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.

IWR1642BOOST: Interpreting data from the Data port ( UART)

Part Number: IWR1642BOOST
Other Parts Discussed in Thread: IWR1642

Hi, 

I am working on a simple object detection using IWR1642. I was able to read the data port for the received data from IWR1642 EVM. 

The data I receive on the Data port, I have parsed ( using python) and formatted as per  - https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/1023/4201.DataStructure_5F00_table.pdf

The data starts with the 8 byte magic word which I am able to receive and parse correctly. In the same way I have read the other bytes and the data doesn't match with the detected objects in mmWave Visualiser. 

I am attaching the data received by my program( python) and a picture of the detected objects ( XY PLot and Range for zero doppler) in mmWave Visualiser. 

The visualiser shows 4 detected objects at ( -0.302,0.434) , (-0.62,0.725),(-0.843,0.955) ...

My program shows 5 detected objects bu the coordinates do not match with the ones in Visualiser

What is the format of the co-ordinates and am I missing something here?

COM28 is open..
0: magic-1					b'\x02\x01\x04\x03'		|| 4610
1: magic-2					b'\x06\x05\x08\x07'		|| 10758
2: Version					b'\x04\x00\x00\x01'		|| 772
3: TPL						b'\xa0\x02\x00\x00'		|| 672
4: platform					b'B\x16\n\x00'			|| 10818
5: frame number				b'\xdf\xe2\x00\x00'		|| 58079
6: time CPU					b'\xed"K\xd9'			|| 213997
7: Detected No.				b'\x05\x00\x00\x00'		|| 5
8: Total Data Structures	b'\x03\x00\x00\x00'		|| 3
---------------------------------
 Name  ||  No. of bytes || Raw Data || Value 
Structure - Tag Detect Object			|| 4 || b'\x01\x00\x00\x00' || 1
 Strength Len.- Detect Object			|| 4 || b'@\x00\x00\x00' 	|| 64
 Detect Desciptor - #Detected Objects	|| 2 || b'\x05\x00' 		|| 5
 Detect Descriptot - XYZ Q Format		|| 2 || b'\t\x00' 			|| 9
---------------------------
 ----------- Detected Object No.0 -------------------- 
 Range Index			|| 2 || b'\x16\x00' || 22
 Doppler Index			|| 2 || b'\x00\x00' || 0
Peak Value				|| 2 || b'\xa5\x01' || 421
X Cordinate				|| 2 || b'\xd2\xff' || 65490
Y Cordinate				|| 2 || b'\xe9\x01' || 489
Z Cordinate				|| 2 || b'\x00\x00' || 0
 ----------- Detected Object No.1 -------------------- 
 Range Index			|| 2 || b'\xf4\x00' || 244
 Doppler Index			|| 2 || b'\x00\x00' || 0
Peak Value				|| 2 || b'\x01\x00' || 1
X Cordinate				|| 2 || b'\x04\xf8' || 63492
Y Cordinate				|| 2 || b'\xbd\x13' || 5053
Z Cordinate				|| 2 || b'\x00\x00' || 0
 ----------- Detected Object No.2 -------------------- 
 Range Index			|| 2 || b'\xff\x00' || 255
 Doppler Index			|| 2 || b'\x00\x00' || 0
Peak Value				|| 2 || b'&\x00' 	|| 38
X Cordinate				|| 2 || b'\xc0\xe9' || 59840
Y Cordinate				|| 2 || b'\x00\x00' || 0
Z Cordinate				|| 2 || b'\x00\x00' || 0
 ----------- Detected Object No.3 -------------------- 
 Range Index			|| 2 || b'\x16\x00' || 22
 Doppler Index			|| 2 || b'\x00\x00' || 0
Peak Value				|| 2 || b'v\x01' 	|| 374
X Cordinate				|| 2 || b'\xbd\xfe' || 65213
Y Cordinate				|| 2 || b's\x01' 	|| 371
Z Cordinate				|| 2 || b'\x00\x00' || 0
 ----------- Detected Object No.4 -------------------- 
 Range Index			|| 2 || b'\xf4\x00' || 244
 Doppler Index			|| 2 || b'\x00\x00' || 0
Peak Value				|| 2 || b'\x00\x00' || 0
X Cordinate				|| 2 || b'\xfa\x0b' || 3066
Y Cordinate				|| 2 || b'\x9a\x11' || 4506
Z Cordinate				|| 2 || b'\x00\x00' || 0
 ------------------------ 
Range Structure Tag			|| 4 || b'\x02\x00\x00\x00' || 2
Range Structure Length		|| 4 || b'\x00\x02\x00\x00' || 512
 ------------------------ 
Objects Detected  5
 Total Size =  672
 detect_structure_tag = 1
 Range_structure_tag = 2
 x_cord = [65490, 63492, 59840, 65213, 3066]
 y_cord = [489, 5053, 0, 371, 4506]
z_cord = [0, 0, 0, 0, 0]
 range_idx = [22, 244, 255, 22, 244]
 doppler_idx = [0, 0, 0, 0, 0]
 peak_value = [421, 1, 38, 374, 0]
 detect_descrptor_object = 5
 detect_descrptor_qformat = 9
 range_str_lngt = 512

COM28 is closed..

  • Hello Anup,

    The issue may come from the fact the document you refer to above is related to the SDK 1.0.0 version when you may be using the latest SDK, 1.1.0, which follows a slightly different structure for the UART data. Please refer to the mmWave Demo Doxygen documentation: file C:\ti\mmwave_sdk_01_01_00_02\packages\ti\demo\xwr16xx\mmw\docs\doxygen\html\index.html and under the header "Output information sent to host".


    Thanks,
    François.
  • The SDK version i use is 1.0.
    I understood that the conversion is done using the q-factor. My program reads the q format as 6 and sometimes as 7.
    When i convert the value to fractional [ I multiply the integer obtained by 2^(-1 * <q-format value>) ], i do not get the negative values.
    When the q factor value is 6 does it mean Q2.6 signed?
  • Hi Anup,

    Please move to the SDK 1.1. Not only it fixes a number of known problems, but it adds some very useful new features such as the sensor calibration.

    If a data structure contains a integer value V in Qn format, it corresponds to a real value of V / 2^n.


    Thanks,
    François.