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
[x] 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)
[ ] 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.
🦟 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
codecheck
passed (See contributing)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.