Choreonoid  1.1
構成 | Public 型 | Public メソッド | Static Public メソッド | Public 変数 | Protected メソッド | フレンド | すべてのメンバ一覧
クラス cnoid::Body

#include <Body.h>

cnoid::Bodyに対する継承グラフ
cnoid::Referenced cnoid::LeggedBody

構成

struct  LinkConnection

Public 型

typedef std::vector
< LinkConnection
LinkConnectionArray

Public メソッド

 Body ()
virtual ~Body ()
virtual BodyPtr duplicate () const
const std::string & name ()
void setName (const std::string &name)
const std::string & modelName ()
void setModelName (const std::string &name)
void setRootLink (Link *link)
void updateLinkTree ()
int numJoints () const
Linkjoint (int id) const
const std::vector< Link * > & joints () const
int numLinks () const
Linklink (int index) const
const LinkTraverselinks () const
const LinkTraverselinkTraverse () const
Linklink (const std::string &name) const
LinkrootLink () const
SensorcreateSensor (Link *link, int sensorType, int id, const std::string &name)
void addSensor (Sensor *sensor, int sensorType, int id)
Sensorsensor (int sensorType, int sensorId) const
int numSensors (int sensorType) const
int numSensorTypes () const
void clearSensorValues ()
template<class TSensor >
TSensor * sensor (int id) const
template<class TSensor >
TSensor * sensor (const std::string &name) const
bool isStaticModel ()
double calcTotalMass ()
double totalMass () const
Vector3 calcCM ()
const Vector3lastCM ()
void calcTotalMomentum (Vector3 &out_P, Vector3 &out_L)
void setDefaultRootPosition (const Vector3 &p, const Matrix3 &R)
void getDefaultRootPosition (Vector3 &out_p, Matrix3 &out_R)
void initializeConfiguration ()
void calcForwardKinematics (bool calcVelocity=false, bool calcAcceleration=false)
void clearExternalForces ()
JointPathPtr getJointPath (Link *baseLink, Link *targetLink)
void setVirtualJointForces ()
virtual InverseKinematicsPtr getDefaultIK (Link *targetLink)
void updateLinkColdetModelPositions ()
void putInformation (std::ostream &out)
bool installCustomizer ()
bool installCustomizer (BodyCustomizerInterface *customizerInterface)
YamlMappinginfo ()
void resetInfo (YamlMappingPtr info)
LinkGrouplinkGroup ()
- Public メソッド inherited from cnoid::Referenced
 Referenced ()
virtual ~Referenced ()

Static Public メソッド

static void addCustomizerDirectory (const std::string &path)
static BodyInterfacebodyInterface ()

Public 変数

LinkConnectionArray linkConnections

Protected メソッド

 Body (const Body &org)
virtual void doResetInfo (const YamlMapping &info)
- Protected メソッド inherited from cnoid::Referenced
int refCounter ()

フレンド

class CustomizedJointPath

型定義

コンストラクタとデストラクタ

Body::Body ( )
Body::~Body ( )
virtual
Body::Body ( const Body org)
protected

関数

void Body::addCustomizerDirectory ( const std::string &  path)
static
void Body::addSensor ( Sensor sensor,
int  sensorType,
int  id 
)
BodyInterface * Body::bodyInterface ( )
static
Vector3 Body::calcCM ( )
void Body::calcForwardKinematics ( bool  calcVelocity = false,
bool  calcAcceleration = false 
)
double Body::calcTotalMass ( )
void Body::calcTotalMomentum ( Vector3 out_P,
Vector3 out_L 
)

assuming Link::v,w is already computed by calcForwardKinematics(true); assuming Link::wc is already computed by calcCM();

void Body::clearExternalForces ( )
void Body::clearSensorValues ( )
Sensor * Body::createSensor ( Link link,
int  sensorType,
int  id,
const std::string &  name 
)
void Body::doResetInfo ( const YamlMapping info)
protectedvirtual

cnoid::LeggedBodyで再定義されています。

BodyPtr Body::duplicate ( ) const
virtual

cnoid::LeggedBodyで再定義されています。

InverseKinematicsPtr Body::getDefaultIK ( Link targetLink)
virtual
void Body::getDefaultRootPosition ( Vector3 out_p,
Matrix3 out_R 
)
JointPathPtr Body::getJointPath ( Link baseLink,
Link targetLink 
)
YamlMapping* cnoid::Body::info ( )
inline
void Body::initializeConfiguration ( )
bool Body::installCustomizer ( )

The function installs the pre-loaded customizer corresponding to the model name.

bool Body::installCustomizer ( BodyCustomizerInterface customizerInterface)
bool cnoid::Body::isStaticModel ( )
inline

This function returns true when the whole body is a static, fixed object like a floor.

Link* cnoid::Body::joint ( int  id) const
inline

This function returns a link that has a given joint ID. If there is no link that has a given joint ID, the function returns a dummy link object whose ID is minus one. The maximum id can be obtained by numJoints().

const std::vector<Link*>& cnoid::Body::joints ( ) const
inline

The vector<Link*> corresponding to the sequence of joint().

const Vector3& cnoid::Body::lastCM ( )
inline
Link* cnoid::Body::link ( int  index) const
inline

This function returns the link of a given index in the whole link sequence. The order of the sequence corresponds to a link-tree traverse from the root link. The size of the sequence can be obtained by numLinks().

Link * Body::link ( const std::string &  name) const

This function returns a link that has a given name.

This function returns a link object whose name of Joint node matches a given name. Null is returned when the body has no joint of the given name.

LinkGroup* cnoid::Body::linkGroup ( )
inline
const LinkTraverse& cnoid::Body::links ( ) const
inline
const LinkTraverse& cnoid::Body::linkTraverse ( ) const
inline

LinkTraverse object that traverses all the links from the root link

const std::string& cnoid::Body::modelName ( )
inline
const std::string& cnoid::Body::name ( )
inline
int cnoid::Body::numJoints ( ) const
inline

The number of the links that work as a joint. Note that the acutal value is the maximum joint ID plus one. Thus there may be a case where the value does not correspond to the actual number of the joint-links. In other words, the value represents the size of the link sequence obtained by joint() function.

int cnoid::Body::numLinks ( ) const
inline

The number of all the links the body has. The value corresponds to the size of the sequence obtained by link() function.

int cnoid::Body::numSensors ( int  sensorType) const
inline
int cnoid::Body::numSensorTypes ( ) const
inline
void Body::putInformation ( std::ostream &  out)
void Body::resetInfo ( YamlMappingPtr  info)
Link* cnoid::Body::rootLink ( ) const
inline

The root link of the body

Sensor* cnoid::Body::sensor ( int  sensorType,
int  sensorId 
) const
inline
template<class TSensor >
TSensor* cnoid::Body::sensor ( int  id) const
inline
template<class TSensor >
TSensor* cnoid::Body::sensor ( const std::string &  name) const
inline
void Body::setDefaultRootPosition ( const Vector3 p,
const Matrix3 R 
)
void cnoid::Body::setModelName ( const std::string &  name)
inline
void cnoid::Body::setName ( const std::string &  name)
inline
void Body::setRootLink ( Link link)
void Body::setVirtualJointForces ( )
double cnoid::Body::totalMass ( ) const
inline
void Body::updateLinkColdetModelPositions ( )

This function must be called before the collision detection. It updates the positions and orientations of the models for detecting collisions between links.

void Body::updateLinkTree ( )

This function must be called when the structure of the link tree is changed.

フレンドと関連する関数

friend class CustomizedJointPath
friend

変数

LinkConnectionArray cnoid::Body::linkConnections

このクラスの説明は次のファイルから生成されました: