Skip to content
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

Fix SDFormat generation of pose elements #1069

Merged
merged 1 commit into from
Sep 29, 2021

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Sep 29, 2021

🦟 Bug fix

Summary

Fixes a bug when generating SDFormat strings for included models with poses that use one of the newly added attributes (//pose[@degrees] and //pose[@rotation_format]). The issues comes from assigning an updated pose form the ECM to a <pose> element without clearing its attributes. For example, here are a couple of pose tags from the original world:

  <pose degrees='true'>1 2 3    90 0 0</pose>
  <pose rotation_format='quat_xyzw'>1 2 3    0 0 0 1</pose>

The generated world will currently have, which are both incorrect.

  <pose degrees='true'>1 2 3 1.5708 -0 0</pose>
  <pose rotation_format='quat_xyzw'>1 2 3 0 -0 0</pose>

After this PR, the output will be

  <pose>1 2 3 1.5708 -0 0</pose>
  <pose>1 2 3 0 -0 0</pose>

Checklist

  • Signed all commits for DCO
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

Note to maintainers: Remember to use Squash-Merge

@azeey azeey requested a review from aaronchongth September 29, 2021 02:05
@azeey azeey requested a review from chapulina as a code owner September 29, 2021 02:05
@github-actions github-actions bot added the 🏯 fortress Ignition Fortress label Sep 29, 2021
@codecov
Copy link

codecov bot commented Sep 29, 2021

Codecov Report

Merging #1069 (1017d49) into main (064dacc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1069   +/-   ##
=======================================
  Coverage   64.07%   64.07%           
=======================================
  Files         255      255           
  Lines       19958    19960    +2     
=======================================
+ Hits        12788    12790    +2     
  Misses       7170     7170           
Impacted Files Coverage Δ
src/SdfGenerator.cc 94.87% <100.00%> (+0.06%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 064dacc...1017d49. Read the comment docs.

@chapulina chapulina added beta Targeting beta release of upcoming collection bug Something isn't working labels Sep 29, 2021
@chapulina chapulina merged commit ad0ddc4 into gazebosim:main Sep 29, 2021
WilliamLewww pushed a commit to WilliamLewww/ign-gazebo that referenced this pull request Dec 7, 2021
Signed-off-by: Addisu Z. Taddese <[email protected]>
Signed-off-by: William Lew <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta Targeting beta release of upcoming collection bug Something isn't working 🏯 fortress Ignition Fortress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants