How to capture same time velodyne VLP-16 lidar and camera image?

asked 2019-09-04 21:26:51 -0500

victor_12 gravatar image

updated 2019-09-07 00:47:09 -0500

I want to capture velodyne VLP-16 lidar and camera image same time. And I want record Lidar data and camera image data record sequence. Can ros_bag package record topic same time? How to this work? if you know tell me please.

I use LOAM SLAM. I want to synchronize the capture of a camera image and lidar scan data and laser odometry and laser path data. I already calibration lidar and camera. final data format is colorized cloud point map.

edit retag flag offensive close merge delete

Comments

can you add more details to your question like what do you want to achieve, as my answer will greatly depend on what you are trying to do.

Choco93 gravatar imageChoco93 ( 2019-09-05 02:38:23 -0500 )edit

If you just want record both topics from a velodyne lidar and a camera at the same time, you will need to start both sensors ROS nodes and using rosbag record -a to record all topics. However if you want to synchronise the capture of a camera image and a lidar scan that is a lot more involved. Can you let us know exactly what you're trying to do.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-09-05 03:12:19 -0500 )edit

I use LOAM SLAM. I want to synchronize the capture of a camera image and lidar scan data and laser odometry and laser path data. I already calibration lidar and camera. final data format is colorized cloud point map.

victor_12 gravatar imagevictor_12 ( 2019-09-05 21:45:24 -0500 )edit

You can use ROS to collect pairs of LIDAR scan and image messages which are temporally close to each other. You can do this using the message_filters package.

But this will not be perfect. Your camera image is probably captured in instant while the lidar pointcloud comes from a scanning sensor, those points are collected at slightly different times. This means there will always be some time offset.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-09-09 08:52:11 -0500 )edit

As mentioned you can use approximate time policies to filter messages once you ave recorded a rosbag but there will always be time offset due to different frequencies and capture times etc.

If you want them to be captured at exactly same time then you can look into time synchronization method like PTP, which needs to be supported by hardware you are using. But i am not really sure if lidar and camera can be synchronized to each other using it as I haven't looked into it much.

Choco93 gravatar imageChoco93 ( 2019-09-09 13:50:02 -0500 )edit

Can't I capture this information slowly? If not, can you capture it manually? If I capture manually like push space button. Can I same time capture topics( lidar and camera image and LOAM's lidar sensor location)? Is there a package with this functionality?

victor_12 gravatar imagevictor_12 ( 2019-09-09 21:10:33 -0500 )edit

Capturing frames is what your hardware is doing for you, ROS drivers fir your hardware convert it into ROS compatible messages. You need time synchronization between 2 sensors if you need them to capture at exact time.

If you don't want to deal with synchronization at hardware level then your best bet is to use message filters in ROS.

Choco93 gravatar imageChoco93 ( 2019-09-10 02:14:07 -0500 )edit