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

对应的新 Gazebo Sim 写法:
gz topic -e -t /chatter
在 Web Shell 3 中执行
ros2 topic pub /chatter std_msgs/msg/String 'data: "Hello"' --once
你的结果应与下图类似:

