Constraints
Length constraints use tendons
A straight length constraint is a spatial tendon with two sites. Use
World::addSpatialTendon for hard limits, a length lock, springs, or commanded
tension. Routed cables and fixed joint transmissions use the same properties,
solver, inspection, rendering, checkpoint, and removal interfaces. See
Tendons, Tendon code examples, and Tendon physics.
Migrating the former wire API
The C++ and Python addStiffWire, addCompliantWire, addCustomWire,
getWire, getWires, and LengthConstraint types have been removed.
Use addSpatialTendon, getTendon, getTendons, and removeTendon.
Recompile applications and bindings against matching headers and libraries.
Former behavior |
Tendon properties or command |
|---|---|
Stiff, stretch only |
|
Stiff, compression only |
|
Stiff, both directions |
|
Compliant, stretch only |
|
Compliant, compression only |
|
Compliant, both directions |
|
Custom tension |
|
Other properties keep their defaults in this table. A spring interval imposes
no hard bound. Add limits explicitly if the model needs both elasticity and a
maximum or minimum length. getLength() reports the current transmission
coordinate; the configured target is in getProperties(). Call
updateGeometry() after manually changing object positions before reading it.
getTension() is a signed scalar, positive in tension. getForce() has the
opposite sign. Appearance is set through Properties::width and color.
The world owns tendons; removal invalidates their pointers and also removes
couplings that reference them. Removing an attached object removes its tendons.
Existing RaiSim XML <wire> elements remain readable. The loader converts
them immediately into ordinary two-site tendons, including stretch mode, body
attachments, nominal length, stiffness, and appearance. A custom wire’s optional
tension attribute becomes its tension command; absent commands default to
zero. New XML exports write only <tendon> elements. Legacy XML support is an
import conversion, with no second runtime type or API.
The mapping preserves the intended physical model, but does not promise identical trajectories. Former compliant wires applied explicit spring forces; tendon springs and damping use the implicit velocity solve described in Tendon physics. Hard bounds also use tendon constraint rows now. Recheck timestep, damping, and tolerances when migrating a tuned simulation.
Historical class links
Pin constraints
Pin constraints impose coincidence of attachment points in closed-loop systems
and are specified under URDF <constraints>. They retain their independent
API because they constrain vector position, whereas a tendon constrains one
scalar transmission coordinate.