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

Optimization: skip applying noise and distortion to lidars and camera sensors if parameters are 0s #450

Merged
merged 1 commit into from
Jul 29, 2024

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Jul 26, 2024

🦟 Bug fix

Summary

When Gaussian noise params and distortion coefficients are 0s, there shouldn't be any change to the sensor output. So skip doing extra computations in this case.

One instance where this usually happens is when a user saves the world to file in gz-sim, all sdf elements are written out with their default values. So when you load the saved world sdf file back in, you now have noise / distortion sdf elements present but with values of 0s.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Jul 26, 2024
@iche033 iche033 changed the title Optimization: skip applying noise and distortion if parameters are 0s Optimization: skip applying noise and distortion lidars and camera sensors if parameters are 0s Jul 26, 2024
@iche033 iche033 changed the title Optimization: skip applying noise and distortion lidars and camera sensors if parameters are 0s Optimization: skip applying noise and distortion to lidars and camera sensors if parameters are 0s Jul 26, 2024
@iche033 iche033 merged commit 08ab86b into gz-sensors8 Jul 29, 2024
10 checks passed
@iche033 iche033 deleted the skip_noise_distortion branch July 29, 2024 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎵 harmonic Gazebo Harmonic
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants