Suggested changes to #729#748
Merged
aaronchongth merged 1 commit intoaaron/pose-quat-empty-valuefrom Nov 12, 2021
Merged
Conversation
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
7 tasks
Codecov Report
@@ Coverage Diff @@
## aaron/pose-quat-empty-value #748 +/- ##
===============================================================
- Coverage 88.35% 88.35% -0.01%
===============================================================
Files 76 76
Lines 11538 11546 +8
===============================================================
+ Hits 10194 10201 +7
- Misses 1344 1345 +1
Continue to review full report at Codecov.
|
aaronchongth
approved these changes
Nov 12, 2021
Collaborator
aaronchongth
left a comment
There was a problem hiding this comment.
Yeah this makes a lot of sense. Thanks for finding a solution to this dilemma 🙇 I'll go ahead and merge it in
aaronchongth
added a commit
that referenced
this pull request
Dec 21, 2021
…used angles (#689) * Ruby option to print in_degrees or snap_to_degrees Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Basic PrintConfig added Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * PrintConfig gets passed into printing implementations of Element and Param Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Adding basic test for print options Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Reverting to PrintConfig with basic API Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved creation of PrintConfig into ign functions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Param value GetPoseAsString and tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moved attribute painting to its own function, fixed test strings Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added basic tests for pose rotation input as quaternions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using different flags for ign sdf -p, allow snapping to different values Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Disabling test on windows, fixing comment Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Remove stale function, fixed linting Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Adding tolerance as a argument, added tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Use 3 spaces when changing rotation formats or snapping to degrees Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added check for tolerance larger than snapping interval Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Moving PrintAttributes to ElementPrivate to remain ABI stability Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using true/false instead of 1/0 Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Remove use of SDF_ASSERT in GetAsString Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added tests for //include/pose Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Adding parsing passing test for empty quat_xyzw pose Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added check for default string values to be modified when rotation_format is defined Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Reparsing translates default value into string to be used if values have not been assigned to param Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using StringFromValueImpl for getting strings from all ParamVariants Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Refactor pose string from value into its own function Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fixing casting erroerror, added documentation and tests for tolerance < interval Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Correcting stale comments Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fixing snapToInterval math, added more tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Removed unneeded visibility macro Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Adding return documentation and using const reference to variant instead of pointer Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Returning string directly, removing stale _config, reverting strValue to nullopt Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Remove use of assertions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Suggested changes to #729 (#748) Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org> * Using three space delimiter between position and rotation if attributes are set Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added comment regarding use of default PrintConfig in Reparse Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Adding equality comparison for PrintConfig Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Removed stale include Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Uniied string and value parsing behavior, and modified necessary tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Overloaded function to maintain ABI stability Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Fixing missing space in test for exec command Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Adding comment regarding attributeExceptions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Indenting help message, adding test for shuffling command flags Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Modifying cmd flag shuffling test to handling flags with arguments too Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Removed Get from PrintConfig getter functions Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Using std optional's converting constructor Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Modified snapToInterval implementation, added test Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added bool type specific value parser, values are parsed using ParamStreamer by default Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Reverting all unnecessary changes made in sdf12 to old tests Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added comparison for PreserveIncludes Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Check for 'type' attribute in unknown elements as well, in order to parse booleans into true/false, instead of 1/0 Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Only checking for pose related PrintConfig options for returning string instead of default PrintConfig Signed-off-by: Aaron Chong <aaronchongth@gmail.com> * Added comment regarding sanitizing -0 in test outputs Signed-off-by: Aaron Chong <aaronchongth@gmail.com> Co-authored-by: Addisu Z. Taddese <addisu@openrobotics.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes make it so that the default string used in the sdf description is used as-is if an element is added by default or it's value is empty. This avoids introducing changes in the output of
ToString(eg.<magnetic_field>5.5645e-6 22.8758e-6 -42.3884e-6</magnetic_field>as opposed to<magnetic_field>6e-06 2.3e-05 -4.2e-05</magnetic_field>in #729)