New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Suggestion] use ROS timestamp to publish cloud and imu topic #74
Comments
Hey Samuel, not from the ouster team but have done some experience with lidars in general. What you are doing is manually re-stamping the message of the lidar/imu data at arrival time in the ROS node. With this you will introduce a time-offset between when your measurement was actually taken and when you are publishing it. I assume you are seeing misaligned point clouds in you reference frame during fast movements. The ouster sensor data is hardware timestamped to a reference clock. From the screenshot it seems that you are running the ouster in "TIME_FROM_INTERNAL_OSC" mode. This means that at sensor startup the internal oscillator of the ouster will count up and timestamp your sensor data accordingly and hence the big time stamp difference between your ROS and measurement times. In essence you have not time-synced the ouster to your host pc. To sync your ouster to you system time of the host computer. You need to follow 2 steps for this.
Hope that helped. |
Hi @fabioruetz Thanks for the information, i will try it out, syncing the ouster with my system time. I will get back to you once i try the solution you suggested. Best, |
Hi @HappySamuel, |
Hi @fabioruetz I haven't try it out. Will try it out in these 2 weeks. Then i will let you know my status with the ouster. Best, |
Hi @fabioruetz I did as you said. Turn it into TIME_FROM_PTP_1588, below are the commands i did: Please advise which part i missed? Best, |
Great hint @fabioruetz! We got it working on Ubuntu 16.04 by following these steps:
|
Hi @varandaas The steps you are doing will enable the ouster lidar to use the ROS timestamp??? Best, |
That's correct @HappySamuel! When you run the ptp4l PTP server (with the -m flag) you will see the ouster trying to sync its clock when you turn it on. You can check similar instructions on the ouster manual (from page 38) |
@varandaas Thanks for such a descriptive help! Besides, could you please mention the reason to increase |
Hi @varandaas Thank you for the info. It's very helpful.
Best, |
Hello @varandaas,
Btw I contacted the support of the manufacturer of the IMU and they told me that the IMU doesn't support PTP for synchronization. I don't know if that is important at this case. I hope anyone could help me. Thank you in advantage. |
Hi
It's a suggestion for Ouster, to use ROS timestamp for both functions that do the topics publishing, packet_to_imu_msg() and cloud_to_cloud_msg(). Otherwise, there will be issue popping out for visualizing pointcloud stream on RVIZ.
For example i have tf tree, odom -> base_link -> os1_sensor -> os1_lidar.
Static Transform Publisher
base_link -> os1_sensor
os1_sensor -> os1_lidar
Dynamic Transform Publisher
odom -> base_link
The issue is raised due to lookup would require extrapolation into the past. Requested time 3484.289833850 (sensor own timestamp) but the earliest data is at time 1560843465.275178432 (ROS timestamp), when looking up transform from frame [os1_lidar] to frame [odom]. Attached picture is the issue:
Modification to os1_ros.cpp is as below:
After this modification, there will be no issue like above. Hope Ouster (master branch) can do modification to use ROS timestamp, instead of using sensor own timestamp.
Hope this help ouster_ros become better. Thank you.
Best,
Samuel
The text was updated successfully, but these errors were encountered: