SICKAG / sick_scan_xd

A versatile driver for a wide range of SICK LiDAR and RADAR devices, providing support for both Linux (native, ROS 1, ROS 2) and Windows (native, ROS 2) platforms.
Apache License 2.0
111 stars 85 forks source link

Invalid range_min value in LaserScan message #382

Closed maracuya-robotics closed 2 months ago

maracuya-robotics commented 3 months ago

While using sick_scan_xd with a SICK picoScan150, I noticed that the range_min field of the sensor_msgs/LaserScan message is always set to 0.0. At the same time, invalid range measurements are set to zero. According to the definition of the message invalid measurements should not be included within this range:

float32[] ranges         # range data [m] (Note: values < range_min or > range_max should be discarded)

The documentation says that the picoScan150 has a design limitation of range_min = 0.05, therefore range_min should be set to this value in the message. Alternatively define invalid scans as NaN or +infinity.

rostest commented 3 months ago

Thank you very much for your feedback. We will correct range_min in thesensor_msgs/LaserScan messages in the next release. In the meantime please replace line 846 in driver/src/sick_scansegment_xd/ros_msgpack_publisher.cpp by 0.05f for multiScan and picoScan:

laser_scan_msg.range_min = std::max(0.05f, laser_scan_msg.range_min); // min range of multiScan and picoScan: 0.05 [m]