MarkerBodyPosition

A position 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 information as well as the according derivatives (=velocity and derivative of position w.r.t. body coordinates). It can be used for connectors, joints or loads where position is required. If connectors also require orientation information, use a MarkerBodyRigid.

Interface

Parameters

The parameters of the item; in a dictionary, its type is ‘BodyPosition’:

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

[0.,0.,0.]

(symbol: \(\pLocB\)) local body position of marker; e.g. local (body-fixed) position where force is applied to

visualization

VMarkerBodyPosition

parameters for visualization of item

Visualization parameters

The parameters of VMarkerBodyPosition, 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 Position of the body at the local position \(\pLocB\)

velocity

\(\LU{0}{\vv}_m\)

the output variable Velocity of the body at \(\pLocB\)

Both are global. \(\pLocB\) is given in the body frame, from the reference point of the body.

Jacobians

The position Jacobian is the derivative of the velocity of the point with respect to the velocity coordinates of the body,

\[ \LU{0}{\Jm_{pos}} = \frac{\partial \LU{0}{\vv}_m}{\partial \dot\qv} , \]

which the body computes (its access function TranslationalVelocity_qt). For a rigid body it contains the rotation of the local position, see the page of the body.

Mini example

#a point of a body - here of the ground, at a local position - connected to a mass point by a spring
node = mbs.AddNode(NodePoint(referenceCoordinates=[1,0,0]))
body = mbs.AddObject(ObjectMassPoint(nodeNumber=node, mass=1))
mBody = mbs.AddMarker(MarkerBodyPosition(bodyNumber=body, localPosition=[0,0,0]))
mGround = mbs.AddMarker(MarkerBodyPosition(bodyNumber=oGround, localPosition=[1,0,0]))
mbs.AddObject(ObjectConnectorCartesianSpringDamper(markerNumbers=[mGround, mBody], stiffness=[100,100,100]))
mbs.AddLoad(LoadForceVector(markerNumber=mBody, loadVector=[0,0,-10]))

mbs.Assemble()
mbs.SolveStatic()

#the spring is stretched by F/k
exu.sys['testResult'] = mbs.GetNodeOutput(node, exu.OutputVariableType.Displacement)[2] #-0.1

Examples (Ex) and TestModels (TM) that show this item, with weblink to github: tutorialSpringDamperCreate.py (Ex), tutorialRigidBodyCreate.py (Ex), rigidPendulum.py (Ex), pendulum2Dconstraint.py (Ex), cartesianSpringDamper.py (Ex)