[ODE] AMotor Lo/HiStop and Ball joint
Wesley Smith
wesley.hoke at gmail.com
Mon Dec 11 14:33:46 MST 2006
Ok, I figured it out. I had to set dParamLoStop2 and dParamLoStop3.
wes
On 12/11/06, Wesley Smith <wesley.hoke at gmail.com> wrote:
> Hi,
> I can't seem to get the Lo/HiStop parameters of Amotor joints to
> properly constrain the angles of a Ball joint. Here's the setup code:
>
> m_LinkJoints[i] = dJointCreateBall(m_World, 0);
> pos1 = m_ChainLinks[i].position();
> pos2 = m_ChainLinks[i+1].position();
>
> jointPos[0] = (pos1[0]+pos2[0])/2.;
> jointPos[1] = (pos1[1]+pos2[1])/2.;
> jointPos[2] = (pos1[2]+pos2[2])/2.;
>
> dJointAttach(m_LinkJoints[i], m_ChainLinks[i].body(),
> m_ChainLinks[i+1].body());
> dJointSetBallAnchor(m_LinkJoints[i], jointPos[0], jointPos[1], jointPos[2]);
>
>
> m_LinkConstrain[i] = dJointCreateAMotor(m_World, 0);
> dJointAttach(m_LinkConstrain[i], m_ChainLinks[i].body(),
> m_ChainLinks[i+1].body());
>
> dJointSetAMotorMode(m_LinkConstrain[i], dAMotorEuler);
> dJointSetAMotorNumAxes(m_LinkConstrain[i], 3);
> dJointSetAMotorAxis(m_LinkConstrain[i], 0, 1, 1, 0, 0);
> dJointSetAMotorAxis(m_LinkConstrain[i], 2, 2, 0, 0, 1);
> dJointSetAMotorParam(m_LinkConstrain[i], dParamLoStop, -30*3.1415/180.);
> dJointSetAMotorParam(m_LinkConstrain[i], dParamHiStop, 30*3.1415/180.);
>
>
> When I do dJointGetAMotorAngle, I see the angles going way beyond the
> +/- 30 degrees I set the values to. Visually this is what I see as
> well. Am I doing things in the proper order? Any other ideas?
>
> thanks,
> wes
>
More information about the ODE
mailing list