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

Inaccurate contact results from Bullet collision detector for falling objects #1184

Open
2 tasks done
mxgrey opened this issue Oct 30, 2018 · 5 comments
Open
2 tasks done
Assignees

Comments

@mxgrey
Copy link
Member

mxgrey commented Oct 30, 2018


Bug Report

Please answer the following questions for yourself before submitting an issue.

  • I checked the documentation and found no answer.
  • I checked to make sure that this issue has not already been filed.

Environment

  • Select DART version: 6.7
  • Select OS name and version name(or number): Ubuntu 18.04
  • Select compiler name and version number: GCC-8

Expected Behavior

When an object falls onto a surface (e.g. a sphere falls onto a plane) it should settle into place such that the object is just barely touching a surface (within some reasonable tolerance).

Current Behavior

When an object falls onto a surface, the Bullet collision detector reports contacts that are above the surface. As a result, objects that fell will settle into a position where they are hovering over the surface.

Note that if the object starts in contact with the surface but has no initial velocity, this phenomenon does not happen, even with gravity pushing the object down into the surface.

Steps to Reproduce

A regression test can be found in #1185

@mxgrey
Copy link
Member Author

mxgrey commented Oct 30, 2018

I'm noticing that in the sphere-plane tests, the collision detector is returning exactly one contact point every time step, and that one contact point remains the same from the very first time it gets computed. This makes me wonder if the issue could be related to #859 which seems to have something to do with making contact points persistent. Edit: Ignore this remark.

@mxgrey
Copy link
Member Author

mxgrey commented Oct 30, 2018

I've noticed that the penetration depth from the contacts report here will come out negative for bodies that are moving towards each other close enough together. When a point has a negative penetration depth, it will be located on an object that is not actually in penetration yet, but perhaps moving towards a penetration. If I filter out points that have a negative penetration depth value, then this issue disappears.

One brute force solution could be to throw away contact points that have negative penetration depth. However, I think that would be losing valuable information, since we could instead use these points to avoid problems like excessive penetration and phasing. I'll take a look at the collision handling code to see if I can identify a way to leverage negative penetration information, although I'd appreciate any and all guidance on that, since it's a part of the codebase that I'm not familiar with.

@mxgrey
Copy link
Member Author

mxgrey commented Oct 30, 2018

Also this may be related to what @karenliu has said about Bullet collision detector reporting collision points that are outside of the collision bodies.

@mxgrey
Copy link
Member Author

mxgrey commented Oct 30, 2018

I've chosen the simple option of ignoring contact points with negative penetration depth for now. We can always improve the constraint solving in the future if we want to leverage the proximity information somehow.

Some more questions to consider: Should we also filter out these phantom contact points when providing contact results to the user? And should we watch out for false negatives when the collision detector is being queried for a true/false response to whether there are collisions?

@jslee02
Copy link
Member

jslee02 commented Oct 31, 2018

Some more questions to consider: Should we also filter out these phantom contact points when providing contact results to the user? And should we watch out for false negatives when the collision detector is being queried for a true/false response to whether there are collisions?

Quick thoughts: We could have an option in CollisionOption for that (whether or not to include contacts with negative penetration if available).

jslee02 pushed a commit that referenced this issue Nov 12, 2018
#1185)

This PR is for investigating the issue reported in #1184.

***

**Before merging a pull request**

- [x] Set version target by selecting a milestone on the right side
- [x] Summarize this change in `CHANGELOG.md`
- [x] Add unit test(s) for this change
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants