Blowing up in extremes

From Newton Wiki
Revision as of 08:02, 10 June 2019 by WikiSysop (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

If you have a lot of abrupt changes in your forces (or hinge angle/speed values) you may get blow ups. For example, this can happen with AI that is being trained and is sometimes noisy.

To solve this, use a low pass filter. A simple way is to average the current value with the last value and pass that as the force or speed:

output=0.5*(last_value+desired_value);
last_value=output;

use output for joint angle/speed/force, whatever.