-
Notifications
You must be signed in to change notification settings - Fork 98
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
Support quaternions representation for poses #690
Conversation
Codecov Report
@@ Coverage Diff @@
## main #690 +/- ##
==========================================
+ Coverage 88.06% 88.14% +0.08%
==========================================
Files 75 75
Lines 11333 11363 +30
==========================================
+ Hits 9980 10016 +36
+ Misses 1353 1347 -6
Continue to review full report at Codecov.
|
ac7ca0a
to
73a1a49
Compare
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
…y pose string Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
…tation formats Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
517dcea
to
3c151fa
Compare
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a few test regressions in ign-physics and ign-gazebo with this PR. I can't seem to figure what's causing them though.
…n description Signed-off-by: Aaron Chong <[email protected]>
I believe some of the regressions caused by the use of Instead of the default value, Using The regressions in ign-gazebo on tests |
Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Aaron Chong <[email protected]>
…ving hard coded default value from ValueFromStringImpl Signed-off-by: Aaron Chong <[email protected]>
…at don't use 1.9/pose.sdf Signed-off-by: Aaron Chong <[email protected]>
@azeey, I've managed to fix the regression tests by adding this check for the attribute, as there are some pose elements that don't support |
Signed-off-by: Aaron Chong <[email protected]>
…uler_rpy Signed-off-by: Aaron Chong <[email protected]>
…he value is parsed successfully Signed-off-by: Aaron Chong <[email protected]>
…ns from previous test Signed-off-by: Aaron Chong <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return false; | ||
} | ||
|
||
std::string input = _input.empty() ? defaultValueStr : _input; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When parsing <pose />
, the _input
will not actually be empty, it will be the default value of //pose
because in Param()
, calls ValueFromString
with the default string https://github.com/ignitionrobotics/sdformat/blob/fcac14d3c9359910c12fcf029eb70ca468e3220e/src/Param.cc#L76 and ValueFromString
sets strValue
to whatever it's input argument is:
https://github.com/ignitionrobotics/sdformat/blob/fcac14d3c9359910c12fcf029eb70ca468e3220e/src/Param.cc#L586-L593
I think this is why <pose rotation_format='quat_xyzw
/>` doesn't work currently.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ticketed an issue for this #707.
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: Addisu Z. Taddese <[email protected]>
Done in 1f542c4
I agree, I changed them to EXPECT_EQ in ae929b5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just two small nits
Signed-off-by: Addisu Z. Taddese <[email protected]>
I'll approve once we have this issue created |
thanks for opening #707. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice work!
whoever does the squash and merge, please remember the merging strategy in our process documentation involves editing the commit message in the GitHub UI to "captures the core ideas of the pull request and contains all authors' signatures". By default these messages contain lots of unnecessary details about the commit history of the pull request, rather than a succinct summary.
🎉 New feature
Per proposal, http://sdformat.org/tutorials?tut=better_pose_proposal&cat=pose_semantics_docs&
Related to #252
Discussed briefly in #589
Summary
Support quaternions in the order of (x, y, z, w) for pose elements, using an new attribute
//pose[@rotation_format]
, which iseuler_rpy
by default, but can be set toquat_xyzw
.SetParentElement
to return abool
in the event that theReparse
fails, for example having//pose[@degrees='true'][@rotation_format='quat_xyzw']
ToString()
, the exact value string that was provided in the.sdf
file is expected. If left empty, the exact default value string that was defined insdf/1.9/*.sdf
will be expected. This is the reason some tests have been modified.These are valid poses,
These are not a valid pose,
Test
Checking representations,
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge