Skip to content

Commit

Permalink
Added instructions to use Gazebo sources with rosdep
Browse files Browse the repository at this point in the history
Signed-off-by: Saurabh Kamat <[email protected]>
  • Loading branch information
sauk2 authored and Hwurzburg committed Mar 4, 2025
1 parent a8ee8b4 commit eecc6c0
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions dev/source/docs/ros2-gazebo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Prerequisites

Ensure you have the prerequisites complete and working before beginning this Gazebo tutorial.

#. :ref:`Install ROS 2 <ros2>`
#. :ref:`Install ROS 2 <ros2>`
#. :ref:`Install and Run ROS 2 with ArduPilot SITL <ros2-sitl>`

Install Gazebo
Expand All @@ -35,15 +35,31 @@ It's recommended to set this in your `~/.bashrc` file.
export GZ_VERSION=harmonic
Update ROS dependencies:
Add Gazebo APT sources.

.. code-block:: bash
sudo apt install wget
wget https://packages.osrfoundation.org/gazebo.gpg -O /usr/share/keyrings/pkgs-osrf-archive-keyring.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-stable $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/gazebo-stable.list > /dev/null
sudo apt update
Add Gazebo sources to `rosdep` for the non-default pairing of ROS 2 Humble and Gazebo Harmonic.

.. code-block:: bash
wget https://raw.githubusercontent.com/osrf/osrf-rosdep/master/gz/00-gazebo.list -O /etc/ros/rosdep/sources.list.d/00-gazebo.list
rosdep update
Update ROS and Gazebo dependencies:

.. code-block:: bash
cd ~/ardu_ws
source /opt/ros/humble/setup.bash
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -r
rosdep install --from-paths src --ignore-src -y
Build and Run Tests
===================
Expand All @@ -67,7 +83,7 @@ If you'd like to test your installation, run:
Run the Simulation
==================

Finally, you can source the workspace and launch one of the example Gazebo simulations:
Finally, you can source the workspace and launch one of the example Gazebo simulations:

.. code-block:: bash
Expand Down

0 comments on commit eecc6c0

Please sign in to comment.