Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 17 additions & 15 deletions .github/workflows/dockerbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,27 @@ on:
jobs:
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
ros_distro: [foxy, humble, jazzy]
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Checkout
uses: actions/checkout@v2
- name: Get the Smart Access binaries
run: echo "yes" | ./smart_extract.sh

- name: Get the Smart Access binaries
run: echo "yes" | ./smart_extract.sh
- name: Build docker container
run: docker build --build-arg ROS_DISTRO=${{ matrix.ros_distro }} -t umrr-ros:${{ matrix.ros_distro }} .

- name: Build the docker container
run: docker build . -t umrr-ros:latest
- name: Build the driver
run: docker run --rm -v $(pwd):/code umrr-ros:${{ matrix.ros_distro }} colcon build --packages-skip smart_rviz_plugin

- name: Building the driver with the docker container
run: docker run --rm -v`pwd`:/code umrr-ros colcon build --packages-skip smart_rviz_plugin
- name: Run tests
run: ROS_DISTRO=${{ matrix.ros_distro }} docker compose up

- name: Running the unit/integration tests via the docker container and exit
run: docker compose up
- name: Collect test results
run: docker run --rm -v`pwd`:/code umrr-ros:${{ matrix.ros_distro }} colcon test-result --all --verbose

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

- name: Shut down docker containers and networks
run: docker compose down
- name: Shut down containers
run: docker compose down
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,19 @@ All notable changes to this project will be documented in this file. This projec
- **New User Interfaces**: Added user interfaces for DRVEGRD 152 v1.5.0 and DRVEGRD 171 v1.4.0.
- **RViz Plugins**: Extended service configurator with DRVEGRD 171 MSE instruction set.
- **Adopted Testing**: Includes check for new DRVEGRD 171 v1.5.0.
- **Updated External libraries**: Updated external libraries compatible with the new smart access release.
- **Updated External libraries**: Updated external libraries compatible with the new smart access release.

## v8.0.0 - 2026-03-03

### New Features
- **User Interface for DRVEGRD 166 v1.0.0**: Introduced a new UI.
- **User Interface for DRVEGRD 166 v2.0.0**: Introduced a new UI.
- **New User Interfaces**: Added user interfaces for DRVEGRD 169 v3.0.0, DRVEGRD 169 MSE v1.3.0 and DRVEGRD 171 MSE v2.1.0.
- **Multi-Distro Support**: Added full compatibility for ROS 2 Foxy, Humble, and Jazzy via updated Docker configurations and CI/CD pipelines.
- **Batch Instruction Interface**: Introduced a new extensible service structure allowing multiple parameters of varying types (float, uint8/16/32) to be sent in a single request.
- **Asynchronous Firmware Updates**: Refactored the download protocol to use a thread-safe, non-blocking architecture, preventing RViz UI freezes during sensor updates.
- **Expanded Service Set**: Integrated new GetMode and GetStatus services into the smartmicro node logic.
- **Enhanced RViz Plugins**: Updated the Service Configurator and Download plugins with improved layouts, section-based parameters, and read/write capabilities.

### Breaking Changes
- **Message Structure Refactor**: Replaced single-field param and value fields with array-based params, values, and value_types to support batch processing. Existing integrations must be updated to the new array format.
39 changes: 27 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,35 @@
FROM ros:foxy
# ROS 2 distro (default = foxy)
ARG ROS_DISTRO=foxy
FROM ros:${ROS_DISTRO}

## Revert to snapshot once GPG key error is resolved
RUN rm /etc/apt/sources.list.d/ros2-snapshots.list
RUN apt-get update && apt-get install curl -y
RUN curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
RUN echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
# Fix repo keys ONLY for Foxy (snapshots issue).
RUN if [ "$ROS_DISTRO" = "foxy" ]; then \
rm -f /etc/apt/sources.list.d/ros2-snapshots.list || true && \
apt-get update && apt-get install -y curl gnupg2 lsb-release && \
curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key \
-o /usr/share/keyrings/ros-archive-keyring.gpg && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] \
http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" \
| tee /etc/apt/sources.list.d/ros2.list > /dev/null ; \
fi

# Common dependencies
RUN apt-get update && apt-get install -y \
iputils-ping \
python3 \
python3-pip \
ros-foxy-point-cloud-msg-wrapper \
ros-foxy-rviz2 \
ros-foxy-rviz-common \
ros-foxy-rviz-default-plugins \
ros-foxy-rviz-rendering \
wget
wget \
git \
ca-certificates \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*

# ROS-specific dependencies
RUN apt-get update && apt-get install -y \
ros-${ROS_DISTRO}-point-cloud-msg-wrapper \
ros-${ROS_DISTRO}-rviz2 \
ros-${ROS_DISTRO}-rviz-common \
ros-${ROS_DISTRO}-rviz-default-plugins \
ros-${ROS_DISTRO}-rviz-rendering

WORKDIR /code
66 changes: 48 additions & 18 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ ros2 launch umrr_ros2_driver radar.launch.py
## How to launch the rviz with recorder plugin
From a separate terminal and after sourcing workspace
```
rviz2 -d [`recorder.rviz`](smart_rviz_plugin/config/rviz/recorder.rviz)
rviz2 -d smartmicro_ros2_radars/umrr_ros2_driver/config/rviz/smart_plugin.rviz
```

![Recorder](smart_rviz_plugin/config/images/recorder_rviz.png "Rviz Outlook")
![Recorder](smart_rviz_plugin/config/images/smart_rviz_plugin.png "Rviz Outlook")

## How to start the custom can message sender
From smart_rviz_plugin folder
Expand All @@ -42,8 +42,8 @@ A [smartmicro](https://www.smartmicro.com/automotive-radar) UMRR96, UMRR11, DRVE
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 12, 2025`
- Smart Access Automotive version: `v3.9.0`
- Date of release: `March 03, 2026`
- Smart Access Automotive version: `v3.11.0`

For each sensor user interface there is a corressponding sensor firmware. The following list all the possible combinations.

Expand All @@ -64,14 +64,20 @@ For each sensor user interface there is a corressponding sensor firmware. The fo
| UMRR9D Type 152 AUTOMOTIVE v1.2.2 | UMRR9D Type 152: V2.5.0 |
| UMRR9D Type 152 AUTOMOTIVE v1.4.1 | UMRR9D Type 152: V2.7.0 |
| UMRR9D Type 152 AUTOMOTIVE v1.5.0 | UMRR9D Type 152: V3.3.0 |
| UMRR9D Type 152 AUTOMOTIVE v1.5.0 | UMRR9D Type 152: V3.6.0 |
| UMRRA4 Type 171 AUTOMOTIVE v1.0.0 | UMRRA4 Type 171: V1.0.0 |
| UMRRA4 Type 171 AUTOMOTIVE v1.0.1 | UMRRA4 Type 171: V1.0.0 |
| UMRRA4 Type 171 AUTOMOTIVE v1.2.1 | UMRRA4 Type 171: V1.2.1 |
| UMRRA4 Type 171 AUTOMOTIVE v1.4.0 | UMRRA4 Type 171: V2.0.0 |
| UMRRA4 Type 171 AUTOMOTIVE v1.4.0 | UMRRA4 Type 171: V2.3.0 |
| UMRR11 Type 132 MSE v1.1.1 | UMRR11 Type 132-MSE: V6.1.2 |
| UMRR9F Type 169 MSE v1.0.0 | UMRR9F Type 169-MSE: V1.1.0 |
| UMRR9F Type 169 MSE v1.1.0 | UMRR9F Type 169-MSE: V1.3.0 |
| UMRR9F Type 169 MSE v1.3.0 | UMRR9F Type 169-MSE: V1.5.0 |
| UMRRA4 Type 171 MSE v1.0.0 | UMRR9F Type 171-MSE: V1.0.0 |
| UMRRA4 Type 171 MSE v1.3.0 | UMRR9F Type 171-MSE: V2.1.0 |
| UMRRA1 Type 166 AUTOMOTIVE v1.0.0 | UMRRA1 Type 166: V1.0.0 |
| UMRRA1 Type 166 AUTOMOTIVE v2.0.0 | UMRRA1 Type 166: V1.0.0 |

### Point cloud message wrapper library
To add targets to the point cloud in a safe and quick fashion a
Expand Down Expand Up @@ -120,11 +126,13 @@ To set up the ***sensors***, configure the following parameters:

- **`model`**: Defines the model of the sensor being used.
- **CAN Models**:
`umrra4_can_mse_v1_0_0`, `umrr9f_can_mse_v1_1_0`, `umrr9f_can_mse_v1_0_0`, `umrr96_can_v1_2_2`, `umrr11_can_v1_1_2`, `umrr9f_can_v2_1_1`, `umrr9f_can_v2_2_1`,
`umrr9f_can_v2_4_1`, `umrr9d_can_v1_0_3`, `umrr9d_can_v1_2_2`, `umrr9d_can_v1_4_1`, `umrr9d_can_v1_5_0`, `umrra4_can_v1_0_1`, `umrra4_can_v1_2_1`,`umrra4_can_v1_4_0`
'umrra4_can_mse_v1_0_0', 'umrra4_can_mse_v2_1_0', 'umrr9f_can_mse_v1_1_0', 'umrr9f_can_mse_v1_0_0', 'umrr96_can_v1_2_2',
'umrr11_can_v1_1_2', 'umrr9f_can_v2_1_1', 'umrr9f_can_v2_2_1', 'umrr9f_can_v2_4_1', 'umrr9f_can_v3_0_0', 'umrr9d_can_v1_0_3',
'umrr9d_can_v1_2_2', 'umrr9d_can_v1_4_1', 'umrr9d_can_v1_5_0', 'umrra4_can_v1_0_1', 'umrra4_can_v1_2_1', 'umrra4_can_v1_4_0'
- **Port Models**:
`umrra4_mse_v1_0_0`, `umrr9f_mse_v1_1_0`, `umrr9f_mse_v1_0_0`, `umrr96_v1_2_2`, `umrr11_v1_1_2`, `umrr9f_v2_1_1`, `umrr9f_v2_2_1`,
`umrr9f_v2_4_1`, `umrr9d_v1_0_3`, `umrr9d_v1_2_2`, `umrr9d_v1_4_1`, `umrr9d_v1_5_0`, `umrra4_v1_0_1`, `umrra4_v1_2_1`,`umrra4_v1_4_0`
'umrra1_v2_0_0', 'umrra1_v1_0_0', 'umrra4_mse_v1_0_0', 'umrra4_mse_v2_1_0', 'umrr9f_mse_v1_3_0', 'umrr9f_mse_v1_1_0',
'umrr9f_mse_v1_0_0', 'umrr96_v1_2_2', 'umrr11_v1_1_2', 'umrr9f_v2_1_1', 'umrr9f_v2_2_1', 'umrr9f_v2_4_1','umrr9f_v3_0_0',
'umrr9d_v1_0_3', 'umrr9d_v1_2_2', 'umrr9d_v1_4_1', 'umrr9d_v1_5_0', 'umrra4_v1_0_1', 'umrra4_v1_2_1', 'umrra4_v1_4_0'

- **`dev_id`**: Adapter ID to which the sensor is connected.
***Note:*** The adapter and sensor must have the same `dev_id`.
Expand Down Expand Up @@ -180,21 +188,42 @@ To set up the ***adapters***, configure the following parameters:
The smartmicro radars come equipped with numerous features and modes of operation. Using the ros2 services provided one
may access these modes and send commands to the sensor. A list of available sensor operations is given in the [`user_interfaces`](umrr_ros2_driver/smartmicro/user_interfaces/).

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)
A ros2 `SetMode` service should be called to implement these mode changes. These are the inputs to a ros2 `SetMode` service call:
- `params`: name/names of the mode instructions (specific to the sensor).
- `values`: 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.
- `value_types`: the data types for the params `0: float32, 1: uint32, 2: uint16, 3: uint8`.
- `section_name`: the name of the section in the instruction file.

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}"`
For instance, changing the `Index of center frequency (center_frequency_idx)` of a UMRR-A4 sensor to `(1)` mode would require the following call:
`ros2 service call /smart_radar/set_radar_mode umrr_ros2_msgs/srv/SetMode "{section_name: auto_interface_0dim, sensor_id: 100, params: ['center_frequency_idx'], values: ['1'], value_types: [3]}"`

A ros2 'GetMode' service can be called to get the actual sensor modes. The inputs for this call are:
- `params`: name/names of the mode instructions (specific to the sensor).
- `sensor_id`: the id of the sensor to which the service call should be sent.
- `param_types`: the data types for the params `0: float32, 1: uint32, 2: uint16, 3: uint8`.
- `section_name`: the name of the section in the instruction file.

For instance, getting the `Index of center frequency (center_frequency_idx)` of a UMRR-A4 sensor to `(1)` mode would require the following call:
`ros2 service call /smart_radar/get_radar_mode umrr_ros2_msgs/srv/GetMode "{section_name: auto_interface_0dim, sensor_id: 100, params: ['center_frequency_idx'], param_types: [3]}"`

Similarly, a ros2 `SendCommand` service could be used to send commands to the sensors. There are three inputs for sending a command:
- `command`: name of the command (specific to the sensor interface)
- `value`: the value of the command
- `sensor_id`: the id of the sensor to which the service call should be sent.
- `section_name`: the name of the section in the instruction file.

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", value: 2, sensor_id: 100}"`
`ros2 service call /smart_radar/send_command umrr_ros2_msgs/srv/SendCommand "{section_name: auto_interface_command, command: "comp_eeprom_ctrl_default_param_sec", value: 2, sensor_id: 100}"`

Apart from commands and modes we can also access the status of the sensor using a ros2 `GetStatus` service. It has three inputs:
- `statuses`: name/names of the status (specific to the sensor).
- `sensor_id`: the id of the sensor to which the service call should be sent.
- `status_types`: the data types for the status `0: uint32, 1: uint16`.
- `section_name`: the name of the section in the instruction file.

The call would be like follows:
`ros2 service call /smart_radar/get_radar_status umrr_ros2_msgs/srv/GetStatus "{section_name: auto_interface, sensor_id: 100, statuses: ["sw_version_major", "sw_version_minor"], status_types: [1, 1]}"`

## Configuration of the sensors
In order to use multiple sensors (maximum of up to eight sensors) with the node the sensors should be configured separately.
Expand Down Expand Up @@ -242,10 +271,11 @@ The sensor services respond with certain value codes. The following is a lookup
7 | Value out of minimal bounds
8 | Value out of maximal bounds

## Recorder plugin and custom CAN sender
A custom plugin for rviz to log the target list has been provided. A config file is available which adds this plugin to the rviz. WIth the plugin
it is now possible to view the target list data for the desired sensor. Along with logging the data the plugin also gives the possibility to record
the target list data, convert it into a csv format and save it.
## RVIZ plugins and custom CAN sender
Custom plugins for rviz has been provided. This plugin provides logging of the target list, object list and their respective headers.
It provides a command configurator plugin through which commands, status and mode reqeust could be send. It also provides a plugin for initiating a firmware download.
A config file is available which adds this plugin to the rviz. Along with logging the data the plugin also gives the possibility to record
the target/object list data, convert it into a csv format and save it.

Separately, a python GUI is also provided with which it is possible to send custom CAN messages.

Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@
version: "3"
services:
build_simulator:
image: umrr-ros:latest
image: umrr-ros:${ROS_DISTRO:-foxy}
volumes:
- .:/code
entrypoint: ["/code/simulator/simulation/build_simulator.sh"]
sensor_0:
depends_on:
build_simulator:
condition: service_completed_successfully
image: umrr-ros:latest
image: umrr-ros:${ROS_DISTRO:-foxy}
volumes:
- .:/code
environment:
Expand All @@ -38,7 +38,7 @@ services:
depends_on:
build_simulator:
condition: service_completed_successfully
image: umrr-ros:latest
image: umrr-ros:${ROS_DISTRO:-foxy}
volumes:
- .:/code
environment:
Expand All @@ -53,7 +53,7 @@ services:
depends_on:
build_simulator:
condition: service_completed_successfully
image: umrr-ros:latest
image: umrr-ros:${ROS_DISTRO:-foxy}
volumes:
- .:/code
environment:
Expand All @@ -68,7 +68,7 @@ services:
depends_on:
build_simulator:
condition: service_completed_successfully
image: umrr-ros:latest
image: umrr-ros:${ROS_DISTRO:-foxy}
volumes:
- .:/code
environment:
Expand All @@ -80,7 +80,7 @@ services:
device_network:
ipv4_address: 172.22.10.104
ros_node:
image: umrr-ros:latest
image: umrr-ros:${ROS_DISTRO:-foxy}
depends_on:
- "sensor_0"
- "sensor_1"
Expand Down
Loading
Loading