@iche033 I haven't checked this thoroughly, but the solution I came up with is to call the base class's checkCollideWithOverride as well as btMultiBodyLinkCollider::checkCollideWithOverride and return the result of anding the two. This does behave much better. I tried with the SDF below by uncommenting only one of the <plugin> tags. Without this PR, the objects fly up or down together even though gravity is 0. Visualizing contacts in gz-sim also shows that they are in contact. With the PR, the boxes stay in place and generate no contacts.
[ ] 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.
๐ฆ Bug fix
Fixes #
Summary
Even with #632 , it looks like objects that are attached to each other continue to generate contacts. Even though we've explicitly marked the two objects not to collide, looking at the bullet code (https://github.com/bulletphysics/bullet3/blob/e9c461b0ace140d5c73972760781d94b7b5eee53/src/BulletDynamics/Featherstone/btMultiBodyLinkCollider.h#L79-L80), that is ignored because
checkCollideWithOverride
will always return true if the two objects are not in the same btMultiBody.@iche033 I haven't checked this thoroughly, but the solution I came up with is to call the base class's
checkCollideWithOverride
as well asbtMultiBodyLinkCollider::checkCollideWithOverride
and return the result of anding the two. This does behave much better. I tried with the SDF below by uncommenting only one of the<plugin>
tags. Without this PR, the objects fly up or down together even though gravity is 0. Visualizing contacts in gz-sim also shows that they are in contact. With the PR, the boxes stay in place and generate no contacts.SDF File
```xmlChecklist
codecheck
passed (See contributing)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.๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ๐ธ