ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how to extract the data from the packets of Velodyne HDL-32E

asked 2013-01-27 17:53:01 -0600

Hyungi gravatar image

updated 2013-01-27 21:39:05 -0600

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.

edit retag flag offensive close merge delete

Comments

2

@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 gravatar image piyushk  ( 2013-01-28 03:24:19 -0600 )edit

@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 gravatar image Hyungi  ( 2013-01-29 12:26:04 -0600 )edit

@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 gravatar image piyushk  ( 2013-01-30 05:16:22 -0600 )edit

@piyushk: Thank you.

Hyungi gravatar image Hyungi  ( 2013-01-31 04:47:46 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2013-01-27 18:22:00 -0600

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.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-01-27 17:53:01 -0600

Seen: 2,627 times

Last updated: Jan 27 '13