-
Notifications
You must be signed in to change notification settings - Fork 100
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
Suggested changes to #729 #748
Suggested changes to #729 #748
Conversation
Signed-off-by: Addisu Z. Taddese <[email protected]>
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.
|
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.
Yeah this makes a lot of sense. Thanks for finding a solution to this dilemma 🙇 I'll go ahead and merge it in
…used angles (#689) * Ruby option to print in_degrees or snap_to_degrees Signed-off-by: Aaron Chong <[email protected]> * Basic PrintConfig added Signed-off-by: Aaron Chong <[email protected]> * PrintConfig gets passed into printing implementations of Element and Param Signed-off-by: Aaron Chong <[email protected]> * Adding basic test for print options Signed-off-by: Aaron Chong <[email protected]> * Reverting to PrintConfig with basic API Signed-off-by: Aaron Chong <[email protected]> * Moved creation of PrintConfig into ign functions Signed-off-by: Aaron Chong <[email protected]> * Param value GetPoseAsString and tests Signed-off-by: Aaron Chong <[email protected]> * Moved attribute painting to its own function, fixed test strings Signed-off-by: Aaron Chong <[email protected]> * Added basic tests for pose rotation input as quaternions Signed-off-by: Aaron Chong <[email protected]> * Using different flags for ign sdf -p, allow snapping to different values Signed-off-by: Aaron Chong <[email protected]> * Disabling test on windows, fixing comment Signed-off-by: Aaron Chong <[email protected]> * Remove stale function, fixed linting Signed-off-by: Aaron Chong <[email protected]> * Adding tolerance as a argument, added tests Signed-off-by: Aaron Chong <[email protected]> * Use 3 spaces when changing rotation formats or snapping to degrees Signed-off-by: Aaron Chong <[email protected]> * Added check for tolerance larger than snapping interval Signed-off-by: Aaron Chong <[email protected]> * Moving PrintAttributes to ElementPrivate to remain ABI stability Signed-off-by: Aaron Chong <[email protected]> * Using true/false instead of 1/0 Signed-off-by: Aaron Chong <[email protected]> * Remove use of SDF_ASSERT in GetAsString Signed-off-by: Aaron Chong <[email protected]> * Added tests for //include/pose Signed-off-by: Aaron Chong <[email protected]> * Adding parsing passing test for empty quat_xyzw pose Signed-off-by: Aaron Chong <[email protected]> * Added check for default string values to be modified when rotation_format is defined Signed-off-by: Aaron Chong <[email protected]> * Added tests Signed-off-by: Aaron Chong <[email protected]> * Reparsing translates default value into string to be used if values have not been assigned to param Signed-off-by: Aaron Chong <[email protected]> * Using StringFromValueImpl for getting strings from all ParamVariants Signed-off-by: Aaron Chong <[email protected]> * Refactor pose string from value into its own function Signed-off-by: Aaron Chong <[email protected]> * Fixing casting erroerror, added documentation and tests for tolerance < interval Signed-off-by: Aaron Chong <[email protected]> * Correcting stale comments Signed-off-by: Aaron Chong <[email protected]> * Fixing snapToInterval math, added more tests Signed-off-by: Aaron Chong <[email protected]> * Removed unneeded visibility macro Signed-off-by: Aaron Chong <[email protected]> * Adding return documentation and using const reference to variant instead of pointer Signed-off-by: Aaron Chong <[email protected]> * Returning string directly, removing stale _config, reverting strValue to nullopt Signed-off-by: Aaron Chong <[email protected]> * Remove use of assertions Signed-off-by: Aaron Chong <[email protected]> * Suggested changes to #729 (#748) Signed-off-by: Addisu Z. Taddese <[email protected]> * Using three space delimiter between position and rotation if attributes are set Signed-off-by: Aaron Chong <[email protected]> * Added comment regarding use of default PrintConfig in Reparse Signed-off-by: Aaron Chong <[email protected]> * Adding equality comparison for PrintConfig Signed-off-by: Aaron Chong <[email protected]> * Removed stale include Signed-off-by: Aaron Chong <[email protected]> * Uniied string and value parsing behavior, and modified necessary tests Signed-off-by: Aaron Chong <[email protected]> * Overloaded function to maintain ABI stability Signed-off-by: Aaron Chong <[email protected]> * Fixing missing space in test for exec command Signed-off-by: Aaron Chong <[email protected]> * Adding comment regarding attributeExceptions Signed-off-by: Aaron Chong <[email protected]> * Indenting help message, adding test for shuffling command flags Signed-off-by: Aaron Chong <[email protected]> * Modifying cmd flag shuffling test to handling flags with arguments too Signed-off-by: Aaron Chong <[email protected]> * Removed Get from PrintConfig getter functions Signed-off-by: Aaron Chong <[email protected]> * Using std optional's converting constructor Signed-off-by: Aaron Chong <[email protected]> * Modified snapToInterval implementation, added test Signed-off-by: Aaron Chong <[email protected]> * Added bool type specific value parser, values are parsed using ParamStreamer by default Signed-off-by: Aaron Chong <[email protected]> * Reverting all unnecessary changes made in sdf12 to old tests Signed-off-by: Aaron Chong <[email protected]> * Added comparison for PreserveIncludes Signed-off-by: Aaron Chong <[email protected]> * 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 <[email protected]> * Only checking for pose related PrintConfig options for returning string instead of default PrintConfig Signed-off-by: Aaron Chong <[email protected]> * Added comment regarding sanitizing -0 in test outputs Signed-off-by: Aaron Chong <[email protected]> Co-authored-by: Addisu Z. Taddese <[email protected]>
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)