Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect behavior of BulletCollisionDetector for group-group check #717

Closed
jslee02 opened this issue May 8, 2016 · 7 comments
Closed
Labels
type: bug Indicates an unexpected problem or unintended behavior

Comments

@jslee02
Copy link
Member

jslee02 commented May 8, 2016

Collision checking for two collision groups should the test pairs of two objects from different groups rather than from one group. However, it was not straightforward to implement BulletCollisionDetector to work so since I couldn't find a way of using bullet's collision masks or filter callback after the collision objects are added to btCollisionWorld to update the collision pairs.

@jslee02 jslee02 added the type: bug Indicates an unexpected problem or unintended behavior label May 8, 2016
@mkoval
Copy link
Collaborator

mkoval commented May 9, 2016

I am not sure how to interpret this bug. I see two possibilities about BulletCollisionDetector:

  1. group-group checks are less efficient than they could be, but return the correct result
  2. group-group checks return the incorrect result

Which of these is true?

@jslee02
Copy link
Member Author

jslee02 commented May 9, 2016

Both.

group-group checks are less efficient than they could be, but return the correct result

It couldn't be efficient as fcl is since bullet doesn't support checking a group against to another group by default. We should create another group and put all the collision objects into it from the two groups for this.

group-group checks return the incorrect result

To make this to work correctly, we should set the proper collision mask when the collision objects are added btCollisionWorld, but this is not possible with the current API of DART. I just saved this for the next release. That's why I disabled this test for bullet.

@mkoval
Copy link
Collaborator

mkoval commented May 10, 2016

I am still not sure what the current behavior is. What is the outcome if I attempt to perform a group-group check with Bullet in the current master version of DART?

@jslee02
Copy link
Member Author

jslee02 commented May 10, 2016

Suppose we have object1 in group1, and also have object2 and object3 in group2 where only object2 and object3 are colliding. In this case, we would expect group1-group2 returns false because the testing pairs should be object1-object2 and object1-object3 (objects in group1 against object in group2). However, BulletCollisionDetector would have all the objects in one group, which is temporarily created in collide() function, and check all the possible pairs including object2-object3. So it would return true, which is not correct behavior.

@mkoval
Copy link
Collaborator

mkoval commented May 10, 2016

I see. That is a pretty major bug. 😰

If we can't easily fix this in the 6.0.0 release, perhaps we can add a warning to collide(CollisionGroup, CollisionGroup) on BulletCollisionDetector?

@jslee02 jslee02 changed the title BulletCollisionDetector doesn't distinguish two groups Incorrect behavior of BulletCollisionDetector for group-group check May 13, 2016
@stale
Copy link

stale bot commented Feb 13, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@jslee02
Copy link
Member Author

jslee02 commented Jul 2, 2021

Fixed in 6.11.0 by #1585

@jslee02 jslee02 closed this as completed Jul 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants