Navigation, mapping, localization, and path planning for BORIS robot in RoboCup@Home competitions
Overview • Architecture • Installation • Usage • Development
fbot_navigation provides ROS2-based navigation, mapping, localization, and path planning for the BORIS robot. It integrates SLAM, Nav2, and robot localization for autonomous navigation in RoboCup@Home and similar robotics competitions.
fbot_navigation/
├── launch/ # ROS2 launch files for navigation, mapping, localization, controllers
├── maps/ # Map files (.pgm, .yaml) for navigation and SLAM
├── param/ # Parameter files for EKF, Nav2, SLAM Toolbox
├── rviz/ # RViz configuration files for mapping and navigation
├── CMakeLists.txt # Build configuration
├── package.xml # ROS2 package manifest
- ROS2 Humble
- Python 3.10+
- Ubuntu 22.04
- Dependencies listed in
package.xml
-
Clone the repository into your ROS workspace:
cd ~/fbot_ws/src git clone https://github.com/fbotathome/fbot_navigation.git
-
Install dependencies:
cd ~/fbot_ws sudo rosdep init # Skip if already initialized rosdep update rosdep install --from-paths src --ignore-src -r -y # No requirements.txt for this package
-
Build the workspace:
cd ~/fbot_ws colcon build --packages-select fbot_navigation source install/setup.bash
# Launch full navigation stack
ros2 launch fbot_navigation navigation.launch.py
# Launch mapping
ros2 launch fbot_navigation mapping.launch.py
# Launch slam
ros2 launch fbot_navigation slam.launch.py
# Launch robot localization
ros2 launch fbot_navigation robot_localization.launch.py
# Launch navigation with keepout zones
ros2 launch fbot_navigation navigation_keepout.launch.py
# Launch controllers
ros2 launch fbot_navigation start_controllers.launch.py# Open RViz for navigation
ros2 run rviz2 rviz2 -d $(ros2 pkg prefix fbot_navigation)/share/fbot_navigation/rviz/navigation.rviz
# Open RViz for mapping
ros2 run rviz2 rviz2 -d $(ros2 pkg prefix fbot_navigation)/share/fbot_navigation/rviz/mapping.rviz# Launch SLAM
ros2 launch fbot_navigation mapping.launch.py
# Open RViz for mapping
ros2 run rviz2 rviz2 -d $(ros2 pkg prefix fbot_navigation)/share/fbot_navigation/rviz/mapping.rviz
# Move the robot around (running teleop of just pushing the robot)
# When the map is ready just save it
ros2 run nav2_map_server map_saver_cli -f my_map
# Do not forget to alter the name of the map on the launch file with the name you chose when saving the newly created map.
# Obs.: If the map seems quirky don't worry, sometimes moving it around a little more corrects the drift. If it doesn't help just start over again :)
- Get the map of the environment
- Open gimp, or other image editor
- Draw a black square or line over the areas where the robot should not go through
- Save a copy of the map with a different name
- Open the file
bash nav2_params_keepout.yaml - Edit the filter_mask_server param to match the name of the newly created map with keepout zones
- Run the launch as stated previously
- Is the robot on? (base and arm, whatever is needed)
- Is the LiDAR sending data?
- Is the emergency button not pressed?
- Are all the USB devices recognized?
- Are all the udev rules for USB devices set?
- After all if nothing works try restarting.
- When mapping remember to change the launch file to match the name of the generated map
- For the robot to appear in the map when running nav an initial pose has to be estimated
- To change robot's velocity you can alter the following params:
nav2_params.yaml: min_vel_x: 0.0 min_vel_y: 0.0 max_vel_x: 1.0 max_vel_y: 0.0 max_vel_theta: 1.0
- Error: Either left or right wheel...index[0] Fix: Check if the base is on and if the base and emergency buttons wires are connected and working.
- Error: Robot not appearing after pose estimation
Fix: Check the section "What to check before running", however, before restarting try running
sudo udevadm control --reload-rules && sudo service udev restart && sudo udevadm trigger
- Create a feature branch (
git checkout -b feat/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feat/amazing-feature) - Open a Pull Request
- Basic Navigation
- Navigation Concepts
- Setting up Odometry
- Smoothing Odometry
- Mapping and Localization Basics
- Setting Up Robot Footprint
- Setting Up Navigation Plugins
- Nav2 Configuration Guide
- Nav2 Tuning Guide
- List of Navigation Plugins
- Tutorial: Navigation with SLAM
- Tutorial: Dynamic Point Following
- Tutorial: Navigation with KeepOut Zones
- Tutorial: Navigation with Speed Limits
- Tutorial: Navigation with Rotation Shim Controller
- Tutorial: Navigation with Obstacle Noise Filtering
- Tutorial: Adding Vector Objects to Navigation
- Tutorial: Creating New Planner
- Tutorial: Creating New Controller
- Tutorial: Creating New Navigator
- Tutorial: Creating New Costmap2D