Choreonoid  1.8
Classes | Public Member Functions | List of all members
cnoid::DyWorldBase Class Reference

#include <DyWorld.h>

Inheritance diagram for cnoid::DyWorldBase:
cnoid::DyWorld< TConstraintForceSolver > cnoid::DyWorld< cnoid::ConstraintForceSolver >

Public Member Functions

 DyWorldBase ()
 
virtual ~DyWorldBase ()
 
int numBodies () const
 
DyBodybody (int index)
 
DyBodybody (const std::string &name) const
 
const std::vector< DyBodyPtr > & bodies ()
 
int numSubBodies () const
 This function returns the number of bodies used in the internal calculation in this world. More...
 
DySubBodysubBody (int index)
 
const std::vector< DySubBodyPtr > & subBodies ()
 
int addBody (DyBody *body)
 This function adds a body to the world. More...
 
bool hasHighGainDynamics () const
 
void clearBodies ()
 
void clearCollisionPairs ()
 
void setTimeStep (double dt)
 
double timeStep (void) const
 
void setCurrentTime (double tm)
 
double currentTime (void) const
 
void setGravityAcceleration (const Vector3 &g)
 
const Vector3gravityAcceleration () const
 
void enableSensors (bool on)
 enable/disable sensor simulation More...
 
void setOldAccelSensorCalcMode (bool on)
 
void setEulerMethod ()
 Use the euler method for integration. More...
 
void setRungeKuttaMethod ()
 Use the runge-kutta method for integration. More...
 
virtual void initialize ()
 initialize this world. This must be called after all bodies are registered. More...
 
void setVirtualJointForces ()
 
virtual void calcNextState ()
 compute forward dynamics and update current state More...
 
void refreshState ()
 
std::pair< int, bool > getIndexOfLinkPairs (DyLink *link1, DyLink *link2)
 get index of link pairs More...
 
std::vector< ExtraJoint > & extraJoints ()
 
void clearExtraJoints ()
 
void addExtraJoint (ExtraJoint &extraJoint)
 

Constructor & Destructor Documentation

◆ DyWorldBase()

DyWorldBase::DyWorldBase ( )

◆ ~DyWorldBase()

DyWorldBase::~DyWorldBase ( )
virtual

Member Function Documentation

◆ addBody()

int DyWorldBase::addBody ( DyBody body)

This function adds a body to the world.

Returns
Index of the body in the world
Note
This must be called before initialize() is called.

◆ addExtraJoint()

void cnoid::DyWorldBase::addExtraJoint ( ExtraJoint extraJoint)
inline

◆ bodies()

const std::vector<DyBodyPtr>& cnoid::DyWorldBase::bodies ( )
inline

◆ body() [1/2]

DyBody * DyWorldBase::body ( const std::string &  name) const

◆ body() [2/2]

DyBody* cnoid::DyWorldBase::body ( int  index)
inline

◆ calcNextState()

void DyWorldBase::calcNextState ( )
virtual

compute forward dynamics and update current state

Reimplemented in cnoid::DyWorld< TConstraintForceSolver >, and cnoid::DyWorld< cnoid::ConstraintForceSolver >.

◆ clearBodies()

void DyWorldBase::clearBodies ( )

◆ clearCollisionPairs()

void DyWorldBase::clearCollisionPairs ( )

◆ clearExtraJoints()

void cnoid::DyWorldBase::clearExtraJoints ( )
inline

◆ currentTime()

double cnoid::DyWorldBase::currentTime ( void  ) const
inline

◆ enableSensors()

void DyWorldBase::enableSensors ( bool  on)

enable/disable sensor simulation

Parameters
ontrue to enable, false to disable
Note
This must be called before initialize() is called.

◆ extraJoints()

std::vector<ExtraJoint>& cnoid::DyWorldBase::extraJoints ( )
inline

◆ getIndexOfLinkPairs()

std::pair< int, bool > DyWorldBase::getIndexOfLinkPairs ( DyLink link1,
DyLink link2 
)

get index of link pairs

Parameters
link1link1
link2link2
Returns
pair of index and flag. The flag is true if the pair was already registered, false othewise.

◆ gravityAcceleration()

const Vector3& cnoid::DyWorldBase::gravityAcceleration ( ) const
inline

◆ hasHighGainDynamics()

bool cnoid::DyWorldBase::hasHighGainDynamics ( ) const
inline

◆ initialize()

void DyWorldBase::initialize ( )
virtual

initialize this world. This must be called after all bodies are registered.

Reimplemented in cnoid::DyWorld< TConstraintForceSolver >, and cnoid::DyWorld< cnoid::ConstraintForceSolver >.

◆ numBodies()

int cnoid::DyWorldBase::numBodies ( ) const
inline

◆ numSubBodies()

int cnoid::DyWorldBase::numSubBodies ( ) const
inline

This function returns the number of bodies used in the internal calculation in this world.

Note
The body that has non-root free-joints are decomposed into internal sub bodies

◆ refreshState()

void DyWorldBase::refreshState ( )

◆ setCurrentTime()

void DyWorldBase::setCurrentTime ( double  tm)

◆ setEulerMethod()

void DyWorldBase::setEulerMethod ( )

Use the euler method for integration.

◆ setGravityAcceleration()

void DyWorldBase::setGravityAcceleration ( const Vector3 g)
Parameters
ggravity acceleration[m/s^2]

◆ setOldAccelSensorCalcMode()

void DyWorldBase::setOldAccelSensorCalcMode ( bool  on)

◆ setRungeKuttaMethod()

void DyWorldBase::setRungeKuttaMethod ( )

Use the runge-kutta method for integration.

◆ setTimeStep()

void DyWorldBase::setTimeStep ( double  dt)

◆ setVirtualJointForces()

void DyWorldBase::setVirtualJointForces ( )

◆ subBodies()

const std::vector<DySubBodyPtr>& cnoid::DyWorldBase::subBodies ( )
inline

◆ subBody()

DySubBody* cnoid::DyWorldBase::subBody ( int  index)
inline

◆ timeStep()

double cnoid::DyWorldBase::timeStep ( void  ) const
inline

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