Skip to content

shahzaibraza37/smartmicro_ros2_radars

 
 

Repository files navigation

ROS2 smartmicro radar driver

Build and test

Purpose / Use cases

There is a need for a node that will interface with a smartmicro radar driver and publish the data acquired by the sensor through the ROS2 pipeline. This package implements such a node.

Get the smartaccess release

./smart_extract.sh

How to launch this node

ros2 launch umrr_ros2_driver radar.launch.py

Prerequisites

Supported ROS distributions:

  • ROS2 foxy

UMRR-96 radar and Smart Access API version

A smartmicro UMRR-96 radar (or data recorded from it) is required to run this node. This code is bundled with a version of Smart Access API. Please make sure the version used to publish the data is compatible with this version:

  • Date of release: November 01, 2021
  • Library version: v3.3.15
  • User interface version: Smartaccess UMRR96 Type 153 AUTOMOTIVE v4.1.1

Point cloud message wrapper library

To add targets to the point cloud in a safe and quick fashion a point_cloud_msg_wrapper library is used within this project's node. This project can be installed either through rosdep or manually by executing:

sudo apt install ros-foxy-point-cloud-msg-wrapper

Inputs / Outputs / Configuration

The inputs:

The inputs are coming as network packages generated in either of the following two ways:

  • Through directly interfacing with the sensor
  • Through a provided pcap file

These inputs are processed through the Smart Access C++ API and trigger a callback. Every time this callback is triggered a new point cloud message is created and published.

The outputs:

The driver publishes sensor_msgs::msg::PointCloud2 messages with the radar targets on the topic umrr/targets which can be remapped through the parameters.

Configuration:

The node is configured through the parameters. Here is a short recap of the most important parts. For more details, see the radar.template.yaml file.

  • client_id: the id of the client, must be a unique integer
  • ip: the IP of the used sensor or the source
  • port: port to be used to receive the packets
  • iface_name: name of the used network interface
  • frame_id: name of the frame in which the messages will be published
  • history_size: size of history for the message publisher

Configuration of the sensors

In order to use multiple sensors with the node the sensors should be configured separately. There are two possible ways to assign IP addresses to the sensors:

  • Through the smartmicro tool DriveRecorder.
  • Using the Smart Access C++ API.

Each sensor has to be assigned a unique IP address!

Development

The dockerfile can be used to build and test the ros driver.

Building docker container

docker build . -t umrr-ros:latest

Accept the agreement and get the smartaccess release

./smart_extract.sh

Building the driver with the docker container

docker run --rm -v`pwd`:/code umrr-ros colcon build

Running the unit and integration tests via the docker compose

docker-compose up --exit-code-from ros_node

Getting the test coverage via the docker container

docker run --rm -v`pwd`:/code umrr-ros colcon test-result --all --verbose

Stop and remove docker containers and networks

docker-compose down

Contribution

This project is a joint effort between smartmicro and Apex.AI. The initial version of the code was developed by Igor Bogoslavskyi of Apex.AI (@niosus) and was thereafter adapted and extended by smartmicro.

License

Licensed under the Apache 2.0 License.

About

ROS2 support for smartmicro radars.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 46.2%
  • Python 22.4%
  • CMake 15.5%
  • Shell 15.3%
  • Dockerfile 0.6%