Skip to content

Commit

Permalink
sensors object is given as argument
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Feb 19, 2025
1 parent bd9dfb3 commit 3f62f12
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions doc/3_sensor_models/3_3_sensors.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,22 @@ The following three functions to get data of LiDAR are implemented. First one is

if self.lidar: return self.lidar.get_global_y_m()
else: return 0.0
```

### 3.3.5 Vehicle class
For installing the object of sensors class on the vehicle model, [Four wheels vehicle class](/src/components/vehicle/four_wheels_vehicle.py) need to be modified. Firstly, an argument, sensors is added to the constructor. This argument is None as default. When it is None, any processes are not executed.
```python
class FourWheelsVehicle:
"""
Four Wheels Vehicle model class
"""

def __init__(self, state, spec, sensors=None, show_zoom=True):
"""
Constructor
state: Vehicle's state object
spec: Vehicle's specification object
sensors: Sencors object
show_zoom: Flag for zoom around vehicle
"""
```

0 comments on commit 3f62f12

Please sign in to comment.