ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I found a solution to extracting the acquisition time from a PCAP file acquired by a Velodyne VLP-16 LIDAR in an older question by changing the packet stamp time in the input.cc file within the velodyne_driver package. The follow steps were borrowed from the older question, but I will place here as well.

To accomplish this, git clone velodyne package into the catkin_workspace/src

/home/user/catkin_ws/src

and navigated to

/home/user/catkin_ws/src/velodyne/velodyne_driver/src/lib

and changed the following line in the input.cc file (line 320 on mine)

from: pkt->stamp = ros::Time::now(); to: pkt->stamp = ros::Time(header->ts.tv_sec, header->ts.tv_usec * 1000);

Then run catkin_make in /home/user/catkin_ws (and, don't forget to source the /home/user/catkin_ws/devel/setup.bash) and I printed the timestamps for each packet, which matched the acquired time.

I found a solution to extracting the acquisition time from a PCAP file acquired by a Velodyne VLP-16 LIDAR in an older question by changing the packet stamp time in the input.cc file within the velodyne_driver package. The follow steps were borrowed from the older question, but I will place here as well.

To accomplish this, git clone velodyne package into the catkin_workspace/src

/home/user/catkin_ws/src

and navigated to

/home/user/catkin_ws/src/velodyne/velodyne_driver/src/lib

and changed the following line in the input.cc file (line 320 on mine)

  • fromFROM: pkt->stamp = ros::Time::now(); ros::Time::now();
  • toTO: pkt->stamp = ros::Time(header->ts.tv_sec, header->ts.tv_usec * 1000);

Then run catkin_make in /home/user/catkin_ws (and, don't forget to source the /home/user/catkin_ws/devel/setup.bash) and I printed the timestamps for each packet, which matched the acquired time.

Thanks.