ISSUE : Missing packages for ROS2 humble - Gz Garden installation [closed]
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
- Install gazebo garden from binary
- Install ROS2 Humble from source as requested here.
- Install rosdep rules for Gazebo Garden
- Follow the instructions to compile ros_gz from source in a colcon workspace for ROS humble
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 humble
gives 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
Asked by tanguy on 2023-06-22 22:35:34 UTC
Answers
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 theset(BRIDGE_MESSAGE_TYPES ...)
entry, - In
package.xml
remove the correspondingdepend
entries, - In
include/ros_gz_bridge/convert.hpp
: remove the coresponding#include
entries, - In
ros_gz_bridge/mappings.py
: remove them from theMAPPINGS
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.
Asked by jrtg on 2023-06-23 02:30:16 UTC
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"
Asked by tanguy on 2023-06-23 03:32:52 UTC
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
Asked by jrtg on 2023-06-23 11:37:59 UTC
Comments