Skip to content

Commit

Permalink
feat(ars548): initial driver (#123)
Browse files Browse the repository at this point in the history
* feat: initial implementation of the continentla ars548 driver

The initial implementation consists of a working hw_interface, decoder, and ros wrappers.
The full ros wrappers to be integrated with other coebases have not been implemented.
Since this is the first non-lidar sensor in the codebase, some structural changes were tentatively proposed.
Some refactoring is still needed

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: refactor before sending PR

Changed the generic naming to ARS548 since it looked like many things can not be generalized
Added documentation to the new methods
Addressed remaining TODOs

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: fixed errors with naming and symbols after the refactoring

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: fixed spell misses

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: more spell fixes

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: updated the build_repos to point to the custom transport drivers for this PR

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: removed duplicated message file

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* Update nebula_ros/src/continental/continental_ars548_hw_interface_ros_wrapper.cpp

Co-authored-by: Max Schmeller <[email protected]>

* chore: addressed comments from the review related con consitency and unused code

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: removed default parameters in line with the awf guidelines

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: replaced the confusing position orientation name by simply otientation

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: removed unused `using`

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: implemented boost endian approach

Also fixed some typos
Both implementations provide the same results

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: removed the old implementation

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: mixed misspells

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: fixed short circuit in conditional statement, missing lock, and typo

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: added use_receive_time options, enriched the PointCloud2 messages for evaluation, and implemented some ROS logic to set the radar configuration and dynamic input

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: added the missing steerin angle input

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: missing features for proper vehicle integration. fixed fixes and added visualization markers

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: had implemented the reference point correction for all relevant interfaces but the radar track msgs

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: implemented changes from another branch (for the ars548). dianostics are now parsed in the decoder, fixed radar configuration, and implemented a temporary multi radar hw interface

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: spell fix

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: covariance matrix

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: added documentation on the ros wrapper regarding the reference point

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: added documentation regarding the dropped packages estimation

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: replaced if-elses by switches and fixed a status vatiable decoding

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: spell fixes

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: refactored parameter setting into custom services (as much as possible)

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: added documentation regarding the multi hw interface

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: reverted pre-commit related changes (it will not pass pre-commit now though)

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: added unit tests for the ars548

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: spell fix

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: reflected the change of a status message in checks and changed the qos of a topic

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: there are cases (probably involving the mounting yaw) in which the objects are published in the sensor frame rather than in the base, so I added a new parameter

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: generalized launch script to support ars548 and updated the readme

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* fix: merge error

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: spell fix

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: fixed another spelling

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: yet another spell fix

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: deleted SRR files that leaked into the ARS branch

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* feat: added an option to set all the parameters directly via services

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

* chore: updated cspell dict

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>

---------

Signed-off-by: Kenzo Lobos-Tsunekawa <[email protected]>
Co-authored-by: Max Schmeller <[email protected]>
  • Loading branch information
knzo25 and mojomex authored Mar 28, 2024
1 parent 18bb03a commit cb3c56a
Show file tree
Hide file tree
Showing 73 changed files with 16,626 additions and 95 deletions.
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"Adctp",
"AT",
"block_id",
"extrinsics",
"gprmc",
"Hesai",
"memcpy",
Expand Down Expand Up @@ -39,6 +40,8 @@
"gptp",
"Idat",
"Vdat",
"autosar",
"srvs",
"manc",
"ipaddr",
"ntoa"
Expand Down
55 changes: 27 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
Nebula is a sensor driver platform that is designed to provide a unified framework for as wide a variety of devices as possible.
While it primarily targets Ethernet-based LiDAR sensors, it aims to be easily extendable to support new sensors and interfaces.
Nebula provides the following features:

- Support for Velodyne and Hesai sensors, with other LiDAR vendor support under development
- ROS 2 interface implementations
- TCP/IP and UDP communication implementations
Expand All @@ -14,10 +15,8 @@ Nebula provides the following features:
- Receiving and interpretation of diagnostics information from the sensor
- Support for multiple return modes and labelling of return types for each point


With a rapidly increasing number of sensor types and models becoming available, and varying levels of vendor and third-party driver support, Nebula creates a centralized driver methodology. We hope that this project will be used to facilitate active collaboration and efficiency in development projects by providing a platform that reduces the need to re-implement and maintain many different sensor drivers. Contributions to extend the supported devices and features of Nebula are always welcome.


## How to build

Nebula builds on ROS Galactic and Humble.
Expand Down Expand Up @@ -85,27 +84,27 @@ ros2 launch nebula_ros nebula_launch.py sensor_model:=Pandar64 config_file:=your

Supported models, where sensor_model is the ROS param to be used at launch:

| Manufacturer | Model | sensor_model | Configuration file | Test status |
| ------------ | ------------- | ------------ | ------------------ | ----------- |
| HESAI | Pandar 64 | Pandar64 | Pandar64.yaml | :heavy_check_mark: |
| HESAI | Pandar 40P | Pandar40P | Pandar40P.yaml | :heavy_check_mark: |
| HESAI | Pandar XT32 | PandarXT32 | PandarXT32.yaml | :heavy_check_mark: |
| HESAI | Pandar XT32M | PandarXT32M | PandarXT32M.yaml | :warning: |
| HESAI | Pandar QT64 | PandarQT64 | PandarQT64.yaml | :heavy_check_mark: |
| HESAI | Pandar QT128 | PandarQT128 | PandarQT128.yaml | :warning: |
| HESAI | Pandar AT128 | PandarAT128 | PandarAT128.yaml | :heavy_check_mark:* |
| HESAI | Pandar 128E4X | Pandar128E4X | Pandar128E4X.yaml | :warning: |
| Velodyne | VLP-16 | VLP16 | VLP16.yaml | :warning: |
| Velodyne | VLP-16-HiRes | VLP16 | | :x: |
| Velodyne | VLP-32 | VLP32 | VLP32.yaml | :warning: |
| Velodyne | VLS-128 | VLS128 | VLS128.yaml | :warning: |
| Manufacturer | Model | sensor_model | Configuration file | Test status |
| ------------ | ------------- | ------------ | ------------------ | -------------------- |
| HESAI | Pandar 64 | Pandar64 | Pandar64.yaml | :heavy_check_mark: |
| HESAI | Pandar 40P | Pandar40P | Pandar40P.yaml | :heavy_check_mark: |
| HESAI | Pandar XT32 | PandarXT32 | PandarXT32.yaml | :heavy_check_mark: |
| HESAI | Pandar XT32M | PandarXT32M | PandarXT32M.yaml | :warning: |
| HESAI | Pandar QT64 | PandarQT64 | PandarQT64.yaml | :heavy_check_mark: |
| HESAI | Pandar QT128 | PandarQT128 | PandarQT128.yaml | :warning: |
| HESAI | Pandar AT128 | PandarAT128 | PandarAT128.yaml | :heavy_check_mark:\* |
| HESAI | Pandar 128E4X | Pandar128E4X | Pandar128E4X.yaml | :warning: |
| Velodyne | VLP-16 | VLP16 | VLP16.yaml | :warning: |
| Velodyne | VLP-16-HiRes | VLP16 | | :x: |
| Velodyne | VLP-32 | VLP32 | VLP32.yaml | :warning: |
| Velodyne | VLS-128 | VLS128 | VLS128.yaml | :warning: |
| Continental | ARS548 | ARS548 | ARS548.yaml | :warning: |

Test status:\
:heavy_check_mark:: complete\
:warning:: some functionality yet to be tested\
:x:: untested\
*: AT128 needs software version 3.50.8 or newer for the `scan_angle` setting to work correctly.

\*: AT128 needs software version 3.50.8 or newer for the `scan_angle` setting to work correctly.

## ROS parameters

Expand Down Expand Up @@ -215,27 +214,26 @@ Parameters shared by all supported models:

#### Driver parameters

| Parameter | Type | Default | Accepted values | Description |
| ---------------- | ------ | -------- | -------------------- | --------------------------------------- |
| frame_id | string | velodyne | | ROS frame ID |
| calibration_file | string | | | LiDAR calibration file |
| min_range | double | 0.3 | meters, >= 0.3 | Minimum point range published |
| max_range | double | 300.0 | meters, <= 300.0 | Maximum point range published |
| cloud_min_angle | uint16 | 0 | degrees [0, 360] | FoV start angle |
| cloud_max_angle | uint16 | 359 | degrees [0, 360] | FoV end angle |
| Parameter | Type | Default | Accepted values | Description |
| ---------------- | ------ | -------- | ---------------- | ----------------------------- |
| frame_id | string | velodyne | | ROS frame ID |
| calibration_file | string | | | LiDAR calibration file |
| min_range | double | 0.3 | meters, >= 0.3 | Minimum point range published |
| max_range | double | 300.0 | meters, <= 300.0 | Maximum point range published |
| cloud_min_angle | uint16 | 0 | degrees [0, 360] | FoV start angle |
| cloud_max_angle | uint16 | 359 | degrees [0, 360] | FoV end angle |

## Software design overview

![DriverOrganization](docs/diagram.png)


## Hesai Sensor Setup

New Hesai sensors do not provide a Web UI to verify and set up the sensor parameters. Instead, these offer a TCP-based protocol to obtain and set the configuration. Nebula sets these sensors at launch. However, settings such as Destination IP, Sensor IP, IP Mask, and Data Port might cause undesired sensor functioning if the driver gets mistakenly launched with inappropriate values. To overcome this problem, Nebula provides an additional setup script for these settings to avoid such scenarios.

The script requires the installation of dependencies via pip:

`$ pip3 install scripts/requirements.txt # first-time setup`
`$ pip3 install scripts/requirements.txt # first-time setup`

Once the dependencies are installed, the setup script can be invoked using the following command:

Expand Down Expand Up @@ -274,6 +272,7 @@ Run profiling for each version you want to compare:
git checkout my_improved_branch
./scripts/profiling_runner.bash improved -m Pandar64 -b ~/my_rosbag -c 2 -t 20 -n 3
```

Show results:

```bash
Expand Down
4 changes: 2 additions & 2 deletions build_depends.repos
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ repositories:
# TCP version of transport drivers
transport_drivers:
type: git
url: https://github.com/MapIV/transport_drivers
version: boost
url: https://github.com/knzo25/transport_drivers
version: feat/multicast_support
Loading

0 comments on commit cb3c56a

Please sign in to comment.