calculating forces during collisions

108 views
Skip to first unread message

Varun V Prabhu

unread,
Jun 13, 2010, 4:33:20 PM6/13/10
to ode-users
I want to output to the console window, the force experienced when an
object collides with the other. I tried the "dReal * dBodyGetForce
(dBodyID);" command in the boxstack demo provided with ODE but it
outputs only zeroes even when a selected object collides with the
other. How can I find this out in general for any body ?

Daniel K. O.

unread,
Jun 14, 2010, 1:48:20 PM6/14/10
to ode-...@googlegroups.com

It works like this:

* forces are accumulated by the user through dBodyAddForce. Those are
the "external forces".

* you call dWorldQuickStep or dWorldStep.

* gravity is also accumulated as an external force

* the solver computes the joint forces so the body movements satisfy the
constraints. Each joint with a dJointFeedback set will store this
constraint force on the feedback.

* the accumulated forces are zeroed.

* the step function returns.

So you can only know the force applied by the contact joints through
joint feedbacks. That, or use the change of velocity of the bodies
multiplied by their mass to estimate the impulse, and divide it by the
timestep size to estimate the force.


--
Daniel K. O.

Varun V Prabhu

unread,
Jun 14, 2010, 3:44:36 PM6/14/10
to ode-users
the dGetLinearVel() function returns zero when an object is under the
influence of gravity i.e falling freely. How can I know the velocity
during this time ?

Jon Watte

unread,
Jun 15, 2010, 12:59:31 PM6/15/10
to ode-...@googlegroups.com
dGetLinearVel() function returns zero when an object is under the
influence of gravity

That should not be true.

Sincerely,

jw


--
Americans might object: there is no way we would sacrifice our living standards for the benefit of people in the rest of the world. Nevertheless, whether we get there willingly or not, we shall soon have lower consumption rates, because our present rates are unsustainable.




--
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.


Daniel K. O.

unread,
Jun 15, 2010, 5:02:43 PM6/15/10
to ode-...@googlegroups.com
Em 15-06-2010 10:59, Jon Watte escreveu:
>
> dGetLinearVel() function returns zero when an object is under the
> influence of gravity
>
>
> That should not be true.

Right now I'm under the influence of gravity, and my linear velocity is
zero. ;-)
The question is, if the object is free-falling, did you step the world
at all?

--
Daniel K. O.

Reply all
Reply to author
Forward
0 new messages