From 01c6ca592b3e3614d61e090af0921721696f964d Mon Sep 17 00:00:00 2001 From: ShisatoYano Date: Fri, 24 Jan 2025 09:50:56 +0000 Subject: [PATCH] implemented getter methods for dimension, distance and point array --- 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 1e44d60..6b3437f 100644 --- a/doc/3_sensor_models/3_2_lidar.md +++ b/doc/3_sensor_models/3_2_lidar.md @@ -197,4 +197,29 @@ class ScanPoint: self.point_array = XYArray(np.array([[x_m], [y_m]])) self.transformed_x = None self.transformed_y = None +``` + +Then, some member methods for accessing or visualizing the data. The getter methods for a dimension of x-y array, distance and x-y array of point are implemented as follow. +```python + def get_dimension(self): + """ + Return point's x-y array data's dimension value + """ + + return self.point_array.get_dimension() + + def get_distance_m(self): + """ + Return point's distance data[m] + """ + + return self.distance_m + + def get_point_array(self): + """ + Return point's x-y array data + Type is ndarray object + """ + + return self.point_array.get_data() ``` \ No newline at end of file