Choreonoid  1.8
Public Member Functions | Protected Member Functions | List of all members
cnoid::DyBody Class Reference

#include <DyBody.h>

Inheritance diagram for cnoid::DyBody:
cnoid::Body cnoid::ClonableReferenced cnoid::Referenced

Public Member Functions

 DyBody ()
 
 DyBody (const Body &org)=delete
 
virtual LinkcreateLink (const Link *org=nullptr) const override
 
DyLinkjoint (int id) const
 
DyLinklink (int index) const
 
DyLinklink (const std::string &name) const
 
DyLinkrootLink () const
 
const std::vector< DyLink * > & links () const
 
void initializeSubBodies ()
 
std::vector< DySubBodyPtr > & subBodies ()
 
void calcSpatialForwardKinematics ()
 
- Public Member Functions inherited from cnoid::Body
 Body ()
 
 Body (const std::string &name)
 
 Body (const Body &org)=delete
 
virtual ~Body ()
 
void copyFrom (const Body *org, CloneMap *cloneMap=nullptr)
 
Bodyclone () const
 
Bodyclone (CloneMap &cloneMap) const
 
const std::string & name () const
 
void setName (const std::string &name)
 
const std::string & modelName () const
 
void setModelName (const std::string &name)
 
void setRootLink (Link *link)
 
void expandLinkOffsetRotations ()
 
void updateLinkTree ()
 
void initializePosition ()
 
virtual void initializeState ()
 
BodyparentBody () const
 
LinkparentBodyLink () const
 
void setParent (Link *parentBodyLink)
 
void resetParent ()
 
void syncPositionWithParentBody (bool doForwardKinematics=true)
 
int numLinks () const
 
Linklink (int index) const
 
Linklink (const std::string &name) const
 
const LinkTraverselinkTraverse () const
 
const std::vector< Link * > & links () const
 
LinkrootLink () const
 
LinkfindUniqueEndLink () const
 
LinklastSerialLink () const
 
int numJoints () const
 
int numVirtualJoints () const
 
int numAllJoints () const
 
Linkjoint (int id) const
 
Linkjoint (const std::string &name) const
 
ContainerWrapper< std::vector< LinkPtr > > joints ()
 
const std::vector< LinkPtr > & allJoints () const
 
int numDevices () const
 
Devicedevice (int index) const
 
const DeviceListdevices () const
 
template<class DeviceType >
DeviceList< DeviceType > devices () const
 
template<class DeviceType >
DeviceType * findDevice (const std::string &name) const
 
template<class DeviceType >
DeviceType * findDevice () const
 
DevicefindDevice (const std::string &name) const
 
void addDevice (Device *device, Link *link)
 
void addDevice (Device *device)
 
void removeDevice (Device *device)
 
void clearDevices ()
 
void sortDevicesByLinkOrder ()
 
void initializeDeviceStates ()
 
bool isStaticModel () const
 
bool isFixedRootModel () const
 
void resetDefaultPosition (const Isometry3 &T)
 
const Isometry3defaultPosition () const
 
double mass () const
 
const Vector3calcCenterOfMass ()
 
const Vector3centerOfMass () const
 
void calcTotalMomentum (Vector3 &out_P, Vector3 &out_L)
 
void calcForwardKinematics (bool calcVelocity=false, bool calcAcceleration=false)
 
void clearExternalForces ()
 
int numExtraJoints () const
 
ExtraJointextraJoint (int index)
 
const ExtraJointextraJoint (int index) const
 
void addExtraJoint (const ExtraJoint &extraJoint)
 
void clearExtraJoints ()
 
const Mappinginfo () const
 
Mappinginfo ()
 
template<typename T >
info (const std::string &key) const
 
template<typename T >
info (const std::string &key, const T &defaultValue) const
 
template<typename T >
void setInfo (const std::string &key, const T &value)
 
void resetInfo (Mapping *info)
 
void cloneShapes (CloneMap &cloneMap)
 
template<class T >
T * findCache (const std::string &name)
 
template<class T >
const T * findCache (const std::string &name) const
 
template<class T >
T * getOrCreateCache (const std::string &name)
 
void setCache (const std::string &name, Referenced *cache)
 
bool getCaches (PolymorphicReferencedArrayBase<> &out_caches, std::vector< std::string > &out_names) const
 
void removeCache (const std::string &name)
 
void setCurrentTimeFunction (std::function< double()> func)
 
double currentTime () const
 
bool addHandler (BodyHandler *handler, bool isTopPriority=false)
 
template<class BodyHandlerType >
BodyHandlerType * findHandler ()
 
int numHandlers () const
 
BodyHandlerhandler (int index)
 
BodyCustomizerHandle customizerHandle () const
 
BodyCustomizerInterfacecustomizerInterface () const
 
bool installCustomizer ()
 
bool installCustomizer (BodyCustomizerInterface *customizerInterface)
 
bool hasVirtualJointForces () const
 
void setVirtualJointForces (double timeStep=0.0)
 
void resetLinkName (Link *link, const std::string &name)
 
void resetJointSpecificName (Link *link)
 
void resetJointSpecificName (Link *link, const std::string &name)
 
template<>
double info (const std::string &key) const
 
template<>
double info (const std::string &key, const double &defaultValue) const
 
template<>
bool info (const std::string &key, const bool &defaultValue) const
 
template<>
void setInfo (const std::string &key, const double &value)
 
template<>
void setInfo (const std::string &key, const bool &value)
 
- Public Member Functions inherited from cnoid::Referenced
virtual ~Referenced ()
 

Protected Member Functions

virtual ReferenceddoClone (CloneMap *cloneMap) const override
 
- Protected Member Functions inherited from cnoid::Body
 Body (Link *rootLink)
 
- Protected Member Functions inherited from cnoid::Referenced
 Referenced ()
 
 Referenced (const Referenced &)
 
int refCount () const
 

Additional Inherited Members

- Static Public Member Functions inherited from cnoid::Body
static void addCustomizerDirectory (const std::string &path)
 
static BodyInterfacebodyInterface ()
 

Detailed Description

A Body class used for forward dynamics based on the articulated body method (ABM)

Constructor & Destructor Documentation

◆ DyBody() [1/2]

DyBody::DyBody ( )

◆ DyBody() [2/2]

cnoid::DyBody::DyBody ( const Body org)
delete

The copy constructor is disabled becasue a virtual function is neccessary to create the instance but it cannot be called from the contructor. Use the copyFrom function after the empty instance is created to create the copied instance.

Member Function Documentation

◆ calcSpatialForwardKinematics()

void DyBody::calcSpatialForwardKinematics ( )

◆ createLink()

Link * DyBody::createLink ( const Link org = nullptr) const
overridevirtual

Reimplemented from cnoid::Body.

◆ doClone()

Referenced * DyBody::doClone ( CloneMap cloneMap) const
overrideprotectedvirtual

Reimplemented from cnoid::Body.

◆ initializeSubBodies()

void DyBody::initializeSubBodies ( )

◆ joint()

DyLink* cnoid::DyBody::joint ( int  id) const
inline

◆ link() [1/2]

DyLink* cnoid::DyBody::link ( const std::string &  name) const
inline

◆ link() [2/2]

DyLink* cnoid::DyBody::link ( int  index) const
inline

◆ links()

const std::vector<DyLink*>& cnoid::DyBody::links ( ) const
inline

◆ rootLink()

DyLink* cnoid::DyBody::rootLink ( ) const
inline

◆ subBodies()

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

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