Add lock_inertia flag to ModelBuilder.add_link, add_body#1422
Conversation
Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
📝 WalkthroughWalkthroughThe PR introduces a per-body Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
vastsoun
left a comment
There was a problem hiding this comment.
LGTM, seems to do the trick.
I think, however, that this solution is not ideal. We could consider in a future refactoring/reworking of the ModelBuilder, to handle this in a more systematic manner. For example, we could define some logic similar to that of USD, where automatic re-calculations happen only based on the data provided to the builder etc, and re-calculate if something is missing from the body specs, as well as to add a helper function that users can call to perform the recalculations.
…ysics#1422) Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
…ysics#1422) Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
…ysics#1422) Signed-off-by: Eric Heiden <eric-heiden@outlook.com>
This flag (defaults to False) will prevent shapes to contribute mass, COM, inertia to a body.
Fixes #1330.
Summary by CodeRabbit
New Features
lock_inertiaparameter to body and link creation methods, enabling users to prevent automatic mass and inertia updates when shapes are subsequently added to locked bodies.Tests
✏️ Tip: You can customize this high-level summary in your review settings.