RoboSense-LiDAR / rslidar_sdk

RoboSense LiDAR SDK for ROS & ROS2
Other
457 stars 219 forks source link

Point cloud dimensions seem not consistent with real world distances #116

Open howaix1 opened 1 year ago

howaix1 commented 1 year ago

The distance of point cloud measured in rviz seems to be half of the corresponding real world distance.

I tested the ros_rslidar, rslidar_sdk and RSView and this bug only occurred in rslidar_sdk.

This occurred both in XYZI and XYZIRT settings.

Teemumokkonen commented 5 months ago

To anybody who is still facing this issue: Some RS-lidars seem to assume a 0.01 meter distance resolution. The driver assumes 0.05m resolution, which causes this issue. In the driver decoder implementation change the following line definition of the resolution: https://github.com/RoboSense-LiDAR/rs_driver/blob/ef1bdd45ee4df51e5acb57b64e49d8fed233039c/src/rs_driver/driver/decoder/decoder_RS16.hpp#L151

Remember to change the decoder version of the lidar that you are using. The link is pointing to the RS16 decoder.

Change the value from 0.005f to 0.01f. This should resolve the issue with the scaling, this change at least for us fixed this real world distance scaling issue.

Hope this helps anybody who is looking into this same issue.