No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro jazzy. Known supported distros are highlighted in the buttons above.
No version for distro rolling. Known supported distros are highlighted in the buttons above.
Repository Summary
Description | Minimal example for using Navigation 2 with Gazebo Sim |
Checkout URI | https://github.com/art-e-fact/navigation2_ignition_gazebo_example.git |
VCS Type | git |
VCS Version | main |
Last Updated | 2025-02-27 |
Dev Status | UNKNOWN |
CI status | No Continuous Integration |
Released | UNRELEASED |
Tags | No category tags. |
Contributing |
Help Wanted (0)
Good First Issues (0) Pull Requests to Review (0) |
Packages
Name | Version |
---|---|
sam_bot_nav2_gz | 1.0.0 |
README
Navigation2 (Ignition) Gazebo Example
Minimal example ROS2 project to use Navigation2 with (Ignition) Gazebo. Based on the official Gazebo Classic example: tutorial, code
Requirements
- ROS 2 Humble
- Gazebo Fortress
- Navigation 2
Setup and build
# Install Nav2 dependencies
sudo apt install ros-humble-navigation2 ros-humble-nav2-bringup
# Import source dependencies
pip3 install vcstool
vcs import --input deps.repos src
# Install rosrep dependencies
rosdep install -y -r -i --from-paths .
# Make sure ROS2 is sourced (assuming bash, please replace extension as needed)
source /opt/ros/humble/setup.bash
# Build
colcon build
# Make sure the app is sourced (assuming bash, please replace extension as needed)
source install/setup.bash
Run examples
# Launch Gazebo, RViz, and Navigation2
ros2 launch sam_bot_nav2_gz complete_navigation.launch.py
# Set goal poses in RViz or run a navigation example:
ros2 run sam_bot_nav2_gz follow_waypoints.py
ros2 run sam_bot_nav2_gz reach_goal.py
Run tests with launch_testing
You will need to pip install the artefacts-toolkit
package to run the tests.
# Start one of the tests with
# if using a virtualenv you may need to add the path to the python packages to make it available in the ROS2 environment:
# export PYTHONPATH=$PYTHONPATH:$HOME/.pyenv/versions/[venv-name]/lib/python3.10/site-packages
launch_test src/sam_bot_nav2_gz/test/test_bringup.launch.py
launch_test src/sam_bot_nav2_gz/test/test_reach_goal.launch.py
launch_test src/sam_bot_nav2_gz/test/test_follow_waypoints.launch.py
Run tests with Artefacts CI
- Set up a new Artefacts CI project. Instructions: https://docs.artefacts.com/latest/
- Replace the project name in the
artefacts.yaml
with the name of your project
You will need to pip install the artefacts-toolkit
and artefacts-cli
packages to run the tests.
# Run test locally
artefacts run all
# Run test remotely
artefacts run-remote all --description "Test Navigation2"
# Run test locally with Docker
docker build -t nav2-gz .
# ARTEFACTS_KEY can be generated at the project-settings page of the Artefacts CI dashboard
docker run --rm -e ARTEFACTS_JOB_NAME=all -e ARTEFACTS_KEY=${ARTEFACTS_KEY} nav2-gz
Visualize navigation with Rerun.io (experimental)
For more info, see: https://www.rerun.io/docs/howto/ros2-nav-turtlebot
cd rerun
# create a virtual env and install dependencies
python3 -m venv rr-venv
source rr-venv/bin/activate
pip install -r requirements
# Run rerun node
python run-rerun.py
CONTRIBUTING
No CONTRIBUTING.md found.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro ardent. Known supported distros are highlighted in the buttons above.
No version for distro bouncy. Known supported distros are highlighted in the buttons above.
No version for distro crystal. Known supported distros are highlighted in the buttons above.
No version for distro eloquent. Known supported distros are highlighted in the buttons above.
No version for distro dashing. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro foxy. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.
No version for distro lunar. Known supported distros are highlighted in the buttons above.
No version for distro jade. Known supported distros are highlighted in the buttons above.
No version for distro indigo. Known supported distros are highlighted in the buttons above.
No version for distro hydro. Known supported distros are highlighted in the buttons above.
No version for distro kinetic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.