RobWorkProject  23.9.11-
Public Types | Public Member Functions | List of all members
RWBody Class Reference

Public Types

enum  BodyType { Rigid , Fixed , Link , Kinematic }
 

Public Member Functions

 RWBody (int id)
 
virtual void saveState (double h, rw::kinematics::State &state)
 
virtual void rollBack (rw::kinematics::State &state)
 
virtual void updateVelocity (double h, rw::kinematics::State &state)
 
virtual void updatePosition (double h, rw::kinematics::State &state)
 
virtual void updateImpulse ()
 
rw::math::Vector3D getPointVelW (const rw::math::Vector3D<> &p)
 
rw::math::InertiaMatrix getEffectiveMassW (const rw::math::Vector3D<> &wPc)
 
double calcEnergy (const rw::math::Vector3D<> &grav)
 calculates and returns the total energy of this body where grav is the constant gravitation. More...
 
void calcAuxVarialbles (rw::kinematics::State &state)
 this is called to precalculate all auxiliary variables.
 
rw::kinematics::FramegetBodyFrame () const
 gets the frame that the bodies dynamic variables are described relative to.
 
const std::string & getMaterial ()
 
void resetState (rw::kinematics::State &state)
 
virtual void reset ()
 reset the state variables of this body More...
 
BodyType getType ()
 
void setBody (dynamics::Body *body)
 
void setType (BodyType type)
 
virtual void setForce (const rw::math::Vector3D<> &f)
 Sets the force described in parent frame acting on the center mass of this body.
 
virtual void setForceW (const rw::math::Vector3D<> &f)
 Sets the force described in world frame acting on the center mass of this body.
 
virtual rw::math::Vector3D getForceW ()
 Gets the force described in world frame acting on the center mass of this body.
 
virtual const rw::math::Vector3DgetForce ()
 Gets the force described in parent frame acting on the center mass of this body.
 
virtual void addForce (const rw::math::Vector3D<> &force)
 Adds a force described in parent frame to the center of mass of this body.
 
virtual void addForceW (const rw::math::Vector3D<> &force)
 Adds a force described in world frame to the center of mass of this body.
 
virtual void addForceToPos (const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &pos)
 Adds a force described in parent frame to this body which is working on a specific position pos that is described relative to this body.
 
virtual void addForceWToPosW (const rw::math::Vector3D<> &force, const rw::math::Vector3D<> &pos)
 Adds a force described in world frame to this body which is worked on a specific position pos that is described relative to world.
 
virtual void addImpulseToPos (const rw::math::Vector3D<> &impulse, const rw::math::Vector3D<> &pos)
 Adds a impulse described in parent frame to this body which is working on a specific position pos that is described relative to this body.
 
virtual void addImpulseWToPosW (const rw::math::Vector3D<> &impulse, const rw::math::Vector3D<> &pos)
 Adds a impulse described in world frame to this body which is worked on a specific position pos that is described relative to world.
 
virtual void addGravitation (const rw::math::Vector3D<> &grav)
 adds gravitation to the body where the gravitation is described in body frame
 
virtual void addGravitationW (const rw::math::Vector3D<> &grav)
 adds gravitation to the body where the gravitation is described in world frame
 
virtual void setGravitation (const rw::math::Vector3D<> &grav)
 sets gravitation to the body where the gravitation is described in body frame
 
virtual void setGravitationW (const rw::math::Vector3D<> &grav)
 sets gravitation to the body where the gravitation is described in world frame
 
virtual void setTorque (const rw::math::Vector3D<> &t)
 set the torque of this body with torque t, where t is described in body frame
 
virtual void setTorqueW (const rw::math::Vector3D<> &t)
 set the torque of this body with torque t, where t is described in world frame
 
virtual const rw::math::Vector3DgetTorque ()
 returns torque described in body frame
 
virtual rw::math::Vector3D getTorqueW ()
 returns torque described in world frame
 
virtual const rw::math::Transform3DgetPTBody ()
 returns the transform from parent to body
 
virtual void setPTBody (const rw::math::Transform3D<> &pTb, rw::kinematics::State &state)
 
virtual const rw::math::Transform3DgetWTBody ()
 returns the transform from world to body
 
virtual rw::math::Vector3D getLinVel ()
 return the linear velocity described in parent frame
 
virtual rw::math::Vector3D getLinVelW ()
 return the linear velocity described in world frame
 
virtual void setLinVel (const rw::math::Vector3D<> &lvel)
 
virtual const rw::math::Vector3DgetAngVel ()
 returns the angular velocity described in parent frame
 
virtual rw::math::Vector3D getAngVelW ()
 returns the angular velocity described in world frame
 
virtual void setAngVel (const rw::math::Vector3D<> &avel)
 
rw::math::Vector3D getPointVel (const rw::math::Vector3D<> &p)
 calculates the relative velocity in parent frame of a point p on the body described in parent frame.
 
double getMass () const
 returns the mass of this body
 
double getMassInv () const
 returns the inverse of the mass of this body
 
const rw::math::InertiaMatrixgetBodyInertia () const
 returns the body inertia matrix
 
const rw::math::InertiaMatrixgetBodyInertiaInv () const
 return the inverse of the body inertia matrix
 
const rw::math::InertiaMatrixgetInertiaTensorInv () const
 returns the inverse of the inertia tensor described in parent frame. More...
 
rw::math::InertiaMatrix getInertiaTensorInvW () const
 returns the inverse of the inertia tensor described in world frame.
 
const rw::math::InertiaMatrixgetInertiaTensor () const
 returns the inverse of the inertia tensor described in parent frame.
 
int getId ()
 

Member Function Documentation

◆ calcEnergy()

double calcEnergy ( const rw::math::Vector3D<> &  grav)

calculates and returns the total energy of this body where grav is the constant gravitation.

Returns

◆ getInertiaTensorInv()

const rw::math::InertiaMatrix& getInertiaTensorInv ( ) const
inline

returns the inverse of the inertia tensor described in parent frame.

pTb.R() * (IBodyInv * inverse(pTb.R()));

◆ reset()

virtual void reset ( )
inlinevirtual

reset the state variables of this body


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