how to extract the data from the packets of Velodyne HDL-32E
hi, I'm using velodyne and Pan-Tilt Unit together. I could get the packets with the below command.
$ rosbag record -O test.bag /velodyne_packets /velodyne_points
or
$ rosrun velodyne_driver vdump pcap- eth0
However, results are just expressed as the combination of 1-byte digit. I need the information such as laser sources, distances, rotations, intensities, etc. I've seen that the code(velodyne/velodyne_pointcloud/src/lib/rawdata.cc) has the unpacking formula of a packet, but I couldn't know how to extract the data directly.
Do I have to change the source codes? OR Is there another way to get the unpacked data?
Your comments will be much appreciated.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I have two warning messages when I typed below two commands respectively.
$ rosrun velodyne_driver velodyne_node _model:=32E
[ WARN] [1359363950.652052848]: Velodyne poll() timeout
$rosrun velodyne_pointcloud transform_node _calibration:=32db.yaml
[ WARN] [1359363867.642563134]: MessageFilter [target=/odom ]: Dropped 100.00% of messages so far. Please turn the [ros.velodyne_pointcloud.message_notifier] rosconsole logger to DEBUG for more information.
I don't know what's wrong.
@Hyungi: A poll timeout suggests that the driver was not able to get any input from the device. I've seen this happen if the device was not actually connected or IP address configuration was incorrect.
@piyushk: Thanks. I think that I solved the above warning messages. You mean that the topic "/velodyne_points" has unpacked data, but "$rostopic echo /velodyne_points" shows also 1byte digit to me. Is this right? I could see the pointclouds using rviz, but I want to save as numerical data.
@Hyungi: The reason you see 1 byte data is that all the data is stored in an unsigned char array. If you want to save the data to file in a human readable format, then you can write a simple node to do it using the pcl_ros bridge. See examples at http://www.ros.org/wiki/pcl_ros
@piyushk: Thank you.