This class encapsulates a tree kinematic interconnection structure. It is built out of segments.
More...
#include <tree.hpp>
This class encapsulates a tree kinematic interconnection structure. It is built out of segments.
◆ Tree() [1/2]
| KDL::Tree::Tree |
( |
const std::string & | root_name = "root" | ) |
|
|
explicit |
The constructor of a tree, a new tree is always empty
◆ Tree() [2/2]
| KDL::Tree::Tree |
( |
const Tree & | in | ) |
|
◆ ~Tree()
| virtual KDL::Tree::~Tree |
( |
| ) |
|
|
inlinevirtual |
◆ addChain()
| 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_name | name of the segment to connect the chain with. |
- Returns
- false if hook_name could not be found.
◆ addSegment()
| 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
-
| segment | new segment to add |
| hook_name | name of the segment to connect this segment with. |
- Returns
- false if hook_name could not be found.
◆ addTree()
| 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
-
| tree | Tree to add |
| hook_name | name of the segment to connect the tree with |
- Returns
- false if hook_name could not be found
◆ getChain()
| 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_root | the name of the root segment of the chain |
| chain_tip | the name of the tip segment of the chain |
| chain | the resulting chain |
- Returns
- success or failure
◆ 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
◆ getNrOfSegments()
| unsigned int KDL::Tree::getNrOfSegments |
( |
| ) |
const |
|
inline |
Request the total number of segments in the tree.
- Returns
- total number of segments
◆ getRootSegment()
| SegmentMap::const_iterator KDL::Tree::getRootSegment |
( |
| ) |
const |
|
inline |
Request the root segment of the tree
- Returns
- constant iterator pointing to the root segment
◆ 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_name | the name of the requested segment |
- Returns
- constant iterator pointing to the requested segment
◆ getSegments()
| const SegmentMap & KDL::Tree::getSegments |
( |
| ) |
const |
|
inline |
◆ getSubTree()
| bool KDL::Tree::getSubTree |
( |
const std::string & | segment_name, |
|
|
Tree & | tree ) const |
Extract a tree having segment_name as root. Only child segments of segment_name are added to the new tree.
- Parameters
-
| segment_name | the name of the segment to be used as root of the new tree |
| tree | the resulting sub-tree |
- Returns
- success or failure
◆ operator=()
| Tree & KDL::Tree::operator= |
( |
const Tree & | arg | ) |
|
The documentation for this class was generated from the following file:
- build/orocos_kdl_install/include/kdl/tree.hpp