[ODE] Newbie Question about AMotors...

Ary Setijadi Prihatmanto asetijadi at gmx.at
Tue Feb 3 21:12:07 MST 2004


  ;-)
  so,
  definitly stupid question...

  thank you all


  ----- Original Message ----- 
  From: "DjArcas" <djarcas at hotmail.com>
  To: "Ary Setijadi Prihatmanto" <asetijadi at gmx.at>; <ode at q12.org>
  Sent: Tuesday, February 03, 2004 7:13 AM
  Subject: Re: [ODE] Newbie Question about AMotors...


  > %d prints an integer decimal... try %f
  >
  > :-)
  >
  > ----- Original Message ----- 
  > From: "Ary Setijadi Prihatmanto" <asetijadi at gmx.at>
  > To: <ode at q12.org>
  > Sent: Monday, February 02, 2004 12:37 PM
  > Subject: [ODE] Newbie Question about AMotors...
  >
  >
  > > Halo all,
  > >
  > > sorry for (maybe) this stupid question.
  > >
  > > I have tried to get euler angle information from ball joint through
  > AMotor,
  > > using
  > >             dJointGetAMotorAngle(dJointID, int anum) command.
  > > But it seems i just get a garbage number, a very big integer number.
  > >
  > > this is a part of code :
  > >
  > > 1. for defining joint:
  > >             balljoint  = dJointCreateBall(world->GetWorldID(), 0);
  > >                 dJointAttach(balljoint, body1->GetBodyID(),
  > > body2->GetBodyID());
  > >                 dJointSetBallAnchor(balljoint, x, y,  z);
  > >
  > > 2. for defining AMotor
  > >                 balljointAMotor =
dJointCreateAMotor(world->GetWorldID(),
  > > 0);
  > >                 dJointAttach(balljointAMotor, body1->GetBodyID(),
  > > body2->GetBodyID());
  > >                 dJointSetAMotorNumAxes(balljointAMotor ,3);
  > >                 dJointSetAMotorAxis(balljointAMotor, 0, 1, 0,0,1);
  > >                 dJointSetAMotorAxis(balljointAMotor, 2, 2, 1,0,0);
  > >                 dJointSetAMotorMode(balljointAMotor, dAMotorEuler);
  > >                 dJointSetAMotorParam(balljointAMotor, dParamFMax, 0);
  > >
  > > 3. for getting joint angle:
  > >             float pitch  = dJointGetAMotorAngle(balljointAMotor, 0)
  > >
  > > 4. And this is a sample of what I got for pitch: -30221568 (using
printf
  > > with %d )
  > >
  > > Thank you in advance....
  > > Ary
  > >
  > >
  > > _______________________________________________
  > > ODE mailing list
  > > ODE at q12.org
  > > http://q12.org/mailman/listinfo/ode
  > >
  >



More information about the ODE mailing list