Rolling Friction Issue

Post Reply
Rope
Posts: 3
Joined: Tue Sep 11, 2012 9:57 am

Rolling Friction Issue

Post by Rope »

Hello, Erwin

I pull the lastest bullet physics(v2.81), and use the new feature called "rolling friction".

In RollingFrictionDemo, I remove all dynamic bodies, and add a sphere rigid body in the world.(look attachment)

When simulating, applying a impulse (10, 0, 5) to sphere.

Rigid body moving in (10, 0, 5) to begin, but rolling out of (10, 0, 5) line in the end.

Is it right?

PS: I found it doesn't occur when rolling in direction(1, 0, 0), (0, 0, 1), (1, 0, 1), (-1, 0, 0), (0, 0, -1), (-1, 0, 1), (-1, 0, -1), (1, 0, -1)
Attachments
rollingfriction.jpg
rollingfriction.jpg (79.16 KiB) Viewed 7658 times
User avatar
Dr.Shepherd
Posts: 168
Joined: Tue Jan 04, 2011 11:47 pm
Contact:

Re: Rolling Friction Issue

Post by Dr.Shepherd »

Is there any other force in the dynamics world? How long does this deviation begin to be noticeable? If it takes a long time, maybe issues with numeric stability (not sure...).

If it is correct in the direction of (-1, 0, 1), (-1, 0, -1), (1, 0, -1), I can't see why it doesn't in (10, 0, 5).
Rope
Posts: 3
Joined: Tue Sep 11, 2012 9:57 am

Re: Rolling Friction Issue

Post by Rope »

There isn't any other force which apply to sphere...
Only applying a impulse (10, 0, 5) to sphere, and the result as attachment.

But if the impulse is in direction (1, 0, 0) or (0, 0, 1) or (1, 0, 1) or (-1, 0, 0) or (0, 0, -1) or (-1, 0, 1) or (-1, 0, -1) or (1, 0, -1)
The sphere move along the impulse direction (1, 0, 0) or (0, 0, 1) or (1, 0, 1) or (-1, 0, 0) or (0, 0, -1) or (-1, 0, 1) or (-1, 0, -1) or (1, 0, -1)

If disable rolling friction, it's right.
LtBrick
Posts: 6
Joined: Mon Apr 14, 2014 6:39 pm

Re: Rolling Friction Issue

Post by LtBrick »

I have come across this same problem. Was a reason/solution ever found?
LtBrick
Posts: 6
Joined: Mon Apr 14, 2014 6:39 pm

Re: Rolling Friction Issue

Post by LtBrick »

I have done some more investigation into the issues seen with rolling friction.

I have taken the RollingFrictionDemo and removed all the objects other than the sphere and box for the ground, tilt removed. I also removed the call to setAnisotropicFriction as this is a sphere, and as I understand it is not limited in its direction of travel.

I started the sphere on top of the box, at x=0, Z=-50, and applied an impulse vector of (10, 0, -50) both with and without the calls to setRollingFriction.

The image below shows the sphere position over time. The blue line shows the balls track without any rolling friction. The red line is with rolling friction as defined in the demo.
FrictionProblem.tiff
FrictionProblem.tiff (32.4 KiB) Viewed 6859 times
With no rolling friction the sphere follows the expected trajectory but does not slow down, this I understand. However, with rolling friction, as shown in red, the sphere slows down but then fails to follow the expected trajectory.

I am using the btDbvtBroadphase solver as per the demo. This looks like a bug to me, I can't see anything on the Issue pages to indicate this has already be reported. Any opinions before I report it.

LtBrick
LtBrick
Posts: 6
Joined: Mon Apr 14, 2014 6:39 pm

Re: Rolling Friction Issue

Post by LtBrick »

Still can't find a solution to this problem so I have uploaded a youtube video showing the issue.

The surface is flat and the ball has an impulse

body->applyCentralImpulse( btVector3( -5.0/2.0f, 0.f, -5.0 ) );

So expect the ball to go 1 square left for every 2 forward, which it starts to do but then 'turns' to the right before going straight down the z axis.

https://www.youtube.com/watch?v=ZQvz9oO ... e=youtu.be

I have tried playing around with m_solverMode but can't find anything that makes much of a difference.

Can anyone explain what the various options that follow do, couldn't find any documentation on them?

SOLVER_RANDMIZE_ORDER
SOLVER_FRICTION_SEPARATE
SOLVER_USE_WARMSTARTING
SOLVER_USE_2_FRICTION_DIRECTIONS
SOLVER_ENABLE_FRICTION_DIRECTION_CACHING
SOLVER_DISABLE_VELOCITY_DEPENDENT_FRICTION_DIRECTION
SOLVER_CACHE_FRIENDLY
SOLVER_SIMD
SOLVER_INTERLEAVE_CONTACT_AND_FRICTION_CONSTRAINTS
SOLVER_ALLOW_ZERO_LENGTH_FRICTION_DIRECTIONS

Thanks,

LtBrick
Post Reply