How to convert pcap data of Velodyne's VLP-16 to point cloud without using Veloview?

8.6k Views Asked by At

I am new to LiDAR technology. From the Documentation I found that we can visualize LiDAR data using Veloview software. But my aim is to create a 3D image using .pcap file and process it further for object detection. Whole working is in Ubuntu 14.04. Can anyone provide me a good solution?

3

There are 3 best solutions below

0
On

I would suggest looking into using ROS and the point cloud library. There is a lot of support for this kind of processing using those. For pulling in the data form the VLP-16 you could use this ROS package.

0
On

Open 6 terminal tabs (Ctrl + Shift + t):

1st tab:

$ roscore

2nd tab (run your .pcap file):

$ rosrun velodyne_driver velodyne_node _model:=VLP16 _pcap:=/path/to file.pcap

3rd tab: (create .bag file to visualize in Rviz)

$ rosrun rosbag record -O vlp_16.bag /velodyne_packets

4th. tab: (play your .bag file just created from 3rd. tab):

$ rosbag play vlp_16.bag

5th. tab: (to convert velodyne_msgs/VelodyneScan to /Pointcloud2 and /LaserScan topic to visualize in Rviz):

$ roslaunch velodyne_pointcloud VLP16_points.launch

6th. tab: (fixed frame MUST be assigned to "velodyne")

$ rosrun rviz rviz -f velodyne

In Rviz:

To visualize /scan topic:

Displays -> Add -> By topic -> LaserScan

To visualize velodyne_points topic:

Displays -> Add -> By topic -> PointCloud2

Enjoy!

1
On

You may use the Point Cloud Library.

Compiling PCL is a bit tricky, but once you get it going, you can do quite a lot of point cloud analysis.

Follow the instructions here for the LiDAR HDL Grabber. For your purpose, you will want to include the <pcl/io/vlp_grabber.h> along with the <pcl/io/hdl_grabber.h>. The vlp_grabber, basically uses the same hdl_grabber but supplies the vlp calibration parameters. Also in the main, you will want to instantiate a pcl::VLPGrabber instead of a pcl::HDLGrabber.

These few changes alone may not be enough to getting a fully functional grabber and viewer, but it is a start.

The example on PCL is for the hdl_viewer_simple.cpp but there is also a vlp_viewer.cpp also located in visualization/tools/. Check that out.

This is not an answer to fully solve your problem, but provide a path to a solution if you want to use PCL.