I am working on trying to get Ardupilot SITL to work with ROS2 in Gazebo by following the instructions on this page (ROS 2 with Gazebo — Dev documentation). However, I am running in issues of some rosdep packages could not be located. I got the following errors:
ros_gz_image: Cannot locate rosdep definition for [gz-transport12]
ros_gz_bridge: Cannot locate rosdep definition for [gz-transport12]
ardupilot_gz_gazebo: Cannot locate rosdep definition for [gz-sim7]
ros_gz_sim: Cannot locate rosdep definition for [gz-math7]
ardupilot_gazebo: Cannot locate rosdep definition for [gz-sim7]
sdformat_urdf: Cannot locate rosdep definition for [sdformat13]
I assume this contributes to my errors while trying to colcon build the ardupilot_gazebo package. Has anyone run into this error? Or does anyone has a suggestion on a possible solution?
These versions should be good for the build. I suspect the issue is that the officially supported Gazebo version for Ubuntu 22.04 is Fortress, and the rosdep definitions are not configured for Garden. If you add the -r flag (continue on error) to the rosdep command and then carry on with the build. Gazebo Garden can be installed manually with sudo apt install gz-garden.