[ODE] Simulating a Human Leg
Gene Ruebsamen
gene at erachampion.com
Sun Feb 10 10:31:01 2002
Okay, I figured out that I was not constraining all three axis's.
Defining dParamLoStop2 and 3 as well as the HiStop's seem to work.
I am still not too clear about setting the AMotor Axis and how that
works. The docs indicate for a AMotorEuler, one axis needs to be
attached to the first body and the other axis needs to be attached to
the 2nd body, and they need to be perpendicular. I couldn't tell any
difference between choosing the x axis for the first body and the z or y
axis for the 2nd body... Can someone provide some clarification?
Thanks!
Gene
On Sat, 2002-02-09 at 21:08, Gene Ruebsamen wrote:
> Hello,
>
> I'm still new to ODE, but I love it so far (thanks Russ!). I am trying
> to model a simple bipedal humanoid in ODE. My question is, is using a
> Ball & Socket joint the way to go to simulate where the upper leg
> connects to the Torso??
>
> I am using a hinge joint with stops to simulate the knee, and where the
> torso connects to the leg, I am using a ball & socket joint. The problem
> with the ball & socket is it seems like there is nothing to constrain
> its degrees of freedom. I tried using an AMotor with the ball & socket
> joint, but is that the way to go?
>
> Example of what I'm doing:
> // left Leg Socket
> joint[5] = dJointCreateBall(world,0);
> dJointAttach(joint[5],body[0],body[6]);
> dJointSetBallAnchor(joint[5],-TORSO[0]/2,0,STARTZ-(TORSO[2]/2));
> amotor[1] = dJointCreateAMotor(world,0);
> dJointAttach(amotor[1],body[0],body[6]);
> dJointSetAMotorMode(amotor[1],dAMotorEuler);
> dJointSetAMotorAxis(amotor[1],0,1,0,1,0); // is this correct?
> dJointSetAMotorAxis(amotor[1],2,2,1,0,0); // correct?
> dJointSetAMotorParam(amotor[1],dParamLoStop,0); // not sure..
> dJointSetAMotorParam(amotor[1],dParamHiStop,0.8); // not sure
> // knee below (use hinge)
>
>
> I could use a hinge for the upper leg to torso connection; however, then
> I wouldn't be able to get any type of lateral movement in the legs, only
> a back & forth movement. I don't want too much lateral movement, but a
> stiff leg that can only move in one axis is unrealistic, which is why I
> originally tried the ball & socket approach. I would like to approximate
> the freedom of movement found in a human leg. Anyone have any examples
> of using a ball & socket joint with Amotors?
>
> Thanks,
>
> Gene Ruebsamen
>
>
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode