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

Attempt to correct mass matrix in mesh inertia calculator #2775

Merged
merged 21 commits into from
Feb 26, 2025

Conversation

iche033
Copy link
Contributor

@iche033 iche033 commented Feb 13, 2025

🦟 Bug fix

Depends on #2770

Summary

The mesh inertia calculator can potentially generate invalid inertial values for complex / non-water tight meshes. This PR adds a function that attempts to correct the auto-calculated mass matrix if it is strictly positive and within the specified tolerance of satisfying the triangle inequality.

Credits go to @shameekganguly and @scpeters for the mass matrix correction algorithm

Checklist

  • Signed all commits for DCO
  • Added tests
  • 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.

Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033 iche033 requested a review from mjcarroll as a code owner February 13, 2025 23:31
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Base automatically changed from mesh_inertial_calc_optimization to gz-sim9 February 21, 2025 19:18
@iche033 iche033 added the 🏛️ ionic Gazebo Ionic label Feb 21, 2025
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
Signed-off-by: Ian Chen <ichen@openrobotics.org>
@iche033 iche033 merged commit 1509b0f into gz-sim9 Feb 26, 2025
11 of 12 checks passed
@iche033 iche033 deleted the mesh_inertial_calc_fix_inertia branch February 26, 2025 21:13
@iche033
Copy link
Contributor Author

iche033 commented Feb 27, 2025

@Mergifyio backport gz-sim8

Copy link
Contributor

mergify bot commented Feb 27, 2025

backport gz-sim8

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Feb 27, 2025
Signed-off-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 1509b0f)
iche033 added a commit that referenced this pull request Mar 4, 2025
…2775) (#2799)

* Attempt to correct mass matrix in mesh inertia calculator (#2775)

Signed-off-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 1509b0f)

* split test

Signed-off-by: Ian Chen <ichen@openrobotics.org>

---------

Signed-off-by: Ian Chen <ichen@openrobotics.org>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
Co-authored-by: Steve Peters <scpeters@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏛️ ionic Gazebo Ionic
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants