Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#6 can integration #36

Merged
merged 16 commits into from
Sep 22, 2023
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
16 changes: 10 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,28 +14,32 @@ Requires new sensor firmware, if using UMRR11-T132: V5.1.4 and if using UMRR96-T
## v2.1.0 - 2022-06-02

This minor release of the driver offer ros2 services to communicate with the sensor. The driver now supports mode changes for UMRR96 and UMRR11.
This release also offers the possibilty of configuring the ip addresses of the sensor using ros2 services. The tests are further extended to inlcude ros2 services check. Requires new sensor firmware, if using UMRR11-T132: V5.1.4 and if using UMRR96-T153: V5.2.4.
This release also offers the possibility of configuring the ip addresses of the sensor using ros2 services. The tests are further extended to include ros2 services check. Requires new sensor firmware, if using UMRR11-T132: V5.1.4 and if using UMRR96-T153: V5.2.4.

## v3.0.0 - 2022-09-23

Major release includes the new smartmicro sensor DRVEGRD 169. The driver offers mode changes and configuration of the DRVEGRD 169 along with publishing the radar targets as pointcloud data. The callbacks for datastream now require a clientID.
Major release includes the new smartmicro sensor DRVEGRD 169. The driver offers mode changes and configuration of the DRVEGRD 169 along with publishing the radar targets as point cloud data. The callbacks for datastream now require a clientID.

## v3.1.0 - 2022-10-19

This release includes the new smartmicro sensor DRVEGRD 152. The driver offers mode changes and configuration of the DRVEGRD 152 along with publishing the radar targets as pointcloud data. The callbacks for datastream now require a clientID.
This release includes the new smartmicro sensor DRVEGRD 152. The driver offers mode changes and configuration of the DRVEGRD 152 along with publishing the radar targets as point cloud data. The callbacks for datastream now require a clientID.

## v3.2.0 - 2022-11-11

This minor release introduces signal-to-noise field in the pointclouds and also fixes the max number of sensors that could be connected at once.
This minor release introduces signal-to-noise field in the point clouds and also fixes the max number of sensors that could be connected at once.

## v3.2.1 - 2022-12-16

This release fixes the offset which causes anomaly in pointclouds from DRVEGRD 152 sensor. It also fixes the timestamp calculation bug which causes rviz to crash and updates the simulator source files.
This release fixes the offset which causes anomaly in point clouds from DRVEGRD 152 sensor. It also fixes the timestamp calculation bug which causes rviz to crash and updates the simulator source files.

## 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'.

## 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.
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.

## v5.0.0 - 2023-09-22

This release includes CAN communication for all the provided sensor types and sensors interfaces. The params are now extended to include the params/setting for the connected adapters along with the sensor params.
61 changes: 46 additions & 15 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ 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: `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`
- Date of release: `September 22, 2023`
- Smart Access Automotive version: `v3.4.0`
- User interface version: `UMRR96 Type 153 AUTOMOTIVE v1.2.2`
- User interface version: `UMRR11 Type 132 AUTOMOTIVE v1.1.2`
- 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`
- User interface version: `UMRR9F Type 169 AUTOMOTIVE v2.1.1`
- User interface version: `UMRR9F Type 169 AUTOMOTIVE v2.2.1`
- User interface version: `UMRR9D Type 152 AUTOMOTIVE v1.0.3`
- User interface version: `UMRR9D Type 152 AUTOMOTIVE v1.2.2`
- User interface version: `UMRRA4 Type 171 AUTOMOTIVE v1.0.1`

### Sensor Firmwares
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
- UMRR9D Type 152: V2.5.0
- UMRR9F Type 169: V1.3.0
- UMRR9F Type 169: V2.0.2
- UMRR9F Type 169: V2.2.0
Expand Down Expand Up @@ -70,16 +72,45 @@ 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.

### Configuration:
### Interface Configuration:
For setting up a sensor with ethernet or can, the interfaces of the should be set properly prior to configuring the node.
The sensor is equipped with three physical layers (RS485, CAN and ethernet) however the driver uses only ethernet and can:
- ethernet: to set-up an ethernet interface the following command could be used `ifconfig my_interface_name 192.168.11.17 netmask 255.255.255.0`.
The command above uses the default source ip address used by the sensors.
- can: if using LAWICEL to set-up a can interface the following commands could be used `slcand -o -s6 -t hw -S 3000000 /dev/ttyUSBx`and than `ip link set up my_interface_name`.
This uses the default baudrate of _500000_. When using Peak CAN the interfaces are recognized by linux and is only needed to set the baudrate.

### Node 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`](umrr_ros2_driver/param/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
For more details, see the [`radar.sensor.example.yaml`](umrr_ros2_driver/param/radar.sensor.example.yaml) and
[`radar.adapter.example.yaml`](umrr_ros2_driver/param/radar.adapter.example.yaml) files.

For the setting up the ***sensors***:
- `link_type`: the type of hardware connection
- `model`: the model of the sensor being used
- can: 'umrra4_can_v1_0_1', 'umrr96_can', 'umrr11_can', 'umrr9d_can_v1_0_3', 'umrr9d_can_v1_2_2', 'umrr9f_can_v2_1_1', 'umrr9f_can_v2_2_1'
- port: 'umrra4_v1_0_1', 'umrr96', 'umrr11', 'umrr9d_v1_0_3', 'umrr9d_v1_2_2', 'umrr9f_v1_1_1', 'umrr9f_v2_1_1', 'umrr9f_v2_2_1',
- `dev_id`: adapter id to which sensor is connected. ***The adapter and sensor should have the same dev_id***
- `id`: the client_id of the sensor/source, ***must be a _unique_ integer and non-zero***.
- `ip`: the ***_unique_*** ip address of the sensor or of the source acting as a sensor, required only for sensors using _ethernet_.
- `port`: port to be used to receive the packets, default is _55555_
- `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('umrra4_v1_0_0', 'umrr11', 'umrr9d', 'umrr96', 'umrr9f_v1_1_1', 'umrr9f_v2_0_0') of the sensor being used
- `inst_type`: the type of instruction serialization type, relevant to sensors using ethernet and should be 'port_based'
- `data_type`: the type of data serialization type, relevant to sensors using ethernet and should be 'port_based'
- `uifname`: the user interface name of the sensor
- `uifmajorv`: the major version of the sensor user interface
- `uifminorv`: the minor version of the sensor user interface
- `uifpatchv`: the patch version of the sensor user interface

For setting up the ***adapters***:
- `master_inst_serial_type`: the instruction serilization type of the master. When using a hybrid of 'can' and 'port' use 'can_based'
- `master_data_serial_type`: the data serilization type of the master. When using a hybrid of 'can' and 'port' use 'can_based'
- `hw_type`: the type of the hardware connection
- `hw_dev_id`: adapter id of the hardware, ***the sensor and adapter should use the same id***
- `hw_iface_name`: name of the used network interface
- `baudrate`: the baudrate of the sensor connected with can, default is _500000_
- `port`: port to be used to receive the packets, default is _55555_

## Mode of operations of the sensors
The smartmicro radars come equipped with numerous features and modes of operation. Using the ros2 services provided one
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ services:
- SMART_ACCESS_CFG_FILE_PATH=/code/simulator/config_umrr9f/com_lib_config.json
- LD_LIBRARY_PATH=/code/umrr_ros2_driver/smartmicro/lib-linux-x86_64-gcc_9
entrypoint: ["/code/simulator/simulation/out/bin/simulator"]
command: ["9", "1", "1", "B"]
command: ["9", "2", "1", "C"]
networks:
device_network:
ipv4_address: 172.22.10.103
Expand Down
2 changes: 1 addition & 1 deletion simulator/config_umrr9d/com_lib_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"user_interface_name": "umrr9d_t152_automotive",
"user_interface_major_v": 1,
"user_interface_minor_v": 0,
"user_interface_patch_v": 2,
"user_interface_patch_v": 3,
"download_path": "",
"instruction_serialization_type": "port_based",
"data_serialization_type": "port_based",
Expand Down
2 changes: 1 addition & 1 deletion simulator/config_umrr9f/com_lib_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"shared_lib_path": "/code/umrr_ros2_driver/smartmicro/lib-linux-x86_64-gcc_9",
"config_path": "/code/simulator/config_umrr9f",
"user_interface_name": "umrr9f_t169_automotive",
"user_interface_major_v": 1,
"user_interface_major_v": 2,
"user_interface_minor_v": 1,
"user_interface_patch_v": 1,
"download_path": "",
Expand Down
16 changes: 8 additions & 8 deletions simulator/simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ add_executable(simulator

target_include_directories(simulator PUBLIC
../../umrr_ros2_driver/smartmicro/include
umrr_ros2_driver/smartmicro/include/umrr11_t132_automotive_v1_1_1
umrr_ros2_driver/smartmicro/include/umrr96_t153_automotive_v1_2_1
umrr_ros2_driver/smartmicro/include/umrr9f_t169_automotive_v1_1_1
umrr_ros2_driver/smartmicro/include/umrr9d_t152_automotive_v1_0_2)
umrr_ros2_driver/smartmicro/include/umrr11_t132_automotive_v1_1_2
umrr_ros2_driver/smartmicro/include/umrr96_t153_automotive_v1_2_2
umrr_ros2_driver/smartmicro/include/umrr9f_t169_automotive_v2_1_1
umrr_ros2_driver/smartmicro/include/umrr9d_t152_automotive_v1_0_3)

target_link_libraries(simulator
com_lib
osal
umrr11_t132_automotivev1.1.1_user_interface
umrr96_t153_automotivev1.2.1_user_interface
umrr9f_t169_automotivev1.1.1_user_interface
umrr9d_t152_automotivev1.0.2_user_interface
umrr11_t132_automotivev1.1.2_user_interface
umrr96_t153_automotivev1.2.2_user_interface
umrr9f_t169_automotivev2.1.1_user_interface
umrr9d_t152_automotivev1.0.3_user_interface
dl)

install(TARGETS simulator DESTINATION bin)
2 changes: 1 addition & 1 deletion simulator/simulation/src/simulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int main(int argc, char * argv[])
} else {
std::cout << "Invalid input!" << std::endl;
}
if (std::chrono::steady_clock::now() - Start > std::chrono::seconds(30)) {
if (std::chrono::steady_clock::now() - Start > std::chrono::seconds(15)) {
break;
}
}
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_2_0.tgz
smart_pack=SmartAccessAutomotive_3_4_0.tgz
URL_smartbinaries=https://www.smartmicro.com/fileadmin/media/Downloads/Automotive_Radar/Software/${smart_pack}

cat << EOF
Expand Down
41 changes: 22 additions & 19 deletions umrr_ros2_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ install(FILES
"${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}/libumrr11_t132_automotivev1.1.2_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr96_t153_automotivev1.2.2_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"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9f_t169_automotivev2.1.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9f_t169_automotivev2.2.1_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9d_t152_automotivev1.0.3_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrr9d_t152_automotivev1.2.2_user_interface.so"
"${PROJECT_SOURCE_DIR}/smartmicro/${SMARTMICRO_LIB_DIR}/libumrra4_automotivev1.0.1_user_interface.so"
DESTINATION lib)

set(LIB_PATH "${CMAKE_INSTALL_PREFIX}/lib")
Expand All @@ -80,29 +81,31 @@ ament_auto_add_library(smartmicro_radar_node SHARED "src/smartmicro_radar_node.c

target_include_directories(smartmicro_radar_node PUBLIC ${CMAKE_INSTALL_PREFIX}/include/
smartmicro/include/
smartmicro/include/umrr11_t132_automotive_v1_1_1
smartmicro/include/umrr96_t153_automotive_v1_2_1
smartmicro/include/umrr11_t132_automotive_v1_1_2
smartmicro/include/umrr96_t153_automotive_v1_2_2
smartmicro/include/umrr9f_t169_automotive_v1_1_1
smartmicro/include/umrr9f_t169_automotive_v2_0_0
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)
smartmicro/include/umrr9f_t169_automotive_v2_1_1
smartmicro/include/umrr9f_t169_automotive_v2_2_1
smartmicro/include/umrr9d_t152_automotive_v1_0_3
smartmicro/include/umrr9d_t152_automotive_v1_2_2
smartmicro/include/umrra4_automotive_v1_0_1)

# link smart_access_lib-linux-x86_64-gcc_9 to the node
target_link_libraries(smartmicro_radar_node
smart_access
nlohmann_json::nlohmann_json
com_lib
osal
umrr11_t132_automotivev1.1.1_user_interface
umrr96_t153_automotivev1.2.1_user_interface
umrr11_t132_automotivev1.1.2_user_interface
umrr96_t153_automotivev1.2.2_user_interface
umrr9f_t169_automotivev1.1.1_user_interface
umrr9f_t169_automotivev2.0.0_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)
umrr9f_t169_automotivev2.1.1_user_interface
umrr9f_t169_automotivev2.2.1_user_interface
umrr9d_t152_automotivev1.0.3_user_interface
umrr9d_t152_automotivev1.2.2_user_interface
umrra4_automotivev1.0.1_user_interface)

rclcpp_components_register_node(smartmicro_radar_node
PLUGIN "smartmicro::drivers::radar::SmartmicroRadarNode"
Expand All @@ -111,7 +114,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")
add_launch_test(test/radar_node_test.launch.py TIMEOUT "100")

# Not applying ros2 linters on external sources
list(APPEND AMENT_LINT_AUTO_EXCLUDE
Expand Down
4 changes: 2 additions & 2 deletions umrr_ros2_driver/cmake/smart_access_config.json.in
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"user_interface_minor_v": 0,
"user_interface_patch_v": 2,
"download_path": "",
"instruction_serialization_type": "port_based",
"data_serialization_type": "port_based",
"instruction_serialization_type": "can_based",
"data_serialization_type": "can_based",
"alive": false
}
11 changes: 4 additions & 7 deletions umrr_ros2_driver/config/hw_inventory.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"name": "HW Inventory List",
"version": "1.1.0",
"hwItems": [
{
"type": "eth",
"dev_id": 2,
"iface_name": "eth0",
"port": 55555

}
]
],
"name": "HW Inventory List",
"version": "1.1.0"
}
13 changes: 4 additions & 9 deletions umrr_ros2_driver/config/routing_table.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
{
"name": "Client Routing Table",
"version": "1.0.0",
"clients": [
{
"client_id": 111,
"link_type": "eth",
"ip": "172.22.10.101",
"port": 55555,
"instruction_serialization_type": "port_based",
"data_serialization_type": "port_based"
"can_network_id": 0
}
]
],
"name": "Client Routing Table",
"version": "1.0.0"
}
Loading
Loading