[ODE] a newbies question on hinge and robot legs...
Nate W
coding at natew.com
Fri Oct 18 10:39:01 2002
On Fri, 18 Oct 2002, Michael Scharvogel wrote:
> In the final state I'd like to say something like:
> Hinge 1 bow 10 degrees.
>
> So do I have to attach Motors to the hinges to achiev this (I did not
> quiet figure out how this could work) or do I have to use these
> Transform geometries and rotate them (I I understood them right they
> can be used to rotate for example a leg around one of its ends)
What you're talking about is a job for motors. You don't have to
"attach" motors to joints though, in ODE joints have motorization built
into them.
The motor API does not allow command like "move 10 degrees" though.
Instead, you ask it something like "Hinge 1 move at 5 degrees per
second" until the hinge is at the angle you desire. This means checking
the hinge angle every frame, comparing it to the desired hinge angle, and
asking it to move at a speed proportional to the difference.
If you search the mailing list archives you'll probably find some messagse
from me on this subject. The most recent of those messages are the most
correct - I was trying to do it the wrong way at first. :-)
--
Nate Waddoups
Redmond WA USA
http://www.natew.com