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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Equal tolerance method to Quaternion #196

Merged
merged 1 commit into from
Mar 11, 2021

Conversation

adlarkin
Copy link
Contributor

@adlarkin adlarkin commented Mar 10, 2021

Signed-off-by: Ashton Larkin ashton@openrobotics.org

馃帀 New feature

Summary

I've added a method to compare equality between quaternions with a user-defined tolerance, similar to the Vector3 class. This is useful in cases where the default precision of the quaternion's == operator (.001) isn't enough, such as in gazebosim/gz-physics#223 (since physics requires high precision, 1e-6 is used for equality tolerance instead of 1e-3).

Test it

Take a look at the unit tests written in this PR (files changed tab -> src/Quaternion_TEST.cc).

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • 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

@osrf-triage osrf-triage added this to Inbox in Core development Mar 10, 2021
@github-actions github-actions bot added 馃彚 edifice Ignition Edifice 馃彴 citadel Ignition Citadel 馃摐 blueprint Ignition Blueprint 馃敭 dome Ignition Dome labels Mar 10, 2021
@chapulina chapulina moved this from Inbox to In progress in Core development Mar 10, 2021
@codecov
Copy link

codecov bot commented Mar 10, 2021

Codecov Report

Merging #196 (1e9ce65) into ign-math6 (6f4dcfa) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##           ign-math6     #196      +/-   ##
=============================================
- Coverage      99.20%   99.20%   -0.01%     
=============================================
  Files             63       63              
  Lines           6020     6019       -1     
=============================================
- Hits            5972     5971       -1     
  Misses            48       48              
Impacted Files Coverage 螖
include/ignition/math/Quaternion.hh 100.00% <100.00%> (酶)

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update 6f4dcfa...1e9ce65. Read the comment docs.

@adlarkin adlarkin marked this pull request as ready for review March 10, 2021 19:51
@adlarkin adlarkin requested a review from scpeters as a code owner March 10, 2021 19:51
@adlarkin adlarkin requested a review from azeey March 10, 2021 19:56
@adlarkin adlarkin force-pushed the adlarkin/quaternion_equality_tolerance branch from 1eff96d to 8be4e08 Compare March 10, 2021 20:09
Core development automation moved this from In progress to In review Mar 10, 2021
Copy link
Contributor

@azeey azeey left a comment

Choose a reason for hiding this comment

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

LGTM!

adlarkin added a commit that referenced this pull request Mar 10, 2021
Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
@adlarkin adlarkin force-pushed the adlarkin/quaternion_equality_tolerance branch from 8be4e08 to 4bb6f57 Compare March 10, 2021 20:28
adlarkin added a commit that referenced this pull request Mar 10, 2021
Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
@adlarkin adlarkin force-pushed the adlarkin/quaternion_equality_tolerance branch from 4bb6f57 to 05e5232 Compare March 10, 2021 21:36
Signed-off-by: Ashton Larkin <ashton@openrobotics.org>
@adlarkin adlarkin force-pushed the adlarkin/quaternion_equality_tolerance branch from 05e5232 to 1e9ce65 Compare March 10, 2021 23:37
@adlarkin adlarkin merged commit 1e9ce65 into ign-math6 Mar 11, 2021
Core development automation moved this from In review to Done Mar 11, 2021
@adlarkin adlarkin deleted the adlarkin/quaternion_equality_tolerance branch March 11, 2021 00:59
@j-rivero j-rivero removed this from Done in Core development May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃摐 blueprint Ignition Blueprint 馃彴 citadel Ignition Citadel 馃敭 dome Ignition Dome 馃彚 edifice Ignition Edifice
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants