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.
source

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.FloatingMethod
Floating(body1, body2; spring, damper)

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

source
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).

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

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

source