See ijnek/gz_control_hw_demo for how to use this package.
ROS 2 version | Gazebo version | Branch |
---|---|---|
Humble | Fortress (default) | humble |
Humble | Garden | humble |
Iron | Fortress (default) | rolling |
Iron | Garden | rolling |
Rolling | Edifice | rolling |
Rolling | Fortress (default) | rolling |
Rolling | Garden | rolling |
Install a Gazebo version that is supported on your platform from the Supported Combinations table above.
If you have selected a Gazebo version that is not the default version for your distro, then set the GZ_VERSION
environment variable to the Gazebo version you'd like to compile against. For example:
export GZ_VERSION=edifice
If you're using a version of Gazebo that isn't the default for your ROS distribution, you must install ros_gz
from source too.
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 # Source ROS distro's setup.bash (replace rolling with your distro) source /opt/ros/rolling/setup.bash # Clone repoitory (**select one** from below, depending on your ROS 2 distro) git clone https://github.com/ijnek/gz_control_hw.git -b humble # Humble git clone https://github.com/ijnek/gz_control_hw.git -b rolling # Rolling
-
Install dependencies (this may also install Ignition):
cd ~/ws rosdep install --from-paths src --ignore-src --default-yes
If
rosdep
fails to install Ignition libraries and you have not installed them before, please follow Ignition installation instructions. -
Build the workspace:
# Build workspace cd ~/ws colcon build
-
Source the workspace:
# In any new terminal you want to use gz_control_hw, first run source ~/ws/src/local_setup.bash