mechanisms.components.constrained

Constrained elements: springs and dampers that act along one direction n only (a cart).

Each is its plain element on the projection of the coordinate on n, s = n̂ᵀ y, so its force is n̂ times the plain element’s force on s: the plane normal to n is left free. normal n is an episode Param, normalized when used.

Classes

ConstrainedGaussianSpring(coord, strength, ...)

Repulsive Gaussian along normal only: f = n̂ A exp(−s²/2σ²) s with s = n̂ᵀ y.

ConstrainedLinearDamper(coord, damping, normal)

Linear damper along normal only: f = −d n̂ n̂ᵀ ẏ, damping d.

ConstrainedLinearSpring(coord, stiffness, normal)

Linear spring along normal only: f = −k n̂ n̂ᵀ y, stiffness k.

ConstrainedTanhDamper(coord, damping, ...)

Saturating damper along normal only: f = −n̂ F tanh(d n̂ᵀ ẏ / F), within ±F.

ConstrainedTanhSpring(coord, stiffness, ...)

Saturating spring along normal only: f = −n̂ F tanh(k n̂ᵀ y / F), within ±F.