Public Member Functions | Private Member Functions | Private Attributes | List of all members
KDL::Tree Class Reference

This class encapsulates a tree kinematic interconnection structure. It is built out of segments. More...

#include <tree.hpp>

Public Member Functions

bool addChain (const Chain &chain, const std::string &hook_name)
 
bool addSegment (const Segment &segment, const std::string &hook_name)
 
bool addTree (const Tree &tree, const std::string &hook_name)
 
bool getChain (const std::string &chain_root, const std::string &chain_tip, Chain &chain) const
 
unsigned int getNrOfJoints () const
 
unsigned int getNrOfSegments () const
 
SegmentMap::const_iterator getRootSegment () const
 
SegmentMap::const_iterator getSegment (const std::string &segment_name) const
 
const SegmentMapgetSegments () const
 
Treeoperator= (const Tree &arg)
 
 Tree (const std::string &root_name="root")
 
 Tree (const Tree &in)
 
virtual ~Tree ()
 

Private Member Functions

bool addTreeRecursive (SegmentMap::const_iterator root, const std::string &hook_name)
 

Private Attributes

unsigned int nrOfJoints
 
unsigned int nrOfSegments
 
std::string root_name
 
SegmentMap segments
 

Detailed Description

This class encapsulates a tree kinematic interconnection structure. It is built out of segments.

Definition at line 99 of file tree.hpp.

Constructor & Destructor Documentation

KDL::Tree::Tree ( const std::string &  root_name = "root")
explicit

The constructor of a tree, a new tree is always empty

Definition at line 28 of file tree.cpp.

KDL::Tree::Tree ( const Tree in)

Definition at line 34 of file tree.cpp.

virtual KDL::Tree::~Tree ( )
inlinevirtual

Definition at line 210 of file tree.hpp.

Member Function Documentation

bool KDL::Tree::addChain ( const Chain chain,
const std::string &  hook_name 
)

Adds a complete chain to the end of the segment with hook_name as segment_name.

Parameters
hook_namename of the segment to connect the chain with.
Returns
false if hook_name could not be found.

Definition at line 83 of file tree.cpp.

bool KDL::Tree::addSegment ( const Segment segment,
const std::string &  hook_name 
)

Adds a new segment to the end of the segment with hook_name as segment_name

Parameters
segmentnew segment to add
hook_namename of the segment to connect this segment with.
Returns
false if hook_name could not be found.

Definition at line 55 of file tree.cpp.

bool KDL::Tree::addTree ( const Tree tree,
const std::string &  hook_name 
)

Adds a complete tree to the end of the segment with hookname as segment_name.

Parameters
treeTree to add
hook_namename of the segment to connect the tree with
Returns
false if hook_name could not be found

Definition at line 94 of file tree.cpp.

bool KDL::Tree::addTreeRecursive ( SegmentMap::const_iterator  root,
const std::string &  hook_name 
)
private

Definition at line 98 of file tree.cpp.

bool KDL::Tree::getChain ( const std::string &  chain_root,
const std::string &  chain_tip,
Chain chain 
) const

Request the chain of the tree between chain_root and chain_tip. The chain_root and chain_tip can be in different branches of the tree, the chain_root can be an ancestor of chain_tip, and chain_tip can be an ancestor of chain_root.

Parameters
chain_rootthe name of the root segment of the chain
chain_tipthe name of the tip segment of the chain
chainthe resulting chain
Returns
success or failure

Definition at line 117 of file tree.cpp.

unsigned int KDL::Tree::getNrOfJoints ( ) const
inline

Request the total number of joints in the tree.
Important: It is not the same as the total number of segments since a segment does not need to have a joint.

Returns
total nr of joints

Definition at line 159 of file tree.hpp.

unsigned int KDL::Tree::getNrOfSegments ( ) const
inline

Request the total number of segments in the tree.

Returns
total number of segments

Definition at line 168 of file tree.hpp.

SegmentMap::const_iterator KDL::Tree::getRootSegment ( ) const
inline

Request the root segment of the tree

Returns
constant iterator pointing to the root segment

Definition at line 186 of file tree.hpp.

SegmentMap::const_iterator KDL::Tree::getSegment ( const std::string &  segment_name) const
inline

Request the segment of the tree with name segment_name.

Parameters
segment_namethe name of the requested segment
Returns
constant iterator pointing to the requested segment

Definition at line 177 of file tree.hpp.

const SegmentMap& KDL::Tree::getSegments ( ) const
inline

Definition at line 205 of file tree.hpp.

Tree & KDL::Tree::operator= ( const Tree arg)

Definition at line 44 of file tree.cpp.

Member Data Documentation

unsigned int KDL::Tree::nrOfJoints
private

Definition at line 103 of file tree.hpp.

unsigned int KDL::Tree::nrOfSegments
private

Definition at line 104 of file tree.hpp.

std::string KDL::Tree::root_name
private

Definition at line 106 of file tree.hpp.

SegmentMap KDL::Tree::segments
private

Definition at line 102 of file tree.hpp.


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


orocos_kdl
Author(s):
autogenerated on Sat Jun 15 2019 19:07:36