General description
The “DataVariationLimiter” component is used to avoid big variation of an input data. It interpolates between two consecutive inputs when a jump is detected.
How to use the component
To learn how to create a SOFA scene, please refer to the tutorial provided by the SOFA Modeler or this documentation.
Here is an example where the DataVariationLimiter is used to avoid big jump in a goal effector:
goal = rootNode.createChild('goal') goal.createObject('EulerImplicit') goal.createObject('CGLinearSolver', iterations='100', tolerance="1e-5", threshold="1e-5") goal.createObject('MechanicalObject', name='goalMO', position='0 0 5', showObject="1", showObjectScale="1", drawMode="1") goal.createObject('DataVariationLimiter', name="stabilizer", listening="1", input="@goalMO.position") goal.createObject('MechanicalObject', name='goalMOStabilized', position='@stabilizer.output', showObject="1", showObjectScale="1", drawMode="1") goal.createObject('UncoupledConstraintCorrection')
This component is useful when using, for example, an external device to control an effector.
Data field
Input data
input : Input data (usually link to a mechanical position)
initOuput : If true, will initialize the output with the input (allows to interpolate an initial jump). Default true.
nbStep : Interpolation number of step. Default 50.
maxJump : Unautorized jump. Default 10%, maxJump = 0.1.
Output data
output : Output interpolation.