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

feat: support Aeva Aeries II #169

Open
wants to merge 40 commits into
base: develop
Choose a base branch
from

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Jun 26, 2024

PR Type

  • New Feature

Description

Add support for Aeva Aeries II:

  • output pointclouds with velocity info
  • allow for frame sync, scan pattern and FoV setup via the launch config
  • publish diagnostics (health + telemetry) to /diagnostics

Review Procedure

  • Code review
  • Test with sensor
    • Pointcloud fields are correct (use rviz2)
    • Packets are published when subscribed to when launch_hw:=true, subscribed to when launch_hw:=false
    • Diagnostics are correct (use rqt's Plugins->Robot Tools->Runtime Monitor)
  • Test with PTP configs provided by Aeva

Remarks

This is a fairly minimal implementation for now.

Pre-Review Checklist for the PR Author

PR Author should check the checkboxes below when creating the PR.

  • Assign PR to reviewer

Checklist for the PR Reviewer

Reviewers should check the checkboxes below before approval.

  • Commits are properly organized and messages are according to the guideline
  • (Optional) Unit tests have been written for new behavior
  • PR title describes the changes

Post-Review Checklist for the PR Author

PR Author should check the checkboxes below before merging.

  • All open points are addressed and tracked via issues or tickets

CI Checks

  • Build and test for PR: Required to pass before the merge.

@mojomex mojomex requested a review from drwnz June 26, 2024 08:17
@mojomex mojomex self-assigned this Jun 26, 2024
@mojomex mojomex force-pushed the aeva-aries2-support branch 2 times, most recently from a8c9ee5 to 4829c22 Compare June 26, 2024 10:59
@mojomex mojomex marked this pull request as ready for review June 26, 2024 11:00
@mojomex
Copy link
Collaborator Author

mojomex commented Jul 4, 2024

🟢 Evaluation

🟢 Pointcloud Output

Pointcloud Field Image
azimuth azimuth
elevation elevation
distance distance
range rate range_rate_-2_2
intensity intensity
channel channel
return type* returtn_type_strongest_secondstrongest
timestamp** time_stamp_0_1e8

*: red: strongest, magenta: second strongest. Currently, there is no documented way to get or set the return mode without the proprietary API. Nebula is currently hard-coded for the default configuration. fixed in 7ea9137. Return modes are now correctly handled.
**: clamped to [red, magenta] = [0 ns, 1e8 ns]. Timestamps are loosely proportional to increasing elevation.

🟢 Performance

The pointcloud is published consistently at around 10 Hz:
pointcloud_10hz

🟢 Hardware Monitor

Diagnostic Image
temperature monitor_temperature
system info monitor_sysinfo
SPC converter monitor_spc_converter
scanner monitor_scanner
health codes*** monitor_health
configuration monitor_config

***: ⚠️ Currently, the descriptions of health codes are under NDA and cannot be put into Nebula.

🟢 PTP & Synchronization

PTP has been tested with all provided mechanisms (1588v2, gPTP, automotive) and works with all of them using the vendor-provided configurations.

Pointcloud timestamps take around 1-2 min to converge.

Description Image
PTP started, sensor syncs shortly after ptp_start
~100s later, timestamp converges to ToS sync_converged
HW monitor shows converged state monitor_converged
HW monitor shows PTP info monitor_ptp

🟢 Error Handling & Recovery

Currently, Nebula does not attempt to recover from communication errors and instead exits, instead of continuing in a possibly corrupted state.
Errors that have been observed:

  • failing to connect to sensor early after power-on (sensor boots for ~1-2 mins)
  • failing to fetch configuration manifest (timeout) fixed in 7781318 (protocol impl was wrong)
  • receiving unexpected responses after configuration command fixed in 7781318 (protocol impl was wrong)

All of these errors only occur during startup. No crashes / errors were observed during runtime.

🟢 Parameters

All parameters from the sensor's manifest that have more than one possible value have been added to Nebula. No attempt was made to convert them to the common naming scheme used in the other drivers (e.g. return_mode for Aeva is second_peak_type).

Validation:

  • Parameters are validated by the sensor and rejected by Nebula if the sensor reports them as invalid
  • Parameters are automatically propagated to the hardware and decoder
  • Parameter schema allows for auto-complete in config file

@mojomex
Copy link
Collaborator Author

mojomex commented Jul 9, 2024

@drwnz All issues from yesterday have been addressed and I could not find any bugs or unexpected behavior since. I think this is ready to merge.

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0.57143% with 348 lines in your changes missing coverage. Please review.

Please upload report for BASE (develop@04c9a0b). Learn more about missing BASE report.

Files Patch % Lines
nebula_ros/src/aeva/aeva_ros_wrapper.cpp 0.00% 166 Missing ⚠️
nebula_ros/src/aeva/hw_monitor_wrapper.cpp 0.00% 77 Missing ⚠️
.../src/nebula_decoders_aeva/aeva_aeries2_decoder.cpp 0.00% 38 Missing ⚠️
...la_ros/include/nebula_ros/common/rclcpp_logger.hpp 0.00% 16 Missing ⚠️
nebula_tests/aeva/aeva_hw_interface_test.cpp 0.00% 13 Missing ⚠️
...a_ros/include/nebula_ros/aeva/aeva_ros_wrapper.hpp 0.00% 10 Missing ⚠️
...include/nebula_ros/common/nebula_packet_stream.hpp 0.00% 10 Missing ⚠️
nebula_tests/common/mock_byte_stream.hpp 0.00% 9 Missing ⚠️
...ros/include/nebula_ros/aeva/hw_monitor_wrapper.hpp 0.00% 3 Missing ⚠️
...ders/nebula_decoders_aeva/aeva_aeries2_decoder.hpp 0.00% 1 Missing ⚠️
... and 5 more

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             develop     #169   +/-   ##
==========================================
  Coverage           ?   14.61%           
==========================================
  Files              ?      103           
  Lines              ?     9207           
  Branches           ?     1540           
==========================================
  Hits               ?     1346           
  Misses             ?     6767           
  Partials           ?     1094           
Flag Coverage Δ
differential 14.61% <0.57%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mojomex mojomex requested a review from drwnz September 2, 2024 07:42
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<launch>
<arg name="sensor_model" description="Aeries2"/>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

description or default?

mojomex and others added 24 commits September 3, 2024 10:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants