#include <KdlTreeUtilities.h>
Public Member Functions | |
virtual void | addSegment (const KDL::Segment &segment, const std::string &hookName) |
adds a segment to the tree | |
virtual std::string | getBaseName () const |
get base of tree. Virtual so derived classes can publish a different base if desired. | |
virtual bool | getChain (const std::string &baseFrame, const std::string &toolFrame, KDL::Chain &chain) const |
get chain from baseFrame to toolFrame. Virtual so derived classes can manipulate the chain if desired. | |
void | getChainJointNames (const KDL::Chain &chain, std::vector< std::string > &jointNames) const |
get joint names in chain. | |
virtual void | getChainJointNames (const std::string &toolFrame, std::vector< std::string > &jointNames) const |
get joint names in chain from base to toolFrame. Virtual so derived classes can manipulate the published names if desired. | |
virtual void | getChainJointNames (const std::string &baseFrame, const std::string &toolFrame, std::vector< std::string > &jointNames) const |
get joint names in chain from baseFrame to toolFrame. Virtual so derived classes can manipulate the published names if desired. | |
virtual unsigned int | getJointCount () const |
get joint count of tree. Virtual so derived classes can publish a different number if desired. | |
virtual void | getJointNames (std::vector< std::string > &jointNames) const |
get joint names in tree. Virtual so derived classes can manipulate the published names if desired. | |
bool | hasSegment (const std::string &segName) const |
KdlTreeUtilities () | |
virtual bool | removeSegment (const std::string &segName) |
removes a segment and all its children from the tree | |
bool | removeSegRecursive (KDL::Tree &tree, KDL::SegmentMap::const_iterator root, const std::string &hook_name, const std::string &seg_remove_name) |
~KdlTreeUtilities () |
Definition at line 8 of file KdlTreeUtilities.h.
Definition at line 3 of file KdlTreeUtilities.cpp.
Definition at line 7 of file KdlTreeUtilities.cpp.
void KdlTreeUtilities::addSegment | ( | const KDL::Segment & | segment, |
const std::string & | hookName | ||
) | [virtual] |
adds a segment to the tree
segment | The segment to add |
hookName | The reference (parent) frame to add the segment to |
std::runtime_error | if a segment with the same name has already been added |
std::runtime_error | if hookName does not exist in the current tree |
Definition at line 86 of file KdlTreeUtilities.cpp.
virtual std::string KdlTreeUtilities::getBaseName | ( | ) | const [inline, virtual] |
get base of tree. Virtual so derived classes can publish a different base if desired.
Reimplemented in MobileTreeIk.
Definition at line 17 of file KdlTreeUtilities.h.
bool KdlTreeUtilities::getChain | ( | const std::string & | baseFrame, |
const std::string & | toolFrame, | ||
KDL::Chain & | chain | ||
) | const [virtual] |
get chain from baseFrame to toolFrame. Virtual so derived classes can manipulate the chain if desired.
Definition at line 70 of file KdlTreeUtilities.cpp.
void KdlTreeUtilities::getChainJointNames | ( | const KDL::Chain & | chain, |
std::vector< std::string > & | jointNames | ||
) | const |
get joint names in chain.
Definition at line 11 of file KdlTreeUtilities.cpp.
void KdlTreeUtilities::getChainJointNames | ( | const std::string & | toolFrame, |
std::vector< std::string > & | jointNames | ||
) | const [virtual] |
get joint names in chain from base to toolFrame. Virtual so derived classes can manipulate the published names if desired.
Definition at line 31 of file KdlTreeUtilities.cpp.
void KdlTreeUtilities::getChainJointNames | ( | const std::string & | baseFrame, |
const std::string & | toolFrame, | ||
std::vector< std::string > & | jointNames | ||
) | const [virtual] |
get joint names in chain from baseFrame to toolFrame. Virtual so derived classes can manipulate the published names if desired.
Definition at line 37 of file KdlTreeUtilities.cpp.
virtual unsigned int KdlTreeUtilities::getJointCount | ( | ) | const [inline, virtual] |
get joint count of tree. Virtual so derived classes can publish a different number if desired.
Reimplemented in MobileTreeIk.
Definition at line 29 of file KdlTreeUtilities.h.
void KdlTreeUtilities::getJointNames | ( | std::vector< std::string > & | jointNames | ) | const [virtual] |
get joint names in tree. Virtual so derived classes can manipulate the published names if desired.
Reimplemented in MobileTreeIk.
Definition at line 51 of file KdlTreeUtilities.cpp.
bool KdlTreeUtilities::hasSegment | ( | const std::string & | segName | ) | const [inline] |
Definition at line 53 of file KdlTreeUtilities.h.
bool KdlTreeUtilities::removeSegment | ( | const std::string & | segName | ) | [virtual] |
removes a segment and all its children from the tree
segName | The name of the segment to remove |
Definition at line 111 of file KdlTreeUtilities.cpp.
bool KdlTreeUtilities::removeSegRecursive | ( | KDL::Tree & | tree, |
KDL::SegmentMap::const_iterator | root, | ||
const std::string & | hook_name, | ||
const std::string & | seg_remove_name | ||
) |
Definition at line 119 of file KdlTreeUtilities.cpp.