velodyne_common Documentation

velodyne_common: Common Velodyne HDL-64E 3D LIDAR support

Basic device driver, message, header, library and utility interfaces for the Velodyne HDL-64E 3D LIDAR.

  • Homepage: http://www.ros.org/wiki/velodyne_common
  • The velodyne_common ROS package contains includes, messages, libraries and utilities for the Velodyne HDL-64E 3D LIDAR.

    Programming API

    Velodyne Data classes

    The <velodyne/data.h> classes unpacks raw Velodyne LIDAR packets into several formats.

    ROS parameters are relative to the calling node's name space:

    Velodyne Input classes

    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:

    Velodyne read device driver

    ROS device driver node that captures Velodyne HDL-64E 3D LIDAR data and publishes it to the velodyne/rawscan topic.

    Usage

      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)
    

    Examples

    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
    

    ROS names

    Node name: velodyne_read

    Publishes: velodyne/rawscan raw Velodyne data packets for one entire revolution of the device.

    Parameters:

    Print Command

    The print command reads raw data from the velodyne/rawscan topic to print in human-readable form for off-line processing.

    Usage

      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:

    1. file.vdmp -- x, y, z
    2. file.vxyz -- laser number, direction, x, y, z, intensity
    3. file.vtpr -- theta, phi, range, intensity, laser number, revolution
    4. file.vrgb -- x, y, z, r, g, b (r, g, b are all set to 255)

    Examples

    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-
    

    ROS names

    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.

    Cloud Command

    The cloud command reads raw data from the velodyne/rawscan topic, converts to PointCloud format, and republishes as velodyne/pointcloud.

    Usage

      rosrun velodyne_common cloud [options]
    
    Options:
            -h, -?         print help text
            -q <integer>   set ROS topic queue depth (default: 1)
    

    Examples

    Continuously convert raw Velodyne data into PointCloud messages.

    $ rosrun velodyne_common cloud
    

    ROS names

    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.

    Vdump Command

    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.

    Usage

      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")
    

    Examples

    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
    

    Launch Files

    This package includes several launch files for capturing and viewing Velodyne data. See the launch subdirectory for a complete list.

    Example Launch Commands

    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
    
     All Classes Namespaces Files Functions Variables Typedefs Enumerator Defines


    velodyne_common
    Author(s): Jack O'Quin, Patrick Beeson, Michael Quinlan, Yaxin Liu
    autogenerated on Fri Jan 11 10:05:54 2013