ROS2 - Depth Image to Laserscan Nodelest Feature Request

I noticed there is a laserscan publisher in the zed nodelet of ROS, however there isn’t an equivalent one in ROS2.

Hi @AddyPete
Welcome to the Stereolabs community.

You can use the depth image to laserscan node of ROS 2 to subscribe to depth image topics and convert it to a virtual laser scan.
We will add a composition tutorial to do that in the future.

okay thanks I have a Zed 2i, I did

  1. ros2 launch zed_wrapper


  1. ros2 run depthimage_to_laserscan depthimage_to_laserscan_node --ros-args -r depth:=/zed2i/zed_node/depth/depth_registered -r /depth_camera_info:=/zed2i/zed_node/depth/depth_info

The depthimage to laserscan node runs fine without errors, however I can’t see the laserscan in ros2 topic echo, and rviz2. Is there any parameters I need to adjust? thanks!

I managed to make it work.

/zed2i/zed_node/depth/depth_info is a custom message by Zed, it should be
/depth_camera_info:=/zed2i/zed_node/depth/camera_info which is a camera info ros2 message

ros2 run depthimage_to_laserscan depthimage_to_laserscan_node --ros-args -r /depth:=/zed2i/zed_node/depth/depth_registered -r /depth_camera_info:=/zed2i/zed_node/depth/camera_info -p output_frame:="zed2i_left_camera_optical_frame"

1 Like