Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/Tutorials/Advanced/Simulators/Gazebo/Gazebo.rst
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ This topic will be available under the topic ``/lidar_scan``:
.. code-block:: console

$ source /opt/ros/{DISTRO}/setup.bash
$ ros2 run ros_gz_bridge parameter_bridge /lidar2@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan --ros-args -r /lidar2:=/laser_scan
$ ros2 run ros_gz_bridge parameter_bridge /lidar2@sensor_msgs/msg/LaserScan@ignition.msgs.LaserScan --ros-args -r /lidar2:=/laser_scan

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change creates a bidirectional bridge, but that is not necessary. The original version should work as is and bridges data from Gazebo -> ROS. Looking at #3761 (comment), I think the best otion is to wrap the whole thing in single quotes

Suggested change
$ ros2 run ros_gz_bridge parameter_bridge /lidar2@sensor_msgs/msg/LaserScan@ignition.msgs.LaserScan --ros-args -r /lidar2:=/laser_scan
$ ros2 run ros_gz_bridge parameter_bridge `/lidar2@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan` --ros-args -r /lidar2:=/laser_scan


To visualize the data from the lidar in ROS 2 you can use Rviz2:

Expand Down