ifm / ifm3d-ros

ifm pmd-based 3D ToF Camera ROS Package
Apache License 2.0
40 stars 40 forks source link

Use capture time as header's timestamp #10

Closed Alabate closed 5 years ago

Alabate commented 5 years ago

We have multiple cameras and we needed a way to know if frames are in sync or not. So we put the frame timestamp in headers of published cloud.

To keep backward compatibility and avoid publishing a very outdated timestamp on systems where the camera time is not up to date, we check if the frame time is less than 60 seconds old. (Hopping that a 60 seconds latency will never be reached). If we cannot use the camera timestamp we use ros::Time::now() and warn once.

I saw you talked about this feature on #6. I don't know if you wanted to integrate it like that. Feel free to tell me the way you wanted it to be done, if this doesn’t suit you.

tpanzarella commented 5 years ago

Thanks for your contribution @Alabate I've merged this into 0.6.1.