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(ot128): introduce anti-flicker downsample dithering pattern #287

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

mojomex
Copy link
Collaborator

@mojomex mojomex commented Mar 7, 2025

PR Type

  • Improvement

Related Links

Description

⚠️ The below use cases are not affected by the flickering issue (already working fine):

While the mask based pruning filter introduced in #251 works well for all supported Hesai sensors, including OT128 in standard mode, OT128's high resolution mode employs a dithering pattern that interferes with the pruning filter's one.

This results in flicker and could degrade perception performance etc.
This PR extends the DownsampleMaskFilter by allowing sensors to specify a transform function for azimuth/channel coordinates passed to the dithering algorithm. This allows the developer to include knowledge about the sensor's dithering/scan pattern into the mask dithering step.
All sensors except OT128 are using the default transform, as before, with only OT128 using a specialized one.

For details on how OT128 dithers, see the chapter B.4. Laser firing time of each channel of the OT128 User Manual.

Basically, the pattern is repeating every 2 blocks x 4 channels, so the specialized transform ensures that the points that change within one tile are mapped to the same index for dithering.

🟢 Evaluation

Filter disabled (unaffected by this PR)

The dithering pattern causes some oscillating points but the image is overall stable.

downsample_flicker_nomask-2025-03-07_18.00.20.mp4

Filter enabled, before fix

The interference between sensor dithering and downsample filter causes strong flickering.

downsample_flicker_before-2025-03-07_17.56.40.mp4

Filter enabled, after fix

The specialized dithering pattern plays well with the sensor dithering.
Osillations are more noticeable than in the disabled case due to there being larger gaps between points.
The actual oscillation amplitude is the same.

downsample_flicker_after-2025-03-07_17.58.22.mp4

Review Procedure

  • Code review
  • Compare implementation with datasheet
  • Test with downsample mask (different downsample factors or gradients)

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 added 2 commits March 7, 2025 17:49
…nsform

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
@mojomex mojomex self-assigned this Mar 7, 2025
@mojomex mojomex requested review from drwnz and knzo25 March 7, 2025 09:28
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 35.71429% with 9 lines in your changes missing coverage. Please review.

Project coverage is 28.47%. Comparing base (39fbbe7) to head (b3e6d12).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #287      +/-   ##
==========================================
- Coverage   30.23%   28.47%   -1.76%     
==========================================
  Files         112      112              
  Lines        9695     9607      -88     
  Branches     3652     2949     -703     
==========================================
- Hits         2931     2736     -195     
- Misses       6224     6398     +174     
+ Partials      540      473      -67     
Flag Coverage Δ
differential 28.47% <35.71%> (?)
total ?

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

Components Coverage Δ
Common 27.30% <100.00%> (-22.94%) ⬇️
Hesai 30.79% <0.00%> (+0.38%) ⬆️
Velodyne 37.83% <ø> (+0.17%) ⬆️
Continental 28.15% <ø> (+0.17%) ⬆️
Robosense 0.00% <ø> (ø)
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Max SCHMELLER <max.schmeller@tier4.jp>
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