Go to the documentation of this file.
33 #ifdef KDL_USE_NEW_TREE_INTERFACE
34 #include <boost/shared_ptr.hpp>
35 #endif //#ifdef KDL_USE_NEW_TREE_INTERFACE
41 #ifdef KDL_USE_NEW_TREE_INTERFACE
44 typedef boost::shared_ptr<TreeElement> TreeElementPtr;
45 typedef boost::shared_ptr<const TreeElement> TreeElementConstPtr;
49 #define GetTreeElementChildren(tree_element) (tree_element)->children
50 #define GetTreeElementParent(tree_element) (tree_element)->parent
51 #define GetTreeElementQNr(tree_element) (tree_element)->q_nr
52 #define GetTreeElementSegment(tree_element) (tree_element)->segment
54 #else //#ifdef KDL_USE_NEW_TREE_INTERFACE
59 #define GetTreeElementChildren(tree_element) (tree_element).children
60 #define GetTreeElementParent(tree_element) (tree_element).parent
61 #define GetTreeElementQNr(tree_element) (tree_element).q_nr
62 #define GetTreeElementSegment(tree_element) (tree_element).segment
64 #endif //#ifdef KDL_USE_NEW_TREE_INTERFACE
69 TreeElement(
const Segment& segment_in,
const SegmentMap::const_iterator& parent_in,
unsigned int q_nr_in):
77 #ifdef KDL_USE_NEW_TREE_INTERFACE
79 #else //#define KDL_USE_NEW_TREE_INTERFACE
Tree(const std::string &root_name="root")
unsigned int getNrOfJoints() const
SegmentMap::const_iterator getRootSegment() const
bool addTreeRecursive(SegmentMap::const_iterator root, const std::string &hook_name)
SegmentMap::const_iterator parent
bool addChain(const Chain &chain, const std::string &hook_name)
const SegmentMap & getSegments() const
unsigned int getNrOfSegments() const
std::vector< SegmentMap::const_iterator > children
TreeElement TreeElementType
bool getSubTree(const std::string &segment_name, Tree &tree) const
This class encapsulates a tree kinematic interconnection structure. It is built out of segments.
TreeElement(const std::string &name)
std::map< std::string, TreeElement > SegmentMap
This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and a rigid body ine...
bool addSegment(const Segment &segment, const std::string &hook_name)
TreeElement(const Segment &segment_in, const SegmentMap::const_iterator &parent_in, unsigned int q_nr_in)
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 nrOfSegments
static TreeElementType Root(const std::string &root_name)
This class encapsulates a serial kinematic interconnection structure. It is built out of segments.
SegmentMap::const_iterator getSegment(const std::string &segment_name) const
Tree & operator=(const Tree &arg)