ObjectJointPrismaticX

A prismatic joint in 3D; constrains the relative rotation of two rigid body markers and relative motion w.r.t. the joint \(y\) and \(z\) axes, allowing a relative motion along the joint \(x\) axis (defined in local coordinates of marker 0 / joint J0 coordinates). An additional local rotation (rotationMarker) can be used to transform the markers’ coordinate systems into the joint coordinate system. For easier definition of the joint, use the exudyn.rigidbodyUtilities function AddPrismaticJoint(…), Section Function: AddPrismaticJoint, for two rigid bodies (or ground). addExampleImage{PrismaticJointX}

Additional information for ObjectJointPrismaticX:

  • This Object has/provides the following types = Connector, Constraint
  • Requested Marker type = Position + Orientation
  • Short name for Python = PrismaticJointX
  • Short name for Python visualization object = VPrismaticJointX

The item ObjectJointPrismaticX with type = ‘JointPrismaticX’ has the following parameters:

  • name [type = String, default = ‘’]:
    constraints’s unique name
  • markerNumbers [\([m0,m1]\tp\), type = ArrayMarkerIndex, size = 2, default = [ invalid [-1], invalid [-1] ]]:
    list of markers used in connector
  • rotationMarker0 [\(\LU{m0,J0}{\Rot}\), type = Matrix3D, default = [[1,0,0], [0,1,0], [0,0,1]]]:
    local rotation matrix for marker \(m0\); translation and rotation axes for marker \(m0\) are defined in the local body coordinate system and additionally transformed by rotationMarker0
  • rotationMarker1 [\(\LU{m1,J1}{\Rot}\), type = Matrix3D, default = [[1,0,0], [0,1,0], [0,0,1]]]:
    local rotation matrix for marker \(m1\); translation and rotation axes for marker \(m1\) are defined in the local body coordinate system and additionally transformed by rotationMarker1
  • activeConnector [type = Bool, default = True]:
    flag, which determines, if the connector is active; used to deactivate (temporarily) a connector or constraint
  • visualization [type = VObjectJointPrismaticX]:
    parameters for visualization of item

The item VObjectJointPrismaticX has the following parameters:

  • show [type = Bool, default = True]:
    set true, if item is shown in visualization and false if it is not shown
  • axisRadius [type = float, default = 0.1]:
    radius of joint axis to draw
  • axisLength [type = float, default = 0.4]:
    length of joint axis to draw
  • color [type = Float4, default = [-1.,-1.,-1.,-1.]]:
    RGBA connector color; if R==-1, use default color

DESCRIPTION of ObjectJointPrismaticX

The following output variables are available as OutputVariableType in sensors, Get…Output() and other functions:

  • Position: \(\LU{0}{{\mathbf{p}}}_{m0}\)
    current global position of position marker \(m0\)
  • Velocity: \(\LU{0}{{\mathbf{v}}}_{m0}\)
    current global velocity of position marker \(m0\)
  • DisplacementLocal: \(\LU{J0}{\Delta{\mathbf{p}}}\)
    relative displacement in local joint0 coordinates; uses local J0 coordinates even for spherical joint configuration
  • VelocityLocal: \(\LU{J0}{\Delta{\mathbf{v}}}\)
    relative translational velocity in local joint0 coordinates
  • Rotation: \(\LU{J0}{\ttheta}= [\theta_0,\theta_1,\theta_2]\tp\)
    relative rotation parameters (Tait Bryan Rxyz); if all axes are fixed, this output represents the rotational drift; for a revolute joint, it contains the rotation of this axis
  • AngularVelocityLocal: \(\LU{J0}{\Delta\tomega}\)
    relative angular velocity in local joint0 coordinates; if all axes are fixed, this output represents the angular velocity constraint error; for a revolute joint, it contains the angular velocity of this axis
  • ForceLocal: \(\LU{J0}{{\mathbf{f}}}\)
    joint force in local \(J0\) coordinates
  • TorqueLocal: \(\LU{J0}{{\mathbf{m}}}\)
    joint torque in local \(J0\) coordinates; depending on joint configuration, the result may not be the according torque vector

Definition of quantities

intermediate variables
symbol
description
marker m0 position
\(\LU{0}{{\mathbf{p}}}_{m0}\)
current global position which is provided by marker m0
marker m0 orientation
\(\LU{0,m0}{\Rot}\)
current rotation matrix provided by marker m0
joint J0 orientation
\(\LU{0,J0}{\Rot} = \LU{0,m0}{\Rot} \LU{m0,J0}{\Rot}\)
joint \(J0\) rotation matrix
joint J0 orientation vectors
\(\LU{0,J0}{\Rot} = [\LU{0}{{\mathbf{t}}_{x0}},\,\LU{0}{{\mathbf{t}}_{y0}},\,\LU{0}{{\mathbf{t}}_{z0}}]\tp\)
orientation vectors (represent local \(x\), \(y\), and \(z\) axes) in global coordinates, used for definition of constraint equations
marker m1 position
\(\LU{0}{{\mathbf{p}}}_{m1}\)
accordingly
marker m1 orientation
\(\LU{0,m1}{\Rot}\)
current rotation matrix provided by marker m1
joint J1 orientation
\(\LU{0,J1}{\Rot} = \LU{0,m1}{\Rot} \LU{m1,J1}{\Rot}\)
joint \(J1\) rotation matrix
joint J1 orientation vectors
\(\LU{0,J1}{\Rot} = [\LU{0}{{\mathbf{t}}_{x1}},\,\LU{0}{{\mathbf{t}}_{y1}},\,v{\mathbf{t}}_{z1}]\tp\)
orientation vectors (represent local \(x\), \(y\), and \(z\) axes) in global coordinates, used for definition of constraint equations
marker m0 velocity
\(\LU{0}{{\mathbf{v}}}_{m0}\)
current global velocity which is provided by marker m0
marker m1 velocity
\(\LU{0}{{\mathbf{v}}}_{m1}\)
accordingly
marker m0 velocity
\(\LU{b}{\tomega}_{m0}\)
current local angular velocity vector provided by marker m0
marker m1 velocity
\(\LU{b}{\tomega}_{m1}\)
current local angular velocity vector provided by marker m1
Displacement
\(\LU{0}{\Delta{\mathbf{p}}}=\LU{0}{{\mathbf{p}}}_{m1} - \LU{0}{{\mathbf{p}}}_{m0}\)
used, if all translational axes are constrained
DisplacementLocal
\(\LU{J0}{\Delta{\mathbf{p}}}\)
\(\left(\LU{0,m0}{\Rot}\LU{m0,J0}{\Rot}\right)\tp \LU{0}{\Delta{\mathbf{p}}}\)
VelocityLocal
\(\LU{J0}{\Delta{\mathbf{v}}}\)
\(\left(\LU{0,m0}{\Rot}\LU{m0,J0}{\Rot}\right)\tp \LU{0}{\Delta{\mathbf{v}}}\) \(\ldots\) note that this is the global relative velocity projected into the local \(J0\) coordinate system
AngularVelocityLocal
\(\LU{J0}{\Delta\omega}\)
\(\left(\LU{0,m0}{\Rot}\LU{m0,J0}{\Rot}\right)\tp \left( \LU{0,m1}{\Rot} \LU{m1}{\omega} - \LU{0,m0}{\Rot} \LU{m0}{\omega} \right)\)
algebraic variables
\({\mathbf{z}}=[\lambda_0,\,\ldots,\,\lambda_5]\tp\)
vector of algebraic variables (Lagrange multipliers) according to the algebraic equations

Connector constraint equations

Equations for translational part (``activeConnector = True``) :

The two translational index 3 constraints for a free motion along the local \(x\)-axis read (in the coordinate system \(J0\)),

\[\begin{split}\LU{J0}{{\mathbf{p}}}_{y,m1} - \LU{J0}{{\mathbf{p}}}_{y,m0} &=& \Null \nonumber \\ \LU{J0}{{\mathbf{p}}}_{z,m1} - \LU{J0}{{\mathbf{p}}}_{z,m0} &=& \Null\end{split}\]

and the translational index 2 constraints read

\[\begin{split}\LU{J0}{{\mathbf{v}}}_{y,m1} - \LU{J0}{{\mathbf{v}}}_{y,m0} &=& \Null \nonumber \\ \LU{J0}{{\mathbf{v}}}_{z,m1} - \LU{J0}{{\mathbf{v}}}_{z,m0} &=& \Null\end{split}\]

Equations for rotational part (``activeConnector = True``) :

Note that the axes are always given in global coordinates, compare the table in Section Definition of quantities. The index 3 constraint equations read

(85)\[\begin{split}\LU{0}{{\mathbf{t}}}_{z0}\tp \LU{0}{{\mathbf{t}}}_{y1} &=& 0 \\ \LU{0}{{\mathbf{t}}}_{z0}\tp \LU{0}{{\mathbf{t}}}_{x1} &=& 0 \\ \LU{0}{{\mathbf{t}}}_{x0}\tp \LU{0}{{\mathbf{t}}}_{y1} &=& 0\end{split}\]

The index 2 constraints follow from the derivative of Eq. (85) w.r.t., and are given in the C++ code. if activeConnector = False,

\[{\mathbf{z}} = \Null\]

Relevant Examples and TestModels with weblink:

The web version may not be complete. For details, consider also the Exudyn PDF documentation : theDoc.pdf