To convert the PCAP file e.g. HDL32-V2_Monterey_Highway.pcap, perform the following:
- Open up a Terminal. Enter the command to record the messages under the ROS topic /velodyne_points to an output bag file.
$ rosbag record -O /path/to/output.bag /velodyne_points
Note: /velodyne_points is the message to record. Leave blank if you want to record all messages. - Open up another Terminal. Change directory to the location of the PCAP file, e.g. /path/to/Downloads/.
$ cd /path/to/Downloads - Enter the command to playback the Velodyne PCAP file and publish as a point cloud.
$ roslaunch velodyne_pointcloud 32e_points.launch pcap:=$(pwd)/HDL32-V2_Monterey_Highway.pcap readonce:=true
Note: this command publishes a HDL-32E PCAP file as a point cloud. - Wait until the PCAP file is fully read. You can use the following command in another Terminal to check if anymore data is published.
$ rostopic echo /velodyne_points
A stream of points appear. - When no more messages appear, the PCAP file is fully read. In the first Terminal, press CTRL-C to interrupt and complete the recording process to the bag file.
The bag file is created.
No comments:
Post a Comment