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(velodyne): remove heavy get_snapshot from HW monitor #279

Merged
merged 2 commits into from
Feb 25, 2025

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Feb 20, 2025

PR Type

  • Bug Fix

Related Links

Description

The /cgi/snapshot.hdl endpoint of the sensor is not meant to be polled every second. Doing that causes the sensor to sometimes drop communication for a while (see the linked issue above).

This hotfix removes the timer polling get_snapshot and the related, now unused code.
As far as I can tell, marking diag info stale did not work reliably before (updates from get_diag and get_status were ignored, and will not work at all now.
All diag information will still be output as before.

Review Procedure

Test with a real VLP16, VLP32 and VLS128 and compare before/after, especially with advanced diag enabled.

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.

Copy link

codecov bot commented Feb 20, 2025

Codecov Report

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

Project coverage is 26.57%. Comparing base (1128658) to head (4a385f8).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #279      +/-   ##
==========================================
- Coverage   29.28%   26.57%   -2.71%     
==========================================
  Files         112      112              
  Lines        9733     9489     -244     
  Branches     3252     2121    -1131     
==========================================
- Hits         2850     2522     -328     
- Misses       6359     6543     +184     
+ Partials      524      424     -100     
Flag Coverage Δ
differential 26.57% <0.00%> (?)
total ?

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

Components Coverage Δ
Common 18.37% <ø> (-31.87%) ⬇️
Hesai 29.69% <ø> (-0.72%) ⬇️
Velodyne 37.78% <0.00%> (+0.59%) ⬆️
Continental 25.09% <ø> (+0.02%) ⬆️
Robosense 0.00% <ø> (ø)

@mojomex mojomex force-pushed the fix/velodyne-dont-poll-snapshot branch from cc1607d to 19c1050 Compare February 21, 2025 01:04
@mojomex mojomex self-assigned this Feb 21, 2025
mojomex added a commit that referenced this pull request Feb 21, 2025
@mojomex mojomex force-pushed the fix/velodyne-dont-poll-snapshot branch from 19c1050 to 4a615da Compare February 25, 2025 06:30
@KYabuuchi KYabuuchi requested a review from shmpwk February 25, 2025 06:33
Copy link

@interimadd interimadd left a comment

Choose a reason for hiding this comment

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

Thank you for fixing issue for diagnostics.
I've added a single comment for a small suggestion, but totally looks great so I approved this PR.

Copy link
Contributor

@KYabuuchi KYabuuchi left a comment

Choose a reason for hiding this comment

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

Thanks for creating the fix PR!
I tested this fix using both the VLP-16 and VLS-128, and it looks good to me.

@mojomex mojomex merged commit b38ac0a into tier4:main Feb 25, 2025
12 of 16 checks passed
@mojomex mojomex deleted the fix/velodyne-dont-poll-snapshot branch February 25, 2025 17:39
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.

3 participants