ros-drivers / velodyne

ROS support for Velodyne 3D LIDARs
http://ros.org/wiki/velodyne
Other
652 stars 651 forks source link

using std::round to calculate the scan array size #459

Closed Hi-Zed closed 2 years ago

Hi-Zed commented 2 years ago

By rounding the array size instead of truncating it, the laser scan topic is compatible with slam_toolbox and can be used to create maps.

JWhitleyWork commented 2 years ago

I'm not familiar enough with this to know: Can you forsee any unintended consequences from this change?

JLBicho commented 2 years ago

Hi @JWhitleyWork, @Hi-Zed

I had the same issue with the slam_toolbox. It is well explained here also: https://github.com/SteveMacenski/slam_toolbox/issues/426

I've been using the branch array-rounding from kmi-robots with no problems and no unintended consequences.

Russ76 commented 1 year ago

Did this fix get left out of the Humble velodyne release? I'm getting the rounding error often with a vlp16. [async_slam_toolbox_node-1] LaserRangeScan contains 897 range readings, expected 898 [async_slam_toolbox_node-1] LaserRangeScan contains 897 range readings, expected 898 [async_slam_toolbox_node-1] LaserRangeScan contains 897 range readings, expected 898