Skip to content

Conversation

@XINJIANGMO
Copy link
Contributor

🦟 Bug fix

Fixes #3246

Summary

Previously, if a model contained invalid inertial properties (specifically, a non-positive definite spatial inertia matrix, often caused by incorrect fluid_added_mass coefficients), the invalid matrix was passed directly to DART, triggering an assertion failure (Assertion !math::isNan(partialAcceleration) failed) and causing the server to abort.

This patch adds a validation step in Physics.cc (both in CreateModelEntities and CreateLinkEntities) using Eigen::LLT decomposition to ensure the spatial inertia matrix is positive definite before passing it to the physics engine.

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Inbox

Development

Successfully merging this pull request may close these issues.

1 participant