EAIBOT / ydlidar

The driver of ydlidar for ROS on the linux !
101 stars 61 forks source link

Convert scan_time and time_increment from nanoseconds to seconds for ROS msgs #32

Open rhaschke opened 1 year ago

rhaschke commented 1 year ago

Fixes #31. ROS msgs expect time_increment and scan_time in seconds (see msg documentation). However, internally scan_time is computed from stamp measures in nanoseconds: https://github.com/EAIBOT/ydlidar/blob/ceca2ce394a3851b17d9b55c71e4169d898b384d/sdk/src/CYdLidar.cpp#L136 https://github.com/EAIBOT/ydlidar/blob/ceca2ce394a3851b17d9b55c71e4169d898b384d/sdk/src/CYdLidar.cpp#L83-L84 https://github.com/EAIBOT/ydlidar/blob/ceca2ce394a3851b17d9b55c71e4169d898b384d/sdk/src/ydlidar_driver.cpp#L689 https://github.com/EAIBOT/ydlidar/blob/ceca2ce394a3851b17d9b55c71e4169d898b384d/sdk/src/ydlidar_driver.cpp#L683