I'm trying to simulate an inelastic string that pulls on multiple joints (think a finger, where the string is anchored in the tip and runs the length of the finger. I'm currently trying to model this with a fixed length tendon - ie, a spatial tendon passing through sites on the bodies that are connected by the joints - and constrained by an equality of the form <equality> <tendon tendon1="my_string" /> </equality> I pull on the string by attaching a small mass to the end of the string, and moving the mass with a simple positional actuator. What I'm seeing is a huge amount of springiness in the response. Since I'm using a fixed length tendon I surmise that we're dealing with constraint violations, and I've attempted to manipulate solref and solimp to tighten the response. That's helped, but not enough. A few questions: - Is this a reasonable model for what I'm trying to do? - If so, what am I doing wrong? Am I simply not being aggressive enough with solref and solimp, or is there something else I should do? - If not, what model should I be using?
It sounds like you need some damping in the system. Try adding damping to the joints. You could also add damping to the equality constraint itself: solref[0] has the meaning of time constant, while solref[1] has the meaning of damping ratio. If you set solref[1] to a value greater than 1, the constraint will be over-damped system. But joint damping is better behaved. Also, make sure the rest of the system behaves as expected without the tendon constraint. You can disable equality constraints in the simulator and pull the system around with the mouse to see what it does. If you have modeling bugs -- for example contacts that are always active -- and define an equality constraint on top of them, you could get unexpected behavior for reasons unrelated to the constraint.
I'm not sure adding more damping is the answer. The system as it exists feels overdamped - the motions are extremely sluggish compared to the same simulation with positional actuators at the joints, and this is after I've jacked up the kp values to about 100 times where they were using more direct joint activation. I appreciate the pointer about contacts that are always active, although I don't think it's currently applicable. I did have such problems a week back, but they've been eliminated and I don't see any obvious problems with the simulation when turn off the system and drive it with a mouse (except of course that the strings, being equality constraints themselves, don't work at all.) Do you still think that adding more damping is the answer?
If it looks over-damped already then it may not be the answer... if you send me your model I can take a look.