sick_scan_xd icon indicating copy to clipboard operation
sick_scan_xd copied to clipboard

Can't visualize point cloud in Rviz2 with Picoscan 100/150

Open bertulli opened this issue 1 year ago • 2 comments
trafficstars

Hi all, I'm trying to test and integrate a PicoScan150 LiDAR into my application. To see if the driver is receiving data correctly, I'd like to visualize in Rviz the laser scan. After successfully building the driver repo on Linux with ROS2 Humble, I ran ros2 launch sick_scan_xd sick_picoscan.launch.py hostname:=192.168.0.1 udp_receiver_ip:=192.168.0.8. I can see the point cloud if I connect to the webserver at 192.168.0.1, and after launching the node I can see with ros2 topic echo /scan_fullframe the data being transmitted. However, I can't figure out how to visualize the scan in Rviz2. I tried changing "Global Options > Fixed frame" to "world", but what should I add then? A LaserScan, PointCloud or PointCloud2 display? On which topic? Thanks

bertulli avatar May 08 '24 13:05 bertulli

Thanks for your feedback. To visualize a point cloud, just start rviz2 (or ros2 run rviz2 rviz2) and add a topic with PointCloud2 messages, e.g. cloud_all_fields_fullframe:

image

The sick_scan_xd driver publishes several point clouds that can be customized in the launchfile. The point cloud on topic cloud_all_fields_fullframe publishes all scan data (fields x, y, z, intensity, range, azimuth, elevation, layer_idx, echo_idx, reflectorbit) of a 360 degree full frame. Use Channel Name to colorize the pointcloud with a field of your choice, e.g. intensity, range, azimuth or elevation angle. ros2 topic list displays a list of all available topics.

Set "Global Options > Fixed frame" to the frame id of the point cloud, which is "world" by default and can be configured in the launchfile. See https://github.com/SICKAG/sick_scan_xd/blob/develop/doc/sick_scan_segment_xd.md#customized-pointclouds for details.

rostest avatar May 08 '24 18:05 rostest

Thank you for your quick answer, now it works! If you like, I can do a quick PR to add these info in the docs

bertulli avatar May 09 '24 08:05 bertulli