robopeak / rplidar_ros

BSD 2-Clause "Simplified" License
453 stars 370 forks source link

Incorrect value of scan_duration #51

Closed aalapshah12297 closed 6 years ago

aalapshah12297 commented 6 years ago

At line no. 250 of src/node.cpp: scan_duration = (end_scan_time - start_scan_time).toSec() * 1e-3; Why is the scan duration being multiplied by 0.001? ROS requires these times to be in seconds only (see the message documentation). As a consequence, the time_increment field generated by the node is also incorrect. If for some reason, this is deliberate, please add a comment to the code mentioning why (since it is not obvious). Otherwise, please fix this issue by changing that line to: scan_duration = (end_scan_time - start_scan_time).toSec(); I believe it could prevent problems foe people who are using this package as-is.

aalapshah12297 commented 6 years ago

Could you update this soon in the ROS package downloaded via apt-get too?

kintzhao commented 6 years ago

we will update it in the next big improve.