Cheers
Bill
> --
> 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.
>
ODE does not have a joint called servo. You have to tell us precisely
what ODE entities you are using, so we can tell you what to expect from
them.
> However, when I use
> dJointGetFeedback on those static servos, I get some torque values
> (though they should be zero).
A joint doesn't have to be motorized to apply torques. In fact, most
joints have to apply torques to interact with the bodies.
Just a guess here: are you using a hinge joint to keep the axis
constraints, and trying to power it up by using its built-in motor
params? If so, your feedback will contain a combination of forces and
torques, from both the axis constraints and the motor powering it up.
You;'ll have to project the torque along the axis to obtain only the
motor component. Or use a separated AMotor joint to apply the motor part.
> Moreover, if I need to get jointtorque, should I add the values from
> 't1' and 't2'? (Since, if a joint applies t1 to body 1 and t2 to body
> 2, it should experience an equal and opposite torque which can be
> added component-wise)
Newton's third law of motion, the forces and torques will be of equal
magnitude but opposite. So adding t1 and t2 should cancel everything to
zero.
--
Daniel K. O.
and ti and t2 are the torques being applied to bodies 1 and 2... so
net torque on the joint should be (-t1+ -t2).... and should not be
zero....
Also, could you suggest me how to use dBodyGetForce() values for calculations..
Thanks,
Mayank
> --
> 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.
>
>
--
Regards,
Mayank
Maybe you are interpreting the meaning of torque in a different way?
On our context, a torque is a vector, that represents a "twisting
force". The direction of the vector gives you the axis of the twist, and
its length gives the intensity. Try to display those torque vectors, and
you will see the axis it's trying to rotate around.
Now, suppose a simple, non-powered hinge joint, with no rotational
limits. It will exert forces over the connected bodies to keep them from
falling apart. It will also exert torques, so the bodies don't rotate
freely as if it was a ball joint. In fact, the only difference between
the ball and hinge constraints is the hinge has 2 angular constraints so
there is only 1 degree of freedom for the bodies to rotate. To maintain
the constraints the joint has to apply forces and torques.
To avoid having to draw something, look at the letter V floating in zero
gravity, and imagine it has a hinge at the bottom, connecting \ and /,
with no friction. Suppose you push \ to the right, at its very center
(so you initially have no intention of rotating \), what happens to / ?
Well, the two pieces can't get closer unless they rotate. So \ tries to
push / to the right, but the inertia of / tries to keep it still. So it
pushes \ back. This reaction force is not acting on the center of \, so
it starts to rotate; that is, we have a torque. Even though the hinge is
not powered, it induced a rotation around the axis that it's supposed to
let rotate freely. [1]
> and ti and t2 are the torques being applied to bodies 1 and 2... so
> net torque on the joint should be (-t1+ -t2).... and should not be
> zero....
If I understood your sentence correctly, I think you are confusing
something. Joints don't have net torques. Torques, like forces, are
applied on bodies. A body can have a net torque. So if body 1 receives a
torque to rotate it to the left, body 2 will receive a torque of the
same magnitude to rotate it to the left, or something like that. They
will be opposite vectors of the same magnitude, so they cancel out.
> Also, could you suggest me how to use dBodyGetForce() values for calculations..
Whenever you call dBodyAddForce(), it gets accumulated in the body. To
retrieve value that was accumulated so far you call dBodyGetForce(). You
can override this accumulated value directly by calling dBodySetForce().
When you step the world, those accumulated forces are combined with
gravity, and the system proceeds to find constraint forces to
compensate, so the joint constraints are not violated. Then the force
accumulator for each body is zeroed. [2]
So whatever you would obtain with dBodyGetForce() you already know,
because you added the force in yourself. The constraint forces are added
later, during the time step.
What exactly do you intend to calculate? Or even better, what is your
goal? Maybe you could use a different approach.
[1] This happens because, to establish linear constraints away from the
center of mass, a transformation is used, that combines linear and
angular constraints.
[2] ODE uses first-order approximation, so it deals with velocities and
impulses instead of accelerations and forces. But the concept is the same.
--
Daniel K. O.
Mayank
In which frame does dJointGetFeedback return values? Is it global frame
or joint fixed frame?
Thanks,
Mayank
On 23-Feb-12 10:51 PM, Daniel K. O. wrote:
Everything is always in the global frame, unless specified otherwise.
--
Daniel K. O.
--
Daniel K. O.
--
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.