mbsim  4.0.0
MBSim Kernel
MBSim::RigidBody Class Reference

rigid bodies with arbitrary kinematics More...

#include <rigid_body.h>

Inheritance diagram for MBSim::RigidBody:
[legend]

Public Types

enum  GeneralizedVelocityOfRotation { derivativeOfGeneralizedPositionOfRotation =0 , coordinatesOfAngularVelocityWrtFrameOfReference , coordinatesOfAngularVelocityWrtFrameForKinematics , unknown }
 
- Public Types inherited from MBSim::Element
enum  InitStage {
  resolveStringRef =0 , preInit , plotting , unknownStage ,
  LASTINITSTAGE
}
 The stages of the initialization. More...
 

Public Member Functions

 RigidBody (const std::string &name="")
 constructor More...
 
 ~RigidBody () override
 destructor
 
void addDependency (Constraint *constraint_)
 
void updateqd () override
 
void updateT () override
 
void updateh (int j=0) override
 
void updateM () override
 
void updateInertiaTensor ()
 
void updateGeneralizedPositions () override
 
void updateGeneralizedVelocities () override
 
void updateDerivativeOfGeneralizedPositions () override
 
void updateGeneralizedAccelerations () override
 
void updateGeneralizedJacobians (int j=0)
 
void updatePositions ()
 
void updateVelocities ()
 
void updateJacobians () override
 
void updateGyroscopicAccelerations ()
 
void updatePositions (Frame *frame) override
 
void updateVelocities (Frame *frame) override
 
void updateAccelerations (Frame *frame) override
 
void updateJacobians (Frame *frame, int j=0) override
 
void updateGyroscopicAccelerations (Frame *frame) override
 
void updateJacobians0 (Frame *frame)
 
void updateJacobians1 (Frame *frame)
 
void updateJacobians2 (Frame *frame)
 
void calcSize () override
 
void calcqSize () override
 
void calcuSize (int j=0) override
 
void sethSize (int hSize_, int i=0) override
 
void sethInd (int hInd_, int i=0) override
 
void init (InitStage stage, const InitConfigSet &config) override
 plots time series header More...
 
void setUpInverseKinetics () override
 TODO. More...
 
void plot () override
 plots time dependent data More...
 
void setGeneralTranslation (Function< fmatvec::Vec3(fmatvec::VecV, double)> *fPrPK_)
 set Kinematic for genral translational motion More...
 
void setTimeDependentTranslation (Function< fmatvec::Vec3(double)> *fPrPK_)
 set Kinematic for only time dependent translational motion More...
 
void setStateDependentTranslation (Function< fmatvec::Vec3(fmatvec::VecV)> *fPrPK_)
 set Kinematic for only state dependent translational motion More...
 
void setTranslation (Function< fmatvec::Vec3(fmatvec::VecV, double)> *fPrPK_)
 
void setTranslation (Function< fmatvec::Vec3(double)> *fPrPK_)
 
void setTranslation (Function< fmatvec::Vec3(fmatvec::VecV)> *fPrPK_)
 
void setGeneralRotation (Function< fmatvec::RotMat3(fmatvec::VecV, double)> *fAPK_)
 set Kinematic for general rotational motion More...
 
void setTimeDependentRotation (Function< fmatvec::RotMat3(double)> *fAPK_)
 set Kinematic for only time dependent rotational motion More...
 
void setStateDependentRotation (Function< fmatvec::RotMat3(fmatvec::VecV)> *fAPK_)
 set Kinematic for only state dependent rotational motion More...
 
void setRotation (Function< fmatvec::RotMat3(fmatvec::VecV, double)> *fAPK_)
 
void setRotation (Function< fmatvec::RotMat3(double)> *fAPK_)
 
void setRotation (Function< fmatvec::RotMat3(fmatvec::VecV)> *fAPK_)
 
void setTranslationDependentRotation (bool dep)
 
void setGeneralizedVelocityOfRotation (GeneralizedVelocityOfRotation generalizedVelocityOfRotation_)
 
Function< fmatvec::Vec3(fmatvec::VecV, double)> * getTranslation ()
 get Kinematic for translational motion More...
 
Function< fmatvec::RotMat3(fmatvec::VecV, double)> * getRotation ()
 get Kinematic for rotational motion More...
 
void setMass (double m_)
 
double getMass () const
 
FramegetFrameForKinematics ()
 
FixedRelativeFramegetFrameC ()
 
const fmatvec::Vec3 & evalGlobalRelativePosition ()
 
const fmatvec::Vec3 & evalGlobalRelativeVelocity ()
 
const fmatvec::Vec3 & evalGlobalRelativeAngularVelocity ()
 
const fmatvec::SymMat3 & evalGlobalInertiaTensor ()
 
const fmatvec::Mat3xV & evalPJTT ()
 
const fmatvec::Mat3xV & evalPJRR ()
 
const fmatvec::Vec3 & evalPjhT ()
 
const fmatvec::Vec3 & evalPjhR ()
 
const fmatvec::Vec3 & evalPjbT ()
 
const fmatvec::Vec3 & evalPjbR ()
 
fmatvec::SymMat3 & getGlobalInertiaTensor (bool check=true)
 
fmatvec::Vec3 & getGlobalRelativeVelocity (bool check=true)
 
fmatvec::SqrMat3 & getRelativeOrientation (bool check=true)
 
fmatvec::Vec3 & getPjbT (bool check=true)
 
fmatvec::Vec3 & getPjbR (bool check=true)
 
void setInertiaTensor (const fmatvec::SymMat3 &RThetaR)
 
const fmatvec::SymMat3 & getInertiaTensor () const
 
fmatvec::SymMat3 & getInertiaTensor ()
 
void setFrameForKinematics (Frame *frame)
 
void setFrameForInertiaTensor (Frame *frame)
 
void setOpenMBVRigidBody (const std::shared_ptr< OpenMBV::RigidBody > &body)
 
void setOpenMBVFrameOfReference (Frame *frame)
 
const FramegetOpenMBVFrameOfReference () const
 
void initializeUsingXML (xercesc::DOMElement *element) override
 
fmatvec::MatV & getJRel (int i=0, bool check=true)
 
fmatvec::VecV & getjRel (bool check=true)
 
void setqRel (const fmatvec::VecV &q)
 
void setuRel (const fmatvec::VecV &u)
 
void setJRel (const fmatvec::MatV &J)
 
void setjRel (const fmatvec::VecV &j)
 
bool transformCoordinates () const
 
void resetUpToDate () override
 
void resetPositionsUpToDate () override
 
void resetVelocitiesUpToDate () override
 
void resetJacobiansUpToDate () override
 
void resetGyroscopicAccelerationsUpToDate () override
 
const fmatvec::VecV & evalqTRel ()
 
const fmatvec::VecV & evalqRRel ()
 
const fmatvec::VecV & evaluTRel ()
 
const fmatvec::VecV & evaluRRel ()
 
const fmatvec::VecV & evalqdTRel ()
 
const fmatvec::VecV & evalqdRRel ()
 
const fmatvec::MatV & evalJRel (int j=0)
 
const fmatvec::VecV & evaljRel ()
 
fmatvec::VecV & getqTRel (bool check=true)
 
fmatvec::VecV & getqRRel (bool check=true)
 
fmatvec::VecV & getuTRel (bool check=true)
 
fmatvec::VecV & getuRRel (bool check=true)
 
fmatvec::VecV & getqdTRel (bool check=true)
 
fmatvec::VecV & getqdRRel (bool check=true)
 
void setUpdateByReference (bool updateByReference_)
 
InverseKineticsJointgetJoint ()
 
void setDynamicSystemSolver (DynamicSystemSolver *sys) override
 sets the used dynamics system solver to the element More...
 
- Public Member Functions inherited from MBSim::Body
 Body (const std::string &name)
 constructor More...
 
 ~Body () override
 destructor
 
void setGeneralizedInitialPosition (const fmatvec::Vec &q0_)
 
void setGeneralizedInitialVelocity (const fmatvec::Vec &u0_)
 
void setGeneralizedInitialPosition (double q0_)
 
void setGeneralizedInitialVelocity (double u0_)
 
void sethSize (int hSize_, int i=0) override
 
void sethInd (int hInd_, int i=0) override
 
void plot () override
 plots time dependent data More...
 
void setDynamicSystemSolver (DynamicSystemSolver *sys) override
 sets the used dynamics system solver to the element More...
 
void init (InitStage stage, const InitConfigSet &config) override
 plots time series header More...
 
void createPlotGroup () override
 creates the plotGroup for H5-output More...
 
virtual ContourgetContour (const std::string &name, bool check=true) const
 
virtual FramegetFrame (const std::string &name, bool check=true) const
 
virtual FramegetFrameOfReference ()
 
virtual const FramegetFrameOfReference () const
 
virtual void setFrameOfReference (Frame *frame)
 
const std::vector< Frame * > & getFrames () const
 
const std::vector< Contour * > & getContours () const
 
std::shared_ptr< OpenMBV::GroupgetOpenMBVGrp () override
 
std::shared_ptr< OpenMBV::Body > & getOpenMBVBody ()
 
std::shared_ptr< OpenMBV::GroupgetFramesOpenMBVGrp () override
 
std::shared_ptr< OpenMBV::GroupgetContoursOpenMBVGrp () override
 
H5::GroupBasegetFramesPlotGroup () override
 
H5::GroupBasegetContoursPlotGroup () override
 
int frameIndex (const Frame *frame_) const
 
int contourIndex (const Contour *contour_) const
 
void initializeUsingXML (xercesc::DOMElement *element) override
 
ElementgetChildByContainerAndName (const std::string &container, const std::string &name) const override
 Get the Element named name in the container named container. More...
 
fmatvec::Mat3xV & getPJT (int i=0, bool check=true)
 
fmatvec::Mat3xV & getPJR (int i=0, bool check=true)
 
const fmatvec::Mat3xV & evalPJT ()
 
const fmatvec::Mat3xV & evalPJR ()
 
void resetUpToDate () override
 
virtual void resetPositionsUpToDate ()
 
virtual void resetVelocitiesUpToDate ()
 
virtual void resetJacobiansUpToDate ()
 
virtual void resetGyroscopicAccelerationsUpToDate ()
 
virtual void updateJacobians ()
 
virtual void addFrame (Frame *frame)
 
virtual void addContour (Contour *contour)
 
- Public Member Functions inherited from MBSim::Object
 Object (const std::string &name)
 constructor
 
virtual void calcSize ()
 
int getGeneralizedPositionSize ()
 
int getGeneralizedVelocitySize ()
 
virtual void updateT ()
 
virtual void updateh (int j=0)
 
virtual void updateM ()
 
virtual void updatedhdz ()
 
virtual void updatedq ()
 
virtual void updatedu ()
 
virtual void updateud ()
 
virtual void updateqd ()
 
virtual void sethSize (int hSize_, int i=0)
 
int gethSize (int i=0) const
 
int getqSize () const
 
int getuSize (int i=0) const
 
virtual void calcqSize ()
 
virtual void calcuSize (int j)
 
int getqInd ()
 
int getuInd (int i=0)
 
virtual void setqInd (int qInd_)
 
virtual void setuInd (int uInd_, int i=0)
 
const fmatvec::Vec & getq () const
 
const fmatvec::Vec & getu () const
 
virtual H5::GroupBasegetPlotGroup ()
 
void plot () override
 plots time dependent data More...
 
virtual void updateqRef (fmatvec::Vec &qRef)
 references to positions of dynamic system parent More...
 
virtual void updateqdRef (fmatvec::Vec &qdRef)
 references to differentiated positions of dynamic system parent More...
 
virtual void updatedqRef (fmatvec::Vec &dqRef)
 references to differentiated positions of dynamic system parent More...
 
virtual void updateuRef (fmatvec::Vec &uRef)
 references to velocities of dynamic system parent More...
 
virtual void updateuallRef (fmatvec::Vec &uallRef)
 references to velocities of dynamic system parent More...
 
virtual void updateudRef (fmatvec::Vec &udRef)
 references to differentiated velocities of dynamic system parent More...
 
virtual void updateduRef (fmatvec::Vec &duRef)
 references to differentiated velocities of dynamic system parent More...
 
virtual void updateudallRef (fmatvec::Vec &udallRef)
 references to differentiated velocities of dynamic system parent More...
 
virtual void updatehRef (fmatvec::Vec &hRef, int i=0)
 references to smooth force vector of dynamic system parent More...
 
virtual void updatedhdqRef (fmatvec::Mat &dhdqRef, int i=0)
 references to object Jacobian for implicit integration of dynamic system parent regarding positions More...
 
virtual void updatedhduRef (fmatvec::SqrMat &dhduRef, int i=0)
 references to object Jacobian for implicit integration of dynamic system parent regarding velocities More...
 
virtual void updatedhdtRef (fmatvec::Vec &dhdtRef, int i=0)
 references to object Jacobian for implicit integration of dynamic system parent regarding time More...
 
virtual void updaterRef (fmatvec::Vec &ref, int i=0)
 references to nonsmooth force vector of dynamic system parent More...
 
virtual void updaterdtRef (fmatvec::Vec &ref)
 references to nonsmooth force vector of dynamic system parent More...
 
virtual void updateTRef (fmatvec::Mat &ref)
 references to linear transformation matrix between differentiated positions and velocities of dynamic system parent More...
 
virtual void updateMRef (fmatvec::SymMat &ref)
 references to mass matrix of dynamic system parent More...
 
virtual void updateLLMRef (fmatvec::SymMat &ref)
 references to Cholesky decomposition of dynamic system parent More...
 
void init (InitStage stage, const InitConfigSet &config) override
 initialize object at start of simulation with respect to contours and frames More...
 
virtual void initz ()
 
virtual void writez (H5::GroupBase *group)
 writes its z-Vector to a subgroup of the given group
 
virtual void readz0 (H5::GroupBase *group)
 reads the z-Vector of a subgroup of the given group
 
virtual void updateLLM ()
 perform Cholesky decomposition of mass martix
 
virtual void setUpInverseKinetics ()
 TODO. More...
 
void setqSize (int qSize_)
 
void setuSize (int uSize_, int i=0)
 
int getzSize () const
 
virtual void sethInd (int hInd_, int i=0)
 
int gethInd (int i=0)
 
const fmatvec::SymMat & getM (bool check=true) const
 
fmatvec::SymMat & getM (bool check=true)
 
const fmatvec::Vec & geth (int i=0, bool check=true) const
 
fmatvec::Vec & geth (int i=0, bool check=true)
 
fmatvec::Vec & getq ()
 
fmatvec::Vec & getu ()
 
const fmatvec::Vec & getq0 () const
 
const fmatvec::Vec & getu0 () const
 
fmatvec::Vec & getq0 ()
 
fmatvec::Vec & getu0 ()
 
const fmatvec::Mat & evalT ()
 
const fmatvec::Vec & evalh (int i=0)
 
const fmatvec::SymMat & evalM ()
 
const fmatvec::SymMat & evalLLM ()
 
const fmatvec::Vec & evalr (int i=0)
 
const fmatvec::Vec & evalrdt ()
 
const fmatvec::Vec & evalqd ()
 
const fmatvec::Vec & evalud ()
 
const fmatvec::Vec & evaludall ()
 
fmatvec::Vec & getud (bool check=true)
 
fmatvec::Vec & getudall (bool check=true)
 
void resetUpToDate () override
 
virtual void updateGeneralizedPositions ()
 
virtual void updateGeneralizedVelocities ()
 
virtual void updateGeneralizedAccelerations ()
 
virtual void updateDerivativeOfGeneralizedPositions ()
 
const fmatvec::VecV & evalGeneralizedPosition ()
 
const fmatvec::VecV & evalGeneralizedVelocity ()
 
const fmatvec::VecV & evalDerivativeOfGeneralizedPosition ()
 
const fmatvec::VecV & evalGeneralizedAcceleration ()
 
fmatvec::VecV & getGeneralizedPosition (bool check=true)
 
fmatvec::VecV & getGeneralizedVelocity (bool check=true)
 
fmatvec::VecV & getDerivativeOfGeneralizedPosition (bool check=true)
 
fmatvec::VecV & getGeneralizedAcceleration (bool check=true)
 
void setq (const fmatvec::Vec &q_)
 
void setu (const fmatvec::Vec &u_)
 
bool hasNonCostantMassMatrix ()
 
void initializeUsingXML (xercesc::DOMElement *element) override
 
void createPlotGroup () override
 creates the plotGroup for H5-output More...
 
- Public Member Functions inherited from MBSim::Element
 Element (const std::string &name)
 constructor
 
 ~Element () override=default
 destructor
 
void throwError (const std::string &msg) const
 
virtual void setDynamicSystemSolver (DynamicSystemSolver *sys)
 sets the used dynamics system solver to the element More...
 
virtual void plot ()
 plots time dependent data More...
 
virtual void plotAtSpecialEvent ()
 plots time dependent data at special events More...
 
const std::string & getName () const
 
void setName (const std::string &str)
 
void setPath (const std::string &str)
 
DynamicSystemSolvergetDynamicSystemSolver ()
 
virtual void init (InitStage stage, const InitConfigSet &config=InitConfigSet())
 plots time series header More...
 
virtual void createPlotGroup ()
 creates the plotGroup for H5-output More...
 
H5::GroupBasegetPlotGroup ()
 
virtual H5::GroupBasegetFramesPlotGroup ()
 
virtual H5::GroupBasegetContoursPlotGroup ()
 
virtual H5::GroupBasegetGroupsPlotGroup ()
 
virtual H5::GroupBasegetObjectsPlotGroup ()
 
virtual H5::GroupBasegetLinksPlotGroup ()
 
virtual H5::GroupBasegetConstraintsPlotGroup ()
 
virtual H5::GroupBasegetObserversPlotGroup ()
 
bool getPlotFeature (const PlotFeatureEnum &pf)
 
virtual void setPlotFeature (const PlotFeatureEnum &pf, bool value)
 Set a plot feature. More...
 
void setPlotFeatureForChildren (const PlotFeatureEnum &pf, bool value)
 Set a plot feature for the children of this object. More...
 
void setPlotFeatureRecursive (const PlotFeatureEnum &pf, bool value)
 Set a plot feature for this object and the children of this object. More...
 
template<class T >
void setPlotAttribute (const std::string &name, const T &value)
 Set a plot attribute: static data attached as key/value pairs to the plot datasets/groups.
 
void setPlotAttribute (const std::string &name)
 
virtual void initializeUsingXML (xercesc::DOMElement *element)
 
template<class T >
T * getByPath (const std::string &path, bool initialCaller=true) const
 Get the object of type T represented by the path path. Do not set any argurment other than path!
 
std::string getPath (const Element *relTo=nullptr, std::string sep="/") const
 Return the path of this object. If relativeTo is not NULL return a relative path to relativeTo. Do not set any argurment other than relTo and sep!
 
virtual ElementgetChildByContainerAndName (const std::string &container, const std::string &name) const
 Get the Element named name in the container named container. More...
 
virtual std::shared_ptr< OpenMBV::GroupgetOpenMBVGrp ()
 
virtual std::shared_ptr< OpenMBV::GroupgetFramesOpenMBVGrp ()
 
virtual std::shared_ptr< OpenMBV::GroupgetContoursOpenMBVGrp ()
 
virtual std::shared_ptr< OpenMBV::GroupgetGroupsOpenMBVGrp ()
 
virtual std::shared_ptr< OpenMBV::GroupgetObjectsOpenMBVGrp ()
 
virtual std::shared_ptr< OpenMBV::GroupgetLinksOpenMBVGrp ()
 
virtual std::shared_ptr< OpenMBV::GroupgetConstraintsOpenMBVGrp ()
 
virtual std::shared_ptr< OpenMBV::GroupgetObserversOpenMBVGrp ()
 
virtual ElementgetParent ()
 
virtual const ElementgetParent () const
 
virtual void setParent (Element *parent_)
 
std::vector< Element * > getDependencies () const
 checks dependency on other elements. More...
 
void addDependency (Element *ele)
 
int computeLevel ()
 computes the length of the pathes in the graph that represents the dependencies between all elements. More...
 
virtual void updatePositions (Frame *frame)
 
virtual void updateVelocities (Frame *frame)
 
virtual void updateAccelerations (Frame *frame)
 
virtual void updateJacobians (Frame *frame, int j=0)
 
virtual void updateGyroscopicAccelerations (Frame *frame)
 
virtual void resetUpToDate ()
 
const double & getTime () const
 
double getStepSize () const
 
const MBXMLUtils::DOMEvalExceptiongetDOMEvalError () const
 

Protected Attributes

double m {0}
 mass
 
fmatvec::SymMat3 SThetaS
 inertia tensor with respect to centre of gravity in centre of gravity and world Frame
 
fmatvec::SymMat3 WThetaS
 
FixedRelativeFrameK
 
fmatvec::Vec3 PjhT
 
fmatvec::Vec3 PjhR
 
fmatvec::Vec3 PjbT
 
fmatvec::Vec3 PjbR
 
fmatvec::SqrMat3 APK
 rotation matrix from kinematic Frame to parent Frame
 
fmatvec::Vec3 PrPK
 translation from parent to kinematic Frame in parent and world system
 
fmatvec::Vec3 WrPK
 
fmatvec::Vec3 WvPKrel
 translational and angular velocity from parent to kinematic Frame in world system
 
fmatvec::Vec3 WomPK
 
Function< fmatvec::MatV(fmatvec::VecV)> * fTR {nullptr}
 
Function< fmatvec::Vec3(fmatvec::VecV, double)> * fPrPK {nullptr}
 translation from parent Frame to kinematic Frame in parent system
 
Function< fmatvec::RotMat3(fmatvec::VecV, double)> * fAPK {nullptr}
 rotation from kinematic Frame to parent Frame
 
void(RigidBody::* updateJacobians_ [3])(Frame *frame)
 
FixedRelativeFrameC
 
fmatvec::MatV JRel [2]
 
fmatvec::VecV jRel
 
fmatvec::VecV qTRel
 
fmatvec::VecV qRRel
 
fmatvec::VecV uTRel
 
fmatvec::VecV uRRel
 
fmatvec::VecV qdTRel
 
fmatvec::VecV qdRRel
 
fmatvec::Mat3xV PJTT
 
fmatvec::Mat3xV PJRR
 
Constraintconstraint {nullptr}
 
FrameframeForJacobianOfRotation {nullptr}
 
FrameframeForInertiaTensor {nullptr}
 
fmatvec::Range< fmatvec::Var, fmatvec::Var > iqT
 
fmatvec::Range< fmatvec::Var, fmatvec::Var > iqR
 
fmatvec::Range< fmatvec::Var, fmatvec::Var > iuT
 
fmatvec::Range< fmatvec::Var, fmatvec::Var > iuR
 
bool translationDependentRotation {false}
 
bool constJT {false}
 
bool constJR {false}
 
bool constjT {false}
 
bool constjR {false}
 
bool updPjb {true}
 
bool updGJ {true}
 
bool updWTS {true}
 
bool updateByReference {true}
 
Frame Z
 
GeneralizedVelocityOfRotation generalizedVelocityOfRotation {derivativeOfGeneralizedPositionOfRotation}
 
InverseKineticsJointjoint
 
- Protected Attributes inherited from MBSim::Body
std::vector< Frame * > frame
 vector of frames and contours
 
std::vector< Contour * > contour
 
FrameR
 frame of reference of the object
 
fmatvec::Mat3xV PJT [2]
 
fmatvec::Mat3xV PJR [2]
 
bool updPos
 
bool updVel
 
bool updPJ
 
std::shared_ptr< OpenMBV::BodyopenMBVBody
 
std::shared_ptr< OpenMBV::GroupopenMBVGrp
 
std::shared_ptr< OpenMBV::GroupframesOpenMBVGrp
 
std::shared_ptr< OpenMBV::GroupcontoursOpenMBVGrp
 
H5::GroupBaseframesPlotGroup
 
H5::GroupBasecontoursPlotGroup
 
- Protected Attributes inherited from MBSim::Object
int nq
 
int nu
 
int qSize
 size of object positions
 
int uSize [2]
 size of object velocities
 
int hSize [2]
 size of object h-vector (columns of J)
 
int qInd
 indices of positions, velocities, right hand side
 
int uInd [2]
 
int hInd [2]
 
fmatvec::Vec q
 positions, velocities
 
fmatvec::Vec u
 
fmatvec::Vec uall
 
fmatvec::Vec q0
 initial position, velocity
 
fmatvec::Vec u0
 
fmatvec::Vec qd
 differentiated positions, velocities
 
fmatvec::Vec ud
 
fmatvec::Vec dq
 
fmatvec::Vec du
 
fmatvec::Vec udall
 
fmatvec::Vec h [2]
 complete and object smooth and nonsmooth right hand side
 
fmatvec::Vec r [2]
 
fmatvec::Vec rdt
 
fmatvec::Mat W [2]
 
fmatvec::Mat V [2]
 
fmatvec::Mat dhdq
 Jacobians of h.
 
fmatvec::SqrMat dhdu
 
fmatvec::Vec dhdt
 
fmatvec::Mat T
 linear relation matrix of differentiated position and velocity parameters
 
fmatvec::SymMat M
 mass matrix
 
fmatvec::SymMat LLM
 LU-decomposition of mass matrix.
 
fmatvec::VecV qRel
 
fmatvec::VecV uRel
 
fmatvec::VecV qdRel
 
fmatvec::VecV udRel
 
bool updSize
 
bool updq
 
bool updu
 
bool updqd
 
bool updud
 
bool nonConstantMassMatrix {true}
 
- Protected Attributes inherited from MBSim::Element
Elementparent { nullptr }
 
std::string name
 name of element
 
std::string path
 The path of this object. Is set during the init stage reorganizeHierarchy. Before this the path is calculated dynamically using getPath() after this stage getPath just returns this value.
 
MBXMLUtils::DOMEvalException domEvalError
 Special XML helper variable.
 
DynamicSystemSolverds { nullptr }
 dynamic system
 
H5::VectorSerie< double > * plotVectorSerie { nullptr }
 time series
 
std::vector< double > plotVector
 one entry of time series
 
std::vector< std::string > plotColumns
 columns of time series
 
H5::GroupBaseplotGroup { nullptr }
 associated plot group
 
std::vector< Element * > dependency
 vector containing all dependencies.
 
PlotFeatureMap plotFeature
 plot feature
 
PlotFeatureMap plotFeatureForChildren
 
std::map< std::string, std::variant< std::monostate, int, double, std::string, std::vector< int >, std::vector< double >, std::vector< std::vector< double > > > > plotAttribute
 

Private Attributes

FrameopenMBVFrame
 Frame of reference for drawing openMBVBody.
 

Additional Inherited Members

- Protected Member Functions inherited from MBSim::Element
void updatePlotFeatures ()
 
void addToPlot (const std::string &name)
 
void addToPlot (const std::string &name, int size)
 
void addToPlot (const std::string &name, const std::vector< std::string > &iname)
 
template<class AT >
void plot (const AT &x)
 
template<class Type , class AT >
void plot (const fmatvec::Vector< Type, AT > &x)
 

Detailed Description

rigid bodies with arbitrary kinematics

Author
Martin Foerg
Date
2009-04-08 some comments (Thorsten Schindler)
2009-07-16 splitted link / object right hand side (Thorsten Schindler)
2009-12-14 revised inverse kinetics (Martin Foerg)
2010-04-24 class can handle constraints on generalized coordinates (Martin Foerg)
2010-06-20 add getter for Kinematics; revision on doxygen comments (Roland Zander)
Todo:

kinetic energy TODO

Euler parameter TODO

check if inertial system for performance TODO

rigid bodies have a predefined canonic Frame 'C' in their centre of gravity

Constructor & Destructor Documentation

◆ RigidBody()

MBSim::RigidBody::RigidBody ( const std::string &  name = "")

constructor

Parameters
namename of rigid body

Member Function Documentation

◆ calcqSize()

void MBSim::RigidBody::calcqSize ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ calcSize()

void MBSim::RigidBody::calcSize ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ calcuSize()

void MBSim::RigidBody::calcuSize ( int  j = 0)
overridevirtual

Reimplemented from MBSim::Object.

◆ getRotation()

Function< fmatvec::RotMat3(fmatvec::VecV, double)> * MBSim::RigidBody::getRotation ( )
inline

get Kinematic for rotational motion

Returns
rotational kinematic description

◆ getTranslation()

Function< fmatvec::Vec3(fmatvec::VecV, double)> * MBSim::RigidBody::getTranslation ( )
inline

get Kinematic for translational motion

Returns
translational kinematic description

◆ init()

void MBSim::RigidBody::init ( InitStage  stage,
const InitConfigSet &  config 
)
overridevirtual

plots time series header

Parameters
invocingparent class

Reimplemented from MBSim::Body.

◆ initializeUsingXML()

void MBSim::RigidBody::initializeUsingXML ( xercesc::DOMElement *  element)
overridevirtual

Reimplemented from MBSim::Body.

◆ plot()

void MBSim::RigidBody::plot ( )
overridevirtual

plots time dependent data

Parameters
simulationtime
simulationtime step size for derivative calculation

Reimplemented from MBSim::Body.

◆ resetGyroscopicAccelerationsUpToDate()

void MBSim::RigidBody::resetGyroscopicAccelerationsUpToDate ( )
overridevirtual

Reimplemented from MBSim::Body.

◆ resetJacobiansUpToDate()

void MBSim::RigidBody::resetJacobiansUpToDate ( )
overridevirtual

Reimplemented from MBSim::Body.

◆ resetPositionsUpToDate()

void MBSim::RigidBody::resetPositionsUpToDate ( )
overridevirtual

Reimplemented from MBSim::Body.

◆ resetUpToDate()

void MBSim::RigidBody::resetUpToDate ( )
overridevirtual

Reimplemented from MBSim::Body.

◆ resetVelocitiesUpToDate()

void MBSim::RigidBody::resetVelocitiesUpToDate ( )
overridevirtual

Reimplemented from MBSim::Body.

◆ setDynamicSystemSolver()

void MBSim::RigidBody::setDynamicSystemSolver ( DynamicSystemSolver sys)
overridevirtual

sets the used dynamics system solver to the element

Parameters
pointerto the dynamic system solver of which the element is part of

Reimplemented from MBSim::Body.

◆ setFrameForKinematics()

void MBSim::RigidBody::setFrameForKinematics ( Frame frame)
Parameters
frameFrame to be used for kinematical description depending on reference Frame and generalised positions / velocities

◆ setGeneralRotation()

void MBSim::RigidBody::setGeneralRotation ( Function< fmatvec::RotMat3(fmatvec::VecV, double)> *  fAPK_)
inline

set Kinematic for general rotational motion

Parameters
fAPKrotational kinematic description

◆ setGeneralTranslation()

void MBSim::RigidBody::setGeneralTranslation ( Function< fmatvec::Vec3(fmatvec::VecV, double)> *  fPrPK_)
inline

set Kinematic for genral translational motion

Parameters
fPrPKtranslational kinematic description

◆ sethInd()

void MBSim::RigidBody::sethInd ( int  hInd_,
int  i = 0 
)
overridevirtual

Reimplemented from MBSim::Body.

◆ sethSize()

void MBSim::RigidBody::sethSize ( int  hSize_,
int  i = 0 
)
overridevirtual

Reimplemented from MBSim::Body.

◆ setInertiaTensor()

void MBSim::RigidBody::setInertiaTensor ( const fmatvec::SymMat3 &  RThetaR)
inline
Parameters
RThetaRinertia tensor
frameoptional reference Frame of inertia tensor, otherwise cog-Frame will be used as reference

◆ setStateDependentRotation()

void MBSim::RigidBody::setStateDependentRotation ( Function< fmatvec::RotMat3(fmatvec::VecV)> *  fAPK_)
inline

set Kinematic for only state dependent rotational motion

Parameters
fAPKrotational kinematic description

◆ setStateDependentTranslation()

void MBSim::RigidBody::setStateDependentTranslation ( Function< fmatvec::Vec3(fmatvec::VecV)> *  fPrPK_)
inline

set Kinematic for only state dependent translational motion

Parameters
fPrPKtranslational kinematic description

◆ setTimeDependentRotation()

void MBSim::RigidBody::setTimeDependentRotation ( Function< fmatvec::RotMat3(double)> *  fAPK_)
inline

set Kinematic for only time dependent rotational motion

Parameters
fAPKrotational kinematic description

◆ setTimeDependentTranslation()

void MBSim::RigidBody::setTimeDependentTranslation ( Function< fmatvec::Vec3(double)> *  fPrPK_)
inline

set Kinematic for only time dependent translational motion

Parameters
fPrPKtranslational kinematic description

◆ setUpInverseKinetics()

void MBSim::RigidBody::setUpInverseKinetics ( )
overridevirtual

TODO.

Reimplemented from MBSim::Object.

◆ updateAccelerations()

void MBSim::RigidBody::updateAccelerations ( Frame frame)
overridevirtual

Reimplemented from MBSim::Element.

◆ updateDerivativeOfGeneralizedPositions()

void MBSim::RigidBody::updateDerivativeOfGeneralizedPositions ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ updateGeneralizedAccelerations()

void MBSim::RigidBody::updateGeneralizedAccelerations ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ updateGeneralizedPositions()

void MBSim::RigidBody::updateGeneralizedPositions ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ updateGeneralizedVelocities()

void MBSim::RigidBody::updateGeneralizedVelocities ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ updateGyroscopicAccelerations()

void MBSim::RigidBody::updateGyroscopicAccelerations ( Frame frame)
overridevirtual

Reimplemented from MBSim::Element.

◆ updateh()

void MBSim::RigidBody::updateh ( int  j = 0)
overridevirtual

Reimplemented from MBSim::Object.

◆ updateJacobians() [1/2]

void MBSim::RigidBody::updateJacobians ( )
overridevirtual

Reimplemented from MBSim::Body.

◆ updateJacobians() [2/2]

void MBSim::RigidBody::updateJacobians ( Frame frame,
int  j = 0 
)
inlineoverridevirtual

Reimplemented from MBSim::Element.

◆ updateM()

void MBSim::RigidBody::updateM ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ updatePositions()

void MBSim::RigidBody::updatePositions ( Frame frame)
overridevirtual

Reimplemented from MBSim::Element.

◆ updateqd()

void MBSim::RigidBody::updateqd ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ updateT()

void MBSim::RigidBody::updateT ( )
overridevirtual

Reimplemented from MBSim::Object.

◆ updateVelocities()

void MBSim::RigidBody::updateVelocities ( Frame frame)
overridevirtual

Reimplemented from MBSim::Element.

Member Data Documentation

◆ C

FixedRelativeFrame* MBSim::RigidBody::C
protected

a pointer to Frame "C"


The documentation for this class was generated from the following files: