EAIBOT / ydlidar

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

ydlidar_node.cpp #14

Open koki-ogura opened 5 years ago

koki-ogura commented 5 years ago
        scan_msg.scan_time = scan.config.scan_time/1000000000.0;
        scan_msg.time_increment = scan.config.time_increment/1000000000.0;
r7vme commented 5 years ago

After updating to 1.3.9 also having issues with timestamps. So far fix above did not help.

Transform [sender=unknown_publisher]
For frame [laser_frame]: No transform to fixed frame [map]. TF error: [Lookup would require extrapolation into the future. Requested time 1545577101.607486000 but the latest data is at time 1545576997.884670960, when looking up transform from frame [laser_frame] to frame [map]]
koki-ogura commented 5 years ago

For me the problem with tf has been solved with the above fix. Have you recompiled after correcting the source?

r7vme commented 5 years ago

Yes, i did. But honestly did not have much time to troubleshoot. Will try one more time later.

So far @koki-ogura do not hesitate to create pull request to this repo with your fix.

r7vme commented 5 years ago

@koki-ogura your fix works fine, thanks. So far i think it makes sense to fix inside SDK not in ROS node.

https://github.com/r7vme/ydlidar/commit/840589dbe7705f7c6bda75d0393ea9b7e8d5e7be

jonra1993 commented 4 years ago

Thanks @koki-ogura :) I was trying to implement cartographer for many day and the problem was that scan_time and time_increment were in ns.