Understanding Pointcloud2 data
I'm trying to understand the pointcloud2 data extracted from a bag file. The contents of one sample message is as follows:
header:
seq: 0
stamp:
secs: 1317022486
nsecs: 689719915
frame_id: "velo_link"
height: 1
width: 119597
fields:
-
name: "x"
offset: 0
datatype: 7
count: 1
-
name: "y"
offset: 4
datatype: 7
count: 1
-
name: "z"
offset: 8
datatype: 7
count: 1
-
name: "i"
offset: 12
datatype: 7
count: 1
is_bigendian: False
point_step: 16
row_step: 1913552
data: [131, 64, 23, 66, 223, 79, 141, 61, 201, 118, 190, 63, 236, 81, 184, 62, 31, 133, 25, 66, 184, 30, 5, 62, 96, 229, 192, 63, 61, 10, 87, 62, 74, 140, 26, 66, 55, 137, 129, 62, 74, 12, 194, 63, 61, 10, 87, 62, 45, 178, 26, 66, 0, 0, 192, 62, 14, 45, 194, 63, 82, 184, 158, 62, 240, 39, 27, 66, 219, 249, 254, 62, 33, 176, 194, 63, 236, 81, 56, 62, 100, 59, 32, 66, 147, 24, 36, 63, 39, 49, 200, 63, 143, 194, 117, 62, 166, 155, 32, 66, 47, 221, 68, 63, 117, 147, 200, 63, 0, 0, 0, 0, 190, 31, 35, 66, 57, 180, 104, 63, 150, 67, 203, 63, 143, 194, 245, 61, 213, 248, 40, 66, 14, 45, 146, 63, 252, 169, ...................................]
I m just trying to match the numbers here.
data [ ] has 1913552 number of elements in it.
row_step says there is 1913552 bytes data in data array.
There are 4 elements per point: x, y, z, i. Each of 1 byte.
Thus the total number of point clouds in this captured message is: 1913552/4 = 478388.
But according to explanation given here, "If the cloud is unordered, height is 1 and width is the length of the point cloud.". That is width denotes the total number of point clouds in the message. But above calculated total number of point clouds (478388) is not matching with width(119597) given in message information. Please explain this mismatch/misunderstanding.