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.

IWR6843AOPEVM: Spherical or Cartesian coordinates from people counting binaries

Part Number: IWR6843AOPEVM

Hello, I am reading data from the AOP, using the people counting binaries.

Are the coordinates from the sensor already Cartesian or are they still Spherical?

Because I see that you guys have the "gtrack_sph2cart" in the utilities library but I am not sure if the function is used in the binary or not.

Thank you!

  • Also, it seems like you guys have already rotated the X axis (based on the elevation tilt), but it is still in Spherical coordinate. Is this correct?

  • Hi, 

    Please refer to the documentation provided as part of the labs in TiREX(https://dev.ti.com/tirex/explore/node?node=AIQzhJRYjeBjkiRvsK8EVg__VLyFKFf__LATEST). There are two different TLVs available. 

    1. 

    Point Cloud TLV

    Size: sizeof (tlvHeaderStruct) + sizeof(pointUnit) + sizeof (pointStruct) x numberOfPoints

    Each Point Cloud TLV consists of an array of points. Each point is defined in 8 bytes. The pointUnit struct is used to uncompress each point to five floats (20 bytes).

    Select text
    pointUnit = struct(...
        'elevationUnit',        {'float', 4}, ... % Multiply each point by this value - used for compression
        'azimuthUnit',          {'float', 4}, ... % Multiply each point by this value - used for compression
        'dopplerUnit',          {'float', 4}, ... % Multiply each point by this value - used for compression
        'rangeUnit',            {'float', 4}, ... % Multiply each point by this value - used for compression
        'snrUnit',              {'float', 4});    % Multiply each point by this value - used for compression
    

    Point Structure

    The above structure provides the point cloud information for each of the points detected. This information is in polar coordinates and doesn't take into account the tilt. 

    2. Tracker output information - This output provides the information about the tracked objects 

    Target List TLV

    Size: sizeof (tlvHeaderStruct) + sizeof (trackerProc_Target) x numberOfTargets

    The Target List TLV consists of an array of targets. Each target object is defined as given below.

    Select text
    targetStruct3D = struct(...
        'tid',             {'uint32', 4}, ... % Track ID
        'posX',            {'float', 4}, ... % Target position in X dimension, m
        'posY',            {'float', 4}, ... % Target position in Y dimension, m
        'posZ',            {'float', 4}, ... % Target position in Z dimension, m
        'velX',            {'float', 4}, ... % Target velocity in X dimension, m/s
        'velY',            {'float', 4}, ... % Target velocity in Y dimension, m/s
        'velZ',            {'float', 4}, ... % Target velocity in Z dimension, m/s
        'accX',            {'float', 4}, ... % Target acceleration in X dimension, m/s2
        'accY',            {'float', 4}, ... % Target acceleration in Y dimension, m/s
        'accZ',            {'float', 4}, ... % Target acceleration in Z dimension, m/s
        'ec[16]',          {'float', 16x4}, ... % Tracking error covariance matrix, [4x4] in range/azimuth/elevation/doppler coordinates
        'g',               {'float', 4}, ... % Gating function gain
        'confidenceLevel'  {'float', 4}, ... % Confidence Level
    

    Target Structure

    Target Index TLV

    Size: sizeof (tlvHeaderStruct) + sizeof(uint8) x numberOfPoints (NOTE: here the number of points are for frame n-1)

    This TLV provides the information about the the tracked objects. The output here is in cartesian co-ordinates taking into account the tilt. 

    Hope this answers your question. 

    Regards, 

    Sudharshan K N 

  • For further clarification, by saying Polar Coordinate, you mean 3-d Spherical coordinates right? Because Polar Coordinate is in 2D.

    Or is it that I'm misunderstanding something?

    Thank you.

  • My bad. You are right. The o/p is spherical coordinates. 

    Regards, 

    Sudharshan K N

  • Are you sure that the elevation tilt is not used in the point cloud TLV? 

    Because when I changed the elevTilt in the config, I can see that the height of the point cloud from the point cloud TLV also changed.

  • Hi, 

    For point cloud the tilt is not accounted. Tilt is accounted only for the tracker output. 

    Regards, 

    Sudharshan K N 

    1. 

    Point Cloud TLV

    Size: sizeof (tlvHeaderStruct) + sizeof(pointUnit) + sizeof (pointStruct) x numberOfPoints

    Each Point Cloud TLV consists of an array of points. Each point is defined in 8 bytes. The pointUnit struct is used to uncompress each point to five floats (20 bytes).

    Select text
    pointUnit = struct(...
        'elevationUnit',        {'float', 4}, ... % Multiply each point by this value - used for compression
        'azimuthUnit',          {'float', 4}, ... % Multiply each point by this value - used for compression
        'dopplerUnit',          {'float', 4}, ... % Multiply each point by this value - used for compression
        'rangeUnit',            {'float', 4}, ... % Multiply each point by this value - used for compression
        'snrUnit',              {'float', 4});    % Multiply each point by this value - used for compression
    

    Point Structure

    The above structure provides the point cloud information for each of the points detected. This information is in polar coordinates and doesn't take into account the tilt. 

  • In the demo visualizer for people counting, I see that you also rotate the tilt in the Cartesian Target TLV as well as the Spherical Point Cloud TLV.  So does this mean that the Cartesian coordinate has not been rotated based on the tilt? Or is it because the demo visualizer made a mistake?

    rotTargetDataX,rotTargetDataY,rotTargetDataZ = rotX (targets[1],targets[2],targets[3],-1*self.profile['elev_tilt'])
            #print('Rotated Data TID,X,Y = ' +str(rotTargetDataX)+', '+str(rotTargetDataY)+', '+str(rotTargetDataZ))
            targets[1] = rotTargetDataX
            targets[2] = rotTargetDataY
            targets[3] = rotTargetDataZ
    
            #pass pointCloud XYZ vals and rotate due to elevation tilt angle (rotX uses Euler rotation around X axis)
            for i in range(numPoints):
                #print('graph point cloud pt = ',pointCloud[:,i])
                #print('graph point cloud Y = ',pointCloud[1][i])
                #print('graph point cloud Z = ',pointCloud[2][i])
                rotPointDataX,rotPointDataY,rotPointDataZ = rotX ([pointCloud[0,i]],[pointCloud[1,i]],[pointCloud[2,i]],-1*self.profile['elev_tilt'])
                #print('graph point cloud rotated pt = ',rotPointDataX,rotPointDataY,rotPointDataZ)
                #print('graph point cloud Y = ',pointCloud[1][i])
                #print('graph point cloud Z = ',pointCloud[2][i])
                pointCloud[0,i] = rotPointDataX
                pointCloud[1,i] = rotPointDataY
                pointCloud[2,i] = rotPointDataZ

  • Hi, 

    Sorry for the confusion. 

    1. point cloud data reported from sensor in spherical co-ordinates relative to the senor orientation (not compensated for tilt or for the height of sensor) 

    2. Tracker output reported in X,Y,Z format still relative to sensor orientation (no compensation for tilt or for the height)

    Both points are corrected and updated in the visualizer. 

    Regards, 

    Sudharshan K N