Commit 3f30814a by Justin Carpentier Committed by GitHub

### Merge pull request #521 from nim65s/topic/doc-v2

`[Doc] Implementation of doc/outline.txt, fix #514`
parents 1e7ca61d de574cce
Pipeline #1512 passed with stage
in 111 minutes and 57 seconds
 ... ... @@ -574,4 +574,4 @@ INCLUDE_PATH = @PROJECT_SOURCE_DIR@/src TAGFILES = EXAMPLE_PATH = @PROJECT_SOURCE_DIR@/examples
 # Spatial Algebra module
 # Model and data TODO: just explain the concept of model and data and what they contain. The explanation on how to build and/or load a model is delayed to the two following pages (explicitely say so from the start). Just use buildModels::humanoidSimple(model) in the snippets [pending v2.0]
 # Joints TODO: Or: Building the model: joints and bodies. Maybe merge this section with previous one? @nmansard : I prefer this way of separing models of joint models.
 # Dealing with Lie group geometry
 # Kinematic algorithms
 # Dynamc algorithms
 # Operational frames TODO: as frames are not necessary to understand the previous sections, it could be a good idea to treat them separately. Introduce them here together with the related algorithms.
 # Geometric models TODO: with related algos
 # Analytical derivatives
 # Automatic differenctiation and source code generation
 # Python bindings
 # Unit tests
 # Geometry ## Special Euclidian Group ## Direct Geometry ## Inverse Geometry
 # Kinematics ## Direct Kinematics ## Inverse Kinematics
 # Loading the model ## Python \include a-model.py ## C++ \include a-model.cpp
 # Computing the dynamics RNEA, bias forces b(q,v), gravity g(q), CRBA M(q) ## Python \include b-dynamics.py ## C++ \include b-dynamics.cpp
 # Contact dynamics ## Python \include c-contact.py ## C++ \include c-contact.cpp
 # Loading and displaying the model ## Python \include d-display.py ## C++ \include d-display.cpp
 # Collision detection and distances ## Python \include e-collisions.py ## C++ \include e-collisions.cpp
 # Derivatives of the dynamics (with finite diff checking) ## Python \include f-derivatives.py ## C++ \include f-derivatives.cpp
 # Code generation ## Python \include g-code-generation.py ## C++ \include g-code-generation.cpp
 # Inverse geometry ## Python \include h-inverse-geometry.py ## C++ \include h-inverse-geometry.cpp
 # Inverse kinematics (clik) ## Python \include i-inverse-kinematics.py ## C++ \include i-inverse-kinematics.cpp
 # Examples
 # Task space inverse dynamics ## Python \include j-tsid.py ## C++ \include j-tsid.cpp
 # QP (normal forces) unilateral contact dynamics (if we can write it concise enough) ## Python \include k-qp.py ## C++ \include k-qp.cpp
 # Posture generation using derivatives (if we can write it concise enough) ## Python \include l-postures.py ## C++ \include l-postures.cpp
 # A RRT planner for a robot arm (if we can write it concise enough) ## Python \include m-rrt.py ## C++ \include m-rrt.cpp
 # A RL tensorflow example (if we can write it concise enough) ## Python \include n-rl.py ## C++ \include n-rl.cpp
 # Creating models Here you can find the differents ways to create a model ( simple models, python/lua/urdf loading, Joint after Joint) ## Introduction In Pinocchio you can create Models in many ways. We have built-in parsers for different kind of format ( urdf, python, Lua) but you can also create a Model from scratch and fill it with the Joints you want. ## Supported formats ### Format urdf To load an urdf file in C++ code, copy the following lines: ```cpp #include #include bool verbose = false; const std::string filename = "path/to/file/model.urdf"; se3::Model model se3::urdf::buildModel (filename, model, verbose); se3::Data data (model); ``` ### Format Python To load a python file in C++ code, copy the following lines: ```cpp #include "pinocchio/multibody/model.hpp" #include "pinocchio/parsers/python.hpp" bool verbose = false; const std::string filename = "path/to/file/model.py"; const std::string model_name = "python_variable_name_in_filename" se3::Model model = se3::python::buildModel(filename, model_name, verbose); se3::Data data (model); ``` ### Format lua To load an lua file in C++ code, copy the following lines: ```cpp #include #include bool verbose = false; bool freeflyer = true; const std::string filename = "path/to/file/model.lua"; se3::Model model = se3::lua::buildModel (filename, freeflyer, verbose); se3::Data data (model); ```
 # Usage
 # Overview ## Rigid Dynamics ## Joint Dynamics ## Articulated Dynamics ## Algorithms
 # Rigid Bodies ## Geometry ## Kinematics ## Dynamics
 # Joint dynamics ## Geometry ## Configuration Space ## Kinematics ## Tangent Space ## List of Joints
 # Articulated Dynamics ## Kinematic Tree ## Configuration and Velocity ## Geometry ## Kinematics and Jacobian ## Inverse and Direct Dynamics
 # Collision volumes
 # Going further ## Templatization ## Auto-differenciation ## Code Generation
 # Main algorithm TODO: list taken from SII
 # Direct Geometry ## Load the robot ```py from pinocchio.robot_wrapper import RobotWrapper from os.path import join PKG = '/opt/openrobots/share' URDF = join(PKG, 'ur5_description/urdf/ur5_gripper.urdf'@ robot = RobotWrapper(URDF, [PKG]) ``` ## Visualize the model launch `gepetto-gui`, and then ```py robot.initDisplay(loadModel=True)