Skip to content

A lightweight ROS2 driver for the TI IWR6843 mmWave radar running Mobile Tracker firmware. It parses custom TLVs to publish point clouds and tracked object lists with RViz visualization support.

Notifications You must be signed in to change notification settings

Zhenyu98/ti_mobile_tracker_ros2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation


ROS2 Driver for TI IWR6843 Mobile Tracker

A lightweight, Python-based ROS2 driver designed specifically for the Texas Instruments IWR6843 mmWave Radar running the Mobile Tracker firmware .

🚀 Motivation

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:

  1. Configuring the radar with a specific .cfg file (e.g., Mobile_Tracker_car.cfg).
  2. Parsing the specific TLVs (Point Cloud, Side Info, Target List, Target Index) used in tracking applications.
  3. Publishing standard ROS2 messages (PointCloud2) and TI-specific tracking messages.
  4. Visualizing tracking results with MarkerArray in RViz.

📦 Dependencies

System Dependencies

  • ROS2 (Tested on Humble with Ubuntu 22.04)
  • Python 3
  • PySerial: pip3 install pyserial
  • NumPy: pip3 install numpy

ROS Dependencies

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 (Contains RadarTrackArray and RadarTrackContents)
  • sensor_msgs
  • visualization_msgs

⚙️ Configuration: Serial Ports

The IWR6843 typically exposes two serial ports:

  1. Command/CLI Port (User UART): Used to send configuration commands.
  2. Data Port (Data UART): Used to receive high-speed radar data.

You have two options to configure these ports:

Option 1: Using Udev Rules (Recommended)

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.

  1. Check your device ID (usually 10c4:ea70 for Silicon Labs CP210x):

    Bash

    lsusb
    
  2. Create a rule file:

    Bash

    sudo nano /etc/udev/rules.d/99-mmwave-radar.rules
    
  3. Add the following lines (adjust idVendor and idProduct if 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/ttyUSBx to find unique attributes.

  4. Reload rules:

    Bash

    sudo udevadm control --reload-rules && sudo udevadm trigger
    

Option 2: Specifying Ports via Parameters

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.

🛠️ Installation

  1. Clone this repository into your ROS2 workspace src folder:

    Bash

    cd ~/ros2_ws/src
    git clone https://github.com/YOUR_USERNAME/mobile_tracker.git
    
  2. Build the workspace:

    Bash

    cd ~/ros2_ws
    colcon build --packages-select mobile_tracker
    source install/setup.bash
    

▶️ Usage

Run with Default Settings

By default, the driver looks for /dev/ttyUSB0 (CLI) and /dev/ttyUSB1 (Data).

Bash

ros2 run mobile_tracker mmwave_6843_driver

Run with Custom Ports (Command Line)

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

Run with a Custom Config File

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

📡 Topics Published

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).

📊 Visualization (RViz)

  1. Open RViz2: ros2 run rviz2 rviz2
  2. Set the Fixed Frame to ti_mmwave_0.
  3. Add a PointCloud2 display and subscribe to /ti_mmwave/radar_scan_pcl.
  4. Add a MarkerArray display and subscribe to /ti_mmwave/radar_track_marker.

About

A lightweight ROS2 driver for the TI IWR6843 mmWave radar running Mobile Tracker firmware. It parses custom TLVs to publish point clouds and tracked object lists with RViz visualization support.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages