Skip to content

[Proposal] Change Default Euler Angle Range in euler_xyz_from_quat #2364

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

Open
1 of 5 tasks
ShaoshuSu opened this issue Apr 24, 2025 · 2 comments · May be fixed by #2365
Open
1 of 5 tasks

[Proposal] Change Default Euler Angle Range in euler_xyz_from_quat #2364

ShaoshuSu opened this issue Apr 24, 2025 · 2 comments · May be fixed by #2365
Labels
enhancement New feature or request

Comments

@ShaoshuSu
Copy link

Proposal

Change the default behavior of the euler_xyz_from_quat function to return Euler angles in the range (-π, π] instead of [0, 2π). Introduce an optional argument allowing users to explicitly request the [0, 2π) range when necessary.

Motivation

Euler angles represented in the (-π, π] range are more intuitive and widely adopted within the robotics community. Users currently must manually adjust outputs, which leads to redundant and scattered implementations across multiple projects. Examples of user-implemented adjustments can be found in:

This proposal aims to centralize and standardize angle normalization.

Alternatives

An alternative is to continue using the current implementation, which would require individual users to manually perform angle wrapping each time they invoke the function.

Additional context

Euler angle normalization issues frequently cause confusion and subtle bugs in robotics simulations and control algorithms.

Checklist

  • I have checked that there is no similar issue in the repo (required)

Acceptance Criteria

  • Default output from euler_xyz_from_quat is changed to the range (-π, π].
  • An argument enables the legacy [0, 2π) range.
  • Documentation clearly reflects the new default behavior and the optional argument.
  • Unit tests are provided to verify behavior.
@ShaoshuSu ShaoshuSu linked a pull request Apr 24, 2025 that will close this issue
6 tasks
@RandomOakForest
Copy link
Collaborator

Thanks for posting this. Maybe the function should have an argument to specify the convention requested. The team will review.

@RandomOakForest RandomOakForest added the enhancement New feature or request label Apr 24, 2025
@ShaoshuSu
Copy link
Author

Hi @RandomOakForest, thanks for your comment!
Actually, I've opened a PR #2365 to address this improvement.
If the code meets the team's standards, I am glad to contribute that PR to the project : )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants