41 #include <kdl/chainfksolverpos_recursive.hpp> 42 #include <kdl/frames_io.hpp> 45 void printLink(
const KDL::SegmentMap::const_iterator & link,
const std::string & prefix)
55 int main(
int argc,
char ** argv)
58 std::cerr <<
"Expect xml file to parse" << std::endl;
62 if (!robot_model.
initFile(argv[1])) {
63 std::cerr <<
"Could not generate robot model" << std::endl;
69 std::cerr <<
"Could not extract kdl tree" << std::endl;
74 std::cout <<
" ======================================" << std::endl;
75 std::cout <<
" Tree has " << my_tree.
getNrOfSegments() <<
" link(s) and a root link" << std::endl;
76 std::cout <<
" ======================================" << std::endl;
URDF_EXPORT bool initFile(const std::string &filename)
#define GetTreeElementSegment(tree_element)
KDL_PARSER_PUBLIC bool treeFromUrdfModel(const urdf::ModelInterface &robot_model, KDL::Tree &tree)
#define GetTreeElementChildren(tree_element)
int main(int argc, char **argv)
void printLink(const KDL::SegmentMap::const_iterator &link, const std::string &prefix)
SegmentMap::const_iterator getRootSegment() const
unsigned int getNrOfSegments() const