ObjectJointRevoluteZ

A revolute joint in 3D; constrains the position of two rigid body markers and the rotation about two axes, while the joint \(z\)-rotation axis (defined in local coordinates of marker 0 / joint J0 coordinates) can freely rotate. 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 AddRevoluteJoint(…), Section Function: AddRevoluteJoint, for two rigid bodies (or ground). addExampleImage{RevoluteJointZ}

Additional information for ObjectJointRevoluteZ:

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

The item ObjectJointRevoluteZ with type = ‘JointRevoluteZ’ 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 = VObjectJointRevoluteZ]:
    parameters for visualization of item

The item VObjectJointRevoluteZ 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 ObjectJointRevoluteZ

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); Z component represents rotation of joint, other components represent constraint drift
  • AngularVelocityLocal: \(\LU{J0}{\Delta\tomega}\)
    relative angular velocity in joint J0 coordinates, giving a vector with Z-component only
  • ForceLocal: \(\LU{J0}{{\mathbf{f}}}\)
    joint force in local \(J0\) coordinates
  • TorqueLocal: \(\LU{J0}{{\mathbf{m}}}\)
    joint torques in local \(J0\) coordinates; torque around Z is zero

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
Velocity
\(\LU{0}{\Delta{\mathbf{v}}} = \LU{0}{{\mathbf{v}}}_{m1} - \LU{0}{{\mathbf{v}}}_{m0}\)
used, if all translational axes are constrained (velocity level)
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 translational index 3 constraints read,

\[\LU{0}{\Delta{\mathbf{p}}} = \Null\]

and the translational index 2 constraints read

\[\LU{0}{\Delta {\mathbf{v}}} = \Null\]

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

Note that the axes are always given in global coordinates, compare the table in Section Definition of quantities, and they include the transformations by \(\LU{m0,J0}{\Rot}\) and \(\LU{m1,J1}{\Rot}\). The index 3 constraint equations read

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

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

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

MINI EXAMPLE for ObjectJointRevoluteZ

 1#example with rigid body at [0,0,0], with torsional load
 2nBody = mbs.AddNode(RigidRxyz())
 3oBody = mbs.AddObject(RigidBody(physicsMass=1, physicsInertia=[1,1,1,0,0,0],
 4                                nodeNumber=nBody))
 5
 6mBody = mbs.AddMarker(MarkerNodeRigid(nodeNumber=nBody))
 7mGround = mbs.AddMarker(MarkerBodyRigid(bodyNumber=oGround,
 8                                        localPosition = [0,0,0]))
 9mbs.AddObject(RevoluteJointZ(markerNumbers = [mGround, mBody])) #rotation around ground Z-axis
10
11#torque around z-axis;
12mbs.AddLoad(Torque(markerNumber = mBody, loadVector=[0,0,1]))
13
14#assemble and solve system for default parameters
15mbs.Assemble()
16mbs.SolveDynamic(exu.SimulationSettings())
17
18#check result at default integration time
19exudynTestGlobals.testResult = mbs.GetNodeOutput(nBody, exu.OutputVariableType.Rotation)[2]

Relevant Examples and TestModels with weblink:

addRevoluteJoint.py (Examples/), rigidBodyTutorial3withMarkers.py (Examples/), openVRengine.py (Examples/), stlFileImport.py (Examples/), CMSexampleCourse.py (Examples/), plotSensorTest.py (TestModels/), revoluteJointPrismaticJointTest.py (TestModels/), perf3DRigidBodies.py (TestModels/)

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