MBSim

Project Page
Public Member Functions | Protected Member Functions | Protected Attributes
MBSim::RigidBody Class Reference

rigid bodies with arbitrary kinematics More...

#include <rigid_body.h>

Inheritance diagram for MBSim::RigidBody:
MBSim::Body MBSim::Object MBSim::Element

List of all members.

Public Member Functions

 RigidBody (const std::string &name="")
 constructor
virtual ~RigidBody ()
 destructor
void addDependency (Constraint *constraint_)
virtual void updatedq (double t, double dt)
virtual void updateqd (double t)
virtual void updateT (double t)
virtual void updateh (double t, int j=0)
virtual void updateh0Fromh1 (double t)
virtual void updateW0FromW1 (double t)
virtual void updateV0FromV1 (double t)
virtual void updatehInverseKinetics (double t, int j=0)
virtual void updateStateDerivativeDependentVariables (double t)
virtual void updateM (double t, int i=0)
virtual void updateStateDependentVariables (double t)
virtual void updateJacobians (double t, int j=0)
void updateJacobians0 (double t)
void updateJacobians1 (double t)
virtual void calcqSize ()
virtual void calcuSize (int j=0)
virtual void updateqRef (const fmatvec::Vec &ref)
 references to positions of dynamic system parent
virtual void updateuRef (const fmatvec::Vec &ref)
 references to velocities of dynamic system parent
virtual void init (InitStage stage)
 initialize object at start of simulation with respect to contours and frames
virtual void initz ()
 initialize state of object at start of simulation
virtual void facLLM (int i=0)
 perform Cholesky decomposition of mass martix
virtual void setUpInverseKinetics ()
 TODO.
virtual std::string getType () const
virtual void plot (double t, double dt=1)
 plots time dependent data
virtual void updateKinematicsForSelectedFrame (double t)
 updates kinematics of kinematic Frame starting from reference Frame
virtual void updateJacobiansForSelectedFrame0 (double t)
 updates JACOBIAN for kinematics starting from reference Frame
virtual void updateKinematicsForRemainingFramesAndContours (double t)
 updates kinematics for remaining Frames starting with and from cog Frame
virtual void updateJacobiansForRemainingFramesAndContours (double t, int j=0)
 updates remaining JACOBIANS for kinematics starting with and from cog Frame
virtual void updateJacobiansForRemainingFramesAndContours1 (double t)
void setGeneralTranslation (fmatvec::Function< fmatvec::Vec3(fmatvec::VecV, double)> *fPrPK_)
 set Kinematic for genral translational motion
void setTimeDependentTranslation (fmatvec::Function< fmatvec::Vec3(double)> *fPrPK_)
 set Kinematic for only time dependent translational motion
void setStateDependentTranslation (fmatvec::Function< fmatvec::Vec3(fmatvec::VecV)> *fPrPK_)
 set Kinematic for only state dependent translational motion
void setTranslation (fmatvec::Function< fmatvec::Vec3(fmatvec::VecV, double)> *fPrPK_)
void setTranslation (fmatvec::Function< fmatvec::Vec3(double)> *fPrPK_)
void setTranslation (fmatvec::Function< fmatvec::Vec3(fmatvec::VecV)> *fPrPK_)
void setGeneralRotation (fmatvec::Function< fmatvec::RotMat3(fmatvec::VecV, double)> *fAPK_)
 set Kinematic for general rotational motion
void setTimeDependentRotation (fmatvec::Function< fmatvec::RotMat3(double)> *fAPK_)
 set Kinematic for only time dependent rotational motion
void setStateDependentRotation (fmatvec::Function< fmatvec::RotMat3(fmatvec::VecV)> *fAPK_)
 set Kinematic for only state dependent rotational motion
void setRotation (fmatvec::Function< fmatvec::RotMat3(fmatvec::VecV, double)> *fAPK_)
void setRotation (fmatvec::Function< fmatvec::RotMat3(double)> *fAPK_)
void setRotation (fmatvec::Function< fmatvec::RotMat3(fmatvec::VecV)> *fAPK_)
void setTranslationDependentRotation (bool dep)
void setCoordinateTransformationForRotation (bool ct)
fmatvec::Function
< fmatvec::Vec3(fmatvec::VecV,
double)> * 
getTranslation ()
 get Kinematic for translational motion
fmatvec::Function
< fmatvec::RotMat3(fmatvec::VecV,
double)> * 
getRotation ()
 get Kinematic for rotational motion
void setMass (double m_)
double getMass () const
FixedRelativeFrame * getFrameForKinematics ()
FixedRelativeFrame * getFrameC ()
void setInertiaTensor (const fmatvec::SymMat3 &RThetaR)
const fmatvec::SymMat3 & getInertiaTensor () const
fmatvec::SymMat3 & getInertiaTensor ()
void addFrame (FixedRelativeFrame *frame)
void setFrameForKinematics (Frame *frame)
void setFrameForInertiaTensor (Frame *frame)
virtual void initializeUsingXML (xercesc::DOMElement *element)
virtual xercesc::DOMElement * writeXMLFile (xercesc::DOMNode *element)
virtual void updatePositionAndOrientationOfFrame (double t, Frame *P)
virtual void updateAccelerations (double t, Frame *P)
virtual void updateRelativeJacobians (double t, Frame *P)
virtual void updateRelativeJacobians (double t, Frame *P, fmatvec::Mat3xV &WJTrel, fmatvec::Mat3xV &WJRrel)
const fmatvec::Mat3xV & getWJTrel () const
const fmatvec::Mat3xV & getWJRrel () const
fmatvec::Mat3xV & getWJTrel ()
fmatvec::Mat3xV & getWJRrel ()
fmatvec::Mat & getJRel (int i=0)
fmatvec::Vec & getjRel ()
fmatvec::Vec & getqRel ()
fmatvec::Vec & getuRel ()
fmatvec::Mat3xV & getPJT (int i=0)
fmatvec::Mat3xV & getPJR (int i=0)
int getqRelSize () const
int getuRelSize (int i=0) const

Protected Member Functions

void updateMConst (double t, int i=0)
 update constant mass matrix
void updateMNotConst (double t, int i=0)
 update time dependend mass matrix
void facLLMConst (int i=0)
 Cholesky decomposition of constant mass matrix.
void facLLMNotConst (int i=0)
 Cholesky decomposition of time dependent mass matrix.

Protected Attributes

double m
 mass
fmatvec::SymMat3 SThetaS
 inertia tensor with respect to centre of gravity in centre of gravity and world Frame
fmatvec::SymMat3 WThetaS
FixedRelativeFrame * K
fmatvec::SymMat Mbuf
 TODO.
bool coordinateTransformation
 boolean to use body fixed Frame for rotation
fmatvec::Mat3xV PJT [2]
 JACOBIAN of translation, rotation and their derivatives in parent system.
fmatvec::Mat3xV PJR [2]
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
fmatvec::Function
< fmatvec::MatV(fmatvec::VecV)> * 
fTR
fmatvec::Function
< fmatvec::Vec3(fmatvec::VecV,
double)> * 
fPrPK
 translation from parent Frame to kinematic Frame in parent system
fmatvec::Function
< fmatvec::RotMat3(fmatvec::VecV,
double)> * 
fAPK
 rotation from kinematic Frame to parent Frame
void(RigidBody::* updateM_ )(double t, int i)
 function pointer to update mass matrix
void(RigidBody::* facLLM_ )(int i)
 function pointer for Cholesky decomposition of mass matrix
void(RigidBody::* updateJacobians_ [2])(double t)
FixedRelativeFrame * C
 a pointer to Frame "C"
fmatvec::Vec aT
fmatvec::Vec aR
fmatvec::Vec qRel
fmatvec::Vec uRel
fmatvec::Mat JRel [2]
fmatvec::Vec jRel
fmatvec::VecV qTRel
fmatvec::VecV qRRel
fmatvec::VecV uTRel
fmatvec::VecV uRRel
fmatvec::Mat3xV WJTrel
fmatvec::Mat3xV WJRrel
fmatvec::Mat3xV PJTT
fmatvec::Mat3xV PJRR
Constraint * constraint
int nu [2]
int nq
Frame * frameForJacobianOfRotation
std::vector< FixedRelativeFrame * > RBF
std::vector< CompoundContour * > RBC
Frame * frameForInertiaTensor
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
bool constJT
bool constJR
bool constjT
bool constjR

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

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

constructor

Parameters:
namename of rigid body

Member Function Documentation

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

get Kinematic for rotational motion

Returns:
rotational kinematic description
fmatvec::Function<fmatvec::Vec3(fmatvec::VecV, double)>* MBSim::RigidBody::getTranslation ( ) [inline]

get Kinematic for translational motion

Returns:
translational kinematic description
virtual std::string MBSim::RigidBody::getType ( ) const [inline, virtual]
Returns:
std::string representation

Reimplemented from MBSim::Body.

virtual void MBSim::RigidBody::plot ( double  t,
double  dt = 1 
) [virtual]

plots time dependent data

Parameters:
simulationtime
simulationtime step size for derivative calculation

Reimplemented from MBSim::Body.

Parameters:
frameFrame to be used for kinematical description depending on reference Frame and generalised positions / velocities
void MBSim::RigidBody::setGeneralRotation ( fmatvec::Function< fmatvec::RotMat3(fmatvec::VecV, double)> *  fAPK_) [inline]

set Kinematic for general rotational motion

Parameters:
fAPKrotational kinematic description
void MBSim::RigidBody::setGeneralTranslation ( fmatvec::Function< fmatvec::Vec3(fmatvec::VecV, double)> *  fPrPK_) [inline]

set Kinematic for genral translational motion

Parameters:
fPrPKtranslational kinematic description
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
void MBSim::RigidBody::setStateDependentRotation ( fmatvec::Function< fmatvec::RotMat3(fmatvec::VecV)> *  fAPK_) [inline]

set Kinematic for only state dependent rotational motion

Parameters:
fAPKrotational kinematic description
void MBSim::RigidBody::setStateDependentTranslation ( fmatvec::Function< fmatvec::Vec3(fmatvec::VecV)> *  fPrPK_) [inline]

set Kinematic for only state dependent translational motion

Parameters:
fPrPKtranslational kinematic description
void MBSim::RigidBody::setTimeDependentRotation ( fmatvec::Function< fmatvec::RotMat3(double)> *  fAPK_) [inline]

set Kinematic for only time dependent rotational motion

Parameters:
fAPKrotational kinematic description
void MBSim::RigidBody::setTimeDependentTranslation ( fmatvec::Function< fmatvec::Vec3(double)> *  fPrPK_) [inline]

set Kinematic for only time dependent translational motion

Parameters:
fPrPKtranslational kinematic description
virtual void MBSim::RigidBody::updateqRef ( const fmatvec::Vec &  qRef) [virtual]

references to positions of dynamic system parent

Parameters:
qRefvector to be referenced

Reimplemented from MBSim::Object.

virtual void MBSim::RigidBody::updateuRef ( const fmatvec::Vec &  uRef) [virtual]

references to velocities of dynamic system parent

Parameters:
uRefvector to be referenced

Reimplemented from MBSim::Object.


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