Avoid collision checking between objects from the same body node #894
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I noticed that if I create multiple collision objects for a single link in Gazebo while using DART physics, they are collision checked against each other even though they are part of the same link (body node). The proposed change to
CollisionFilter::needCollision
prevents collision checking between shapes attached to the same body node.See collisions.world for an example in Gazebo. It contains a model with two links and self-collisions enabled. The top link consists of two flush collision meshes. Without the change, contacts points (blue dots) are detected between the flush meshes.
![before](https://user-images.githubusercontent.com/5615894/28440399-f1f395ec-6d5a-11e7-94e4-1c225e8c8603.jpg)
With the change, no such contacts are detected.
![after](https://user-images.githubusercontent.com/5615894/28440459-3b345f5c-6d5b-11e7-913b-e83a9af5015b.jpg)