-
-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binary Occupancy Grid Implementation #25
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer to the following ndt_map.py.
https://github.com/ShisatoYano/AutonomousVehicleControlBeginnersGuide/blob/main/src/components/mapping/ndt/ndt_map.py
The binary occupancy grid class you added should be implemented by inheriting this grid map base class.
https://github.com/ShisatoYano/AutonomousVehicleControlBeginnersGuide/blob/main/src/components/mapping/grid/grid_map.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the binary occupancy grid map class was implemented, the mapper module class need to be implemented by referring to the following ndt global mapper class.
https://github.com/ShisatoYano/AutonomousVehicleControlBeginnersGuide/blob/main/src/components/mapping/ndt/ndt_global_mapper.py
This global mapper class is given to the vehicle object as a global mapper module and provides the interfaces for mapping.
|
||
# Define RGB colors for each grid value | ||
# Colors in the format [R, G, B], where values are in the range [0, 1] | ||
colors = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This constant value should be defined as a constant member value of the class and be named as COLORS if it is not changed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add a simulation of binary occupancy grid map construction by referring to the following ndt map construction simulation.
https://github.com/ShisatoYano/AutonomousVehicleControlBeginnersGuide/blob/main/src/simulations/mapping/ndt_map_construction/ndt_map_construction.py
And then, please add a unit test code for the simulation by referring to this test code.
https://github.com/ShisatoYano/AutonomousVehicleControlBeginnersGuide/blob/main/test/test_ndt_map_construction.py
PR Description: Binary Occupancy Grid Implementation
Overview
This PR introduces a
BinaryOccupancyGrid
class that provides a grid-based representation of the environment for autonomous vehicle path planning and simulation. The implementation supports obstacle modeling, clearance handling, and visualization, making it a robust foundational tool for tasks like path planning, collision avoidance, and trajectory generation.Key Features
1. Grid-Based Representation
x_lim
,y_lim
) and resolution.2. Obstacle Handling
(x, y)
, dimensions(length, width)
, and rotation (yaw
).3. Clearance Space
4. Visualization
.png
), JSON (.json
), or binary NumPy file (.npy
).5. Obstacle Modeling
yaw
).6. Map Saving
.npy
): For programmatic reloading.Usage Instructions
Input
Map Configuration:
x_lim
andy_lim
to specify map boundaries.Obstacles:
position
,length
,width
, andyaw
.ObstacleList
object.Example
Output