raisimLib
raisimLib copied to clipboard
Is getImpulse() the only way to get contact force?
Hi Jemin,
I want to get the contact force of the contact point. Seems like there is only a method getImpulse() to calculate contact impulse. To calculate the contact force, I have to calculate the derivative of force with respect to time. But how can I get dP/dt? Or is there a method to direct get the force?
A similar problem is the acceleration of the body. It seems no direct way to get acceleration. Should I use the integral of velocity?
Best, Qingxu
In RaiSim, the contact impulse is applied during a time step. If you want to get force, you have to just divide it by the time step. This will give you an average force applied over that time step.
You can compute the acceleration by a finite-difference. Almost all simulators that you will see are velocity-based and do not provide acceleration directly