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.
./smart_extract.sh
ros2 launch umrr_ros2_driver radar.launch.py
- ROS2 foxy
A smartmicro UMRR96, UMRR11, DRVEGRD 152 or DRVEGRD 169 radar are 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:
February 06, 2023
- Smart Access Automotive version:
v3.0.0
- User interface version:
UMRR96 Type 153 AUTOMOTIVE v1.2.1
- User interface version:
UMRR11 Type 132 AUTOMOTIVE v1.1.1
- User interface version:
UMRR9F Type 169 AUTOMOTIVE v1.1.1
- User interface version:
UMRR9F Type 169 AUTOMOTIVE v2.0.0
- User interface version:
UMRR9D Type 152 AUTOMOTIVE v1.0.2
This ROS2 driver release is compatible with the following sensor firmwares:
- UMRR11 Type 132: V5.1.4
- UMRR96 Type 153: V5.2.4
- UMRR9D Type 152: V2.1.0
- UMRR9F Type 169: V1.3.0
- UMRR9F Type 169: V2.0.2
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
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
- Through using the sensor simulators
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 driver publishes sensor_msgs::msg::PointCloud2
messages with the radar targets on the topic
umrr/targets
which can be remapped through the parameters.
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 integerip
: the IP of the used sensor or the sourceport
: port to be used to receive the packetsiface_name
: name of the used network interfaceframe_id
: name of the frame in which the messages will be publishedhistory_size
: size of history for the message publishermodel
: the model('umrr11', 'umrr9d', 'umrr96', 'umrr9f_v1_1_1', 'umrr9f_v2_0_0') of the sensor being used
The smartmicro radars come equipped with numerous features and modes of operation. Using the ros2 services provided one
may access these modes. A list of available sensor modes is given in the sensor_params.json
.
A ros2 SetMode
service should be called to implement these mode changes. There are three inputs to a ros2 service call:
param
: name of the mode instruction (specific to the sensor)value
: the mode of operation (specific to sensor where the modes are same)sensor_id
: the id of the sensor to which the service call should be sent.
For instance, changing the Index of Transmit Antenna (tx_antenna_idx)
of a UMRR-11 sensor to AEB (2)
mode would require the following call:
ros2 service call /smart_radar/set_radar_mode umrr_ros2_msgs/srv/SetMode "{param: "tx_antenna_idx", value: 2, sensor_id: 100}"
In order to use multiple sensors (maximum of up to eight sensors) with the node the sensors should be configured separately. The IP addresses of the sensors could be assigned using:
- The smartmicro tool
DriveRecorder
. - Using the
Smart Access C++ API
- Using
Sensor Services
provided by the node
Each sensor has to be assigned a unique IP address!
To use the ros2 SetIp
service we require two inputs:
value_ip
: the value of the ip address in decimal. For instance to set the IP to192.168.11.64
its corresponding value in decimal3232238400
should be used.sensor_id
: the sensor whose ip address is to be changed.
The call for such a service would be as follows:
ros2 service call /smart_radar/set_ip_address umrr_ros2_msgs/srv/SetIp "{value_ip: 3232238400, sensor_id: 100}"
Note: For successfull execution of this call it is important that the sensor is restarted, the ip address in the
radar.template.yaml
is updated and the driver is build again.
In order to save the mode changes, an additional service if provided. This service offers different save options and also the possibility to
set the default values for the sensors. The list of all the options could be found in the sensor_commands.json
.
The call for such a service would be as follows:
ros2 service call /smart_radar/send_command umrr_ros2_msgs/srv/SendCommand "{command: "comp_eeprom_ctrl_default_param_sec", sensor_id: 100}"
The sensor services respond with certain value codes. The following is a lookup table for the possible responses:
Value | Description |
---|---|
0 | No instruction Response |
1 | Instruction Response was processed successfully |
2 | General error |
6 | Invalid protection |
7 | Value out of minimal bounds |
8 | Value out of maximal bounds |
The dockerfile can be used to build and test the ros driver.
- Docker version >= 20.10.14
- Docker compose version >= 1.29.2
Accept the agreement and get the smartaccess release
./smart_extract.sh
Building docker container
docker build . -t umrr-ros:latest
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
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
The Smart Access release which will be downloaded using the script also offers platform support for armv8. In order to build the driver on an armv8 machine, the CMakeLists.txt
should be adopted.
Instead of using the default lib-linux-x86_64_gcc_9
the user should plugin the lib-linux-armv8-gcc_9
for armv8.
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.
Licensed under the Apache 2.0 License.