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

Switched the input/output of PositionTransform for SPHERICAL frame from radians to degrees. #597

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peci1
Copy link
Contributor

@peci1 peci1 commented May 26, 2024

🦟 Bug fix

Fixes #235 (comment)

Summary

This change is made to unify the units that are inputs/outputs to the coordinate transforms. Now everything working with spherical coordinates either uses math::Angle or degrees.

This is a breaking change and will require downstream changes at least in https://github.com/gazebosim/gz-sim/blob/40aaddc7eb4ca12a03b64e18ffc101db9f9c24ec/src/Util.cc#L694 .

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.

…om radians to degrees.

This change is made to unify the units that are inputs/outputs to the coordinate transforms.

Signed-off-by: Martin Pecka <peckama2@fel.cvut.cz>
@@ -281,7 +281,7 @@ namespace gz
public: void UpdateTransformationMatrix();

/// \brief Convert between positions in SPHERICAL/ECEF/LOCAL/GLOBAL frame
/// Spherical coordinates use radians, while the other frames use meters.
/// Spherical coordinates use degrees, while the other frames use meters.
Copy link
Member

Choose a reason for hiding this comment

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

I'm concerned about the behavior change here if people don't read the release notes, trying to think if there are better alternatives

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I agree this would be impractical. This PR is open for discussion. One obvious solution would be to rename the function, e.g. to TransformPosition (and, for consistency, also rename VelocityTransform). That would mean much more "unrelated" downstream changes, but at least no code would silently fail.

@azeey azeey added the beta Targeting beta release of upcoming collection label Jul 29, 2024
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 🏛️ ionic Gazebo Ionic
Projects
Status: In review
Development

Successfully merging this pull request may close these issues.

None yet

3 participants