AWR2944PEVM: Tracking Where Point Cloud Coordinates and Velocity Are Set in AWR2944 SDK Demo

Part Number: AWR2944PEVM

Tool/software:

Hey,

Our objective is to identify where the point cloud values (x, y, z, velocity) are set in the SDK code so we can correctly add and use rangeIdx and dopplerIdx in the processing pipeline.

We are using an AWR2944PEVM board with the a modified version of the awr2x44P_mmw_demoTDMEnet.appimage demo loaded from the SDK mmwave_mcuplus_sdk_04_07_01_04. The code we have modified is the DPIF_PointCloudCartesian struct to contain rangeIdx and dopplerIdx information:
typedef struct DPIF_PointCloudCartesian_t
{
    float  x;
    float  y;
    float  z;
    float  velocity;
    int16_t rangeIdx;   /* NEW */
    int16_t dopplerIdx; /* NEW */
}DPIF_PointCloudCartesian;
The reason for this addition is that later on in the processing pipeline we want to collect doppler data around each detected point and send it over ethernet. My question is then: where in the code are the x, y, z and velocity values being set? I have located some possible places and placed dummy values, such as on row 1903 in aoaprochwa.c:
    objOut[objOutIdx].x = x;
    objOut[objOutIdx].y = y;
    objOut[objOutIdx].z = z;

    objOut[objOutIdx].velocity = params->dopplerStep * (float)dopplerIdx;
    objOut[objOutIdx].rangeIdx = 10; /* DUMMY VALUE SET HERE */
    objOut[objOutIdx].dopplerIdx = 10; /* DUMMY VALUE SET HERE */
    objOutSideInfo[objOutIdx].noise = objIn[objInIdx].noise;
    objOutSideInfo[objOutIdx].snr = objIn[objInIdx].snr;
    res->detObj2dAzimIdx[objOutIdx] = (uint8_t)maxIdx;


and around row 2870 in aoaprochwa.c:
        for(idx=0; idx < numObjsIn; idx++)
        {
            range = (float)res->cfarRngDopSnrList[idx].rangeIdx * DPParams->rangeStep;
            res->detObjOut[idx].y = range;
            res->detObjOut[idx].x = 0.0F;
            res->detObjOut[idx].z = 0.0F;
            temp = AOA_DOPPLER_IDX_TO_SIGNED(res->cfarRngDopSnrList[idx].dopplerIdx, DPParams->numDopplerBins);
            res->detObjOut[idx].rangeIdx = 20; /* DUMMY VALUE SET HERE */
            res->detObjOut[idx].dopplerIdx = 20; /* DUMMY VALUE HERE */
            res->detObjOut[idx].velocity = DPParams->dopplerStep * (float)temp;
            res->detObjOutSideInfo[idx].snr = res->cfarRngDopSnrList[idx].snr;
            res->detObjOutSideInfo[idx].noise = res->cfarRngDopSnrList[idx].noise;
        }


However, when debugging using CCS 20.2.0, I get the following output:
Cortex_R5_0: Point: [0.053103, -0.066911, 0.000000] -0.406067 m/s
Cortex_R5_0: CFAR: RangeIdx: 1698, DopplerIdx: 16125
Cortex_R5_0: Point: [0.418488, 0.000000, 1.457062] 1.930595 m/s
Cortex_R5_0: CFAR: RangeIdx: 22879, DopplerIdx: -16531
Cortex_R5_0: Point: [0.000000, 0.000000, 0.000000] 0.000000 m/s
Cortex_R5_0: CFAR: RangeIdx: 0, DopplerIdx: 0

This seems like random/garbage values from uninitialized variables. Due to these garbage values, I suspect the values for x,y,z and velocity are being set somewhere else in the code and not in the places I located. I would be very grateful if someone could help solve this issue or point me to where the x,y,z and velocity are being set.

The config I am using is the following:
% ***************************************************************
% Created for SDK ver:04.07
% Created using Visualizer ver:4.7.0.0
% Frequency:77
% Platform:AWR2X44P
% Scene Classifier:best_range_res
% Azimuth Resolution(deg):15 + Elevation
% Range Resolution(m):0.04
% Maximum unambiguous Range(m):9.02
% Maximum Radial Velocity(m/s):1
% Radial velocity resolution(m/s):0.13
% Frame Duration(msec):100
% RF calibration data:None
% Range Detection Threshold (dB):15
% Doppler Detection Threshold (dB):15
% Range Peak Grouping:enabled
% Doppler Peak Grouping:enabled
% Static clutter removal:disabled
% Angle of Arrival FoV: Full FoV
% Range FoV: Full FoV
% Doppler FoV: Full FoV
% ***************************************************************
sensorStop
flushCfg
dfeDataOutputMode 1
channelCfg 15 11 0 0 0
adcCfg 2 0
adcbufCfg -1 1 1 1 1
lowPower 0 0
profileCfg 0 77 267 2.5 57.14 0 0 70 1 272 5070 0 0 30
chirpCfg 0 0 0 0 0 0 0 1
chirpCfg 1 1 0 0 0 0 0 2
chirpCfg 2 2 0 0 0 0 0 8
frameCfg 0 2 16 0 272 100 1 0
lowPower 0 0
guiMonitor -1 1 1 0 0 0 1
antGeometryCfg 1 0 1 2 1 7 1 9 1 3 1 5 1 10 1 12 1 6 1 8 1 13 1 15 0 9 0 11 0 16 0 18 0.5 0.5
cfarCfg -1 0 2 8 4 3 0 15 1
cfarCfg -1 1 0 4 2 3 1 15 1
multiObjBeamForming -1 1 0.5
calibDcRangeSig -1 0 -5 8 256
clutterRemoval -1 0
cfarFovCfg -1 0 0 30
cfarFovCfg -1 1 -1 1.00
compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
extendedMaxVelocity -1 0
measureRangeBiasAndRxChanPhase 0 1.5 0.2
aoaFovCfg -1 -90 90 -90 90
calibData 0 0 0
enetStreamCfg 1 192 168 1 10
sensorStart

  • Hello,

    Could you try doing this in objectdetection_elevEst.c in the DPC_ObjDet_estimateXYZ() function. I will attach a screenshot of the code with the line numbers.

    Best,

    Gabriel

  • Hey Gabriel,

    I have modified the code inside objectdetection_elevEst.c with the following:
    if ((azimSinPhase > subframeCfg->aoaFovSinVal.minAzimuthDeg) && (azimSinPhase < subframeCfg->aoaFovSinVal.maxAzimuthDeg))
        {
        /* Store x, y, z values */
        objOut[ValidObjIdx].z = z;
        objOut[ValidObjIdx].x = x;
        objOut[ValidObjIdx].y = (float)sqrt(ySquared);
        objOut[ValidObjIdx].dopplerIdx = 10; /* DUMMY VALUE */
        objOut[ValidObjIdx].rangeIdx = 10; /* DUMMY VALUE */
        /* Obtain and store Velocity */
        if (detObjList[objIdx].dopIdxActual > numDopplerBins / 2U)
        {
    but I still see random/garbage values in the output for rangeIdx and dopplerIdx:
    Cortex_R5_0: Starting Sensor (issuing MMWave_start)
    Cortex_R5_0: Range[0]: 1005426282, Doppler[0]: 100386714
    UART processing not completed: numObjOut 11 Time 1136
    Cortex_R5_0: x[0]: -0.059716, y[0]: 0.031553, z[0]: 0.081906

    In my initial post, I was not clear about which demo I was using. I am using the TDM demo and not the DDM demo, and from what I can see, only the DMM demo uses the objectdetection_elevEst.c file. In the current moment, I have tried to add my dummy values into the following files/rows:
    - aoaprochwa.c row 1906 and 2870
    - dpc\objectdetectionobjdethwaDDMA\src\objectdetection.c row 1203 
    - dpc\objectdetectionobjdethwaDDMA\src\objectdetection_elevEst.c row 996 and 469
    but garbage/random values are still bring shown by the debug printouts. In these places, I have also tried to modify the x-value to be a dummy value, but this is not shown in the printout either, indicating the code is not being executed. So I am wondering where the x, y ,z and velocity values are being set for the TDMEnet demo for the AWR2944PEVM using the mmwave_mcuplus_sdk_04_07_01_04 SDK.

  • Hello,

    I noticed you made the objectdetection.c changes in the "objectdetectionobjdethwaDDMA" folder. This code is only used in the DDMA demo and not the TDM demo. Please try making your changes in the following file at this path

    "C:\ti\mmwave_mcuplus_sdk_04_07_01_03\mmwave_mcuplus_sdk_04_07_01_03\ti\datapath\dpc\objectdetection\objdethwa\src\objectdetection.c"

    Best,

    Gabriel

  • Hey Gabriel,

    We've already tried changing that file.

    Best,

    Emil

  • Hello,

    Give me a few days to further investigate this.

    Best,

    Gabriel

  • Hello,

    I was able to print the correct dummy values and will share my steps on how to do so. Here is my console output

    1) Add the appropriate definitions for rangeIdx and dopplerIdx in the DPIF_PointCloudCartesian_t struct in dpif_point.h at the following path

    C:\ti\mmwave_mcuplus_sdk_04_07_01_03\mmwave_mcuplus_sdk_04_07_01_03\ti\datapath\dpif\dpif_pointcloud.h

    2)In AoAProcHWA_XYZestimation() in aoaprochwa.c add code like this

    3) This step is important because I believe this is what you missed. You must then built this library again. Navigate to the following makefile and rebuild the library

    C:\ti\mmwave_mcuplus_sdk_04_07_01_03\mmwave_mcuplus_sdk_04_07_01_03\ti\datapath\dpu\aoaproc\makefile

    4) You can print this info however you like but this is how I did. This code was added in mss_main.c in MmwDemo_transmitProcessedOutput().

    5) Then rebuild the entire TDM demo. You should see desired values 

    Best,

    Gabriel