SICKAG / sick_scan_xd

Based on the sick_scan drivers for ROS1, sick_scan_xd merges sick_scan, sick_scan2 and sick_scan_base repositories. The driver supports both Linux (native, ROS1, ROS2) and Windows (native and ROS2).
Apache License 2.0
99 stars 84 forks source link

Invalid range_min value in LaserScan message #382

Open maracuya-robotics opened 3 weeks ago

maracuya-robotics commented 3 weeks 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 weeks 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]