mmWave Data Recorder User Guide
Table of Contents
Overview
The mmWave Data Recorder tool is a lightweight Python script that will automatically run through all steps needed to start the sensor such as connecting to its COM port and sending a configuration file. It will then record the incoming data for a specified amount of frames to be saved locally.
Why Use This Tool?
After an initial evaluation of using the Applications Visualizer to see what radar data looks like, this tool should be used to collect processed Radar output data in large and repeated quantities. It is setup so that it is easy to create multiple recording sessions, and is lightweight enough to run on most microcontrollers that can run Python and supports UART. Recordings saved as a JSON file can additionally be replayed within the Applications Visualizer if desired.
Supported Data Types and Formats
The mmWave Data Recorder tool supports data capture of any demo also supported by the Applications Visualizer by using local references within the Radar Toolbox. To see the current list of TI mmWave demos supported by the Applications Visualizer, please see the Applications Visualizer User Guide. This tool pulls TLV (Type, Length, Value) decoding information directly from the Applications Visualizer source files as well. Most of the TLVs created across all Radar Toolbox demos are listed within the Understanding UART Data Output Format User Guide.
Requirements
Hardware
The mmWave Data Recorder tool is designed to be EVM agnostic and work for any device and example combination also supported by the Radar Toolbox’s Application Visualizer. This allows for coverage of all industrial and incabin demos and devices.
Software
Below is a table which includes the required software. All are python modules which can be installed with pip. You can use the file requirements.txt to pip install all of these using pip. For example:
pip install -r requirements.txt
| Software | Version | How to get |
|---|---|---|
| Python3 | 3.x.x | Tested with 3.10 through 3.12 |
| pyserial | 3.x | pip install pyserial==3.5.0 |
| numpy | 2.x.x | pip install numpy==2.2.5 |
| json-fix | 1.0.0 | pip install json-fix==1.0.0 |
User Instructions
This section will give a brief rundown of how to get started using the mmWave Data Recorder.
1. Configure settings.txt
All the required files are within the src/ folder of this tool’s documentation. Here you will find settings.txt where you can specify parameters needed to run the tool.
Configuration Parameters
Within src/cfg/ are three example configurations. This is the directory you should place any configuration you want the tool to send during runtime. You can specify the following within settings.txt as the configuration to send when one of the following type of devices are detected.
- “cfg_sdk3”: Specify configuration name for
.cfgfile that is meant for MMWAVE-SDK 3. This SDK are for generation 1 devices of TI mmWave Radar such as 1443, 1642, 1843, 6843, and AOP variants of these devices. - “cfg_sdk5”: Specify configuration name for
.cfgfile that is meant for MMWAVE-L-SDK 5. This SDK are for the low power low cost TI mmWave Radar devices such as xWRL1432, xWRL6432, and AOP variants of these devices. - “cfg_sdk6”: Specify configuration name for
.cfgfile that is meant for MMWAVE-L-SDK 6. This SDK are for the low power high performance TI mmWave Radar devices such as xWRL6844.
Runtime Parameters
- “alreadyStarted”: Specify if the sensor is already outputting data upon start up of the recorder tool. Setting this to
"True"will skip the.cfgfile transmission step and will immediately go into incoming data recording mode. This parameter should be set to"True"if the binary flashed to the device has a hard-coded configuration which causes sensor start on power up, or if multiple recording sessions are taking place and the sensor has already been started once with this setting set to"False".- If set to 0 the recorder will run infinitely. If used with no frame count and output data file creation is desired, the user will need to manually set when and how often a JSON or BIN file is created within gui_lite.py line 137 and/or line 152
- “next”: Allows you to specify text to be printed at the bottom of the terminal. You can then add a specific feature to be decoded from the incoming data in real time. The default example prints the number of points detected every frame at the bottom so that it is visually easy to track when frames are coming in many times a second.
- “numFrames”: Number of frames to record. Note that the device will continue to run until power cycled.
Recording Parameters
- “printInConsole”: When set to
"True:will print all the incoming TLVs inside the terminal itself. - “JSONLog”: When set to
"True:will save a.jsonfile of the incoming TLV data. - “BINLog”: When set to
"True:will save a.binfile of the incoming TLV data.
Linux Users Only
The following information is for Linux users of the script only. Currently, the setting of PARSERTYPE, CFG_PORT, CFG_BAUD, DATA_PORT, and DATA_BAUD has to be manually done. First set MANUAL_OVERRIDE to true within parser_lib.py. Then set the variables below to what your sensor is.
- PARSERTYPE is DoubleCOMPort for all devices except xWRL6432 and xWRL1432
- CFG_BAUD will always be 115200
- DATA_BAUD will vary. Check your configuration file for a ‘baudRate’ command. If no manual baud rate is set, generation 1 devices (1443, 1642, 1843, 6843) will use 921600, xWRL6432 and xWRL1432 will use 115200, xWRL6844 will use 1250000
- CFG_PORT and DATA_PORT can be determined via checking /dev directory for ports that start with tty*. Generally, it will appear as either a set of ttyACM0/ttyACM1 or ttyUSB0/ttyUSB1
2. Run the script
Once your sensor is connected and ensured to be in functional mode with a proper configuration in the cfg folder, simply start the script by doing python gui_lite.py. The script will automatically determine the connected device, send the appropriate configuration specified for that device, and record incoming data. Once the amount of numFrames is captured, the data is saved as the files set to "True" within the recording parameters.
Data is saved within:
<RADAR_TOOLBOX_DIR>\tools\mmwave_data_recorder\src\binData
Understanding the Source Code
As mentioned above, this tool has source code of its own combined with source code from the Radar Toolbox’s Applications Visualizer. The source code from used from the Applications Visualizer can be found within
<RADAR_TOOLBOX_DIR>\tools\visualizers\Applications_Visualizer\common
Below are all the Python files used across the tool’s functionalities:
Within mmWave Data Recorder
- gui_lite.py is responsible for parsing the frame format of incoming data.
- parser_lib.py is responsible for deciding what sensor is connected, connecting to it, and sending the appropriate configuration.
Within Applications Visualizer
- parseFrame.py is responsible for parsing the frame format of incoming data.
- parseTLVs.py is responsible for parsing all TLV’s which are defined in the demos.
- gui_common.py aggregates several variables and macros which are used across several files.
- tlv_defines.py defines tlv’s used in the examples.
Need More Help?
- Find answers to common questions on mmWave E2E FAQ
- Search for your issue or post a new question on the mmWave E2E forum
- Learn mmWave technology fundamentals with the Radar Academy package