1
$\begingroup$

I am trying to connect ros and gazebo garden using a bridge. I am working on ubuntu 22.04. I have ros2 humble and gazebo garden installed. I am following the readme of this repo https://github.com/gazebosim/ros_gz/tree/39cdcf88e762589595222d74e41f22b1d876aef1/ros_gz_bridge

I wrote a YAML file as suggested and it looks like this:

 ros_topic_name: "/lidar2"
 gz_topic_name: "/lidar2"
 ros_type_name: "sensor_msgs/msg/LaserScan"
 gz_type_name: "gz.msgs.LaserScan"
 direction: GZ_TO_ROS

then I ran used this line as suggested

ros2 run ros_gz_bridge parameter_bridge --ros-args -p config_file:=$WORKSPACE/ros_gz/ros_gz_bridge/test/config/full.yaml

However, I keep getting this error

[WARN] [1671207408.574261249] [ros_gz_bridge]: Failed to create a bridge for topic [/lidar2] with ROS2 type [/lidar2] to topic [sensor_msgs/msg/LaserScan] with Gazebo Transport type [gz.msgs.LaserScan]

Any idea what's the problem and how to solve it?

$\endgroup$

1 Answer 1

2
$\begingroup$

To use roz_gz with Humble & Garden you will need to build the package from source. https://github.com/gazebosim/ros_gz

The Humble binaries (ros-humble-ros-gz) look for Fortress message types.

$\endgroup$
1
  • $\begingroup$ It worked! Thank you $\endgroup$
    – mh1309
    Dec 20, 2022 at 14:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.