sdformat icon indicating copy to clipboard operation
sdformat copied to clipboard

Geometry and others: update calls to use sdf::Errors parameters

Open marcoag opened this issue 2 years ago • 1 comments

Signed-off-by: Marco A. Gutierrez [email protected]

🎉 New feature

Work towards https://github.com/gazebosim/sdformat/issues/820.

Depends on: https://github.com/gazebosim/sdformat/pull/1141.

Summary

Adds missing Errors structure parameters in a few methods of the following classes:

  • Box
  • Capsule
  • Collision
  • Cylinder
  • Ellipsoid
  • Geometry
  • Heightmap
  • Mesh
  • Plane
  • Polyline
  • Sphere
  • Surface

Adding several classes updates on this PR due to inter dependencies.

Test it

Using the classes above should report all errors through sdf::Errors if the errors parameter is used, it should print them otherwise.

Checklist

  • [x] Signed all commits for DCO
  • [ ] Added tests
  • [ ] Added example and/or tutorial
  • [ ] Updated documentation (as needed)
  • [ ] Updated migration guide (as needed)
  • [ ] 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.

marcoag avatar Sep 19 '22 07:09 marcoag

Codecov Report

Merging #1153 (5dd9b08) into sdf13 (a5da9a3) will increase coverage by 0.05%. The diff coverage is 99.48%.

:exclamation: Current head 5dd9b08 differs from pull request most recent head e085435. Consider uploading reports for the commit e085435 to get more accurate results

@@            Coverage Diff             @@
##            sdf13    #1153      +/-   ##
==========================================
+ Coverage   87.66%   87.72%   +0.05%     
==========================================
  Files         126      126              
  Lines       16506    16585      +79     
==========================================
+ Hits        14470    14549      +79     
  Misses       2036     2036              
Impacted Files Coverage Δ
src/Collision.cc 97.43% <92.30%> (+0.17%) :arrow_up:
src/Box.cc 97.56% <100.00%> (+0.33%) :arrow_up:
src/Capsule.cc 100.00% <100.00%> (ø)
src/Cylinder.cc 100.00% <100.00%> (ø)
src/Ellipsoid.cc 97.56% <100.00%> (+0.33%) :arrow_up:
src/Geometry.cc 100.00% <100.00%> (ø)
src/Heightmap.cc 100.00% <100.00%> (ø)
src/Mesh.cc 98.71% <100.00%> (+0.08%) :arrow_up:
src/Plane.cc 96.36% <100.00%> (+0.36%) :arrow_up:
src/Polyline.cc 89.55% <100.00%> (+1.02%) :arrow_up:
... and 2 more

codecov[bot] avatar Oct 03 '22 17:10 codecov[bot]

When I thought I was almost done adding the ToElement(errors) and Load() method tests for the classes in this PR I found out the ToElement method of the Surface class is missing some elements. I added a PR that fixes this here.

I guess we should keep this PR on hold until that one is merged and ported to sdf13.

marcoag avatar Mar 27 '23 10:03 marcoag

Can you fix the conflicts?

azeey avatar Apr 25 '23 17:04 azeey

The test failures on windows are being investigated in https://github.com/gazebosim/sdformat/issues/1276.

azeey avatar May 02 '23 15:05 azeey