Gazebo | Ignition | Community
Ask Your Question
0

ISSUE : Missing packages for ROS2 humble - Gz Garden installation [closed]

asked 2023-06-22 22:35:34 -0500

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Overall objective : Subscribe to gz.msgs.Image, gz.msgs.Imu, gz.msgs.Odometry and gz.msgs.LaserScan Gazebo Garden SIM topics using ROS2 (I will then use the ROS2-ROS1 bridge to have them in ROS1 to run my VIO code)

Issue : Missing actuator_msgs, gps_msgs and rosidl_pycommon dependencies to colcon build ros_gz_bridge

Setup : Ubuntu Focal 20.04.6 LTS

Steps to reproduce : Follow ROS/Gazebo instructions for Gazebo Garden

Error : When compiling ros_gz from source in my colcon workspace in the last step, running rosdep install -r --from-paths src -i -y --rosdistro humblegives the following error message :

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:                                                       
ros_gz_bridge: No definition of [gps_msgs] for OS version [focal]             
ros_gz_sim_demos: No definition of [xacro] for OS version [focal]             
Continuing to install resolvable dependencies...                              
All required rosdeps installed successfully

Subsequently, if I proceed to the next step and run colcon build, I get :

Starting >>> ros_gz_interfaces
Starting >>> ros_gz_sim
[Processing: ros_gz_interfaces, ros_gz_sim]                                                
--- stderr: ros_gz_sim                                                                     
CMake Warning at /usr/share/cmake/gz-cmake3/cmake3/GzFindPackage.cmake:155 (message):
  ign_find_package is deprecated, use gz_find_package instead.
Call Stack (most recent call first):
  CMakeLists.txt:41 (ign_find_package)


---
Finished <<< ros_gz_sim [30.3s]
Finished <<< ros_gz_interfaces [52.6s]                       
Starting >>> ros_gz_bridge
--- stderr: ros_gz_bridge                                
CMake Error at CMakeLists.txt:62 (find_package):
  By not providing "Findactuator_msgs.cmake" in CMAKE_MODULE_PATH this 
  project has asked CMake to find a package configuration file provided by
  "actuator_msgs", but CMake did not find one.

  Could not find a package configuration file provided by "actuator_msgs"
  with any of the following names:

    actuator_msgsConfig.cmake
    actuator_msgs-config.cmake

  Add the installation prefix of "actuator_msgs" to CMAKE_PREFIX_PATH or set
  "actuator_msgs_DIR" to a directory containing one of the above files.  If
  "actuator_msgs" provides a separate development package or SDK, be sure it
  has been installed.


---
Failed   <<< ros_gz_bridge [10.2s, exited with code 1]

Summary: 2 packages finished [1min 3s]
  1 package failed: ros_gz_bridge
  2 packages had stderr output: ros_gz_bridge ros_gz_sim
  3 packages not processed

It says here that

If rosdep fails to install Gazebo libraries and you have not installed them before, please follow Gazebo installation instructions.

But what does that mean? Following those instructions is how I got here in the first place ...

Help would be much appreciated, thank you in advance!

Tanguy

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-06-23 02:30:16 -0500

jrtg gravatar image

actuator_msgs and gps_msgs are ROS packages, not Gazebo. According to the ros index I would assume this one and this one. So you could try to install these first (either binary, or from source. In the latter case do not forget to issue a source install/setup.bash for the workspace folder).

Alternatively:

If you don't need those message types, you can disable them in the source code of ros_gz_bridge. It's only a few small changes:

  • In the CMakeLists.txt: remove them from the set(BRIDGE_MESSAGE_TYPES ...) entry,
  • In package.xml remove the corresponding depend entries,
  • In include/ros_gz_bridge/convert.hpp: remove the coresponding #include entries,
  • In ros_gz_bridge/mappings.py: remove them from the MAPPINGS

E.g.:

  MAPPINGS = {
    'builtin_interfaces': [
         Mapping('Time', 'Time'),
    ],
#    'actuator_msgs': [
#         Mapping('Actuators', 'Actuators'),
#    ],
  'geometry_msgs': [
         Mapping('Point', 'Vector3d'),
         Mapping('Pose', 'Pose'),
         (etc)


And then just recompile.

edit flag offensive delete link more

Comments

Hey! Thank you for your reply ๐Ÿ˜„ I indeed dont need them and therefore commented them out and recompiled, but then I encountered the "rosidl-pycommon" package dependency thats required in the init script for the bridge & for which I cant find the binary. As I dont know how many more dependencies are still missing behind this one too, I was wondering whether the install instructions are complete/up to date, and what they mean by "if you are missing some packages, follow the install instructions"

tanguy gravatar imagetanguy ( 2023-06-23 03:32:52 -0500 )edit

I haven't had a chance to check this, but I think rosidl-pycommon is more recent than Humble. So you might have to check out the 'humble' branch instead of the 'ros2' branch:

git clone https://github.com/gazebosim/ros_gz.git -b humble

jrtg gravatar imagejrtg ( 2023-06-23 11:37:59 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2023-06-22 22:35:34 -0500

Seen: 1,295 times

Last updated: Jul 07 '23