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

perf(hesai): remove decoder thread and MtQueue, make everything single-threaded #226

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Nov 12, 2024

PR Type

  • Improvement

Related Links

Description

This PR removes the thread-safe queue (MtQueue) from HesaiRosWrapper and gets rid of the decoder thread. This can be done because of #186, which ensures that up to 1 scan's worth of packets can be buffered in the UDP socket to allow for less frequent polling for new packets. This means that the decoder thread's work can be done in the hardware interface thread, too, reducing scheduling and locking overhead.

Remarks

Needs stress-testing, e.g. on the bus reference design.

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 November 12, 2024 09:32
@mojomex mojomex self-assigned this Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 0.00%. Comparing base (3284357) to head (daf3b93).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
nebula_ros/src/hesai/hesai_ros_wrapper.cpp 0.00% 2 Missing ⚠️

❗ There is a different number of reports uploaded between BASE (3284357) and HEAD (daf3b93). Click for more details.

HEAD has 7 uploads less than BASE
Flag BASE (3284357) HEAD (daf3b93)
total 7 0
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #226       +/-   ##
==========================================
- Coverage   26.10%   0.00%   -26.11%     
==========================================
  Files         100      87       -13     
  Lines        9218    7868     -1350     
  Branches     2215     941     -1274     
==========================================
- Hits         2406       0     -2406     
- Misses       6423    7868     +1445     
+ Partials      389       0      -389     
Flag Coverage Δ
differential 0.00% <0.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.


🚨 Try these New Features:

Copy link
Collaborator

@drwnz drwnz left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@mojomex mojomex merged commit 658aab1 into tier4:main Nov 25, 2024
10 of 12 checks passed
mojomex added a commit that referenced this pull request Nov 26, 2024
Signed-off-by: Max SCHMELLER <[email protected]>
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.

2 participants