MarkerBodyRigid
A rigid-body (position+orientation) body-marker attached to a local (body-fixed) position \(\pLocB = [b_0,\; b_1,\; b_2]\) (\(x\), \(y\), and \(z\) coordinates) of the body. It provides position and orientation (rotation), as well as the according derivatives. It can be used for most connectors, joints or loads where either position, position and orientation, or orientation are required.
Interface
Provides:
Position,OrientationBodies it can be placed on: ObjectGround, ObjectMass1D, ObjectRotationalMass1D, ObjectRigidBody, ObjectRigidBody2D, ObjectFFRF, ObjectFFRFreducedOrder, ObjectANCFCable2D, ObjectALEANCFCable2D, ObjectANCFBeam, ObjectBeamGeometricallyExact2D, ObjectBeamGeometricallyExact
Connectors, constraints and loads that can use it: ObjectConnectorSpringDamper, ObjectConnectorCartesianSpringDamper, ObjectConnectorRigidBodySpringDamper, ObjectConnectorLinearSpringDamper, ObjectConnectorTorsionalSpringDamper, ObjectConnectorGravity, ObjectConnectorHydraulicActuatorSimple, ObjectConnectorDistance, ObjectConnectorRollingDiscPenalty, ObjectContactConvexRoll, ObjectContactSphereSphere, ObjectContactSphereTorus, ObjectContactSphereTriangle, ObjectContactCurveCircles, ObjectJointGeneric, ObjectJointRevoluteZ, ObjectJointPrismaticX, ObjectJointSpherical, ObjectJointRollingDisc, ObjectJointRevolute2D, ObjectJointPrismatic2D, LoadForceVector, LoadTorqueVector
Parameters
The parameters of the item; in a dictionary, its type is ‘BodyRigid’:
name |
type |
size |
default |
description |
|---|---|---|---|---|
name |
String |
‘’ |
marker’s unique name |
|
bodyNumber |
ObjectIndex |
invalid (-1) |
body number to which marker is attached to |
|
localPosition |
Vector3D |
3 |
None (zero) |
(symbol: \(\pLocB\)) local body position of marker; e.g. local (body-fixed) position where force is applied to; the translation of localHT |
localHT |
HomogeneousTransformation |
None (identity) |
(symbol: \(\LU{b}{\Hm}_{m}\)) the frame of the marker in the body frame, as homogeneous transformation: its translation is localPosition, its rotation \(\LU{bm}{\Rot}\) turns the marker frame against the body; a 4x4 matrix, its 16 values row by row or an exu.HT; None: not given; given together with localPosition, both must agree |
|
visualization |
VMarkerBodyRigid |
parameters for visualization of item |
Visualization parameters
The parameters of VMarkerBodyRigid, given as visualization:
name |
type |
size |
default |
description |
|---|---|---|---|---|
show |
Bool |
True |
set true, if item is shown in visualization and false if it is not shown |
Drawing
Drawn as all markers.
Detailed description
Marker quantities
quantity |
symbol |
as computed |
|---|---|---|
position |
\(\LU{0}{\pv}_m\) |
the output variable |
velocity |
\(\LU{0}{\vv}_m\) |
the output variable |
rotation matrix |
\(\LU{0m}{\Rot} = \LU{0b}{\Rot} \LU{bm}{\Rot}\) |
the rotation \(\LU{0b}{\Rot}\) of the body at \(\pLocB\) (for a rigid body the rotation of the body), turned by the rotation \(\LU{bm}{\Rot}\) of |
angular velocity |
\(\LU{m}{\tomega} = \LU{bm}{\Rot}\tp \LU{b}{\tomega}\) |
the angular velocity of the body at \(\pLocB\), in the marker frame |
Position, velocity and rotation matrix are global quantities; the angular velocity is local.
\(\pLocB\) is given in the body frame, from the reference point of the body. The marker frame is
localHT = \([\LU{bm}{\Rot}\;\pLocB;\;\Null\tp\;1]\) in the body frame: localPosition is its
translation, and its rotation is the unit matrix unless localHT is given. The Jacobians are
global and do not depend on \(\LU{bm}{\Rot}\).
Jacobians
the derivatives of the global velocity and angular velocity with respect to the velocity
coordinates of the body (its access functions TranslationalVelocity_qt and
AngularVelocity_qt). For ObjectRigidBody they are computed from its node directly, with the
velocity transformation \(\LU{0}{\Gm}\) of the rotation parameters in \(\LU{0}{\Jm_{rot}}\).
Mini example
#position and orientation of a rigid body: a torque on it, held by a rigid body spring-damper
inertia = InertiaCuboid(density=1000, sideLengths=[0.4,0.2,0.1])
node = mbs.AddNode(NodeRigidBodyEP(referenceCoordinates=[1,0,0]+eulerParameters0))
body = mbs.AddObject(ObjectRigidBody(nodeNumber=node, mass=inertia.Mass(),
inertia=inertia.GetInertia6D()))
mBody = mbs.AddMarker(MarkerBodyRigid(bodyNumber=body, localPosition=[0,0,0]))
mGround = mbs.AddMarker(MarkerBodyRigid(bodyNumber=oGround, localPosition=[1,0,0]))
mbs.AddObject(ObjectConnectorRigidBodySpringDamper(markerNumbers=[mGround, mBody],
stiffness=np.diag([1e4,1e4,1e4, 100,100,100]),
damping=np.zeros((6,6))))
mbs.AddLoad(LoadTorqueVector(markerNumber=mBody, loadVector=[0,0,1]))
mbs.Assemble()
mbs.SolveStatic()
#rotation about z: M/k_rot, for the small angle
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Rotation)[2] #0.01
Examples (Ex) and TestModels (TM) that show this item, with weblink to github: tutorialSpringDamperCreate.py (Ex), tutorialRigidBody.py (Ex), tutorialRigidBodyCreate.py (Ex)