adding friction to revolute joints?

hello!

can i add some kind of friction to a revolute joint?
i am currently making a machine in which some gears would be "rusted"
and i would like to add "oil" when needed.

any ideas?

thanks a lot!
Easy, enable the joint motor with a small maximum torque and a zero target velocity.
Hi,

I am interested in this too. When I play with the iPhone testbed, setting speed to zero and setting a torque value seems to just allow me to position the body where I like and it simply stays in position. When I reduce the torque, it just seems to "come to rest", I don't understand how the relationship described represents a frictional joint?

Regards

i
Yeah, that is dry friction. There is no reaction to the normal reaction force, but the effect is often good enough.
ah, cool! thanks!
hi,

i tried getting this to work, but it wont slow down the rotation of the body...

heres my code:

Code:
b2RevoluteJointDef jd;
   
   jd.Initialize(bodyA,bodyB,b2Vec2(bodyA->GetPosition().x + (pointA.x/PTM_RATIO),bodyA->GetPosition().y+(pointA.y/PTM_RATIO)));
   jd.upperAngle = 0.75 * 3.14f;
   jd.lowerAngle = 0.25 *3.14f;
   jd.enableLimit = true;
   jd.maxMotorTorque =5.0f;
   jd.motorSpeed = 0.0f;
    jd.enableMotor = true;
   
   
   world->CreateJoint(&jd);   


i tried values from 100.0f to 0.000000000000001f for the torque, different angles etc. i cant notice any change at all. but if i add motorSpeed, i can see the wheel turning, so he seems to apply the motor-setup correctly.

any ideas?
Try increasing the max motor torque even more. Try 1e10f.
that works!

thanks erin!

Original thread: https://box2d.org/forum/viewtopic.php?t=5211