Skip to content

Commit

Permalink
implemented getter methods for dimension, distance and point array
Browse files Browse the repository at this point in the history
  • Loading branch information
ShisatoYano committed Jan 24, 2025
1 parent 1db6f84 commit 01c6ca5
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 @@ -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()
```

0 comments on commit 01c6ca5

Please sign in to comment.