Commit 5e91938
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 <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>1 parent de356cd commit 5e91938
27 files changed
Lines changed: 1262 additions & 138 deletions
File tree
- include/sdf
- src
- cmd
- test
- integration
- sdf
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
589 | 589 | | |
590 | 590 | | |
591 | 591 | | |
592 | | - | |
| 592 | + | |
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| |||
685 | 685 | | |
686 | 686 | | |
687 | 687 | | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
688 | 696 | | |
689 | 697 | | |
690 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
404 | | - | |
| 404 | + | |
| 405 | + | |
405 | 406 | | |
406 | 407 | | |
407 | 408 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
415 | 432 | | |
416 | 433 | | |
417 | 434 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
35 | 68 | | |
36 | 69 | | |
37 | 70 | | |
| |||
42 | 75 | | |
43 | 76 | | |
44 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
45 | 83 | | |
46 | 84 | | |
47 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
140 | 139 | | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
499 | 499 | | |
500 | 500 | | |
501 | 501 | | |
| 502 | + | |
502 | 503 | | |
503 | 504 | | |
504 | 505 | | |
| |||
513 | 514 | | |
514 | 515 | | |
515 | 516 | | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | | - | |
528 | | - | |
529 | | - | |
530 | | - | |
531 | | - | |
| 517 | + | |
532 | 518 | | |
533 | 519 | | |
534 | 520 | | |
| |||
560 | 546 | | |
561 | 547 | | |
562 | 548 | | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
563 | 593 | | |
564 | 594 | | |
565 | 595 | | |
| |||
0 commit comments