Blender V2.61 - r43446

KDL::Tree Class Reference

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

#include <tree.hpp>

List of all members.

Public Member Functions

 Tree ()
 Tree (const Tree &in)
Treeoperator= (const Tree &arg)
bool addSegment (const Segment &segment, const std::string &segment_name, const std::string &hook_name)
bool addChain (const Chain &chain, const std::string &chain_name, const std::string &hook_name)
bool addTree (const Tree &tree, const std::string &tree_name, const std::string &hook_name)
unsigned int getNrOfJoints () const
unsigned int getNrOfSegments () const
SegmentMap::const_iterator getSegment (const std::string &segment_name) const
const SegmentMapgetSegments () const
virtual ~Tree ()

Detailed Description

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

Definition at line 72 of file tree.hpp.


Constructor & Destructor Documentation

KDL::Tree::Tree ( )

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

Definition at line 30 of file tree.cpp.

References KDL::TreeElement::Root().

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

Definition at line 35 of file tree.cpp.

References addTree(), and KDL::TreeElement::Root().

virtual KDL::Tree::~Tree ( ) [inline, virtual]

Definition at line 166 of file tree.hpp.


Member Function Documentation

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

Adds a complete chain to the end of the segment with hook_name as segment_name. Segment i of the chain will get chain_name+".Segment"+i as segment_name.

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

Definition at line 77 of file tree.cpp.

References addSegment(), KDL::Chain::getNrOfSegments(), KDL::Chain::getSegment(), and i.

bool KDL::Tree::addSegment ( const Segment segment,
const std::string &  segment_name,
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
segment_namename of the new segment
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.

References KDL::Segment::getJoint(), and KDL::Joint::getNDof().

Referenced by addChain().

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

Adds a complete tree to the end of the segment with hookname as segment_name. The segments of the tree will get tree_name+segment_name as segment_name.

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

Definition at line 92 of file tree.cpp.

References getSegment().

Referenced by operator=(), and Tree().

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 136 of file tree.hpp.

Referenced by KDL::TreeFkSolverPos_recursive::JntToCart(), and KDL::TreeJntToJacSolver::JntToJac().

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

Request the total number of segments in the tree.

Returns:
total number of segments

Definition at line 145 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 154 of file tree.hpp.

Referenced by iTaSC::addLimitConstraint(), addTree(), KDL::TreeFkSolverPos_recursive::JntToCart(), and KDL::operator<<().

const SegmentMap& KDL::Tree::getSegments ( ) const [inline]
Tree & KDL::Tree::operator= ( const Tree arg)

Definition at line 45 of file tree.cpp.

References addTree(), and KDL::TreeElement::Root().


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