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

INTEGRATION_physics_system fails locally #5

Closed
osrf-migration opened this issue Oct 12, 2018 · 12 comments
Closed

INTEGRATION_physics_system fails locally #5

osrf-migration opened this issue Oct 12, 2018 · 12 comments
Labels
bug Something isn't working

Comments

@osrf-migration
Copy link

Original report (archived issue) by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


The test always fails for me, but it passes on pipelines.

The tolerance already seems pretty high, should we increase it further or is there anything else that can be tried to improve precision? I tried stepping more to see if it would settle better, but had no success.

/home/developer/ign-gazebo/test/integration/physics_system.cc:181: Failure
The difference between spherePoses.back().Pos().Z() and zStopped is 0.031200947452871164, which exceeds 5e-3, where
spherePoses.back().Pos().Z() evaluates to 1.1.0312009964860931,
zStopped evaluates to 1, and
5e-3 evaluates to 0.0050000000000000001.
@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Do you know what version/branch if ign-physics you are using?

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Yeah, I updated to the latest default

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Can you try the ign-physics1 branch of ign-physics? I'm using that branch, and the test passes for me.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


Yeah that one passes for me. What branch was released as libignition-physics-dev? Maybe there was a regression. Could be related to this PR.

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


libignition-physics-dev uses the ign-physics1 branch.

@osrf-migration
Copy link
Author

Original comment by Michael Grey (Bitbucket: mxgrey, GitHub: mxgrey).


I did notice during this PR that the bullet collision detector is giving suspiciously large distance between objects that are lying on each other.

Qualitatively, I didn't notice any visually obvious issue when running this or this, but maybe an offset of 0.03 is too small to be noticed in those examples?

I can put aside some time to investigate why the precision seems off on these tests.

@osrf-migration
Copy link
Author

Original comment by Nate Koenig (Bitbucket: Nathan Koenig).


Thanks Grey, that would be great.

@osrf-migration
Copy link
Author

Original comment by Addisu Z. Taddese (Bitbucket: azeey, GitHub: azeey).


I can see the same behavior running gazebo with dart and using the bullet collision detector (you'll need https://bitbucket.org/osrf/gazebo/pull-requests/2956 to test this).
The precision seems to depend on the size of the geometry. For a sphere of radius 1m, the error is 0.034m (0.016m if the sphere falls from a higher elevation), while for a radius of 10m, the error is 0.115m.

The behavior doesn't seem to affect some geometries like box. Also, running gazebo with bullet physics doesn't have this behavior.

Gazebo-Dart with bullet collision

dart_with_bullet_collision_zoom_zoom.jpg

Gazebo-bullet

bullet_zoom.jpg

@osrf-migration
Copy link
Author

Original comment by Michael Grey (Bitbucket: mxgrey, GitHub: mxgrey).


Thanks for setting up this test case. I've opened an issue on dartsim here, which includes a regression test inside of dartsim. I think I have some leads for what might be causing this.

@osrf-migration
Copy link
Author

Original comment by Michael Grey (Bitbucket: mxgrey, GitHub: mxgrey).


I've identified the cause of the issue: Bullet collision detector starts to report "collision points" before the objects are actually in collision, and it reports their penetration depth as being negative (or their distance as being positive, depending on which convention you prefer).

I believe dartsim assumes that all contact points reported by the collision detector are occurring at true intersections of the collision bodies, so these pseudo-collisions are being treated as real collisions, causing the bodies to stop early. The Bullet physics engine itself is presumably aware of this behavior, and probably utilizes it to get smoother collisions. An ideal solution for dartsim would be to use this information in whatever way that Bullet physics uses it to improve collision handling, but a brute force solution would be to just throw away contact points that report negative penetration depth.

@osrf-migration
Copy link
Author

Original comment by Michael Grey (Bitbucket: mxgrey, GitHub: mxgrey).


The changes in this dartsim PR should fix the issue.

@osrf-migration
Copy link
Author

Original comment by Louise Poubel (Bitbucket: chapulina, GitHub: chapulina).


  • changed state from "new" to "resolved"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant