预计完成时间:3 分钟
桥接类型: 单向;发布方: GZ;订阅方: ROS2
在 Web Shell 1 中执行
**注意:** ROS 消息类型使用斜杠 /,而 Ignition 消息类型在类型定义中使用点号 .。
ros2 run ros_gz_bridge parameter_bridge /chatter@std_msgs/msg/String[ignition.msgs.StringMsg

对应的新 Gazebo Sim 写法:
ros2 run ros_gz_bridge parameter_bridge /chatter@std_msgs/msg/String[gz.msgs.StringMsg
在 Web Shell 2 中执行
ros2 topic echo /chatter
在 Web Shell 3 中执行
ign topic -t /chatter -m ignition.msgs.StringMsg -p 'data:"Hello"'

对应的新 Gazebo Sim 写法:
gz topic -t /chatter -m gz.msgs.StringMsg -p 'data:"Hello"'
你的结果应与下图类似:

