Skip to content

Commit

Permalink
New interface DRVEGRD 171 and DRVEGRD 152 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
smartSRA authored Aug 21, 2023
1 parent c3c5bd9 commit e375d8d
Show file tree
Hide file tree
Showing 11 changed files with 263 additions and 505 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,8 @@ This release fixes the offset which causes anomaly in pointclouds from DRVEGRD 1

## v4.0.0 - 2023-02-06

This release includes the new DRVEGRD 169 user-interface. The release includes new modes for DRVEGRD 169 and also introduces an additional ros2 service to save configurations. Previously used model 'UMRR9F' in radar parameters has been divided into two versions, the 'UMRR9F_V1_1_1' and 'UMRR9F_V2_0_0'.
This release includes the new DRVEGRD 169 user-interface. The release includes new modes for DRVEGRD 169 and also introduces an additional ros2 service to save configurations. Previously used model 'UMRR9F' in radar parameters has been divided into two versions, the 'UMRR9F_V1_1_1' and 'UMRR9F_V2_0_0'.

## v4.1.0 - 2023-08-21

This release includes the new DRVEGRD 171 and DRVEGRD 152 user-interface. The release includes a complete list of all params and commands for all sensors which are accessed using the ros2 services.
30 changes: 17 additions & 13 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,20 @@ ros2 launch umrr_ros2_driver radar.launch.py
- ROS2 foxy

### UMRR radars and Smart Access API version
A [smartmicro](https://www.smartmicro.com/automotive-radar) UMRR96, UMRR11, DRVEGRD 152 or DRVEGRD 169 radar are
A [smartmicro](https://www.smartmicro.com/automotive-radar) UMRR96, UMRR11, DRVEGRD 171, 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`
- Date of release: `August 21, 2023`
- Smart Access Automotive version: `v3.2.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: `UMRR9F Type 169 AUTOMOTIVE v2.2.0`
- User interface version: `UMRR9D Type 152 AUTOMOTIVE v1.0.2`
- User interface version: `UMRR9D Type 152 AUTOMOTIVE v1.2.1`
- User interface version: `UMRRA4 Type 171 AUTOMOTIVE v1.0.0`

### Sensor Firmwares
This ROS2 driver release is compatible with the following sensor firmwares:
Expand All @@ -41,6 +44,8 @@ This ROS2 driver release is compatible with the following sensor firmwares:
- UMRR9D Type 152: V2.1.0
- UMRR9F Type 169: V1.3.0
- UMRR9F Type 169: V2.0.2
- UMRR9F Type 169: V2.2.0
- UMRRA4 Type 171: 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 @@ -74,11 +79,11 @@ For more details, see the [`radar.template.yaml`](umrr_ros2_driver/param/radar.t
- `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
- `model`: the model('umrr11', 'umrr9d', 'umrr96', 'umrr9f_v1_1_1', 'umrr9f_v2_0_0') of the sensor being used
- `model`: the model('umrra4_v1_0_0', 'umrr11', 'umrr9d', 'umrr96', 'umrr9f_v1_1_1', 'umrr9f_v2_0_0') of the sensor being used

## Mode of operations of the sensors
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`](umrr_ros2_driver/config/sensor_params.json).
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)
Expand All @@ -88,6 +93,13 @@ A ros2 `SetMode` service should be called to implement these mode changes. There
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}"`

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

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}"`

## 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.
The IP addresses of the sensors could be assigned using:
Expand All @@ -108,15 +120,7 @@ The call for such a service would be as follows:
Note: For successfull execution of this call it is important that the sensor is restarted, the ip address in the
[`radar.template.yaml`](umrr_ros2_driver/param/radar.template.yaml) is updated and the driver is build again.

## Saving mode changes
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`](umrr_ros2_driver/config/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}"`

## Sensor Service Responses

The sensor services respond with certain value codes. The following is a lookup table for the possible responses:

**Value** | **Description**
Expand Down
2 changes: 1 addition & 1 deletion smart_extract.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
set -e

smart_pack=SmartAccessAutomotive_3_0_0.tgz
smart_pack=SmartAccessAutomotive_3_2_0.tgz
URL_smartbinaries=https://www.smartmicro.com/fileadmin/media/Downloads/Automotive_Radar/Software/${smart_pack}

cat << EOF
Expand Down
49 changes: 24 additions & 25 deletions umrr_ros2_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,39 +45,36 @@ endif()

ament_auto_find_build_dependencies()

set(SMARTMICRO_LIB_DIR "lib-linux-x86_64-gcc_9")

# specify the path to search for the libraries
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9)
link_directories(${CMAKE_CURRENT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR})

install(FILES
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libsmart_access.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libosal.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libcom_lib.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libbasev1.0.2_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libumrr11_t132_automotivev1.1.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libumrr96_t153_automotivev1.2.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libumrr9f_t169_automotivev1.1.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libumrr9f_t169_automotivev2.0.0_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/lib-linux-x86_64-gcc_9/libumrr9d_t152_automotivev1.0.2_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libsmart_access.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libosal.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libcom_lib.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libbasev1.0.2_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr11_t132_automotivev1.1.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr96_t153_automotivev1.2.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9f_t169_automotivev1.1.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9f_t169_automotivev2.0.0_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9f_t169_automotivev2.2.0_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9d_t152_automotivev1.0.2_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9d_t152_automotivev1.2.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrra4_automotivev1.0.0_user_interface.so"
DESTINATION lib)

set(LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib")
set(CONFIG_FOLDER_PATH "${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}/config")
set(CONFIG_FILE_PATH "${CONFIG_FOLDER_PATH}/smart_access_config.json")
set(HW_INVENTORY_FILE_PATH "${CONFIG_FOLDER_PATH}/hw_inventory.json")
set(ROUTING_TABLE_FILE_PATH "${CONFIG_FOLDER_PATH}/routing_table.json")
set(SENSOR_PARAM_FILE_PATH "${PROJECT_SOURCE_DIR}/config/sensor_params.json")
set(SENSOR_COMMAND_FILE_PATH "${PROJECT_SOURCE_DIR}/config/sensor_commands.json")
configure_file(
"${PROJECT_SOURCE_DIR}/cmake/smart_access_config.json.in" "${CONFIG_FILE_PATH}" @ONLY)
configure_file(
"${PROJECT_SOURCE_DIR}/cmake/config_path.hpp.in"
"${CMAKE_INSTALL_PREFIX}/include/${PROJECT_NAME}/config_path.hpp" @ONLY)
configure_file(
"${PROJECT_SOURCE_DIR}/cmake/sensor_params.hpp.in"
"${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/sensor_params.hpp" @ONLY)
configure_file(
"${PROJECT_SOURCE_DIR}/cmake/sensor_commands.hpp.in"
"${PROJECT_SOURCE_DIR}/include/${PROJECT_NAME}/sensor_commands.hpp" @ONLY)

ament_auto_add_library(smartmicro_radar_node SHARED "src/smartmicro_radar_node.cpp")

Expand All @@ -87,7 +84,10 @@ smartmicro/include/umrr11_t132_automotive_v1_1_1
smartmicro/include/umrr96_t153_automotive_v1_2_1
smartmicro/include/umrr9f_t169_automotive_v1_1_1
smartmicro/include/umrr9f_t169_automotive_v2_0_0
smartmicro/include/umrr9d_t152_automotive_v1_0_2)
smartmicro/include/umrr9f_t169_automotive_v2_2_0
smartmicro/include/umrr9d_t152_automotive_v1_0_2
smartmicro/include/umrr9d_t152_automotive_v1_2_1
smartmicro/include/umrra4_automotive_v1_0_0)

# link smart_access_lib-linux-x86_64-gcc_9 to the node
target_link_libraries(smartmicro_radar_node
Expand All @@ -99,7 +99,10 @@ target_link_libraries(smartmicro_radar_node
umrr96_t153_automotivev1.2.1_user_interface
umrr9f_t169_automotivev1.1.1_user_interface
umrr9f_t169_automotivev2.0.0_user_interface
umrr9d_t152_automotivev1.0.2_user_interface)
umrr9f_t169_automotivev2.2.0_user_interface
umrr9d_t152_automotivev1.0.2_user_interface
umrr9d_t152_automotivev1.2.1_user_interface
umrra4_automotivev1.0.0_user_interface)

rclcpp_components_register_node(smartmicro_radar_node
PLUGIN "smartmicro::drivers::radar::SmartmicroRadarNode"
Expand All @@ -109,11 +112,7 @@ rclcpp_components_register_node(smartmicro_radar_node
if(BUILD_TESTING)
find_package(launch_testing_ament_cmake)
add_launch_test(test/radar_node_test.launch.py TIMEOUT "150")

find_package(ament_cmake_gtest REQUIRED)
ament_add_gtest(test_smartmicro_radar_node test/test_smartmicro_radar_node.cpp)
target_link_libraries(test_smartmicro_radar_node smartmicro_radar_node)


# Not applying ros2 linters on external sources
list(APPEND AMENT_LINT_AUTO_EXCLUDE
ament_cmake_copyright
Expand Down
17 changes: 0 additions & 17 deletions umrr_ros2_driver/config/sensor_commands.json

This file was deleted.

Loading

0 comments on commit e375d8d

Please sign in to comment.