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.

CCS/AWR1642: How to export the point cloud data from mmWave SDK 2.0?

Part Number: AWR1642

Tool/software: Code Composer Studio

Recently, I was using CCS to run the demo in mmWave SDK 2.0.

Is there any way to export point cloud data?

  • The demo exports the point cloud through UART.

    Please read the mmwave SDK User's Guide

    Thank you
    Cesar
  •  I know your means, I have read the  mmwave SDK User's Guide.

    I also know through TI mmwave visualizer to export data, but I can't decipher the data. 

    I want to get the point cloud data then using MATLAB to plot it, what should I do?

    thank you!

  • Currently there is no Matlab GUI provided for the SDK OOB demo, so there is some work to be done to create it.

    Here are the steps that will help:

    1) The output data format provided by the OOB SDK demo is described in the SDK demo documentation

    C:\ti\mmwave_sdk_02_00_00_04\packages\ti\demo\xwr16xx\mmw\docs\doxygen\html

    Click on "index.html"

    See section "Output Information Sent to Host" in the second half of the document.

    2) Since there is no Matlab GUI specific to the OOB demo we need to create one either from scratch or to modify an existing one.

    There are several demos provided on the TI Resource Explorer in the Automotive Toolbox that include a Matlab demo.

    dev.ti.com/.../

    For example: Vehicle Occupant Detection lab

    Install this lab, the gui folder includes a Matlab GUI. The source code is provided: od_demo.m

    At the beginning of this code, we are looking for the magic number "1 2 3 4 5 6 7 8" that marks the beginning of a new frame.

    After we have identified a new frame we can search through the TLV headers. This demo has a different data format (simpler) and it will be useful to create the GUI for the OOB demo

    The TLV types in this demo are 3 :

    MMWDEMO_UART_MSG_OD_DEMO_RANGE_AZIMUT_HEAT_MAP
    MMWDEMO_UART_MSG_OD_DEMO_FEATURE_VECTOR
    MMWDEMO_UART_MSG_OD_DEMO_DECISION


    The OOB demo supports more TLVs, but the concept is the same


    Following code snippet shows how we are searching for the magic number:

    bytevecStr = char(bytevec_cp);
    magicOk = 0;
    startIdx = strfind(bytevecStr', char([2 1 4 3 6 5 8 7]));
    if ~isempty(startIdx)
    if startIdx(1) > 1
    bytevec_cp(1: bytevec_cp_len-(startIdx(1)-1)) = bytevec_cp(startIdx(1):bytevec_cp_len);
    bytevec_cp_len = bytevec_cp_len - (startIdx(1)-1);
    end
    if bytevec_cp_len < 0
    fprintf('Error: %d %d \n',bytevec_cp_len, bytevecAccLen)
    bytevec_cp_len = 0;
    end

    totalPacketLen = sum(bytevec_cp(8+4+[1:4]) .* [1 256 65536 16777216]');
    if bytevec_cp_len >= totalPacketLen
    magicOk = 1;
    else
    magicOk = 0;
    end
    end


    Thank you
    cesar
  • If I don't use this method(through visualizer to export point data).

    How can I do? There are any ways to export point data through CCS?

  • Hi,

    Sorry for the late response.

    In the mmWave demo the point cloud data is sent through UART to a host PC.

    With CCS it would be possible to export this data by stopping the execution with a breakpoint for example and then saving the point cloud data directly from memory through CCS. This would be possible only for one frame

    thank you
    Cesar