I’m attempting to follow the ROS2 with Gazebo installation instructions but am running into an error while updating ROS dependencies.
My issue is similar to this thread where i do not see a resolution.
When running rosdep install --from-paths src --ignore-src -r
I get the following:
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
ardupilot_gazebo: Cannot locate rosdep definition for [gz-sim8]
sdformat_urdf: Cannot locate rosdep definition for [sdformat14]
ros_gz_bridge: Cannot locate rosdep definition for [gz-transport13]
ros_gz_image: Cannot locate rosdep definition for [gz-transport13]
ros_gz_sim: Cannot locate rosdep definition for [gz-transport13]
ardupilot_gz_gazebo: Cannot locate rosdep definition for [gz-sim8]
Full output:
jamison@jamison:~/ardu_ws$ source /opt/ros/humble/setup.bash
sudo apt update
rosdep update
rosdep install --from-paths src --ignore-src -y
[sudo] password for jamison:
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [129 kB]
Hit:2 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [128 kB]
Hit:4 http://packages.ros.org/ros2/ubuntu jammy InRelease
Hit:5 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Hit:6 https://packages.microsoft.com/repos/code stable InRelease
Hit:7 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:8 http://packages.osrfoundation.org/gazebo/ubuntu-stable jammy InRelease
Get:9 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [2,072 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu jammy-updates/main i386 Packages [705 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe i386 Packages [736 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1,132 kB]
Get:13 http://us.archive.ubuntu.com/ubuntu jammy-updates/universe Translation-en [264 kB]
Fetched 5,166 kB in 1s (5,251 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
3 packages can be upgraded. Run 'apt list --upgradable' to see them.
reading in sources list data from /etc/ros/rosdep/sources.list.d
Hit file:///usr/share/python3-rosdep2/debian.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml
Hit https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
Skip end-of-life distro "ardent"
Skip end-of-life distro "bouncy"
Skip end-of-life distro "crystal"
Skip end-of-life distro "dashing"
Skip end-of-life distro "eloquent"
Skip end-of-life distro "foxy"
Skip end-of-life distro "galactic"
Skip end-of-life distro "groovy"
Add distro "humble"
Skip end-of-life distro "hydro"
Skip end-of-life distro "indigo"
Add distro "iron"
Skip end-of-life distro "jade"
Add distro "jazzy"
Skip end-of-life distro "kinetic"
Skip end-of-life distro "lunar"
Skip end-of-life distro "melodic"
Add distro "noetic"
Add distro "rolling"
updated cache in /home/jamison/.ros/rosdep/sources.cache
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
ardupilot_gazebo: Cannot locate rosdep definition for [gz-sim8]
sdformat_urdf: Cannot locate rosdep definition for [sdformat14]
ros_gz_bridge: Cannot locate rosdep definition for [gz-transport13]
ros_gz_image: Cannot locate rosdep definition for [gz-transport13]
ros_gz_sim: Cannot locate rosdep definition for [gz-transport13]
ardupilot_gz_gazebo: Cannot locate rosdep definition for [gz-sim8]
Subsequently, this impacts the colcon build:
jamison@jamison:~/ardu_ws$ colcon build
Starting >>> ros_gz_interfaces
Starting >>> ros_gz_sim
Starting >>> sdformat_test_files
Starting >>> ardupilot_msgs
Starting >>> micro_ros_agent
Starting >>> ardupilot_gazebo
Starting >>> ardupilot_gz_description
Starting >>> ardupilot_gz_gazebo
Starting >>> ardupilot_gz_application
Finished <<< sdformat_test_files [0.38s]
Starting >>> sdformat_urdf
Finished <<< ardupilot_gz_application [0.75s]
Finished <<< ardupilot_gz_description [0.76s]
--- stderr: ardupilot_gazebo
Building ardupilot_gazebo as an `ament_cmake` project.
CMake Error at /usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:603 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.22/Modules/FindPkgConfig.cmake:825 (_pkg_check_modules_internal)
CMakeLists.txt:58 (pkg_check_modules)
---
Failed <<< ardupilot_gazebo [1.46s, exited with code 1]
Aborted <<< ardupilot_msgs [1.47s]
Aborted <<< sdformat_urdf [1.11s]
Aborted <<< ardupilot_gz_gazebo [1.50s]
Aborted <<< ros_gz_interfaces [1.58s]
Aborted <<< ros_gz_sim [1.76s]
Aborted <<< micro_ros_agent [3.81s]
Summary: 3 packages finished [4.14s]
1 package failed: ardupilot_gazebo
6 packages aborted: ardupilot_gz_gazebo ardupilot_msgs micro_ros_agent ros_gz_interfaces ros_gz_sim sdformat_urdf
4 packages had stderr output: ardupilot_gazebo ardupilot_gz_gazebo micro_ros_agent sdformat_urdf
15 packages not processed
I believe I have successfully followed the prerequisite steps from the docs:
- Build ardupilot on linux
- Install ROS 2
- ROS 2 with SITL
I’m running:
- Ubuntu 22.04 6.8.0-45-generic
- Latest Ardupilot
- ROS2 Humble
- Gazebo Harmonic
Any assistance would be greatly appreciated. I’m happy to provide additional information to help problem solve.