Suppose I am using ROS along with IWR1843BOOST and using "rostopic echo -n5 /ti_mmwave/radar_scan_pcl_0 > ros_data.txt" to redirect ROS data into a text file. The text file contains something like:
header:
seq: 93842
stamp:
secs: 1661726240
nsecs: 865267000
frame_id: "/ti_mmwave_0"
height: 1
width: 74
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: "intensity"
offset: 16
datatype: 7
count: 1
-
name: "velocity"
offset: 20
datatype: 7
count: 1
is_bigendian: False
point_step: 32
row_step: 2368
data: [249, 239, 135, 61, 206, 43, 226, 61, 5, 130, 188, 188, 0, 0, 0, 0, 51, 51, 155, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 246, 189, 172, 61, 127, 93, 28, 62, 178, 63, 159, 187, 0, 0, 0, 0, 205, 204, 128, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 239, 17, 229, 61, 255, 6, 6, 61, 164, 4, 5, 190, 0, 0, 0, 0, 205, 204, 128, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 181, 41, 220, 61, 167, 151, 18, 62, 122, 69, 255, 189, 0, 0, 0, 0, 102, 102, 86, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 122, 123, 64, 62, 191, 136, 39, 61, 18, 169, 210, 189, 0, 0, 0, 0, 102, 102, 86, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 164, 210, 155, 60, 15, 170, 64, 62, 111, 89, 57, 190, 0, 0, 0, 0, 0, 0, 56, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 72, 198, 62, 25, 143, 84, 63, 110, 112, 189, 187, 0, 0, 0, 0, 205, 204, 60, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 233, 228, 61, 63, 227, 238, 3, 191, 195, 77, 29, 190, 0, 0, 0, 0, 205, 204, 60, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 147, 205, 62, 75, 174, 94, 63, 0, 214, 111, 189, 0, 0, 0, 0, 154, 153, 173, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 17, 240, 212, 62, 124, 205, 104, 63, 235, 31, 171, 189, 0, 0, 0, 0, 102, 102, 190, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 210, 118, 218, 62, 174, 236, 114, 63, 105, 61, 241, 189, 0, 0, 0, 0, 205, 204, 148, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 74, 227, 135, 62, 186, 63, 135, 63, 234, 222, 86, 61, 0, 0, 0, 0, 0, 0, 64, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 99, 177, 222, 63, 247, 184, 171, 190, 222, 151, 123, 190, 0, 0, 0, 0, 51, 51, 75, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 94, 229, 63, 167, 151, 146, 190, 118, 61, 130, 190, 0, 0, 0, 0, 205, 204, 132, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 82, 221, 235, 63, 223, 33, 112, 190, 55, 125, 134, 190, 0, 0, 0, 0, 0, 0, 128, 65, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.,....................]
is_dense: True
---
How would one convert this data (1D array) into the 3D point cloud data containing the actual XYZ coordinates? I am assuming that it might require using the offsets, point_step and row_step to perform the conversion.