Skip to content

Commit

Permalink
function to draw point cloud and sensor position is implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Feb 17, 2025
1 parent 86cb008 commit f87009c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions doc/3_sensor_models/3_2_lidar.md
Original file line number Diff line number Diff line change
Expand Up @@ -462,4 +462,20 @@ A function to update the point cloud data including the above functions is imple
angle_list.append(angle_rad)

self._ray_casting_filter(distance_list, angle_list, state)
```

Additionally, a function to draw the generated point cloud in the simulation is implemented. Then, the global position of the LiDAR on the vehicle is also drawn simultaneously.
```python
def draw(self, axes, elems, state):
"""
Function to draw sensed point cloud data
axes: Axes object of figure
elems: List of plot objects
state: Vehicle's state object
"""

self.params.draw_pos(axes, elems, state)

for point in self.latest_point_cloud:
point.draw(axes, elems)
```

0 comments on commit f87009c

Please sign in to comment.