Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support printing sdf poses in degrees and allow snapping to commonly …
…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]>
- Loading branch information