Tuesday 26 July 2011

Developer Journal 116 - On Bullet Physics Constraints


I've been thinking lately that keeping a limb at a target angle using the six degrees of freedom constraint by only adjusting the target velocity is going to be hard for the robot. I could try working out mathematically the target velocities to keep a limb in place but I'm not sure. I wish I know how to use solveAngularLimits() in btRotationalLimitMotor. It could be the key.

Other options are I could examine the code for how the hinge constraint stays at a target angle or I can switch from using a six degrees of freedom constraint and two rigid bodies to using three hinge constraints and four rigid bodies. I was going to switch to using three constraints and four rigid bodies anyway to test out my ideas.

I'll have to also explore the option of three constraints with two rigid bodies and three constraints with three rigid bodies. I never want to program new things on a tight deadline again. Actually, I never want to program new things again.

Grr. Today is one of those days where non-AI work intrudes on AI work.

I tried working out how to use solveAngularLimits() in btRotationalLimitMotor but I don't know how. The forum was not much help either. I could always go through the demos.

I had a look at the code for sticking to a specified angle in btHingeConstraint and it is surprisingly straightforward. I can either copy that code or switch from btGeneric6DofConstraint to btHingeConstraint.



RELATED

No comments:

Post a Comment