Convert .pcap to .pcd[Velodyne HDL32E]

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Convert .pcap to .pcd[Velodyne HDL32E]

Phil
Hello, I know this must be pretty basic stuff for you but I went through all docs and tutorials with no success.

I'm working on offline data from a Velodyne HDL32E and I need to convert those .pcap files in .pcd files in order to elaborate them with PCL. But I just don't know how to do it. I read the hdl_viewer_simple.cpp and the grabber documentation. But I just can't find out how to obtain the point cloud data from the pcap file I have,
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert .pcap to .pcd[Velodyne HDL32E]

Phil
I tried using ros commands:

roslaunch velodyne_pointcloud 32e_points.launch pcap:=(paht of your file)

rosrun pcl_ros pointcloud_to_pcd input:=/velodyne_points _prefix:=(path to save it)

But the first command gets stuck and doesn't produce any output(I left it to execute for several hours to be sure).
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert .pcap to .pcd[Velodyne HDL32E]

VictorLamoine
Administrator
roslaunch velodyne_pointcloud 32e_points.launch pcap:=(paht of your file)

will produce ensor_msgs/PointCloud2


open new terminal
rosrun pcl_ros pointcloud_to_pcd input:=/velodyne_points _prefix:=(path to save it)
             
will output the .pcap as pcd
Launch the first command, open a new terminal and launch the second one, does it work ?
Bye!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert .pcap to .pcd[Velodyne HDL32E]

Phil
It works! Thank you so much!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert .pcap to .pcd[Velodyne HDL32E]

boyihu
In reply to this post by VictorLamoine
Hello! I have the exact same problem here (want to convert .pcap to .pcd):

After I type the first line of commend,

 roslaunch velodyne_pointcloud 32e_points.launch pcap:=(paht of your file)

The kernel just said

 [32e_points.launch] is neither a launch file in package [velodyne_pointcloud] nor is [velodyne_pointcloud] a launch file name
The traceback for the exception was written to the log file

I wonder which part I did not do correct? Also, I would appreciate anyone can tell me if there are some documents about how to convert a .pcap file into .pcd online?

Another question: I could not make the The Velodyne High Definition LiDAR (HDL) Grabber demo work either, basically I followed all the instruction, generated a empty .cpp file and named it as openni_grabber.cpp (based on the tutorial page, in the CMakeLists.txt it shows the .cpp file should be named this way), and generated a CMakeLists.txt file. Somehow when I tried to typed in cmake .. command, it showed

/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:18:29: error: expected ‘)’ before ‘&’ token
     SimpleHDLViewer (Grabber& grabber,
                             ^
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp: In function ‘int main(int, char**)’:
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:98:3: error: ‘SimpleHDLViewer’ is not a template
   SimpleHDLViewer<PointXYZI> v (grabber, color_handler);
   ^
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:98:19: error: ‘PointXYZI’ was not declared in this scope
   SimpleHDLViewer<PointXYZI> v (grabber, color_handler);
                   ^
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:98:19: note: suggested alternative:
In file included from /usr/local/include/pcl-1.8/pcl/point_types.h:344:0,
                 from /home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:2:
/usr/local/include/pcl-1.8/pcl/impl/point_types.hpp:450:10: note:   ‘pcl::PointXYZI’
   struct PointXYZI : public _PointXYZI
          ^
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:98:55: error: no matching function for call to ‘SimpleHDLViewer::SimpleHDLViewer(pcl::HDLGrabber&, pcl::visualization::PointCloudColorHandlerGenericField<pcl::PointXYZI>&)’
   SimpleHDLViewer<PointXYZI> v (grabber, color_handler);
                                                       ^
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:98:55: note: candidates are:
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:12:7: note: SimpleHDLViewer::SimpleHDLViewer()
 class SimpleHDLViewer
       ^
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:12:7: note:   candidate expects 0 arguments, 2 provided
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:12:7: note: SimpleHDLViewer::SimpleHDLViewer(SimpleHDLViewer&)
/home/tethys/Documents/PCL_Test/3DLIDAR/openni_grabber.cpp:12:7: note:   candidate expects 1 argument, 2 provided
make[2]: *** [CMakeFiles/openni_grabber.dir/openni_grabber.cpp.o] Error 1
make[1]: *** [CMakeFiles/openni_grabber.dir/all] Error 2
make: *** [all] Error 2
tethys@tethys:~/Documents/PCL_Test/3DLIDAR/build$

Is there anyone can help me out? Thanks in advance!!!
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Convert .pcap to .pcd[Velodyne HDL32E]

shaikh951
In reply to this post by VictorLamoine
I am working on VLP-16 and i did as instructed in your post but I am getting following error.

user@BLRMIESPC-756:~$ rosrun velodyne_driver velodyne_node _mol:=VLP16 _pcap:=/home/user/Highway.pcap _read_once:=true
[ INFO] [1502255123.403963400]: Velodyne HDL-64E rotating at 600 RPM
[ INFO] [1502255123.404897335]: publishing 260 packets per scan
[ INFO] [1502255123.412688332]: Reconfigure Request
[ INFO] [1502255123.413784314]: expected frequency: 10.000 (Hz)
[ INFO] [1502255123.419791581]: Read input file only once.
[ INFO] [1502255123.419856454]: Opening PCAP file "/home/user/Highway.pcap"
[FATAL] [1502255123.419925476]: Error opening Velodyne socket dump file.
Segmentation fault (core dumped)


Can you suggest me proper way to convert pcap file to pcd file.
Thanks.
Loading...