A lightweight, Python-based ROS2 driver designed specifically for the Texas Instruments IWR6843 mmWave Radar running the Mobile Tracker firmware .
While Texas Instruments provides an official ROS driver (ti_mmwave_rospkg), it is primarily designed for the "Out-of-Box" demo firmware. It does not correctly parse the specific output data formats (TLVs) generated by the Mobile Tracker firmware.
This project bridges that gap by providing a driver capable of:
- Configuring the radar with a specific
.cfgfile (e.g.,Mobile_Tracker_car.cfg). - Parsing the specific TLVs (Point Cloud, Side Info, Target List, Target Index) used in tracking applications.
- Publishing standard ROS2 messages (
PointCloud2) and TI-specific tracking messages. - Visualizing tracking results with
MarkerArrayin RViz.
- ROS2 (Tested on Humble with Ubuntu 22.04)
- Python 3
- PySerial:
pip3 install pyserial - NumPy:
pip3 install numpy
This driver relies on message definitions usually found in the TI ROS ecosystem. Ensure you have the message package compiled in your workspace:
ti_mmwave_rospkg_msgs(ContainsRadarTrackArrayandRadarTrackContents)sensor_msgsvisualization_msgs
The IWR6843 typically exposes two serial ports:
- Command/CLI Port (User UART): Used to send configuration commands.
- Data Port (Data UART): Used to receive high-speed radar data.
You have two options to configure these ports:
To ensure the ports always map to consistent names (e.g., /dev/ttyUSB_RADAR_CLI and /dev/ttyUSB_RADAR_DATA) regardless of plug-in order, you should create a udev rule.
-
Check your device ID (usually
10c4:ea70for Silicon Labs CP210x):Bash
lsusb -
Create a rule file:
Bash
sudo nano /etc/udev/rules.d/99-mmwave-radar.rules -
Add the following lines (adjust
idVendorandidProductif yours differs):Plaintext
# TI mmWave Radar CLI Port (usually the first interface, e.g., if00) SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70", ATTRS{interface}=="Silicon Labs Dual CP2105 USB to UART Bridge: Interface 0", SYMLINK+="ttyUSB_RADAR_CLI" # TI mmWave Radar DATA Port (usually the second interface, e.g., if01) SUBSYSTEM=="tty", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea70", ATTRS{interface}=="Silicon Labs Dual CP2105 USB to UART Bridge: Interface 1", SYMLINK+="ttyUSB_RADAR_DATA"Note: The interface names might vary. You can use
udevadm info -a -n /dev/ttyUSBxto find unique attributes. -
Reload rules:
Bash
sudo udevadm control --reload-rules && sudo udevadm trigger
If you do not wish to use udev rules, you can simply identify which port is which (e.g., /dev/ttyUSB0 and /dev/ttyUSB1) and pass them as parameters when running the node.
-
Clone this repository into your ROS2 workspace
srcfolder:Bash
cd ~/ros2_ws/src git clone https://github.com/YOUR_USERNAME/mobile_tracker.git -
Build the workspace:
Bash
cd ~/ros2_ws colcon build --packages-select mobile_tracker source install/setup.bash
By default, the driver looks for /dev/ttyUSB0 (CLI) and /dev/ttyUSB1 (Data).
Bash
ros2 run mobile_tracker mmwave_6843_driver
If your ports are different (or if you mapped them via udev):
Bash
ros2 run mobile_tracker mmwave_6843_driver --ros-args -p cli_port:=/dev/ttyUSB_RADAR_CLI -p data_port:=/dev/ttyUSB_RADAR_DATA
The driver loads the configuration file located in cfg/Mobile_Tracker_car.cfg by default. You can specify a different path:
Bash
ros2 run mobile_tracker mmwave_6843_driver --ros-args -p config_file:=/path/to/your/profile.cfg
| Topic Name | Message Type | Description |
|---|---|---|
/ti_mmwave/radar_scan_pcl |
sensor_msgs/PointCloud2 |
The raw point cloud data (X, Y, Z, Doppler, SNR). |
/ti_mmwave/radar_track_array |
ti_mmwave_rospkg_msgs/RadarTrackArray |
List of tracked objects (ID, Position, Velocity, Acceleration). |
/ti_mmwave/radar_track_marker |
visualization_msgs/MarkerArray |
Visualization markers for RViz (Cubes for objects, Arrows for velocity, Text for IDs). |
- Open RViz2:
ros2 run rviz2 rviz2 - Set the Fixed Frame to
ti_mmwave_0. - Add a PointCloud2 display and subscribe to
/ti_mmwave/radar_scan_pcl. - Add a MarkerArray display and subscribe to
/ti_mmwave/radar_track_marker.