Rosanswers logo

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


$ 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.


[Originally posted](https://answers.ros.org/question/53499/how-to-extract-the-data-from-the-packets-of-velodyne-hdl-32e/) by [Hyungi](https://answers.ros.org/users/4065/hyungi/) on ROS Answers with karma: 25 on 2013-01-27

Post score: 0


### Original comments

**Comment by [piyushk](https://answers.ros.org/users/1770/piyushk/) on 2013-01-28**:\
@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.

**Comment by [Hyungi](https://answers.ros.org/users/4065/hyungi/) on 2013-01-29**:\
@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.

**Comment by [piyushk](https://answers.ros.org/users/1770/piyushk/) on 2013-01-30**:\
@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

**Comment by [Hyungi](https://answers.ros.org/users/4065/hyungi/) on 2013-01-31**:\
@piyushk: Thank you.

1 Answer 1


Rosanswers logo

You can get unpacked data in the ROS standard Pointcloud2 format by using cloud_node (or its nodelet equivalent) in the velodyne_pointcloud package. See usage and examples here.

If you have the device plugged in, the following commands should do it:

rosrun velodyne_driver velodyne_node _model:=32E
rosrun velodyne_pointcloud cloud_node _calibration:=calibration.yaml

You can generate the calibration.yaml from the db.xml file provided by Velodyne using the gen_calibration utility.

Originally posted by piyushk with karma: 2871 on 2013-01-27

This answer was ACCEPTED on the original site

Post score: 2


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.