This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

IWR1843BOOST: Conversion of ROS Radar Data collected from IWR1843BOOST Into 3D Point Cloud Data

Part Number: IWR1843BOOST

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.

  • Hello,

    The way I would achieve what you are trying to do (Point Cloud information in a 1D array) is by saving every point that comes out of the RadarScan msg one by one and append them to a volatile array. The RadarScan msg will always be in the format of: header, point_id, x, y, z, range, velocity, doppler_bin, bearing, intensity and every point will have one of these messages. You can see the message format within the source code of the ROS Driver by going to RadarScan in the msg folder. You can add this code which has the creation of a complete 1D array point cloud within DataHandlerClass.cpp which is in the src folder of the ROS Driver. This is the main source file of the ROS Driver and you should see a switch case of READ_OBJ_STRUCT where all point cloud information is pulled in from the sensor and packaged to be sent off as a message in the format of RadarScan. That is where you should add your code. You could also make a custom msg type which has only the parameters of a point cloud you care about and assign them there

    Best Regards,

    Pedrhom Nafisi

  • Appreciate the help!!

    Regards,

    Jewel