Page 1 of 1

Force sensor is one step behind actual applied forces

Posted: 07 Feb 2016, 18:09
by neduard
Hello,

I noticed a strange behaviour in this following scenario:

I have an object at some height and an accelerometer attached to it. The object starts falling.

I then toggle applying an upward force every 10 time steps on the object and read the data I get back from the accelerometer.

I would expect the accelerometer value to start changing as soon as I'm applying the force, but I notice the accelerometer data 'lags' one step behind the force applied.

I have included two graphs, one with step size 10ms, one with step size 25ms. This is to ensure it is not a problem of simulation accuracy. In both cases, the accelerometer value changes but only one step after the force has changed.

Red line represents the force applied to the object, yellow is speed and green is acceleration.

All movement is in the Z axis.

ts=10ms graph: https://drive.google.com/file/d/0ByPgOd ... sp=sharing

ts=25ms graph: https://drive.google.com/file/d/0ByPgOd ... sp=sharing

Also, here is the scene file: https://drive.google.com/file/d/0ByPgOd ... sp=sharing

I'm not sure though if this is expected behaviour or not.

Many Thanks,
Eduard

Re: Force sensor is one step behind actual applied forces

Posted: 08 Feb 2016, 11:43
by coppelia
Hello Eduard,

you have a very strange construction there. Your Cuboid is dynamically enabled (will fall, respond to collision), but shape Accelerometer is static. And on top of that static shape that is moving, you attached the rest of the construction. This kind of construction is forbidden, have a look here.

In your scene, try to attach Accelerometer_forceSensor to Cuboid directly. Then the graph will look correct.

Cheers