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

Fixed Odometry Publisher Angular Velocity Singularity in 3D #2348

Merged
merged 18 commits into from
Aug 26, 2024

Conversation

tomcreutz
Copy link

@tomcreutz tomcreutz commented Mar 28, 2024

🦟 Bug fix

Fixes #2347

Summary

The angular velocity was calculated using euler angles which led to singularities (see #2347 for a more detailed description). In addition to the fix, I also removed the usage of the rolling mean accumulator for angular velocity. While I see its usefulness for outlier rejections, I still didn't really see why this would be necessary. If the maintainers want to keep this mean accumulator, I'll be happy to reimplement it. Also the commit changes seem a bit messy, I was using clang format with the Google C++ Style guide as configuration, which leaded to the changed formatting that you can see in the pull request.

Checklist

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.

@tomcreutz tomcreutz requested a review from mjcarroll as a code owner March 28, 2024 10:38
@github-actions github-actions bot added the 🎵 harmonic Gazebo Harmonic label Mar 28, 2024
@mjcarroll
Copy link
Contributor

Also the commit changes seem a bit messy, I was using clang format with the Google C++ Style guide as configuration, which leaded to the changed formatting that you can see in the pull request.

Can you roll back the style changes please? We need to just update the logic without altering the style of the entire file.

Signed-off-by: Tom Creutz <[email protected]>
Previously the angular velocity was represented in the world coordinate frame. This change will rotate it to be represented in the body coordinate frame

Signed-off-by: Tom Creutz <[email protected]>
@tomcreutz
Copy link
Author

Hi @mjcarroll,
is there anything more that needs to be changed to merge this pull request ?

@tomcreutz
Copy link
Author

Hello @mjcarroll,
are there any news or requests from your side regarding this pull request ? Are there any plans to address this issue ?

@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 29, 2024
@azeey azeey requested a review from shameekganguly August 6, 2024 19:22
Copy link
Contributor

@shameekganguly shameekganguly left a comment

Choose a reason for hiding this comment

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

Please consider adding a test case in https://github.com/gazebosim/gz-sim/blob/gz-sim8/test/integration/odometry_publisher.cc to prevent a regression in computing 3d angular velocity close to singularity. Thank you!

src/systems/odometry_publisher/OdometryPublisher.cc Outdated Show resolved Hide resolved
src/systems/odometry_publisher/OdometryPublisher.cc Outdated Show resolved Hide resolved
@azeey
Copy link
Contributor

azeey commented Aug 23, 2024

I've merged tomcreutz#1

@azeey azeey added the needs upstream release Blocked by a release of an upstream library label Aug 23, 2024
@shameekganguly
Copy link
Contributor

Please consider adding a test case in https://github.com/gazebosim/gz-sim/blob/gz-sim8/test/integration/odometry_publisher.cc to prevent a regression in computing 3d angular velocity close to singularity. Thank you!

Added test case in 5b877ca

@azeey
Copy link
Contributor

azeey commented Aug 24, 2024

@osrf-jenkins run tests please

@shameekganguly
Copy link
Contributor

Looks like Windows CI is failing as M_PI cannot be found. I guess we should GZ_PI instead in test/integration/odometry_publisher.cc

@tomcreutz
Copy link
Author

Thank you very much for your efforts @azeey and @shameekganguly . Just returned back from holidays and wanted to take care of this in the following days.

Signed-off-by: Addisu Z. Taddese <[email protected]>
@azeey azeey enabled auto-merge (squash) August 26, 2024 17:54
@azeey
Copy link
Contributor

azeey commented Aug 26, 2024

Not sure why CI on Jammy failed. The test seems completely unrelated to this PR, so I'm rerunning it to see if it's a flake. The previous CI job was green https://build.osrfoundation.org/job/gz_sim-ci-pr_any-jammy-amd64/744/.

Build Status

@azeey azeey merged commit bf05593 into gazebosim:gz-sim8 Aug 26, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection 🎵 harmonic Gazebo Harmonic needs upstream release Blocked by a release of an upstream library
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Odometry Publisher Angular Velocity Singularity in 3D
6 participants