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.

IWR6843: Point Cloud TLV Parser Failed

Genius 13655 points
Part Number: IWR6843

Hello Champs,
Customer still has the problem which I have posted before.
https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/1174043/iwr6843-point-cloud-tlv-parser-failed

The line331 in oob_parser.py prompted an error.

def parseCapon3DPolar(self, data, tlvLength):
pUnitStruct = '5f' #elev, azim, doppler, range, snr
pUnitSize = struct.calcsize(pUnitStruct)
pUnit = struct.unpack(pUnitStruct, data[:pUnitSize])
data = data[pUnitSize:]
objStruct = '2bh2H' #2 int8, 1 int16, 2 uint16
objSize = struct.calcsize(objStruct)
self.numDetectedObj = int((tlvLength-pUnitSize)/objSize)
#if (self.printVerbosity == 1):
#print('Parsed Points: ', self.numDetectedObj)
for i in range(self.numDetectedObj):
try:
elev, az, doppler, ran, snr = struct.unpack(objStruct, data[:objSize])
#print(elev, az, doppler, ran, snr)
data = data[objSize:]
#get range, azimuth, doppler, snr
self.pcPolar[0,i] = ran*pUnit[3] #range
if (az >= 128):
print ('Az greater than 127')
az -= 256
if (elev >= 128):
print ('Elev greater than 127')
elev -= 256
if (doppler >= 32768):
print ('Doppler greater than 32768')
doppler -= 65536
self.pcPolar[1,i] = az*pUnit[1] #azimuth
self.pcPolar[2,i] = elev*pUnit[0] #elevation
self.pcPolar[3,i] = doppler*pUnit[2] #doppler
self.pcPolar[4,i] = snr*pUnit[4] #snr

#add pt cloud data to textStructCapon3DCapon3D for text file printing
#self.textStructCapon3DCapon3D[,,,] = [frame #][header,pt cloud data,target info]
#[][pt cloud = 0][pt index][#elev, azim, doppler, range, snr]
if(self.capon3D):
self.textStructCapon3D[self.frameNum%1000,1,i,0] = self.pcPolar[2,i] #elev
self.textStructCapon3D[self.frameNum%1000,1,i,1] = self.pcPolar[1,i] #az
self.textStructCapon3D[self.frameNum%1000,1,i,2] = self.pcPolar[3,i] #doppler
self.textStructCapon3D[self.frameNum%1000,1,i,3] = self.pcPolar[0,i] #range
self.textStructCapon3D[self.frameNum%1000,1,i,4] = self.pcPolar[4,i] #snr
except:
data = data[objSize:]
self.numDetectedObj = i
print('Point Cloud TLV Parser Failed')
break
self.polar2Cart3D()

Thanks
Regards
Shine
  • Hi Shine, 

    I'm not sure which line the customer is referring to here. I think they must have made some modifications to the visualizer code. Can you let me know what those are? Line 331 is a function definition for me.

    Best regards,

    Josh

  • Hi Josh,

    Thanks for your great support.

    Below is the customer's reply.

    Line 374 

    print('Point Cloud TLV Parser Failed')

    It will stuck at the above line after running for a long time. Will it be caused by the PC performance?

    Customer only modified line 122 and line 123. 

    self.saveBinary = 1
    self.saveTextFile = 1


    Thanks
    Regards
    Shine

  • Hi Shine, 

    Thanks. It is possible that this issue is caused by PC performance. When this happens, is the computer connected to power? Or is it running on a laptop which is unplugged? Also the 'Power Mode' in Windows should be set to 'best performance'. We have seen issues in the past with unplugged laptops when running the visualizer. I'm also wondering if the customer has tried to run this on another PC?

    I also want to ask, is there any specific reason that the customer is using Industrial Toolbox 4.11? The visualizer has received some updates and improvements since the 4.11 release. I'm curious if the customer has tried the visualizer in the latest Radar Toolbox release?  

    Best Regards,

    Josh

  • Hi Josh,

    Yes, the computer is connected to power and he enabled  'best performance', but the problem still exists. 

    Customer feels that the Radar Toolbox is a bit messy, so he used industrial Toolbox 4.11 instead. 

    Besides, he wanted to know if the visualizer GUI can configure the point cloud. When using the visualizer GUI in radar_toolbox_1_00_00_26, he met below issue in line 53 of parseFrame.py. 



    Thanks
    Regards
    Shine

  • Hi Shine, 

    Sorry for the delay here. When using the visualizer GUI in radar_toolbox_1_00_00_26, what is flashed on the device? Is it the 3D People Counting binary file from radar_toolbox_1_00_00_26? I'm also wondering if this error is seen every time after launching? Does it only happen occasionally? 

    Thanks and Regards,

    Josh

  • Hi Josh,

    Sorry for the late response.
     
    Customer is flashing the 3D_people_count_68xx_demo.bin in Industrial Toolbox 4.11\labs\People_Counting\3D_People_Counting\prebuilt_binaries and then using Visualizer GUI in radar_toolbox_1_00_00_26. 

    It always prompts below error. 




    Besides, how to use this visualizer GUI to save pointcloud binary and csv files?

    BTW, customer has enabled the PC best performance mode, but it prompts the TLV Analyze error as before when using visualizer GUI in Industrial Toolbox 4.11

    Thanks
    Regards
    Shine

  • Hi Shine, 

    Understood. The customer must flash the binary file from radar_toolbox_1_00_00_26 in order to use the visualizer from radar_toolbox_1_00_00_26. Unfortunately the visualizer is not backwards compatible with previous versions of the demo code. 

    Can the customer try this?

    Best Regards,

    Josh

  • Hi Josh,

    Thank you very much. 

    Customer has resolved the problem.  

    Can the visualizer GUI save data? He met another error: ValueError: could not broadcast input array from shape (3,) into shape (0,)


    Thanks
    Regards
    Shine

  • Hi Shine,

    You can save the data if you run the python source and set saveBin to 1.

    Best,

    Nate

  • Hi Nate,

    Thank you very much. 

    Customer can't find the saveBin and saveTextFile in radar_toolbox_1_00_00_26, would you please point out where it is?

    He still has the "Point Cloud TLV Parser Failed" issue which will cause the number of point cloud decreased, how to resolve it? 

    Thanks
    Regards
    Shine

  • Hi Shine, 

    self.saveBinary = 0 is in the python code for the industrial visualizer in gui_parser.py.

    There are some warning/error messages that may come out of the visualizer when data is streamed very fast. If the visualizer continues to operate correctly, then I would not worry about them. Does this error impede the visualizer from running?

    Best,

    Nate

  • Hi Nate,

    Thank you very much.

    Sorry that customer can't find the saveBinary in gui_parser.py of radar_toolbox_1_00_00_26. 


    Besides, will the error influence the point cloud saving in  visualizer GUI?

    When checking the csv file, he found that the point cloud data only has 12 lines data in a frame as below. 



    Actually, he captured 4 objects data, but the amount of data saved in visualizer doesn't match the expected amount of data. The amount of data shown in visualizer is more much than the amount of saved data. 


    Thanks
    Regards
    Shine

  • Hi Shine, 

    Is the customer able to download Radar Toolbox version 1.00.01.07? Support for saving output data was added back with this version. (This is why with 1.00.00.26 the customer can not see self.saveBinary).

    Best Regards,

    Josh

  • Hi Josh,

    Thank you very much.

    Customer can't find the format of the bin file, so he can't analyze the bin file.
    He wants to know how to save it as csv file.

    Thanks
    Regards
    Shine

  • Hi Shine,

    I'm sorry about the delayed response here. The file is saved as binary UART data. If you the customer needs to convert this to CSV file then please direct the customer to this example parser script at <MMWAVE_SDK3_INSTALL_DIR>/packages/ti/demo/parser_scripts. 

    The relevant files are mmw_demo_example_script.py and parser_mmw_demo.py. There are comments at the top of mmw_demo_example_script.py which describe the scripts usage.

    Best Regards,

    Josh

  • Hi Josh,

    Thank you very much.

    Customer contacted us again and he still had the problem about converting bin to csv file. 

    Is this type related to analyze error? Customer thought the type should be Decimal type. 

    Thanks
    Regards
    Shine

  • Hi Shine,

    Has the customer modified the example parsing scripts at all? By default these scripts support the Out of Box demo only. If the customer is running the People Tracking demo or some other demo besides the Out of Box demo then modifications to these scripts are required to add parsing support for the additional outputs specific to that demo. For example, if the customer is running the People Tracking demo, they will need to add code to parse the TLVs related to tracker output. 

    The best options for the customer to save the output data to a csv file are as follows:

    1. Add the required parsing code to the example parsing scripts then use the visualizer with self.saveBinary to capture the output data file and run the output data file through the scripts to generate csv file. 

    -or-

    2. Add the code which saves data to a csv file directly to the visualizer code. Since the parsing is already done in the visualizer the customer can simply write the parsed data to a csv file. Customer can refer to lines 113-126 of mmw_demo_example_script.py for writing to a csv file. Something similar could be added to the industrial visualizer code in gui_main.py updateGraph function. 

    Best Regards,

    Josh