0
$\begingroup$

Rosanswers logo

This is a general question about ROS messages, but for the sake of the question i will use point clouds.

Lets say my lidar obtains a point cloud at time t=0 sec.

Now i do some processing on the point cloud (apply some transforms and filtering) and my code returns the modified point cloud at time t=1 sec (time delay due to processing exaggerated). For my first cloud the header time reads "0 sec" should my new cloud (which has been processed) have the current time of publishing (t=1) or the time of the original cloud (t=0)? It is essentially the same cloud but from another perspective but I do not know if placing old times on new messages affects ros looking into the past. Putting the current time is also a problem because by "1s" the transforms could have changed and any further processing would be offset in time.

If anyone could share their insight it would be much appreciated


Originally posted by Enmar on ROS Answers with karma: 33 on 2019-10-16

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I would keep the timestamp as 0 in your example (i.e. the time the underlying data was first generated). One big reason for this is TF. Ideally you want other applications that might use your pointcloud to get the correct transforms associated with it, which they would resolve using the TF tree, which in turn would pull up an interpolated transform from a TF buffer. As such keeping the original time stamp is the best strategy and will lead to the least amount of pain down the line.


Originally posted by Jari with karma: 112 on 2019-10-16

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by mjcarroll on 2019-10-17:
Yep, typically you want the header time to reflect the time of validity or time of capture for the sensor, which makes integration with other sensors with varying latency possible.

I think if you were interested in instrumenting (say to compute latency) you would want to add an additional timestamp field/message/topic to capture that information.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.