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 Link * createLink (const Link *org=nullptr) const override
 
DyLink * joint (int id) const
 
DyLink * link (int index) const
 
DyLink * link (const std::string &name) const
 
DyLink * rootLink () 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)
 
Body * clone () const
 
Body * clone (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 ()
 
Body * parentBody () const
 
Link * parentBodyLink () const
 
void setParent (Link *parentBodyLink)
 
void resetParent ()
 
void syncPositionWithParentBody (bool doForwardKinematics=true)
 
int numLinks () const
 
Link * link (int index) const
 
Link * link (const std::string &name) const
 
const LinkTraverse & linkTraverse () const
 
const std::vector< Link * > & links () const
 
Link * rootLink () const
 
Link * findUniqueEndLink () const
 
Link * lastSerialLink () const
 
int numJoints () const
 
int numVirtualJoints () const
 
int numAllJoints () const
 
Link * joint (int id) const
 
Link * joint (const std::string &name) const
 
ContainerWrapper< std::vector< LinkPtr > > joints ()
 
const std::vector< LinkPtr > & allJoints () const
 
int numDevices () const
 
Device * device (int index) const
 
const DeviceList & devices () const
 
template<class DeviceType >
DeviceList< DeviceType > devices () const
 
template<class DeviceType >
DeviceType * findDevice (const std::string &name) const
 
template<class DeviceType >
DeviceType * findDevice () const
 
Device * findDevice (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 Isometry3 & defaultPosition () const
 
double mass () const
 
const Vector3 & calcCenterOfMass ()
 
const Vector3 & centerOfMass () const
 
void calcTotalMomentum (Vector3 &out_P, Vector3 &out_L)
 
void calcForwardKinematics (bool calcVelocity=false, bool calcAcceleration=false)
 
void clearExternalForces ()
 
int numExtraJoints () const
 
ExtraJoint & extraJoint (int index)
 
const ExtraJoint & extraJoint (int index) const
 
void addExtraJoint (const ExtraJoint &extraJoint)
 
void clearExtraJoints ()
 
const Mapping * info () const
 
Mapping * info ()
 
template<typename T >
T info (const std::string &key) const
 
template<typename T >
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
 
BodyHandler * handler (int index)
 
BodyCustomizerHandle customizerHandle () const
 
BodyCustomizerInterface * customizerInterface () 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 Referenced * doClone (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 BodyInterface * bodyInterface ()
 

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: