diff --git a/urdf/include/urdf/model.h b/urdf/include/urdf/model.h index 8a3fe37..c54ba52 100644 --- a/urdf/include/urdf/model.h +++ b/urdf/include/urdf/model.h @@ -52,9 +52,13 @@ class Model public: Model(); + /// \brief Load Model from TiXMLElement bool initXml(TiXmlElement *xml); + /// \brief Load Model from TiXMLDocument bool initXml(TiXmlDocument *xml); + /// \brief Load Model given a filename bool initFile(const std::string& filename); + /// \brief Load Model from a XML-string bool initString(const std::string& xmlstring); boost::shared_ptr getRoot(void) const{return this->root_link_;}; @@ -64,18 +68,20 @@ public: void getLinks(std::vector >& links) const; - /// Some accessor functions + /// \brief get parent Link of a Link given name boost::shared_ptr getParentLink(const std::string& name) const; + /// \brief get parent Joint of a Link given name boost::shared_ptr getParentJoint(const std::string& name) const; + /// \brief get child Link of a Link given name boost::shared_ptr getChildLink(const std::string& name) const; + /// \brief get child Joint of a Link given name boost::shared_ptr getChildJoint(const std::string& name) const; - /// Every Robot Description File can be described as a - /// list of Links and Joints - /// The connection between links(nodes) and joints(edges) - /// should define a tree (i.e. 1 parent link, 0+ children links) + /// \brief complete list of Links std::map > links_; + /// \brief complete list of Joints std::map > joints_; + /// \brief complete list of Materials std::map > materials_; private: diff --git a/urdf/mainpage.dox b/urdf/mainpage.dox index 6b3d3b1..05db9ca 100644 --- a/urdf/mainpage.dox +++ b/urdf/mainpage.dox @@ -2,58 +2,11 @@ \mainpage \htmlinclude manifest.html -\b robot_model is ... - - - -\li RobotModel is a class containing robot model data structure. - -\li Below is an example Robot Description Describing a Parent Link "P", a Child Link "C", and a Joint "J" - -\li OLD URDF: - @verbatim - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @endverbatim -\li NEW URDF XML that corresponds to the current RobotModel data structure: +URDF is a class containing robot model data structure. +Every Robot Description File can be described as a list of Links and Joints. +The connection between links(nodes) and joints(edges) should define a tree (i.e. 1 parent link, 0+ children links). +Below is an example Robot Description Describing a Parent Link 'P', a Child Link 'C', and a Joint 'J' +\li NEW URDF XML that corresponds to the current URDF data structure: @verbatim @@ -105,20 +58,19 @@ You can then link to this documentation page from the Wiki. \section codeapi Code API +The URDF parser API contains the following methods: + \li Parse from XML: urdf::Model::initXml + \li Parse from File: urdf::Model::initFile + \li Parse from String: urdf::Model::initString + \li Get Root Link: urdf::Model::getRoot + \li Get Link by name urdf::Model::getLink + \li Get all Link's urdf::Model::getLinks + \li Get Joint by name urdf::Model::getJoint + \li etc. + - \section rosapi ROS API -