.. _sec-item-objectjointprismaticx: ObjectJointPrismaticX ===================== A prismatic joint in 3D; constrains the relative rotation of two rigid body markers and relative motion w.r.t. the joint \ :math:`y`\ and \ :math:`z`\ axes, allowing a relative motion along the joint \ :math:`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 :ref:`sec-rigidbodyutilities-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** [\ :math:`[m0,m1]\tp`\ , type = ArrayMarkerIndex, size = 2, default = [ invalid [-1], invalid [-1] ]]: | list of markers used in connector * | **rotationMarker0** [\ :math:`\LU{m0,J0}{\Rot}`\ , type = Matrix3D, default = [[1,0,0], [0,1,0], [0,0,1]]]: | local rotation matrix for marker \ :math:`m0`\ ; translation and rotation axes for marker \ :math:`m0`\ are defined in the local body coordinate system and additionally transformed by rotationMarker0 * | **rotationMarker1** [\ :math:`\LU{m1,J1}{\Rot}`\ , type = Matrix3D, default = [[1,0,0], [0,1,0], [0,0,1]]]: | local rotation matrix for marker \ :math:`m1`\ ; translation and rotation axes for marker \ :math:`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-objectjointprismaticx: DESCRIPTION of ObjectJointPrismaticX ------------------------------------ \ **The following output variables are available as OutputVariableType in sensors, Get...Output() and other functions**\ : * | ``Position``\ : \ :math:`\LU{0}{{\mathbf{p}}}_{m0}`\ | current global position of position marker \ :math:`m0`\ * | ``Velocity``\ : \ :math:`\LU{0}{{\mathbf{v}}}_{m0}`\ | current global velocity of position marker \ :math:`m0`\ * | ``DisplacementLocal``\ : \ :math:`\LU{J0}{\Delta{\mathbf{p}}}`\ | relative displacement in local joint0 coordinates; uses local J0 coordinates even for spherical joint configuration * | ``VelocityLocal``\ : \ :math:`\LU{J0}{\Delta{\mathbf{v}}}`\ | relative translational velocity in local joint0 coordinates * | ``Rotation``\ : \ :math:`\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``\ : \ :math:`\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``\ : \ :math:`\LU{J0}{{\mathbf{f}}}`\ | joint force in local \ :math:`J0`\ coordinates * | ``TorqueLocal``\ : \ :math:`\LU{J0}{{\mathbf{m}}}`\ | joint torque in local \ :math:`J0`\ coordinates; depending on joint configuration, the result may not be the according torque vector .. _sec-objectjointprismaticx-definitionofquantities: Definition of quantities ------------------------ .. list-table:: \ :widths: auto :header-rows: 1 * - | intermediate variables - | symbol - | description * - | marker m0 position - | \ :math:`\LU{0}{{\mathbf{p}}}_{m0}`\ - | current global position which is provided by marker m0 * - | marker m0 orientation - | \ :math:`\LU{0,m0}{\Rot}`\ - | current rotation matrix provided by marker m0 * - | joint J0 orientation - | \ :math:`\LU{0,J0}{\Rot} = \LU{0,m0}{\Rot} \LU{m0,J0}{\Rot}`\ - | joint \ :math:`J0`\ rotation matrix * - | joint J0 orientation vectors - | \ :math:`\LU{0,J0}{\Rot} = [\LU{0}{{\mathbf{t}}_{x0}},\,\LU{0}{{\mathbf{t}}_{y0}},\,\LU{0}{{\mathbf{t}}_{z0}}]\tp`\ - | orientation vectors (represent local \ :math:`x`\ , \ :math:`y`\ , and \ :math:`z`\ axes) in global coordinates, used for definition of constraint equations * - | marker m1 position - | \ :math:`\LU{0}{{\mathbf{p}}}_{m1}`\ - | accordingly * - | marker m1 orientation - | \ :math:`\LU{0,m1}{\Rot}`\ - | current rotation matrix provided by marker m1 * - | joint J1 orientation - | \ :math:`\LU{0,J1}{\Rot} = \LU{0,m1}{\Rot} \LU{m1,J1}{\Rot}`\ - | joint \ :math:`J1`\ rotation matrix * - | joint J1 orientation vectors - | \ :math:`\LU{0,J1}{\Rot} = [\LU{0}{{\mathbf{t}}_{x1}},\,\LU{0}{{\mathbf{t}}_{y1}},\,v{\mathbf{t}}_{z1}]\tp`\ - | orientation vectors (represent local \ :math:`x`\ , \ :math:`y`\ , and \ :math:`z`\ axes) in global coordinates, used for definition of constraint equations * - | marker m0 velocity - | \ :math:`\LU{0}{{\mathbf{v}}}_{m0}`\ - | current global velocity which is provided by marker m0 * - | marker m1 velocity - | \ :math:`\LU{0}{{\mathbf{v}}}_{m1}`\ - | accordingly * - | marker m0 velocity - | \ :math:`\LU{b}{\tomega}_{m0}`\ - | current local angular velocity vector provided by marker m0 * - | marker m1 velocity - | \ :math:`\LU{b}{\tomega}_{m1}`\ - | current local angular velocity vector provided by marker m1 * - | Displacement - | \ :math:`\LU{0}{\Delta{\mathbf{p}}}=\LU{0}{{\mathbf{p}}}_{m1} - \LU{0}{{\mathbf{p}}}_{m0}`\ - | used, if all translational axes are constrained * - | DisplacementLocal - | \ :math:`\LU{J0}{\Delta{\mathbf{p}}}`\ - | \ :math:`\left(\LU{0,m0}{\Rot}\LU{m0,J0}{\Rot}\right)\tp \LU{0}{\Delta{\mathbf{p}}}`\ * - | VelocityLocal - | \ :math:`\LU{J0}{\Delta{\mathbf{v}}}`\ - | \ :math:`\left(\LU{0,m0}{\Rot}\LU{m0,J0}{\Rot}\right)\tp \LU{0}{\Delta{\mathbf{v}}}`\ \ :math:`\ldots`\ note that this is the global relative velocity projected into the local \ :math:`J0`\ coordinate system * - | AngularVelocityLocal - | \ :math:`\LU{J0}{\Delta\omega}`\ - | \ :math:`\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 - | \ :math:`{\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 \ :math:`x`\ -axis read (in the coordinate system \ :math:`J0`\ ), .. math:: \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 and the translational index 2 constraints read .. math:: \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 \ **Equations for rotational part (\ ``activeConnector = True``\ )** : Note that the axes are always given in global coordinates, compare the table in Section :ref:`sec-objectjointprismaticx-definitionofquantities`\ . The index 3 constraint equations read .. math:: :label: eq-objectjointprismaticx-index3 \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 The index 2 constraints follow from the derivative of Eq. :eq:`eq-objectjointprismaticx-index3`\ w.r.t., and are given in the C++ code. if \ ``activeConnector = False``\ , .. math:: {\mathbf{z}} = \Null Relevant Examples and TestModels with weblink: \ `revoluteJointPrismaticJointTest.py `_\ (TestModels/) \ **The web version may not be complete. For details, consider also the Exudyn PDF documentation** : `theDoc.pdf `_