[ODE] Actuated arm get stuck into static entities (solved, possible ODE or doc bug?)

Tanguy Fautre tanguy.fautre at spaceapplications.com
Tue Jun 14 14:52:47 MST 2005

I found the problem.

In the servo controller routine, I'm calling dBodyGetJoint() to get the 
reference to the actuated hinge joint. The problem is that the index of 
this hinge joint varies, depending on the total number of joint attached 
to the body.

Here is what I would have expected:

dBodyGetJoint(Body, 0) -> return the 1st attached joint
dBodyGetJoint(Body, 1) -> return the 2nd attached joint
dBodyGetJoint(Body, n) -> return the (n + 1)th attached joint

But from what I can test, it seems the real behaviour is something more 

dBodyGetJoint(Body, 0) -> return the last attached joint
dBodyGetJoint(Body, n) -> return the (total - n - 1)th attached joint

Thus, to get the hinge (first attached) joint, I have to do
     dBodyGetJoint(Body, dBodyGetNumJoints(Body) - 1)
instead of
     dBodyGetJoint(Body, 0)

I looked again through the documentation, but I'm not finding any 
reference to the indices numbering scheme (am I overlooking a particular 
section?). So I don't know what's the intended behaviour.



Tanguy Fautre wrote:
> Megan Fox wrote:
>> If you drop a normal dynamic entity (like a box) into the world, does
>> it interact properly with the other static objects?
>> Can you, for instance, knock a box around the world with your servo
>> arm, so long as you don't touch the static world?
>> -Megan Fox
> Dynamic (non-actuated) entities seems to interact properly with other 
> static objects.
> But I tried the servo arm with a dynamic box as you suggested, and 
> somtimes the arm gets stuck into the box (even sometimes when the box is 
> not touching anything else!)
> I took some screenshots to illustrate the "stuck" situations I 
> identified so far (the red dots shows the contact joints):
> http://users.telenet.be/tfautre/arm_stuck_01.png
> http://users.telenet.be/tfautre/arm_stuck_02.png
> http://users.telenet.be/tfautre/arm_stuck_03.png
> Note: I already tried enabling or disabling dWorldSetAutoDisableFlag(). 
> But I'm explicitly enabling the arm body when actuating it anyway.
> Regards,
> Tanguy
>> On 6/13/05, Tanguy Fautre <tanguy.fautre at spaceapplications.com> wrote:
>>> Hello,
>>> I have a single arm that is attached to the world by a hinge.
>>> This hinge is motorized and controlled by a servo-motor (inspired by
>>> http://ode.org/cgi-bin/wiki.pl?ServoSimulation).
>>> But whenever the arm touches a collision plane (or any other static
>>> entities), the arm gets stuck and won't move anymore no matter what I do
>>> with the motor (like if the collision joint won't let go of it) .
>>> What could I possibly be doing wrong? Any solution?
>>> Regards,
>>> Tanguy

More information about the ODE mailing list