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

Provide functions to write numerically stable code and avoid pitfalls #304

Merged
merged 35 commits into from
Oct 25, 2024

Conversation

AlexanderFabisch
Copy link
Member

@AlexanderFabisch AlexanderFabisch commented Oct 19, 2024

Features

  • Add conversions between axis-angle representation and MRP
  • Add functions to write numerically stable code and avoid pitfalls
    • matrix_requires_renormalization - check if rotation matrix needs renormalization
    • norm_euler - maps Euler angles to unique interval
    • euler_near_gimbal_lock - checks if angles are close to gimbal lock singularity
    • assert_euler_almost_equal - checks if two sets of Euler angles are similar
    • compact_axis_angle_near_pi - check if angle is close to pi
    • quaternion_double - create another quaternion that represents the same orientation (double cover)
    • quaternion_requires_renormalization - check if quaternion needs renormalization
    • mrp_near_singularity - check if angle is close to 2 * pi
    • norm_mrp_angle - normalize angle to [-pi, pi]
    • mrp_double - create another mrp that represents the same orientation (double cover)
    • assert_mrp_almost_equal - check if two mrp vectors are similar
    • transform_requires_renormalization - check if transformation matrix needs renormalization
    • assert_exponential_coordinates_almost_equal - check if exp. coordinates are similar
    • dual_quaternion_requires_renormalization - check if dual quaternion needs renormalization
    • dual_quaternion_double - create another dual quaternion that represents the same transformation (double cover)

Documentation

  • Sort API documentation of rotations and transformations by representation

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (ea69792) to head (96f5592).
Report is 170 commits behind head on develop.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           develop      #304    +/-   ##
==========================================
  Coverage   100.00%   100.00%            
==========================================
  Files           31        33     +2     
  Lines         2552      2669   +117     
  Branches       294       280    -14     
==========================================
+ Hits          2552      2669   +117     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@AlexanderFabisch AlexanderFabisch changed the title WIP: Check if rotation matrix needs normalization WIP: Provide functions to write numerically stable code and avoid pitfalls Oct 20, 2024
@AlexanderFabisch AlexanderFabisch changed the title WIP: Provide functions to write numerically stable code and avoid pitfalls Provide functions to write numerically stable code and avoid pitfalls Oct 25, 2024
@AlexanderFabisch AlexanderFabisch merged commit f4d3e80 into develop Oct 25, 2024
5 of 6 checks passed
@AlexanderFabisch AlexanderFabisch deleted the feature/matrix_check_renorm branch October 25, 2024 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants