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

Why is the Pointcloud2 message large compared to raw sensor data?

asked 2020-11-09 20:41:43 -0600

LalithV gravatar image

According to section 8.2.1 of the [VLP-32 manual] (https://icave2.cse.buffalo.edu/resour...), the data packet rate in single return mode is determined as follows:

There are 12 firing cycles in a data packet. 
12 x 55.296 μs = 0.663552 ms is the accumulation delay per packet.
1 packet/0.663552 ms = 1507 packets/second 
1248 bytes/packet* 1507 packets/second = 1880736 bytes/second
-> 1.9MB/s

However, by inspection of the PointCloud2 message with rostopic echo, we see that each point is stored as a 32 byte value, which means that the data packet rate is increased by a factor of 10:

578688 pt/sec x 32 bytes = 18518016 bytes/second 
-> 18.5MB/s

(Points per second value taken from section 8.2.4.1 of the VLP-32C manual)

Assuming that my reasoning and calculations above are correct, I have the following two questions:

  • Can anyone explain why ROS stores LiDAR point data in such a large data type?
  • Is there any way of reducing this size down to something closer to the raw data output from the sensor?
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-11-11 06:40:30 -0600

miura gravatar image

As I recall, it has x, y, z and intensity information per point, each of which is a float64 ( 8 bytes of floating point number). So it's 32 bytes.

The number of bytes is up because the data is expanded according to the formula in Section 9.2, "Calculating X,Y,Z Coordinates from Collected Spherical Data".

If you want to revert back to the original value, you can do the opposite, if you know the LiDAR model and mode. There will be a calculation error, though.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2020-11-09 20:41:43 -0600

Seen: 200 times

Last updated: Nov 11 '20