gazebosim / gz-physics

Abstract physics interface designed to support simulation and rapid development of robot applications.
https://gazebosim.org
Apache License 2.0
62 stars 38 forks source link

bullet-featherstone: Fix attaching fixed joint between models with inertial pose offset #653

Closed iche033 closed 3 weeks ago

iche033 commented 3 weeks ago

🦟 Bug fix

Summary

When creating a fixed constraint between links, the SetJointTransformFromParent currently does not take into account the inertial pose. If an inertial pose offset exists, the fixed constraint causes the 2 models to be displaced from their original position. This PR updates the calculation in SetJointTransformFromParent to include inertial pose offset.

The detachable_joint.world test world is updated to use a model with inertial pose offset - this world is used by the CorrectAttachmentPoints test in detachable_joint common test. The test fails without the changes in this PR.

Checklist

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.