Constraints

EqualityConstraint

ConstrainedDynamics.EqualityConstraintType
mutable struct EqualityConstraint{T, N, Nc, Cs} <: ConstrainedDynamics.AbstractConstraint{T, N}

An EqualityConstraint is a component of a Mechanism and is used to describe the kinematic relation between two or more Bodys. Typically, an EqualityConstraint should not be created directly. Use the joint prototypes instead, for example:

EqualityConstraint(Revolute(body1, body2, rotation_axis)).

Important attributes

  • id: The unique ID of a constraint. Assigned when added to a Mechanism.
  • name: The name of a constraint. The name is taken from a URDF or can be assigned by the user.
  • parentid: The ID of the parent body.
  • childids: The IDs of the child bodies.

Joint Prototypes

The functions below can be used to create joints between two bodies. Note that body1 can also be the origin. The following arguments are available for most joints:

  • axis: The rotation axis or plane axis.
  • p1: The joint connection point for body1 in body1's frame
  • p2: The joint connection point for body2 in body2's frame
  • qoffsett: The orientation offset of body2 relative to body1
ConstrainedDynamics.CylindricalFreeMethod
CylindricalFree(body1, body2, axis; p1, p2, spring, damper)

A cylindrical joint between two bodies with unconstrained orientation (point-on-line).

ConstrainedDynamics.FloatingMethod
Floating(body1, body2; spring, damper)

An unconstrained connection between two bodies (connection between floating base and origin).

ConstrainedDynamics.PlanarMethod
Planar(body1, body2, axis; p1, p2, qoffset, spring, damper)

A planar joint between two bodies.

ConstrainedDynamics.PlanarAxisMethod
PlanarAxis(body1, body2, axis; p1, p2, qoffset, spring, damper)

A planar joint between two bodies with a rotation axis perpendicular to the plane (turtle bot).

ConstrainedDynamics.PlanarFreeMethod
PlanarFree(body1, body2, axis; p1, p2, spring, damper)

A planar joint between two bodies with unconstrained orientation.

ConstrainedDynamics.RevoluteMethod
Revolute(body1, body2, axis; p1, p2, qoffset, spring, damper)

A revolute joint between two bodies (pin, continuous, hinge joint).

ConstrainedDynamics.SphericalMethod
Spherical(body1, body2; p1, p2, spring, damper)

A spherical joint between two bodies (ball-and-socket joint).