[ODE] value passed to dAddTorque isn't actually torque?
Russ Smith
russ at q12.org
Mon Jun 23 21:36:01 2003
the problem is not in ODE (whew!) ... you're calculating the body mass
but you're not actually setting the mass property of the body. add the
line:
dBodySetMass (box_body,&mass);
at the appropriate point, then everything should work as expected.
russ.
On Mon, 23 Jun 2003 12:41:54 -0400
"Martin C. Martin" <martin@metahuman.org> wrote:
> Hi,
>
> The picture at:
>
> http://www.ai.mit.edu/~mcm/BlockAndHinge.jpg
>
> shows a block in mid air, free to fall except for a
> hinge on one end (the red line). If you do the math, you can show
> that gravity produces a torque about the hinge's axis of:
>
> g M l/2
>
> where l is the length of the box. Therefore, if I apply an equal
> torque in the opposite direction, it should perfectly balance and the
> thing shouldn't move. However, that's not what happens. Instead, to
> balance it, I need the following torque:
>
> g 1/2
>
> That is, same as you'd expect, but without the mass. That formula
> works for changes in:
>
> - acceleration from gravity
> - box density
> - box length
> - box width
> - box height
>
> Is this a bug in ODE? It says that the torque needed to support a rod
> at one end is the same whether its made from lead or Styrofoam. That
> seems wrong. The source I used is below. What can be done to
> fix/work around this?
>
> Thanks,
> Martin
--
Russell Smith
http://www.q12.org