From: Ethan Glasser-C. <gl...@cs...> - 2007-06-19 18:25:19
|
Sorry Nick for the duplicate mail.. nick knouf wrote: > I have a rectangular box (mostly in the xz plane) with 4 chains in > the +y direction, attached with ball joints on the corners of the > box. I want to use the chains to hold the box above the floor. How did you build chains using ODE? (This is personal curiosity; the most effective chains I've been able to build have been hinge joint + slider, but that's only in 2D.) > Pseudo-code for the holding algorithm (in both cases described above) > is as follows: > > currentVelocity = finalChainElement.getLinearVel() > currentPosition = finalChainElement.getPosition() > desiredPosition = holdPosition > > desiredVelocity = desiredPosition - currentPosition > desiredAccel = desiredVeclocity - currentVelocity > finalChainElement.addForce(holdingMass * desiredAcel + holdingForce) I'm not sure but this looks like you should be using some kind of motor instead of computing forces like this. Ethan |