Affine Body Prismatic Joint Limit
#669 AffineBodyPrismaticJointLimit
Affine Body Prismatic Joint Limit restricts how far two bodies can slide relative to each other along a Prismatic Joint axis. When the joint translation goes outside a specified lower or upper bound, a cubic penalty is applied. It is an InterAffineBody extra constitution defined on prismatic-joint geometry.
Energy
The limit adds an energy \(E(x)\) where \(x\) is the scalar joint coordinate (its exact meaning is given in Meaning of \(x\)). Let \(l,u\) be lower/upper limits and \(s\) be limit/strength.
For normal range width (\(u>l\)):
The normalized gaps are dimensionless, so changing \((l,u)\) does not require retuning \(s\) just because the interval width changed.
For degenerate limit (\(u=l\)), use fallback cubic:
Boundary points are treated as in-range.
Meaning of \(x\)
The prismatic coordinate is evaluated in incremental form:
Here:
- \(\mathbf{q}\) is the current affine-body DOF.
- \(\mathbf{q}^{t}\) is the previous-time-step DOF.
- \(\mathbf{q}_{ref}\) is the reference DOF captured at initialization.
- \(\theta^t\) is the accumulated prismatic coordinate from the previous step.
Note that \(\mathbf{q}\) is the concatenation of the DOF of the two affine bodies connected by the prismatic joint.
The Prismatic Joint geometry is represented as an edge with two endpoints. The joint axis direction is defined by the order from \(\mathbf{c}_i\) to \(\mathbf{c}_j\), denoted \(\mathbf{c}_i \to \mathbf{c}_j\), giving \(+\hat{\mathbf{t}}\).
- \(x=0\): current relative prismatic coordinate equals the reference coordinate.
- \(x>0\): link \(j\) translates relative to link \(i\) along \(+\hat{\mathbf{t}}\).
- \(x<0\): link \(j\) translates relative to link \(i\) along \(-\hat{\mathbf{t}}\).
Equivalent symmetric coordinate (same convention as External Articulation Constraint):
Requirement
This limit term is meaningful only on a geometry that already represents a Prismatic Joint (UID=20). The limit augments that base relation as an extra constitution term.
Attributes
On edges:
limit/lower: \(l\) in the energy abovelimit/upper: \(u\) in the energy abovelimit/strength: \(s\) in the energy above