Blender  V3.3
Public Member Functions | List of all members
KDL::Tree Class Reference

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

#include <tree.hpp>

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
 
SegmentMap::value_type const * getSegmentPtr (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 67 of file tree.hpp.

Constructor & Destructor Documentation

◆ Tree() [1/2]

KDL::Tree::Tree ( )

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

Definition at line 30 of file tree.cpp.

◆ Tree() [2/2]

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

Definition at line 37 of file tree.cpp.

References addTree().

◆ ~Tree()

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

Definition at line 169 of file tree.hpp.

Member Function Documentation

◆ addChain()

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 83 of file tree.cpp.

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

◆ addSegment()

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 59 of file tree.cpp.

Referenced by addChain(), and iTaSC::Armature::addSegment().

◆ addTree()

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 98 of file tree.cpp.

References tree.

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

◆ getNrOfJoints()

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

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

◆ getNrOfSegments()

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

Request the total number of segments in the tree.

Returns
total number of segments

Definition at line 140 of file tree.hpp.

◆ getSegment()

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

Referenced by iTaSC::Armature::addConstraint(), iTaSC::Armature::addLimitConstraint(), and iTaSC::Armature::getSegment().

◆ getSegmentPtr()

SegmentMap::value_type const* KDL::Tree::getSegmentPtr ( const std::string &  segment_name) const
inline

◆ getSegments()

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

◆ operator=()

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

Definition at line 48 of file tree.cpp.

References addTree().


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