41 #include <kdl/chainfksolverpos_recursive.hpp> 42 #include <kdl/frames_io.hpp> 43 #include <urdf_model/model.h> 44 #include <urdf_parser/urdf_parser.h> 46 void printLink(
const KDL::SegmentMap::const_iterator & link,
const std::string & prefix)
56 int main(
int argc,
char ** argv)
59 std::cerr <<
"Expect xml file to parse" << std::endl;
62 urdf::ModelInterfaceSharedPtr robot_model = urdf::parseURDFFile(argv[1]);
64 std::cerr <<
"Could not generate robot model" << std::endl;
70 std::cerr <<
"Could not extract kdl tree" << std::endl;
75 std::cout <<
" ======================================" << std::endl;
76 std::cout <<
" Tree has " << my_tree.
getNrOfSegments() <<
" link(s) and a root link" << std::endl;
77 std::cout <<
" ======================================" << std::endl;
#define GetTreeElementSegment(tree_element)
SegmentMap::const_iterator getRootSegment() const
KDL_PARSER_PUBLIC bool treeFromUrdfModel(const urdf::ModelInterface &robot_model, KDL::Tree &tree)
unsigned int getNrOfSegments() const
#define GetTreeElementChildren(tree_element)
int main(int argc, char **argv)
void printLink(const KDL::SegmentMap::const_iterator &link, const std::string &prefix)