mechanisms.components.storage¶
Storage components: springs with an energy V(y) ≥ 0 and the force f = −∂V/∂y.
The deflection is y = x − x_ref, so a spring pulls x towards x_ref. Gains are Params: stage
scope (live) for stiffnesses and shapes, episode for limits and exponents.
Classes
|
One-sided spring on a signed distance d: pushes out only when d < 0 (contact). |
|
Repulsive Gaussian, V = A σ² exp(−‖y‖²/2σ²) and f = A exp(−‖y‖²/2σ²) y. |
|
Gravity on a robot's point masses: V = −Σ m_i gᵀ p_i, f_i = m_i g (a physical component). |
|
Zero force inside [lower, upper] and linear outside, per axis (a joint-limit spring). |
|
Linear spring, V = ½ yᵀ K y and f = −K y. |
|
Spring with stiffness k = K (d / d₀)^n: f = −k y, V = K d^(n+2) / ((n+2) d₀ⁿ). |
|
Spring stiffening with distance: f = −k(d) y, k(d) = k_min + (k_max − k_min) σ(α(d − d₀)). |
|
Saturating spring, per axis: f = −F tanh(k y / F), within ±F on each axis. |