Get joint forces?

Hello,

I’m trying to make a physics simulation that not only animates the results on screen, but also reports the forces at various nodes. The reporting isn’t too important during the simulation, but I definitely want it after the system settles to an ‘equilibrium’.



Take a simple pendulum, for example. Is there a way to read the force seen by the joint?



I see there’s a method getAppliedImpulse() for use in collisions. Maybe I’m missing something, but I can’t see how to apply this to joints.



My request is similar to this post I suppose

http://hub.jmonkeyengine.org/groups/physics/forum/topic/reading-force-of-impact/

The reply back then was that jme didnt support that output, while odejava apparently did(?).

But odejava is ‘dead’ and jme recommends not to use it… so have there been any developments on this subject?



Another similar post but no clear solution:

http://hub.jmonkeyengine.org/groups/physics/forum/topic/force-sensor-and-odejavajme-physics-sources



Thanks for any help!

if you are looking for the amount of Torque (measured in Newton-Metres) being exerted onto each joint (during the application of forces onto it’s ‘arms’)… i don’t think it can exist without some form of joint constraint or rigidity for the rotational force to resist.

…but you may find a formula here: http://www.kwon3d.com/theory/jtorque/jtorque.html



you might be able to simulate this with an imaginary magnitude on each joint that takes the movement vector and speed of each of it’s “arms” and returns a value based on their relation to one another.

for example, using this made up value to render a color scale to show the joints as blue-ish when the arms move slowly or away from each other, changing to red-ish when they move faster or the angle between them gets smaller.



hope that helps.

That’s a good link, thanks Decoy.

It’s exactly the joint constraint force that I’m after (not the external one, I will know that).

In the diagram there, I am interested in the values of net force F – Fd or Fp (or the J & M combinations).

I need the magnitude, and also direction so I can test if it results in compression or tension in each body, and react accordingly.

Units needed are Newtons, or probably Newton-seconds that I can divide by the time step and sum up over simulation time.

So there is no method in jbullet to get these?