Limiting joint motion

Simbody is useful for internal coordinate and coarse grained molecule modeling, large scale mechanical models like skeletons, and anything else that can be modeled as bodies interconnected by joints, acted upon by forces, and restricted by constraints.
POST REPLY
User avatar
Michael Sherman
Posts: 806
Joined: Fri Apr 01, 2005 6:05 pm

Limiting joint motion

Post by Michael Sherman » Fri Sep 18, 2009 10:51 am

(Moved from another thread)
BY: Jean-Philippe Jodoin (jpjodoin)
DATE: 2009-09-18 09:54
SUBJECT: RE: Constraint Missing implementation

I was wondering, what would be the best to set a range to a mobilizer ? For example, I have a MobilizerBody::Ball that I only want to move on 180 degrees (Half-Ball). Or for instance, I have a pin and I want to allow the motion on only 90 degrees. Is there an easy way for this or do I have to create a custom mobilizer ? And if so, how would I do that ?

Thanks a lot,
Jean-Philippe

User avatar
Michael Sherman
Posts: 806
Joined: Fri Apr 01, 2005 6:05 pm

RE: Limiting joint motion

Post by Michael Sherman » Fri Sep 18, 2009 10:52 am

Hi, Jean-Philippe.

The best way to limit the motion of a joint is the way it's done in nature -- with forces! Think about how the limited motion is enforced physically and write a Custom Force that resists motion beyond the limit (I believe you can find Custom Force examples in the tutorials).

The functional form I would recommend for a joint stop is something like f(x,xdot)=0 when -x0<=x<=x0, and f(x,xdot)=k*(x-x0)*(1+c*xdot) when x > x0 (and something similar for x < -x0), where x is the joint coordinate, x0 the limit. This gives you stiffness and dissipation but avoids the force discontinuity that you would get with a functional form like k*(x-x0) + c*xdot.

Best regards,
Sherm

POST REPLY