AMotor behaviour

11 views
Skip to first unread message

Nico Kruithof

unread,
Nov 3, 2009, 9:13:11 AM11/3/09
to ode-...@googlegroups.com
Hello,

I'm trying to understand the AMotor. I created a small model with two bodies aligned vertically above each other and connected by a ball joint. The top body is fixed to the world. So the bottom body is hanging below the top body. Then I connect the bodies with a amotor and give it a force and velocity around the x-axis. Now the bottom body moves up (rotates around the ball joint). If I set the velocity to zero, the body stops rotating. So far everything is fine.

Now if I set the force to zero, I expected the amotor to be disabled and that the bottom body would drop down again. The body doesn't move however. Is this expected behaviour?

-- Nico

Daniel K. O.

unread,
Nov 8, 2009, 12:22:40 AM11/8/09
to ode-...@googlegroups.com
Nico Kruithof wrote:
> Now if I set the force to zero, I expected the amotor to be disabled and
> that the bottom body would drop down again. The body doesn't move however.
> Is this expected behaviour?

With dParamFMax set to zero, motors are disabled.

Do you have gravity in your simulation? What happens if you don't set
the motor params (i.e. let the motor disabled), and move the body by
applying torque directly? Does it drop down again after that?


--
Daniel K. O.
"The only way to succeed is to build success yourself"

Nico Kruithof

unread,
Nov 10, 2009, 5:40:14 AM11/10/09
to ode-...@googlegroups.com
Hi Daniel,

Yes, we do have gravity. If I apply the torque force directly to the body it starts moving and drops down under gravity when I remove the torque force.

Setting the a-motor to FMax=0, Vel=0 holds the body at the current position. With a torque on the body I can get the body moving (the torque has to be larger than the force I ever applied to the amotor). However, as soon as the body stops moving the amotor will keep it in place again.

A thought I had was on the end-stops of joints. It says in the documentation that the limits are instable. Could this be the problem here as well (with the limit being Vel=0 or FMax=0)? I don't know the implementation of ODE exactly so I don't know whether these two could be related. 

Nico Kruithof

Nico Kruithof

unread,
Nov 23, 2009, 3:03:42 AM11/23/09
to ode-...@googlegroups.com
Hi Daniel,

I did some more tests. With the hinge joint things work fine. I can set forces and velocities and the hinge behaves as I would expect. So I'm not sure anymore whether this is an problem within ODE or within our part of the code that gears ODE.

Best regards,
Nico

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "ode-users" group.
To post to this group, send email to ode-...@googlegroups.com
To unsubscribe from this group, send email to ode-users+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/ode-users?hl=en
-~----------~----~----~----~------~----~------~--~---



Reply all
Reply to author
Forward
0 new messages