This repository provides a collection of examples for calling move_base_flex (MBF) actions, ranging from simple Python and C++ nodes to more sophisticated deliberation libraries, see awesome-ros-deliberation. All packages in this repository are compatible with any implementation that inherits from MBF, such as mesh_navigation. Each package includes examples showing how MBF can be integrated into the respective framework across different use cases.
For consistency, all packages include a minimalistic node named navigate_to_pose which:
- waits for a goal pose on the
/goal_posetopic (the default topic to use with RViz), - uses a global planner implementation of MBF to plan a path from the robot's pose to the given goal pose. The planner name must be set via the
plannerparameter and must exist in your MBF config, - uses a controller implementation of MBF to move the robot along the computed path until it reaches the goal. The controller name must be set via the
controllerparameter and must also exist in your MBF config.
This node does not handle any edge cases and therefore does not trigger recovery behaviors. For more robust edge-case handling, refer to the more advanced examples in each package.
Calling MBF actions from plain Python ROS 2 nodes.
ros2 run mbf_simple_client_py navigate_to_pose --ros-args -p planner:="mesh_planner" -p controller:="mesh_controller"Requirements:
- executive_smach, available in official apt repositories. Warning: Unless PR #129 is not merged use this on branch
remove-done-condand compile from source. Otherwise it will not work (tested for ROS 2 humble).
ros2 run mbf_smach navigate_to_pose --ros-args -p planner:="mesh_planner" -p controller:="mesh_controller"Requirements:
- BT.CPP, available in official apt repositories
- BehaviorTree.ROS2, on humble you have to compile this from source
ros2 run mbf_btcpp navigate_to_pose --ros-args -p planner:="mesh_planner" -p controller:="mesh_controller"Requirements:
- Yasmin, available in official apt repositories
ros2 run mbf_yasmin_py navigate_to_pose --ros-args -p planner:="mesh_planner" -p controller:="mesh_controller"Visualization
Run visualization server of Yasmin:
ros2 run yasmin_viewer yasmin_viewer_nodeOpen your web-browser on http://localhost:5000 . For mesh navigation the result should look like this:
Set a goal via RViz 2D Goal Pose tool and you'll see the state machine transitions in your browser.
