Ask Your Question
0

Extract frame time from historic Velodyne PCAP

asked 2019-08-27 14:17:26 -0500

shaky gravatar image

Hello,

Is there a method to extract the collected POSIX time from each frame in a PCAP file (collected on VLP-16) and not the current wall time? Using rospy to examine the nodes' headers provides the current wall time in POSIX and not the time which the frame was recorded.

Thank you

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-08-30 12:36:35 -0500

shaky gravatar image

updated 2019-08-30 12:38:09 -0500

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.

Thanks.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-08-27 14:17:26 -0500

Seen: 24 times

Last updated: Aug 30