ros2_documentation icon indicating copy to clipboard operation
ros2_documentation copied to clipboard

Fix ros_gz_bridge parameter_bridge command syntax

Open Shivam-Bhardwaj opened this issue 10 months ago • 2 comments

Summary

Fixes the ros_gz_bridge parameter_bridge command in the Gazebo tutorial.

The command was using [ instead of @ as the separator between ROS and Gazebo message types:

- ros2 run ros_gz_bridge parameter_bridge /lidar2@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan
+ ros2 run ros_gz_bridge parameter_bridge /lidar2@sensor_msgs/msg/[email protected]

The incorrect syntax causes a "bad pattern" error.

Fixes #3761

Shivam-Bhardwaj avatar Jan 21 '26 04:01 Shivam-Bhardwaj

@ahcorde: perhaps https://github.com/ros2/ros2_documentation/issues/3761#issuecomment-2720566447 is a better explanation of when/why it doesn't work.

It's a localised issue: when using Zsh as a shell, the bridge configuration string is interpreted as a regex/special character.

Just changing it to @ is not a proper solution though.


Edit: perhaps quoting using single quotes would already fix the issue? I haven't tried.

gavanderhoorn avatar Jan 21 '26 09:01 gavanderhoorn

Per waffle, @azeey can you take a look at this?

kscottz avatar Jan 29 '26 18:01 kscottz

This PR appears stale, and the reviewer feedback suggests preserving the original Gazebo -> ROS bridge syntax while quoting the bridge argument to avoid Zsh glob parsing. I can open a small replacement PR for that approach if that would be helpful.

dlanov avatar Jul 15 '26 20:07 dlanov