[ODE] Making a leg (newbie question)

Remi Ricard remi.ricard at simlog.com
Mon Jun 19 04:59:50 MST 2006


Vasco Freitas wrote:
> Hi,
>
> I'm just starting to use ODE, so sorry for the newbie question.
>
> I'm trying to make a leg, so I made two bodies and a hinge joint. I want 
> to do this in 2D, so all forces I apply are only to x and z coordinates. 
> The problem is when I move a body (by applying forces) the distance 
> between the two bodies is always the same, and it shouldn't be right? It 
> should be able to "bend the knee"...
>
> Maybe the problem has to do with dJointSetHingeAxis(), because I don't 
> understand how to set the axis from the brief discription in the manual.
>   
Usually the position between the 2 bodies will stay the same but their 
orientation will change

build like this : ----- * -----

                       *
After motion:       /    \          or ----- *
                 /         \                   \
              /              \                   \
                                                   \
  


I'm using the C++ version of the function but if you look in odecpp.h 
you will find the C version.

  joint  = new dHingeJoint(world, 0);
  joint->attach(upperLegBodyID, lowerLefBodyID);
  joint->setAxis(0.0, 1.0, 0.0);
  joint->setAnchor(position[X], position[Y], position[Z]);


Remi


More information about the ODE mailing list