OK, some more data points: this is directly related to the gravity and center of mass of the immediately following link, but not to the total mass or CoM of subsequent links.
So in other words, in the previous screen shots, the CoM of each link was at the hinge, but as I move the CoM out along the link, the joints sag more. In particular, the sag on the first and last joints becomes noticeable. It's interesting that the sag of each joint only depends on the CoM of the immediately following link, not all attached links on the arm...
The sag scales directly with the gravity parameter.
I have a feeling I might not be doing my rotational inertia correctly, it may be using a relatively large inertia value based on the CoM distance, so I'll look into that.
But for future reference, it looks like if I switch to btGeneric6DofConstraint then I can set the max limit force and ERP for locked axis via btRotationalLimitMotor? Could you say a bit more on m_ERP vs. m_limitSoftness? The API documentation is a bit sparse there, it sounds like it's something like:
Code: Select all
if(abs(past_limit_error) > m_ERP)
applyTorque(sign(limit_error) * min(m_maxLimitForce, abs(past_limit_error) * m_limitSoftness))
Alternatively I'd be happy with the hinge joint if there was a way to increase its stiffness. Perhaps there's a similar parameter(s) in btHingeConstraint that I could make accessible (and supply a patch for others) if you give me a pointer? Thanks?