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.

DCA1000EVM: 使用DCA CLI采集数据时遇到问题

Part Number: DCA1000EVM
Other Parts Discussed in Thread: AWR1642,

你好,我正在使用AWR1642+DCA1000在Ubuntu系统上采集数据

根据sdk_user_guide文档,我在启动AWR1642之后,依次利用DCA1000EVM_CLI_Control发送配置并进行数据采集

其中使用的json文件内容如下:

{
	"DCA1000Config": {
	"dataLoggingMode": "raw",
	"dataTransferMode": "LVDSCapture",
	"dataCaptureMode": "ethernetStream",
	"lvdsMode": 2,
	"dataFormatMode": 3,
	"packetDelay_us": 25,
	"ethernetConfig": {
		"DCA1000IPAddress": "192.168.33.180",
		"DCA1000ConfigPort": 4096,
		"DCA1000DataPort": 4098
	},
	"ethernetConfigUpdate": {
	"systemIPAddress": "192.168.33.30",
	"DCA1000IPAddress": "192.168.33.180",
	"DCA1000MACAddress": "12.34.56.78.90.12",
	"DCA1000ConfigPort": 4096,
	"DCA1000DataPort": 4098
	},
	"captureConfig": {
	"fileBasePath": "/home/hcm/Desktop",
	"filePrefix": "outdoor_capture",
	"maxRecFileSize_MB": 1,
	"sequenceNumberEnable": 1,
	"captureStopMode": "infinite",
	"bytesToCapture": 50000,
	"durationToCapture_ms": 5000,
	"framesToCapture":10
	},
	"dataFormatConfig": {
		"MSBToggle": 0,
		"reorderEnable": 1,
		"laneFmtMap": 0,
		"dataPortConfig": [
		{
			"portIdx": 0,
			"dataType": "real"
		},
		{
			"portIdx": 1,
			"dataType": "complex"
		},
		{
			"portIdx": 2,
			"dataType": "real"
		},
		{
			"portIdx": 3,
			"dataType": "real"
		},
		{
			"portIdx": 4,
			"dataType": "complex"
		}
		]
	}
	}
}

采集过程如下:

1、这里遇到了第一个问题,start_record成功,出现了outdoor_capture_Raw_0.bin文件,而stop_record时发生了报错,但同时一下子出现了outdoor_capture_Raw_1.bin~outdoor_capture_Raw_40.bin(因为我把maxRecFileSize_MB设置为1,每个.bin文件都很小)

看起来终止命令没有成功,但是数据依然保存了下来。我个人怀疑是json文件内参数的问题,但是没有在这个文档里找到各个参数的详细解析,请问在哪里有呢?比如captureStopMode这一项,显然有多个参数可选

2、现在我暂且认为采集的数据是正确的,我试着用它生成range-doppler、range-azimuth热图

此前,我已经成功解析了使用mmwave studio录制的数据,生成了正确的热图,但解析现在采集的数据时发生了错误。在我的理解中,每一帧数据有numTxAntennas * numRxAntennas * numLoopsPerFrame * numADCSamples个采样,每个采样是一个实部+一个虚部。但这和json里却有这样的配置:

"dataPortConfig": [
		{
			"portIdx": 0,
			"dataType": "real"
		},
		{
			"portIdx": 1,
			"dataType": "complex"
		},
		{
			"portIdx": 2,
			"dataType": "real"
		},
		{
			"portIdx": 3,
			"dataType": "real"
		},
		{
			"portIdx": 4,
			"dataType": "complex"
		}
		]

这似乎无法对应上,不知道是不是它导致的错误

希望您能解答我的两个问题,谢谢!

  • 你好,

    请问Linux下的CLI工具是你自己编译的么?能否在window下使用默认的工具测试一下,看是否有同样无法stop的问题?

    关于Json文件,请参考下面的论坛讨论:

    (+) IWR6843 and DCA1000EVM: I capture ADC Data on same scene with different method(mmWave Studio 2.1.1.0/ and mmw demo), the result on 1DFFT is different obvious - Sensors forum - Sensors - TI E2E support forums

  • 你好,请问Windows下的“默认工具”是指什么?

    win系统的CLI程序也需要自行编译生成,我尝试了一下,还出现了错误。。。

    我安装了mingw的make和g++,发生了这样的报错

    PS D:\mmWave\mmwave_studio_02_01_01_00\mmWaveStudio\ReferenceCode\DCA1000\SourceCode> make
    g++ -std=c++11 -w -shared  -o Release\RF_API.dll -fPIC  RF_API/*.cpp Common/Validate_Utils/validate_params.cpp Common/Osal_Utils/osal_win.cpp -lws2_32
    RF_API/rf_api.cpp: In function 'SINT32 ConnectRFDCCard_ConfigMode(strEthConfigMode)':
    RF_API/rf_api.cpp:237:49: error: 'NO_ERROR' was not declared in this scope
         if (WSAStartup(MAKEWORD(2, 2), &wsaData) != NO_ERROR)
                                                     ^~~~~~~~
    RF_API/rf_api.cpp: In function 'SINT32 ConnectRFDCCard_AsyncCommandMode(strEthConfigMode)':
    RF_API/rf_api.cpp:414:49: error: 'NO_ERROR' was not declared in this scope
         if (WSAStartup(MAKEWORD(2, 2), &wsaData) != NO_ERROR)
                                                     ^~~~~~~~
    RF_API/rf_api.cpp: In function 'SINT32 ConnectRFDCCard_RecordMode(strEthConfigMode)':
    RF_API/rf_api.cpp:599:49: error: 'NO_ERROR' was not declared in this scope
         if (WSAStartup(MAKEWORD(2, 2), &wsaData) != NO_ERROR)
                                                     ^~~~~~~~
    RF_API/rf_api.cpp: In function 'SINT32 StartRecordData(strStartRecConfigMode)':
    RF_API/rf_api.cpp:1653:5: error: 'thread' is not a member of 'std'
         std::thread tConfigData([&] { objUdpConfigRecv.readConfigDatagrams(); });
         ^~~
    RF_API/rf_api.cpp:1653:76: error: expected primary-expression before ')' token
         std::thread tConfigData([&] { objUdpConfigRecv.readConfigDatagrams(); });
                                                                                ^
    RF_API/rf_api.cpp:1654:5: error: 'tConfigData' was not declared in this scope
         tConfigData.detach();
         ^~~~~~~~~~~
    RF_API/rf_api.cpp:1656:5: error: 'thread' is not a member of 'std'
         std::thread tRawData([&] { objUdpDataRecv.readData(); });
         ^~~
    RF_API/rf_api.cpp:1656:60: error: expected primary-expression before ')' token
         std::thread tRawData([&] { objUdpDataRecv.readData(); });
                                                                ^
    RF_API/rf_api.cpp:1657:5: error: 'tRawData' was not declared in this scope
         tRawData.detach();
         ^~~~~~~~
    RF_API/rf_api.cpp:1661:5: error: 'thread' is not a member of 'std'
         std::thread tRawData2([&] { objUdpDataRecv.Thread_WriteDataToFile(); });
         ^~~
    RF_API/rf_api.cpp:1661:75: error: expected primary-expression before ')' token
         std::thread tRawData2([&] { objUdpDataRecv.Thread_WriteDataToFile(); });
                                                                               ^
    RF_API/rf_api.cpp:1662:5: error: 'tRawData2' was not declared in this scope
         tRawData2.detach();
         ^~~~~~~~~
    RF_API/rf_api.cpp:1669:9: error: 'thread' is not a member of 'std'
             std::thread tCpData([&] { objUdpCpDataRecv.readData(); });
             ^~~
    RF_API/rf_api.cpp:1669:65: error: expected primary-expression before ')' token
             std::thread tCpData([&] { objUdpCpDataRecv.readData(); });
                                                                     ^
    RF_API/rf_api.cpp:1670:9: error: 'tCpData' was not declared in this scope
             tCpData.detach();
             ^~~~~~~
    RF_API/rf_api.cpp:1672:9: error: 'thread' is not a member of 'std'
             std::thread tCqData([&] { objUdpCqDataRecv.readData(); });
             ^~~
    RF_API/rf_api.cpp:1672:65: error: expected primary-expression before ')' token
             std::thread tCqData([&] { objUdpCqDataRecv.readData(); });
                                                                     ^
    RF_API/rf_api.cpp:1673:9: error: 'tCqData' was not declared in this scope
             tCqData.detach();
             ^~~~~~~
    RF_API/rf_api.cpp:1675:9: error: 'thread' is not a member of 'std'
             std::thread tR4fData([&] { objUdpR4fDataRecv.readData(); });
             ^~~
    RF_API/rf_api.cpp:1675:67: error: expected primary-expression before ')' token
             std::thread tR4fData([&] { objUdpR4fDataRecv.readData(); });
                                                                       ^
    RF_API/rf_api.cpp:1676:9: error: 'tR4fData' was not declared in this scope
             tR4fData.detach();
             ^~~~~~~~
    RF_API/rf_api.cpp:1678:9: error: 'thread' is not a member of 'std'
             std::thread tDspData([&] { objUdpDspDataRecv.readData(); });
             ^~~
    RF_API/rf_api.cpp:1678:67: error: expected primary-expression before ')' token
             std::thread tDspData([&] { objUdpDspDataRecv.readData(); });
                                                                       ^
    RF_API/rf_api.cpp:1679:9: error: 'tDspData' was not declared in this scope
             tDspData.detach();
             ^~~~~~~~
    RF_API/rf_api.cpp:1688:9: error: 'thread' is not a member of 'std'
             std::thread tCpData2([&] { objUdpCpDataRecv.Thread_WriteDataToFile(); });
             ^~~
    RF_API/rf_api.cpp:1688:80: error: expected primary-expression before ')' token
             std::thread tCpData2([&] { objUdpCpDataRecv.Thread_WriteDataToFile(); });
                                                                                    ^
    RF_API/rf_api.cpp:1689:9: error: 'tCpData2' was not declared in this scope
             tCpData2.detach();
             ^~~~~~~~
    RF_API/rf_api.cpp:1690:9: error: 'thread' is not a member of 'std'
             std::thread tCqData2([&] { objUdpCqDataRecv.Thread_WriteDataToFile(); });
             ^~~
    RF_API/rf_api.cpp:1690:80: error: expected primary-expression before ')' token
             std::thread tCqData2([&] { objUdpCqDataRecv.Thread_WriteDataToFile(); });
                                                                                    ^
    RF_API/rf_api.cpp:1691:9: error: 'tCqData2' was not declared in this scope
             tCqData2.detach();
             ^~~~~~~~
    RF_API/rf_api.cpp:1692:9: error: 'thread' is not a member of 'std'
             std::thread tR4fData2([&] { objUdpR4fDataRecv.Thread_WriteDataToFile(); });
             ^~~
    RF_API/rf_api.cpp:1692:82: error: expected primary-expression before ')' token
             std::thread tR4fData2([&] { objUdpR4fDataRecv.Thread_WriteDataToFile(); });
                                                                                      ^
    RF_API/rf_api.cpp:1693:9: error: 'tR4fData2' was not declared in this scope
             tR4fData2.detach();
             ^~~~~~~~~
    RF_API/rf_api.cpp:1694:9: error: 'thread' is not a member of 'std'
             std::thread tDspData2([&] { objUdpDspDataRecv.Thread_WriteDataToFile(); });
             ^~~
    RF_API/rf_api.cpp:1694:82: error: expected primary-expression before ')' token
             std::thread tDspData2([&] { objUdpDspDataRecv.Thread_WriteDataToFile(); });
                                                                                      ^
    RF_API/rf_api.cpp:1695:9: error: 'tDspData2' was not declared in this scope
             tDspData2.detach();
             ^~~~~~~~~
    RF_API/rf_api.cpp:1726:13: error: 'thread' is not a member of 'std'
                 std::thread tTimerToStopRecCp([&] { startDurationStopModeTimer(); });
                 ^~~
    RF_API/rf_api.cpp:1726:80: error: expected primary-expression before ')' token
                 std::thread tTimerToStopRecCp([&] { startDurationStopModeTimer(); });
                                                                                    ^
    RF_API/rf_api.cpp:1727:13: error: 'tTimerToStopRecCp' was not declared in this scope
                 tTimerToStopRecCp.detach();
                 ^~~~~~~~~~~~~~~~~
    RF_API/rf_api.cpp:1746:13: error: 'thread' is not a member of 'std'
                 std::thread tToHandleCaptureTimeout([&] { handleCaptureThreadTimeout(); });
                 ^~~
    RF_API/rf_api.cpp:1746:86: error: expected primary-expression before ')' token
                 std::thread tToHandleCaptureTimeout([&] { handleCaptureThreadTimeout(); });
                                                                                          ^
    RF_API/rf_api.cpp:1747:13: error: 'tToHandleCaptureTimeout' was not declared in this scope
                 tToHandleCaptureTimeout.detach();
                 ^~~~~~~~~~~~~~~~~~~~~~~
    D:\mingw\bin\make.exe: *** [Release\RF_API.dll] Error 1

    Ubuntu系统可以正确编译,但是stop_record仍会报错

    另外,您提到的论坛讨论涉及了数据的发布格式,这的确可能是我第二个问题的原因,我后续会确认一下。但这应该不影响数据录制,报错问题依然没有解决

  • 请问Windows下的“默认工具”是指什么?

    在C:\ti\mmwave_studio_02_01_01_00\mmWaveStudio\PostProc目录下有预先编译好的DCA1000EVM_CLI_Control.exe,请尝试使用,看是否报错。

  • 谢谢,这个工具可以正常使用。但是我在Ubuntu里重新编译了几次,依然存在之前的报错。

  • 你好,

    请问你编译前是否有make clean?

    我这里没有编译环境,没有尝试过在windows或者Linux编译这个工具。

  • 你好,

    我是在新建的文件夹里编译的,一直有报错。目前怀疑是系统版本的原因,之后我会尝试用别的电脑重新编译。

    但是目前在Windows系统下采集的数据依然有问题:

    这次我直接使用了PostProc目录下的cf.json文件,内容如下:

    {
      "DCA1000Config": {
        "dataLoggingMode": "raw",
        "dataTransferMode": "LVDSCapture",
        "dataCaptureMode": "ethernetStream",
        "lvdsMode": 2,
        "dataFormatMode": 3,
        "packetDelay_us": 25,
        "ethernetConfig": {
          "DCA1000IPAddress": "192.168.33.180",
          "DCA1000ConfigPort": 4096,
          "DCA1000DataPort": 4098
        },
        "ethernetConfigUpdate": {
          "systemIPAddress": "192.168.33.30",
          "DCA1000IPAddress": "192.168.33.180",
          "DCA1000MACAddress": "12.34.56.78.90.12",
          "DCA1000ConfigPort": 4096,
          "DCA1000DataPort": 4098
        },
        "captureConfig": {
          "fileBasePath": "D:\\mmWave\\mmwave_studio_02_01_01_00\\mmWaveStudio\\Scripts\\..\\PostProc",
          "filePrefix": "adc_data",
          "maxRecFileSize_MB": 1024,
          "sequenceNumberEnable": 1,
          "captureStopMode": "infinite",
          "bytesToCapture": 4000,
          "durationToCapture_ms": 4000,
          "framesToCapture": 40
        },
        "dataFormatConfig": {
          "MSBToggle": 0,
          "laneFmtMap": 0,
          "reorderEnable": 0,
          "dataPortConfig": [
            {
              "portIdx": 0,
              "dataType": "real"
            },
            {
              "portIdx": 1,
              "dataType": "complex"
            },
            {
              "portIdx": 2,
              "dataType": "real"
            },
            {
              "portIdx": 3,
              "dataType": "real"
            },
            {
              "portIdx": 4,
              "dataType": "complex"
            }
          ]
        }
      }
    }

    启动AWR1642的配置文件内容如下:

    % ***************************************************************
    % Created for SDK ver:03.05
    % Created using Visualizer ver:3.5.0.0
    % Frequency:77
    % Platform:xWR16xx
    % Scene Classifier:best_range_res
    % Azimuth Resolution(deg):15
    % Range Resolution(m):0.044
    % 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 3 0
    adcCfg 2 1
    adcbufCfg -1 0 1 1 1
    profileCfg 0 77 429 7 57.14 0 0 70 1 256 5209 0 0 30
    chirpCfg 0 0 0 0 0 0 0 1
    chirpCfg 1 1 0 0 0 0 0 2
    frameCfg 0 1 16 0 100 1 0
    lowPower 0 1
    guiMonitor -1 1 1 0 0 0 1
    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
    clutterRemoval -1 0
    calibDcRangeSig -1 0 -5 8 256
    extendedMaxVelocity -1 0
    bpmCfg -1 0 0 1
    lvdsStreamCfg -1 1 1 1
    compRangeBiasAndRxChanPhase 0.0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
    measureRangeBiasAndRxChanPhase 0 1.5 0.2
    CQRxSatMonitor 0 3 5 121 0
    CQSigImgMonitor 0 127 4
    analogMonitor 0 0
    aoaFovCfg -1 -90 90 -90 90
    cfarFovCfg -1 0 0 8.92
    cfarFovCfg -1 1 -1 1.00
    calibData 0 0 0
    sensorStart
    

    我注意到,您之前发的帖子里,发帖人有这样一段总结:

    1.1 The IQ swap set is different
    TestCase004 -- mmWave Studio Case

    ar1.ChanNAdcConfig(1, 1, 0, 1, 1, 1, 1, 2, 1, 0)
    the last param is IQSwap, which is 0

    TestCase006 -- mmw-LVDS case
    adcbufCfg -1 0 1 1 1

    <SampleSwap>
    ADCBUF IQ swap selection:
    0-I in LSB, Q in MSB,
    1-Q in LSB, I in MSB
    only option 1 is supp

    这指的应该是sample的实部、虚部顺序问题吧?我的理解是,DCA以2 lane传输,数据的格式应当以 real, real, imag, imag 排布,但是做FFT生成热图后依然是明显错误的。我尝试以 imag, imag, real, real 的格式解析,同样不对。

    请问这可能是什么原因呢?

  • 数据格式的错误原因找到了:

    lvdsStreamCfg -1 0 1 0

    awr的配置文件里应该这样设置,我之前按照sdk文档第13页的说明,设置了-1 1 1 1,这是不对的。。。

  • 你好,

    感谢更新分享!