Basic device driver, message, header, library and utility interfaces for the Velodyne HDL-64E 3D LIDAR.
The velodyne_common ROS package contains includes, messages, libraries and utilities for the Velodyne HDL-64E 3D LIDAR.
The <velodyne/data.h> classes unpacks raw Velodyne LIDAR packets into several formats.
ROS parameters are relative to the calling node's name space:
The <velodyne/input.h> classes provide raw Velodyne LIDAR input packets from either a live socket interface or a previously-saved PCAP dump file.
ROS parameters are relative to the calling node's name space:
ROS device driver node that captures Velodyne HDL-64E 3D LIDAR data and publishes it to the velodyne/rawscan topic.
rosrun velodyne_common read [options] Options: -f <filename> PCAP packet dump file name (default: use real device) -h, -? print help text -q <integer> set ROS topic queue depth (default: 1)
Read the Velodyne input socket as fast as possible. Publish each complete revolution to velodyne/rawscan.
$ rosrun velodyne_common read
Read previously captured Velodyne packets from dump.pcap file. Publish messages to velodyne/rawscan at approximately 10 Hz rate.
Dump files can be grabbed by libpcap, Velodyne's DSR software, ethereal, wireshark, tcpdump, or the velodyne_common vdump command.
$ rosrun velodyne_common read _pcap:=dump.pcap
Node name: velodyne_read
Publishes: velodyne/rawscan raw Velodyne data packets for one entire revolution of the device.
Parameters:
The print command reads raw data from the velodyne/rawscan topic to print in human-readable form for off-line processing.
rosrun velodyne_common print [options] Options: -h, -? print help text -t <type> defines output type (default 2) -n <integer> read this many packets (default: all) -q <integer> set ROS topic queue depth (default: 1) -f <filename> write output to this file (default: none) -f- write data to stdout
The output file format is determined by the -t option, the corresponding file suffixes are:
Print contents of one revolution (260 packets) in XYZ format to file onerev.vxyz.
$ rosrun velodyne_common print -t2 -n260 -f onerev.vxyz
Print contents of two revolutions (520 packets) in theta, phi, range format to tworevs.vtpr.
$ rosrun velodyne_common print -t3 -n 520 -f tworevs.vtpr
Print contents of a hundred revolutions in theta, phi, range format to 100revs.vtpr. Set ROS topic queue depth to 100, reducing the number of dropped packets some while incurring considerable extra latency.
$ rosrun velodyne_common print -t3 -n26000 -q100 -f 100revs.vtpr
Read all data, but do not create an output file. When cancelled via SIGINT (^c), this command will log some summary message latency statistics.
$ rosrun velodyne_common print
Print all data in XYZ format to standard output. You will see a lot of numbers on the terminal. Output can be redirected via the shell, but some ROS log messages will be interspersed with the data. This almost certainly will not be able to keep up with the bandwidth of the device.
$ rosrun velodyne_common print -f-
Node name: velodyne_print
Subscribes to: velodyne/rawscan, raw Velodyne data packets for one complete revolution of the device.
Parameters: uses the <velodyne/data.h> class parameters.
The cloud command reads raw data from the velodyne/rawscan topic, converts to PointCloud format, and republishes as velodyne/pointcloud.
rosrun velodyne_common cloud [options] Options: -h, -? print help text -q <integer> set ROS topic queue depth (default: 1)
Continuously convert raw Velodyne data into PointCloud messages.
$ rosrun velodyne_common cloud
Node name: velodyne_cloud
Subscribes to: velodyne/rawscan, raw Velodyne data packets for one complete revolution of the device.
Publishes: velodyne/pointcloud, corresponding 3D PointCloud messages.
Parameters: uses the <velodyne/data.h> class parameters.
The vdump command dumps raw data from the Velodyne LIDAR in PCAP format. It is a shell script wrapper with some obscure options for the powerful tcpdump command.
Other methods of acquiring PCAP data include using tcpdump directly, wireshark, Velodyne's DSR software, and programming with libpcap.
rosrun velodyne_common vdump <file_prefix> [ <interface> ] <file_prefix> file name to dump (with 3-digit number suffix) <interface> interface to read from (default: "eth1")
Dump Velodyne packets to a series of files named "pcap-000", "pcap-001", etc. Each file will be about 100MB, holding a little more than 30 seconds of Velodyne packets. Type ^C when finished.
$ rosrun velodyne_common vdump pcap- eth0
This package includes several launch files for capturing and viewing Velodyne data. See the launch subdirectory for a complete list.
Convert a Velodyne PCAP file to a ROS bag. The bag file goes in the current directory with a "velodyne_" prefix to the current date and time.
$ PCAP=/path/to/file.pcap roslaunch velodyne_common pcap2bag.launch