CodeMatias / bullet-old

Automatically exported from code.google.com/p/bullet
Other
0 stars 1 forks source link

rayTest sees rounded box corners in 2.82 #762

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Apply the attached patch to bullet 2.82
2. Run the modified AppRaytestDemo
3. Observe that the stationary rayTest does not register an intersection point.

What is the expected output? What do you see instead?
The moving ray test (which uses kF_UseSubSimplexConvexCastRaytest) recognizes 
the corner of the box, while the stationary ray test (which doesn't use 
SubSimplex) does not.

I observed this in running the Gazebo regression tests against bullet 2.82. It 
appears that the ray vs. box intersections produce more rounded corners with 
bullet 2.82.

See https://bitbucket.org/osrf/gazebo/issue/934

Note that enabling kF_UseSubSimplexConvexCastRaytest reduces the rounded corner 
issue, but gives much less accurate results overall.

Original issue reported on code.google.com by scpet...@osrfoundation.org on 1 Nov 2013 at 1:35

Attachments:

GoogleCodeExporter commented 8 years ago
the ray test uses the collision shapes expanded by the collision margin, the 
rounded corners are expected. You can reduce the collision margin, if it is a 
problem, but don't set it too small, otherwise Bullet collision detection won't 
work properly.

Original comment by erwin.coumans on 1 Nov 2013 at 2:31

GoogleCodeExporter commented 8 years ago
I tested a box standing on its edge and on a corner on the ground plane, but I 
didn't notice any margin there. I'll try adjusting the margin parameter.

Also, the rounding behavior seemed to change from 2.81 to 2.82, since we had a 
test that passed with 2.81 that now fails with 2.82. Maybe the default value of 
the margin or the SimplexConvex parameters changed.

Original comment by scpet...@osrfoundation.org on 1 Nov 2013 at 5:14

GoogleCodeExporter commented 8 years ago
it was likely a ray test bug in 2.81.

there are some differences how each algorithm uses margin,
box-box and box-plane is different from the general gjk case.

that's why i asked to reduce the margin as a test.

I'll look at it soon.

Original comment by erwin.coumans on 1 Nov 2013 at 11:40

GoogleCodeExporter commented 8 years ago
It helps if you check out the ray tracer demo in Bullet/Demos/Raytracer and 
bump up the resolution. It shows the rounded corners and the errors when using 
the old 'subsimplexxonvexcast'.

Original comment by erwin.coumans on 4 Nov 2013 at 1:18

GoogleCodeExporter commented 8 years ago
moved to https://github.com/bulletphysics/bullet3/issues/34

Original comment by erwin.coumans on 30 Mar 2014 at 5:42