Represents multibody model as a bidirectional graph.
More...
#include <pinocchio/parsers/graph/model-graph.hpp>
|
| void | addBody (const std::string &vertex_name, const Inertia &inert) |
| | Add a new body to the graph.
|
| void | addFrame (const std::string &vertex_name, const FrameVariant &frame) |
| | Add a new vertex to the graph.
|
| void | addGeometries (const std::string &vertex_name, const std::vector< Geometry > &geoms) |
| void | addGeometry (const std::string &vertex_name, const Geometry &geom) |
| void | addJoint (const EdgeParameters ¶ms) |
| | Add edges (joint) to the graph. Since it's a bidirectional graph, edge and its reverse are added to the graph.
|
| void | addJoint (const std::string &joint_name, const JointVariant &joint, const std::string &source_body, const SE3 &source_to_joint, const std::string &target_body, const SE3 &joint_to_target) |
| | Add edges (joint) to the graph. Since it's a bidirectional graph, edge and its reverse are added to the graph.
|
| void | appendGraph (const ModelGraph &g) |
| | add all the vertex and edges from a graph to this one. Attention : it does not add an edge between the two, so it will be like having two graph coexisting in this structure.
|
| EdgeBuilder | edgeBuilder () |
| | Create an EdgeBuilde. This will allow to use EdgeBuilder interface to have a more flexible edge configuration.
|
| GeometryBuilder | geometryBuilder () |
|
| Graph | graph |
| | Boost graph structure that holds the graph structure.
|
| std::unordered_map< std::string, VertexDesc > | name_to_vertex |
| | Name of the vertexes in the graph. Useful for graph parcours.
|
Represents multibody model as a bidirectional graph.
This is an intermediate step before creating a model, that allows more flexibility as to which body will be the root...
Definition at line 91 of file model-graph.hpp.
◆ EdgeDesc
| typedef boost::graph_traits<Graph>::edge_descriptor EdgeDesc |
◆ Graph
◆ VertexDesc
| typedef boost::graph_traits<Graph>::vertex_descriptor VertexDesc |
◆ addBody()
| void addBody | ( | const std::string & | vertex_name, |
| | const Inertia & | inert ) |
Add a new body to the graph.
- Parameters
| [in] | vertex_name | Name of the vertex |
| [in] | inert | inertia of the body |
◆ addFrame()
| void addFrame | ( | const std::string & | vertex_name, |
| | const FrameVariant & | frame ) |
Add a new vertex to the graph.
- Parameters
| [in] | vertex_name | Name of the vertex |
| [in] | frame | which type of frame will be added to the model (op_frame, sensor, body) |
◆ addJoint() [1/2]
Add edges (joint) to the graph. Since it's a bidirectional graph, edge and its reverse are added to the graph.
- Parameters
| [in] | params | Structure that holds all of the joint parameters |
- Note
- Since it's a bidirectional graph, two edges are added to the graph. Joints and transformation are inverted, to create reverse edge.
◆ addJoint() [2/2]
| void addJoint | ( | const std::string & | joint_name, |
| | const JointVariant & | joint, |
| | const std::string & | source_body, |
| | const SE3 & | source_to_joint, |
| | const std::string & | target_body, |
| | const SE3 & | joint_to_target ) |
Add edges (joint) to the graph. Since it's a bidirectional graph, edge and its reverse are added to the graph.
- Parameters
| [in] | joint_name | Name of the edge |
| [in] | joint | Type of the joint |
| [in] | source_body | Vertex that is supporting the edge |
| [in] | source_to_joint | Transformation from supporting vertex to edge |
| [in] | target_body | Vertex that is supported by edge |
| [in] | joint_to_target | Transformation from edge to supported vertex |
- Note
- Since it's a bidirectional graph, two edges are added to the graph. Joints and transformation are inverted, to create reverse edge.
◆ appendGraph()
add all the vertex and edges from a graph to this one. Attention : it does not add an edge between the two, so it will be like having two graph coexisting in this structure.
- Parameters
| g | graph that will be added |
◆ graph
Boost graph structure that holds the graph structure.
Definition at line 158 of file model-graph.hpp.
◆ name_to_vertex
| std::unordered_map<std::string, VertexDesc> name_to_vertex |
Name of the vertexes in the graph. Useful for graph parcours.
Definition at line 160 of file model-graph.hpp.
The documentation for this struct was generated from the following file: