0
$\begingroup$

When point field data is published by the ROS 2 Velodyne LIDAR, it includes a "time" field. I am trying to find out how this field is calculated. Is it:

time = absolute_firing_time - header_stamp.timestamp[0] ?

Also If anyone can share a ros2 bag of velodyne lidar data for my analysis, that would be great too, so I can play it.

$\endgroup$
1

1 Answer 1

1
$\begingroup$

These are the lines that handle publishing the Velodyne point cloud data, from the ROS Velodyne driver:

  // publish message using time of last packet read
  ROS_DEBUG("Publishing a full Velodyne scan.");
  if (config_.timestamp_first_packet){
    scan->header.stamp = scan->packets.front().stamp;
  }
  else{
    scan->header.stamp = scan->packets.back().stamp;
  }
  scan->header.frame_id = config_.frame_id;
  output_.publish(scan);

As described there, it's informed by the packet as sent from the Velodyne. I would expect this to be when the distances are read by the sensor not when the emissions are sent: you aren't expected to be doing the time-of-flight math yourself, you just want to know where things are in your environment.

For Non-velodyne LIDARs, I would expect similar behavior. A very common pattern is to read sensor data into a message, then provide a timestamp, then publish.

$\endgroup$
0

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.