Force sensor is one step behind actual applied forces

Report crashes, strange behaviour, or apparent bugs
Post Reply

Force sensor is one step behind actual applied forces

Post by neduard » 07 Feb 2016, 18:09


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: ... sp=sharing

ts=25ms graph: ... sp=sharing

Also, here is the scene file: ... sp=sharing

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

Many Thanks,

Site Admin
Posts: 7190
Joined: 14 Dec 2012, 00:25

Re: Force sensor is one step behind actual applied forces

Post by coppelia » 08 Feb 2016, 11:43

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.


Post Reply