The graph which contains all information taken from the mjcf file. More...
#include <pinocchio/parsers/mjcf/mjcf-graph.hpp>

| Public Types | |
| typedef std::unordered_map< std::string, MjcfBody > | BodyMap_t | 
| typedef std::unordered_map< std::string, MjcfClass > | ClassMap_t | 
| typedef std::unordered_map< std::string, Eigen::VectorXd > | ConfigMap_t | 
| typedef std::map< std::string, MjcfEquality > | EqualityMap_t | 
| typedef std::unordered_map< std::string, MjcfMaterial > | MaterialMap_t | 
| typedef std::unordered_map< std::string, MjcfMesh > | MeshMap_t | 
| typedef boost::property_tree::ptree | ptree | 
| typedef std::unordered_map< std::string, MjcfTexture > | TextureMap_t | 
| typedef std::vector< std::string > | VectorOfStrings | 
| Public Member Functions | |
| MjcfGraph (UrdfVisitor &urdfVisitor, const std::string &modelPath) | |
| graph constructor | |
| void | addKeyFrame (const Eigen::VectorXd &keyframe, const std::string &keyName) | 
| Add a keyframe to the model (ie reference configuration) | |
| void | addSoloJoint (const MjcfJoint &jointInfo, const MjcfBody ¤tBody, SE3 &bodyInJoint) | 
| Add a joint to the model. only needed when a body has a solo joint child. | |
| Inertia | convertInertiaFromMjcf (const ptree &el) const | 
| Convert Inertia of an mjcf element into Inertia model of pinocchio. | |
| SE3 | convertPosition (const ptree &el) const | 
| Convert pose of an mjcf element into SE3. | |
| template<typename TypeX , typename TypeY , typename TypeZ , typename TypeUnaligned > | |
| JointModel | createJoint (const Eigen::Vector3d &axis) | 
| Create a joint to add to the joint composite if needed. | |
| void | fillModel (const std::string &nameOfBody) | 
| Use all the infos that were parsed from the xml file to add a body and joint to the model. | |
| void | fillReferenceConfig (const MjcfBody ¤tBody) | 
| Fill reference configuration for a body and all it's associated dof. | |
| void | parseAsset (const ptree &el) | 
| Parse all the info from the meta tag asset (mesh, material, texture) | |
| void | parseCompiler (const ptree &el) | 
| Parse all the info from the compile node into compilerInfo. | |
| void | parseContactInformation (const Model &model, PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) &contact_models) | 
| Parse the equality constraints and add them to the model. | |
| void | parseDefault (ptree &el, const ptree &parent, const std::string &parentTag) | 
| Go through the default part of the file and get all the class name. Fill the mapOfDefault for later use. | |
| void | parseEquality (const ptree &el) | 
| Parse all the info from the equality tag. | |
| void | parseGeomTree (const GeometryType &type, GeometryModel &geomModel, ::hpp::fcl::MeshLoaderPtr &meshLoader) | 
| Fill geometry model with all the info taken from the mjcf model file. | |
| void | parseGraph () | 
| parse the mjcf file into a graph | |
| void | parseGraphFromXML (const std::string &xmlStr) | 
| parse the mjcf file into a graph | |
| void | parseJointAndBody (const ptree &el, const boost::optional< std::string > &childClass, const std::string &parentName="") | 
| Go through the main body of the mjcf file "worldbody" to get all the info ready to create the model. | |
| void | parseKeyFrame (const ptree &el) | 
| Parse all the info from the meta tag keyframe. | |
| void | parseMaterial (const ptree &el) | 
| Parse all the info from a material node. | |
| void | parseMesh (const ptree &el) | 
| Parse all the info from a mesh node. | |
| void | parseRootTree () | 
| Fill the pinocchio model with all the infos from the graph. | |
| void | parseTexture (const ptree &el) | 
| Parse all the info from a texture node. | |
| Public Attributes | |
| VectorOfStrings | bodiesList | 
| MjcfCompiler | compilerInfo | 
| BodyMap_t | mapOfBodies | 
| ClassMap_t | mapOfClasses | 
| ConfigMap_t | mapOfConfigs | 
| EqualityMap_t | mapOfEqualities | 
| MaterialMap_t | mapOfMaterials | 
| MeshMap_t | mapOfMeshes | 
| TextureMap_t | mapOfTextures | 
| std::string | modelName | 
| std::string | modelPath | 
| ptree | pt | 
| Eigen::VectorXd | referenceConfig | 
The graph which contains all information taken from the mjcf file.
Definition at line 381 of file mjcf-graph.hpp.
Definition at line 386 of file mjcf-graph.hpp.
Definition at line 387 of file mjcf-graph.hpp.
| typedef std::unordered_map<std::string, Eigen::VectorXd> ConfigMap_t | 
Definition at line 391 of file mjcf-graph.hpp.
| typedef std::map<std::string, MjcfEquality> EqualityMap_t | 
Definition at line 392 of file mjcf-graph.hpp.
| typedef std::unordered_map<std::string, MjcfMaterial> MaterialMap_t | 
Definition at line 388 of file mjcf-graph.hpp.
Definition at line 389 of file mjcf-graph.hpp.
| typedef boost::property_tree::ptree ptree | 
Definition at line 384 of file mjcf-graph.hpp.
| typedef std::unordered_map<std::string, MjcfTexture> TextureMap_t | 
Definition at line 390 of file mjcf-graph.hpp.
| typedef std::vector<std::string> VectorOfStrings | 
Definition at line 385 of file mjcf-graph.hpp.
Add a keyframe to the model (ie reference configuration)
| keyframe | Keyframe to add | 
| keyName | Name of the keyframe | 
Add a joint to the model. only needed when a body has a solo joint child.
| jointInfo | The joint to add to the tree | 
| currentBody | The body associated with the joint | 
| bodyInJoint | Position of the body wrt to its joint | 
| Inertia convertInertiaFromMjcf | ( | const ptree & | el | ) | const | 
Convert Inertia of an mjcf element into Inertia model of pinocchio.
| el | ptree element with all the inertial information | 
| SE3 convertPosition | ( | const ptree & | el | ) | const | 
Convert pose of an mjcf element into SE3.
| el | ptree element with all the pose element | 
| JointModel createJoint | ( | const Eigen::Vector3d & | axis | ) | 
Create a joint to add to the joint composite if needed.
| TypeX | joint with axis X | 
| TypeY | joint with axis Y | 
| TypeZ | joint with axis Z | 
| TypeUnaligned | joint with axis unaligned | 
| axis | axis of the joint | 
Use all the infos that were parsed from the xml file to add a body and joint to the model.
| nameOfBody | Name of the body to add | 
Fill reference configuration for a body and all it's associated dof.
| currentBody | body to check | 
Parse all the info from the meta tag asset (mesh, material, texture)
| el | ptree texture node | 
Parse all the info from the compile node into compilerInfo.
| el | ptree compile node | 
| void parseContactInformation | ( | const Model & | model, | 
| PINOCCHIO_STD_VECTOR_WITH_EIGEN_ALLOCATOR(RigidConstraintModel) & | contact_models | ||
| ) | 
Parse the equality constraints and add them to the model.
| model | Model to add the constraints to | 
| contact_models | Vector of contact models to add the constraints to | 
Go through the default part of the file and get all the class name. Fill the mapOfDefault for later use.
| el | ptree element. Root of the default | 
Parse all the info from the equality tag.
| el | ptree equality node | 
| void parseGeomTree | ( | const GeometryType & | type, | 
| GeometryModel & | geomModel, | ||
| ::hpp::fcl::MeshLoaderPtr & | meshLoader | ||
| ) | 
Fill geometry model with all the info taken from the mjcf model file.
| type | Type of geometry to parse (COLLISION or VISUAL) | 
| geomModel | geometry model to fill | 
| meshLoader | mesh loader from hpp::fcl | 
parse the mjcf file into a graph
| xmlStr | xml file name | 
| void parseJointAndBody | ( | const ptree & | el, | 
| const boost::optional< std::string > & | childClass, | ||
| const std::string & | parentName = "" | ||
| ) | 
Go through the main body of the mjcf file "worldbody" to get all the info ready to create the model.
| el | root of the tree | 
| parentName | name of the parentBody in the robot tree | 
Parse all the info from the meta tag keyframe.
| el | ptree keyframe node | 
Parse all the info from a material node.
| el | ptree material node | 
Parse all the info from a mesh node.
| el | ptree mesh node | 
Parse all the info from a texture node.
| el | ptree texture node | 
| VectorOfStrings bodiesList | 
Definition at line 418 of file mjcf-graph.hpp.
| MjcfCompiler compilerInfo | 
Definition at line 395 of file mjcf-graph.hpp.
| BodyMap_t mapOfBodies | 
Definition at line 399 of file mjcf-graph.hpp.
| ClassMap_t mapOfClasses | 
Definition at line 397 of file mjcf-graph.hpp.
| ConfigMap_t mapOfConfigs | 
Definition at line 407 of file mjcf-graph.hpp.
| EqualityMap_t mapOfEqualities | 
Definition at line 409 of file mjcf-graph.hpp.
| MaterialMap_t mapOfMaterials | 
Definition at line 401 of file mjcf-graph.hpp.
| MeshMap_t mapOfMeshes | 
Definition at line 403 of file mjcf-graph.hpp.
| TextureMap_t mapOfTextures | 
Definition at line 405 of file mjcf-graph.hpp.
| std::string modelName | 
Definition at line 421 of file mjcf-graph.hpp.
| std::string modelPath | 
Definition at line 422 of file mjcf-graph.hpp.
| ptree pt | 
Definition at line 415 of file mjcf-graph.hpp.
| Eigen::VectorXd referenceConfig | 
Definition at line 412 of file mjcf-graph.hpp.