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 <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…y pose string Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…tation formats Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
517dcea to
3c151fa
Compare
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
azeey
left a comment
There was a problem hiding this comment.
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 <aaronchongth@gmail.com>
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 <aaronchongth@gmail.com>
Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…ving hard coded default value from ValueFromStringImpl Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…::string, used ValueFromStringImpl for min and max value Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
0b81a05 to
0fdcd97
Compare
|
Thanks for catching the mistakes regarding min and max values, I've corrected them in 0fdcd97. I'll continue looking into the regressions |
…at don't use 1.9/pose.sdf Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
@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 <aaronchongth@gmail.com>
…uler_rpy Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…he value is parsed successfully Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
…ns from previous test Signed-off-by: Aaron Chong <aaronchongth@gmail.com>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
| return false; | ||
| } | ||
|
|
||
| std::string input = _input.empty() ? defaultValueStr : _input; |
There was a problem hiding this comment.
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.
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Done in 1f542c4
I agree, I changed them to EXPECT_EQ in ae929b5 |
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
I'll approve once we have this issue created |
thanks for opening #707. |
scpeters
left a comment
There was a problem hiding this comment.
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_rpyby default, but can be set toquat_xyzw.SetParentElementto return aboolin the event that theReparsefails, for example having//pose[@degrees='true'][@rotation_format='quat_xyzw']ToString(), the exact value string that was provided in the.sdffile is expected. If left empty, the exact default value string that was defined insdf/1.9/*.sdfwill 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
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge