A problem about Rigid Body

Please don't post Bullet support questions here, use the above forums instead.
aokman
Posts: 30
Joined: Thu Oct 01, 2009 2:17 pm

A problem about Rigid Body

Post by aokman »

Hello everyone,
I have just implemented the basic algorithm about rigid body simulation. Until now, I haven’t integrated joint constraints into my program, I just finished the non-penetration constraint. When I tested it with a box and a plane, the friction seemed ok. But, when I tested it with a sphere and a plane, there raised a problem.

When a sphere moves on the plane from +x to -x axis, assume that the linear velocity is (-1, 0, 0) and the angular velocity(0, 0, 1), and the radius of sphere is 1 unit, then according to the motion equation, the velocity of the contact point is v’ = v + w x r where r is vector from contact point to center of the sphere, for now, it is (0, -1, 0). And then v’ = (0, 0, 0). Using my PGS solver, the friction at the contact point is always zero. So the sphere will be rolling on the plane all the time. It is unreal, but I don’t kown how to fix it. Please help me.
You do not have the required permissions to view the files attached to this post.
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: A problem about Rigid Body

Post by Dirk Gregorius »

You must implement rolling friction. Usually people just use angular damping.
aokman
Posts: 30
Joined: Thu Oct 01, 2009 2:17 pm

Re: A problem about Rigid Body

Post by aokman »

Dirk Gregorius wrote:You must implement rolling friction. Usually people just use angular damping.
Thank you. By the way, I wonder how bullet engine handle this kind of problem, rolling friction or angular damping.
Dirk Gregorius
Posts: 861
Joined: Sun Jul 03, 2005 4:06 pm
Location: Kirkland, WA

Re: A problem about Rigid Body

Post by Dirk Gregorius »

I think Bullet just uses angular damping.

BTW: I remember a simple trick from university to model rolling friction. Just move the contact point a little forward. This small lever will create a torque and slow the ball down. Let me know if you try it and how it works.