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

fix(hesai): set PTP lock offset on sensor configuration #239

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Nov 27, 2024

PR Type

  • Improvement
  • Bug Fix

Related Links

Description

This PR adds support for the SET_PTP_LOCK_OFFSET and GET_PTP_LOCK_OFFSET PTC commands.
In the inquiry linked above, it was observed that not explicitly setting PTP lock offset sometimes causes the value to reset to 1 us on at least OT128. While this is likely a sensor firmware bug, being able to set this offset from within Nebula should improve usability, and should eliminate the need to use Hesai's web interface or desktop GUI.

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.

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

Attention: Patch coverage is 8.00000% with 23 lines in your changes missing coverage. Please review.

Project coverage is 26.07%. Comparing base (3d42cd0) to head (02b9989).

Files with missing lines Patch % Lines
.../nebula_hesai_hw_interfaces/hesai_hw_interface.cpp 0.00% 13 Missing ⚠️
nebula_ros/src/hesai/hesai_ros_wrapper.cpp 0.00% 10 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #239      +/-   ##
==========================================
- Coverage   26.11%   26.07%   -0.05%     
==========================================
  Files         101      101              
  Lines        9212     9230      +18     
  Branches     2211     2212       +1     
==========================================
+ Hits         2406     2407       +1     
- Misses       6417     6434      +17     
  Partials      389      389              
Flag Coverage Δ
differential 26.07% <8.00%> (?)
total ?

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
Copy link
Collaborator Author

mojomex commented Nov 27, 2024

Evaluation

Sensor Model SW Version FW Version Ctrl. FW Version Works?
OT128 1.3.19 1.3.13 1.3.10 🟢
Pandar40P 2.10.4 4.3.40a 4.51 🔴
Pandar64 2.7.7 4.3.15b 5.10 🔴

Here is a demo of OT128:

ptp-lock-offset.mp4

It has been confirmed that by restarting Nebula, for a brief moment, the setting can revert to the old value (Hesai firmware bug or PTC documentation inaccurate). With this PR, it is immediately set to the desired value again.

@mojomex mojomex marked this pull request as draft November 27, 2024 05:51
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.

1 participant