Clarify data[] in PointCloud2 message
Hello folks,
I have a question about the interpretation of my point cloud data. Actually, everything is clear to me, but I don't really understand the values in data[] itself. I have understood that these numbers are represented in 4 byte values (uint8 FLOAT32 = 7), so for example 128 = 00000000 00000000 00000000 10000000
.
example snippet: [128, 63, 188, 116, 147, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 63, 80, 141, 151, 65]
he question is what every 4 values represent:
x = 128
y = 63
z = 188
intensity = 116
or am I wrong and x = 128,63,188,116.
++++++++++++++++++++++
Additional question: Thank you both, I could get the information I've searched. Only one thing, if its mentioned, that the bytes are stored in little endian. It must be stored like this 128,63,188,116 for x:
memory a: 128 a+1: 63 a+2: 188 a+3: 116
or will it be stored from the right side beginning, so:
memory a: 116 a+1: 188 a+2: 63 a+3: 128
Thank you for every discussion.
Asked by Petros ADLATUS on 2022-04-29 01:29:39 UTC
Comments
Can't directly answer but there are some link hopefuly explain what you are looking for. Hope it helps!
what-is-the-definition-of-the-contents-of-pointcloud2
pcl/Overview
sensor_msgs/PointCloud2
Asked by FurkanEdizkan on 2022-04-29 01:40:07 UTC
I've closed this as a duplicate, as there are a number of previously asked (and answered) Q&As which seem to discuss the same topic: see #q273182, #q373094, #q300906, #q349814, #q319350 and #q294913 for instance.
There are many more. A google search with
site:answers.ros.org
should return them.@Petros ADLATUS: if those do not answer your question, please edit your current question and clarify what exactly is (still) unclear.
Asked by gvdhoorn on 2022-04-29 02:24:53 UTC
@gvdhoorn I added it, could you take a look?
Asked by Petros ADLATUS on 2022-07-14 04:00:40 UTC