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

Add tests for auto-inertial with explicit mass #1514

Merged
merged 2 commits into from
Dec 9, 2024

Conversation

scpeters
Copy link
Member

@scpeters scpeters commented Dec 9, 2024

🎉 New feature

Adds more tests to #1513

Summary

The implementation in #1513 looks correct to me; this just adds a new SDFormat test file and a few more tests.

The new test file test/sdf/inertial_stats_auto_mass.sdf is a variant of test/sdf/inertial_stats_auto.sdf that explicitly sets //inertial/mass with //inertial/@auto == true. Each of these files contains 4 links, with each link holding a cube-shaped collision geometries symmetrically placed around the origin. The new test file replaces some of the cubes with a pair of equivalent half-cubes, and different density values are tested, while ensuring that the lumped inertial is equivalent between the two files.

Test cases for this new file are added to INTEGRATION_link_dom and UNIT_gz_TEST.

Test it

  1. Build this branch
  2. Run INTEGRATION_link_dom
  3. Run UNIT_gz_TEST

Checklist

  • 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)
  • 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 and edit the commit message to match the pull request summary while retaining Signed-off-by messages.

@scpeters scpeters requested a review from azeey as a code owner December 9, 2024 21:10
@scpeters scpeters requested a review from iche033 December 9, 2024 21:10
@iche033 iche033 merged commit 686dc24 into auto_inertia_mass Dec 9, 2024
9 checks passed
@iche033 iche033 deleted the scpeters/auto_inertia_mass branch December 9, 2024 22:08
iche033 added a commit that referenced this pull request Dec 13, 2024
Signed-off-by: Ian Chen <[email protected]>

update python test

Signed-off-by: Ian Chen <[email protected]>

udate api doc for resolving auto inertia

Signed-off-by: Ian Chen <[email protected]>

Add tests for auto-inertial with explicit mass (#1514)

* link_dom test: Fix typo

Signed-off-by: Steve Peters <[email protected]>

* Test case for auto-inertials with explicit mass

Signed-off-by: Steve Peters <[email protected]>

---------

Signed-off-by: Steve Peters <[email protected]>

update doc add comments

Signed-off-by: Ian Chen <[email protected]>

add one more test with multiple collisions

Signed-off-by: Ian Chen <[email protected]>

Update mass expectation in auto-inertial tests

The mass is no longer explicitly set in these
Link tests, so replace the not-equals expectation
with an expectation of what the mass should be.

Signed-off-by: Steve Peters <[email protected]>

fix build

Signed-off-by: Ian Chen <[email protected]>

remove empty line

Signed-off-by: Ian Chen <[email protected]>

remove density warning, fix typo

Signed-off-by: Ian Chen <[email protected]>

Update multiple-collision test with justification (#1515)

Modifies the auto-inertial test with multiple collisions
with different densities so that the lumped center of
gravity is at the link origin and derives the expected
moment of inertia values.

Signed-off-by: Steve Peters <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants