```{raw} latex \clearpage ``` (sec-item-markerbodyposition)= # 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 - Provides: `Position` - Bodies it can be placed on: [](#sec-item-objectground), [](#sec-item-objectmasspoint), [](#sec-item-objectmasspoint2d), [](#sec-item-objectmass1d), [](#sec-item-objectrotationalmass1d), [](#sec-item-objectrigidbody), [](#sec-item-objectrigidbody2d), [](#sec-item-objectffrf), [](#sec-item-objectffrfreducedorder), [](#sec-item-objectancfcable), [](#sec-item-objectancfcable2d), [](#sec-item-objectaleancfcable2d), [](#sec-item-objectancfbeam), [](#sec-item-objectbeamgeometricallyexact2d), [](#sec-item-objectbeamgeometricallyexact), [](#sec-item-objectancfthinplate) - Connectors, constraints and loads that can use it: [](#sec-item-objectconnectorspringdamper), [](#sec-item-objectconnectorcartesianspringdamper), [](#sec-item-objectconnectorgravity), [](#sec-item-objectconnectorhydraulicactuatorsimple), [](#sec-item-objectconnectordistance), [](#sec-item-objectcontactspheresphere), [](#sec-item-objectcontactspheretriangle), [](#sec-item-objectjointspherical), [](#sec-item-objectjointrevolute2d), [](#sec-item-loadforcevector) ## 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](#sec-drawing-markers). (description-markerbodyposition)= ## 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. (miniexample-markerbodyposition)= ## Mini example ```python #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`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/notebooks/tutorialSpringDamperCreate.py) (Ex), [`tutorialRigidBodyCreate.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/notebooks/tutorialRigidBodyCreate.py) (Ex), [`rigidPendulum.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/rigidPendulum.py) (Ex), [`pendulum2Dconstraint.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/pendulum2Dconstraint.py) (Ex), [`cartesianSpringDamper.py`](https://github.com/jgerstmayr/EXUDYN/blob/master/python/Examples/cartesianSpringDamper.py) (Ex)