The Voronoi Planner is a global planner plugin for the Nav2 planner server. Its primary feature is the ability to generate global plans that ensure the robot navigates in the middle of a corridor, even while taking turns. This is achieved using Voronoi diagrams.
- Generates paths that maximize clearance from obstacles.
- Ensures smooth navigation through narrow corridors.
- Integrates seamlessly with the Nav2 framework.
- Complete rewrite of dynamicVoronoi.
- Modern CPP implementation
- Better data structure implementation
- Make GVD generation multi-threaded on large maps.
- OpenMP integration maybe for parallelism?
-
Clone the repository into your ROS2 workspace:
mkdir -p ros2_ws/src cd ros2_ws/ git clone https://github.com/DhruvPotdar/voronoi_planner_nav2 src/voronoi_planner_nav2 -
Build the workspace:
colcon build
-
Source the workspace:
source install/setup.bash
To use the Voronoi Planner as the global planner in Nav2, update your nav2_params.yaml file to include the following configuration:
planner_server:
ros__parameters:
expected_planner_frequency: 20.0
planner_plugins: [ "VoronoiPlanner"]
VoronoiPlanner:
plugin: "voronoi_planner/VoronoiPlanner"Ensure that the plugin field for VoronoiPlanner matches the class name defined in the voronoi_planner.xml file.
-
VoronoiPlanner:- Implements the
nav2_core::GlobalPlannerinterface. - Provides methods for configuration, activation, deactivation, and cleanup.
- Computes paths using Voronoi diagrams.
- Implements the
-
DynamicVoronoi:- Computes and updates a distance map and Voronoi diagram.
- Provides methods to initialize maps, add/remove obstacles, and update the Voronoi diagram.
-
BucketPrioQueue:- A priority queue optimized for integer coordinates and squared distances.
- Used internally by the Voronoi algorithm for efficient processing.
This project is licensed under the MIT License.