ROS 2 version | Gazebo version | Branch | Binaries hosted at |
---|---|---|---|
Foxy | Citadel | foxy | https://packages.ros.org |
Foxy | Edifice | foxy | only from source |
Galactic | Edifice | galactic | https://packages.ros.org |
Galactic | Fortress | galactic | only from source |
Humble | Fortress | humble | https://packages.ros.org |
Humble | Garden | humble | gazebo packages1 |
Humble | Harmonic | humble | only from source |
Iron | Fortress | humble | https://packages.ros.org |
Iron | Garden | humble | only from source |
Iron | Harmonic | humble | only from source |
Rolling | Edifice | ros2 | only from source |
Rolling | Fortress | ros2 | https://packages.ros.org |
Rolling | Garden | ros2 | only from source |
Rolling | Harmonic | ros2 | only from source |
For information on ROS 2 and Gazebo compatibility, refer to the melodic branch README
Please ticket an issue if you'd like support to be added for some combination.
Details about the renaming process from ign
to gz
.
Note: The ros_ign
prefixed packages are shim packages that redirect to their ros_gz
counterpart.
Under most circumstances you want to be using the ros_gz
counterpart.
This repository holds packages that provide integration between ROS and Gazebo:
- ros_gz: Metapackage which provides all the other packages.
- ros_gz_image: Unidirectional transport bridge for images from Gazebo Transport to ROS using image_transport.
- ros_gz_bridge: Bidirectional transport bridge between Gazebo Transport and ROS.
- ros_gz_sim: Convenient launch files and executables for using Gazebo Sim with ROS.
- ros_gz_sim_demos: Demos using the ROS-Gazebo integration.
- ros_gz_point_cloud: Plugins for publishing point clouds to ROS from Gazebo Sim simulations.
This branch supports ROS Iron. See above for other ROS versions.
Iron binaries are available for Fortress. They are hosted at https://packages.ros.org.
-
sudo sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org/ros2/ubuntu $(lsb_release -cs) main" > /etc/apt/sources.list.d/ros2-latest.list' curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add - sudo apt-get update
-
Install
ros_gz
sudo apt install ros-iron-ros-gz
Be sure you've installed ROS Iron (at least ROS-Base). More ROS dependencies will be installed below.
Install either Edifice, Fortress, or Garden.
Set the GZ_VERSION
environment variable to the Gazebo version you'd
like to compile against. For example:
export GZ_VERSION=edifice # IMPORTANT: Replace with correct version
You only need to set this variable when compiling, not when running.
The following steps are for Linux and OSX.
-
Create a colcon workspace:
# Setup the workspace mkdir -p ~/ws/src cd ~/ws/src # Download needed software git clone https://github.com/gazebosim/ros_gz.git -b humble
-
Install dependencies (this may also install Gazebo):
cd ~/ws rosdep install -r --from-paths src -i -y --rosdistro humble
If
rosdep
fails to install Gazebo libraries and you have not installed them before, please follow Gazebo installation instructions. -
Build the workspace:
# Source ROS distro's setup.bash source /opt/ros/<distro>/setup.bash # Build and install into workspace cd ~/ws colcon build
A template project integrating ROS and Gazebo simulator
Footnotes
-
Binaries for these pairings are provided from a the packages.osrfoundation.org repository. Refer to https://gazebosim.org/docs/latest/ros_installation for installation instructions. ↩