GithubHelp home page GithubHelp logo

codesteller86 / mmwave_ti_ros Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kimsooyoung/mmwave_ti_ros

0.0 0.0 0.0 26.17 MB

Ti mmWave Radar ROS/ROS 2 packages & Applications

C++ 78.77% Python 15.34% C 1.53% Makefile 0.63% CMake 3.74%

mmwave_ti_ros's Introduction

TI mmWave ROS 2 Package (Customized)

Radar can overcome some cases that other sensors cannot. Such as transparent, metalic objects, dark and rainy area. TI's mmWave is cheap, stable, and powerful sensor for radar sensing. And this package is made for ROS 2 compatibility for that.

Quick start guide

  1. Mount your mmWave device with power supply and connect a micro-USB cable to host machine with ROS 2. This pkg is vertified in below systems
  • Ubuntu 18.04 & ROS 2 eloquent
  • Ubuntu 20.04 & ROS 2 foxy
  • NVIDIA Jetpack 4 & ROS 2 eloquent

Here's example of mount (designed by Lee, Jongmyeong)

  1. Download SDK 3.0 or above from here and use UNIFLASH to flash xwrXXXX_mmw_demo.bin to your device. Do not forget SOP2 jumper when flashing.

I recommend to check with Demo Visualizer before launching ROS 2 demo

  1. Install apt Dependencies
# install linux pkgs
sudo apt-get install libpthread-stubs0-dev
sudo apt install ros-eloquent-perception-pcl -y
sudo apt install ros-eloquent-composition -y
  1. Clone this repo and build ROS 2 packages
# cd `<workspace dir>/src`
git clone https://github.com/kimsooyoung/mmwave_ti_ros.git

# pkg build
colcon build --symlink-install --packages-select serial
source install/local_setup.bash

colcon build --symlink-install --packages-select ti_mmwave_ros2_interfaces
source install/local_setup.bash

colcon build --symlink-install --packages-select ti_mmwave_ros2_pkg
source install/local_setup.bash

# For this package, pcl common is required, But don't be afraid, ROS Installing contains PCL
colcon build --symlink-install --packages-select ti_mmwave_ros2_examples
source install/local_setup.bash

If Boost error occurs during building, check your boost version with correct symbolic link (ref by stackoverflow)

# check boost version
cat /usr/include/boost/version.hpp | grep "BOOST_LIB_VERSION"
# symbolic link reconfigure 
sudo ln -s /usr/lib/aarch64-linux-gnu/libboost_system.so.1.65.1 /usr/lib/libboost_system.so
  1. Enable command and data ports on Linux:
# validate usb connection
$ ls -l /dev/ | grep mmWave
mmWave_00ED33DD_00 -> ttyUSB0
mmWave_00ED33DD_01 -> ttyUSB1

# give permission to usb pins
sudo chmod 666 /dev/ttyUSB0
sudo chmod 666 /dev/ttyUSB1

Note: If multiple sensors are used, enable additional ports /dev/ttyACM2 and /dev/ttyACM3, etc. the same as this step.

  1. Launch ROS 2 Command
ros2 launch ti_mmwave_ros2_pkg eloquent_composition.launch.py

Bad news. Main node uses pthread instead of ROS 2 lifecycle. Therefore, you must kill process manually for clearly exit program.

kill -9 \`ps faux | grep ti_mmwave_ros2_ | awk '{print $2}'\`
kill -9 \`ps faux | grep component | awk '{print $2}'\`

Based on updates from Dr. Leo Zhang (University of Arizona)

Contributor Updated Content
Kim Soo Young Add support for ROS 2. SDK version: 3.5.0.4.
Dr. Zhang Add support for XWR18XX devices. SDK version: 3.2.0.4.
Allison Wendell Add support for XWR68XX devices. SDK version: 3.2.0.4

Initially derived from TI's origin ROS package in Industrial Toolbox 2.3.0 (new version available Industrial Toolbox 2.5.2).


Differences from origin TI's version:

  1. Added all radar parameters from calculations and can be read from rosparam get.
  2. Added Doppler data from detecting targets and form a customized ROS message /ti_mmwave/radar_scan.
  3. Added support for multiple radars working together.
  4. Added support for camera overlay (for sensor fusion).
  5. Working with xWR1443 and xWR1642 ES1.0 and ES2.0 (ES1.0 is deprecated from TI)

Available devices:

  • TI mmWave xWR1443BOOST
  • TI mmWave xWR1642BOOST
  • TI mmWave xWR1642BOOST ES2.0/3.0 EVM (not tested)
  • TI mmWave xWR1642BOOST ES2.0 EVM
  • TI mmWave AWR1843BOOST ES1.0 EVM
  • TI mmWave IWR6843ISK ES1.0 EVM (verified)

Message format:

header: 
  seq: 6264
  stamp: 
    secs: 1538888235
    nsecs: 712113897
  frame_id: "ti_mmwave"   # Frame ID used for multi-sensor scenarios
point_id: 17              # Point ID of the detecting frame (Every frame starts with 0)
x: 8.650390625            # Point x coordinates in m (front from antenna)
y: 6.92578125             # Point y coordinates in m (left/right from antenna, right positive)
z: 0.0                    # Point z coordinates in m (up/down from antenna, up positive)
range: 11.067276001       # Radar measured range in m
velocity: 0.0             # Radar measured range rate in m/s
doppler_bin: 8            # Doppler bin location of the point (total bins = num of chirps)
bearing: 38.6818885803    # Radar measured angle in degrees (right positive)
intensity: 13.6172780991  # Radar measured intensity in dB

Troubleshooting

mmWaveCommSrv: Failed to open User serial port with error: IO Exception (13): Permission denied
mmWaveCommSrv: Waiting 20 seconds before trying again...

This happens when serial port is called without superuser permission, do the following steps:

sudo chmod 666 /dev/ttyACM0
sudo chmod 666 /dev/ttyACM1
mmWaveQuickConfig: Command failed (mmWave sensor did not respond with 'Done')
mmWaveQuickConfig: Response: 'sensorStop
'�?`???�?`???�?`???~' is not recognized as a CLI command
mmwDemo:/>'

When this happens, re-run the command you send to sensor. If it continues, shut down and restart the sensor.

terminate called after throwing an instance of 'serial::SerialException'

This means unstable serial connection, change use cable or usb-hub.


Multiple devices support (dual AWR1642 ES2.0 EVM):

  1. Connect two devices and try ll /dev/serial/by-id or ls /dev. In this case, /dev/ttyACM0 to /dev/ttyACM3 should shown.
  2. To avoid serial port confliction, you need to launch devices separately. So for first device (it will open rviz):
roslaunch ti_mmwave_rospkg multi_1642_0.launch 
  1. Change radars' location in first six arguments <node pkg="tf" type="static_transform_publisher" name="radar_baselink_0" args="0 0 0 0 0 0 ti_mmwave_pcl ti_mmwave_0 100"/> (stands for x,y,z for positions in meters and yaw, pitch, roll for angles in radians) in launch file multi_1642_1.launch. And launch second device:
roslaunch ti_mmwave_rospkg multi_1642_1.launch 

Note: As serial connection and the original code, you need to launch devices separately using different launch files.


TODO

  • Multi Sensor Documentation
  • Navigation Usage Documentation
  • Camera overlay support

mmwave_ti_ros's People

Contributors

kimsooyoung avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.