Skip to content

Commit

Permalink
getters of point cloud and global coordinate of lidar are implemented
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Feb 17, 2025
1 parent f87009c commit 03d2d01
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions doc/3_sensor_models/3_2_lidar.md
Original file line number Diff line number Diff line change
Expand Up @@ -478,4 +478,29 @@ Additionally, a function to draw the generated point cloud in the simulation is

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

Finally, some getters for an external class are implemented as follow. The array of point cloud, global x-y coordinates of the LiDAR can be got.
```python
def get_point_cloud(self):
"""
Function to get latest point cloud data
Each points are calculated on sensor coordinate system
"""

return self.latest_point_cloud

def get_global_x_m(self):
"""
Function to get installation position x in global coordinate[m]
"""

return self.params.get_global_x_m()

def get_global_y_m(self):
"""
Function to get installation position y in global coordinate[m]
"""

return self.params.get_global_y_m()
```

0 comments on commit 03d2d01

Please sign in to comment.