ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
There are 4 elements per point: x, y, z, i. Each of 1 byte.
I think this is where you're getting confused. The data
elements are not x, y, z
coordinates; they are bytes of data. The other parameters indicate how to read them. In this case point_step = 16
indicates each point is 16 bytes, so each of its 4 components (fields
) would be 4 bytes, which makes sense as they are 32-bit floats (datatype: 7
; see sensor_msgs/PointField).
width: 119597
As you said, this indicates that you have 119597 points in your cloud. row_step * height
is the length of data
in bytes (1913552 as you noted), but each point is 16 bytes long. Therefore, the number of points in data
is 1913552 / 16 = 119597
as previously indicated.