sdformat icon indicating copy to clipboard operation
sdformat copied to clipboard

Check World joints in checkJointParentChildNames

Open scpeters opened this issue 2 years ago • 1 comments

🎉 New feature

Follow-up to #1117

Summary

Joints were added in the world scope in #1117, but the checkJointParentChildNames method in parser.hh was not updated to check these joints. A failing test is added in https://github.com/gazebosim/sdformat/commit/4e86c3edccd28dde7fdaf9613a31f703239ba46e, and then the checkModelJointParentChildNames lambda function into a template function that works for both sdf::Model and sdf::World objects, after adding the World::NameExistsInFrameAttachedToGraph API.

Test it

Run INTEGRATION_joint_dom or gz sdf --check test/sdf/world_joint_invalid_resolved_parent_same_as_child.sdf

Checklist

  • [X] Signed all commits for DCO
  • [X] Added tests
  • [ ] Added example and/or tutorial
  • [ ] Updated documentation (as needed)
  • [ ] Updated migration guide (as needed)
  • [X] Consider updating Python bindings (if the library has them)
  • [X] codecheck passed (See contributing)
  • [X] 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 and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

scpeters avatar Oct 15 '22 09:10 scpeters

Codecov Report

Merging #1189 (d2779cf) into sdf13 (1c2c2af) will increase coverage by 0.00%. The diff coverage is 97.82%.

@@           Coverage Diff           @@
##            sdf13    #1189   +/-   ##
=======================================
  Coverage   87.25%   87.26%           
=======================================
  Files         125      125           
  Lines       16114    16111    -3     
=======================================
- Hits        14061    14059    -2     
+ Misses       2053     2052    -1     
Impacted Files Coverage Δ
python/src/sdf/pyWorld.cc 53.07% <50.00%> (-0.05%) :arrow_down:
python/src/sdf/pyModel.cc 61.41% <100.00%> (ø)
src/World.cc 95.94% <100.00%> (+0.04%) :arrow_up:
src/parser.cc 87.15% <100.00%> (-0.03%) :arrow_down:
src/Model.cc 98.03% <0.00%> (+0.21%) :arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov[bot] avatar Oct 15 '22 09:10 codecov[bot]