From 03d2d01822ea5644b3e668e1b8f65b5762dc5d0c Mon Sep 17 00:00:00 2001 From: ShisatoYano Date: Mon, 17 Feb 2025 15:07:08 +0000 Subject: [PATCH] getters of point cloud and global coordinate of lidar are implemented --- doc/3_sensor_models/3_2_lidar.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/doc/3_sensor_models/3_2_lidar.md b/doc/3_sensor_models/3_2_lidar.md index 58a3838..c74843a 100644 --- a/doc/3_sensor_models/3_2_lidar.md +++ b/doc/3_sensor_models/3_2_lidar.md @@ -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() ``` \ No newline at end of file