This repository contains the plugins used by nav_infrastructure.
The planner_server node within nav_infrastructure dynamically loads a planner plugin at runtime, making it easy to swap between different path planning algorithms. Here's how to create a path planner plugin:
- Run the creation script
The base name should be in lower_snake_case and include only the planner name. For example, if you want to create my_test_planner, run:
chmod u+x create_plugin.sh ./create_plugin planner <base_name>
./create_plugin.sh planner my_test - Go into
<name>_planner.cpp, Usingstraight_line_planner.cpporbfs_planner.cppas reference, implement thefind_path()function - When your plugin is finished, you'll need to test it using the
planner_serverwithin thenav_infrastructurerepository- If you haven't already cloned the
nav_infrastructurerepository, do so now: https://github.com/umigv/nav_infrastructure
- If you haven't already cloned the
- Open
nav_infrastructure/infra_launch/config/infra_params.yamland enter your plugin name into theplanner_pluginparameter:planner_plugin: "planner_plugins::<PluginName>"
- Now build both the
planner_serverandplanner_pluginspackages - To test your plugin, run the
planner_serverand call thenavigate_to_goalaction (thenav_infrastructurerepository contains instructions for this)- You should have some sort of unique print statement in your plugin's
find_pathfunction to verify that it runs correctly when the action is called - If the
planner_servernode starts correctly, the action succeeds, and you see your print statement, your plugin should be working correctly
- You should have some sort of unique print statement in your plugin's