Verified Commit 94e7d07d authored by Justin Carpentier's avatar Justin Carpentier
Browse files

doc: fix compilation rules for Pinocchio examples

parent 0a8d482f
...@@ -67,11 +67,7 @@ We start with a simple program to compute the robot inverse dynamics. It is give ...@@ -67,11 +67,7 @@ We start with a simple program to compute the robot inverse dynamics. It is give
You can compile the C++ version by including Pinocchio and Eigen header directories. You can compile the C++ version by including Pinocchio and Eigen header directories.
\code g++ -std=c++11 $(pkg-config --cflags --libs pinocchio) overview-simple.cpp -o overview-simple \endcode \code g++ -std=c++11 overview-simple.cpp -o overview-simple $(pkg-config --cflags --libs pinocchio) \endcode
where `/path/to/pinocchio` is your chosen installation directory for Pinocchio.
If you do not know Eigen's installation path, you can retrive it with `pkg-config --cflags eigen3`.
On Linux, it will usually be something like `/usr/include/eigen3/`.
Once your code is compiled, you might then run it using Once your code is compiled, you might then run it using
...@@ -138,7 +134,7 @@ in Python. ...@@ -138,7 +134,7 @@ in Python.
In similar way than the previous example, you simple need to do: In similar way than the previous example, you simple need to do:
\code g++ -std=c++11 $(pkg-config --cflags --libs pinocchio) overview-urdf.cpp -o overview-urdf \endcode \code g++ -std=c++11 overview-urdf.cpp -o overview-urdf $(pkg-config --cflags --libs pinocchio) \endcode
The program typically runs with a UR5 URDF description, that can be found for example in this repository https://github.com/humanoid-path-planner/ur_description The program typically runs with a UR5 URDF description, that can be found for example in this repository https://github.com/humanoid-path-planner/ur_description
......
...@@ -4,15 +4,15 @@ This directory contains minimal examples on how to use **Pinocchio** with the Py ...@@ -4,15 +4,15 @@ This directory contains minimal examples on how to use **Pinocchio** with the Py
## Loading a model ## Loading a model
- Loading an embeded Model: `python -i overview-simple.py` and in C++ `g++ -I $(pkg-config --cflags pinocchio) -g overview-simple.cpp -o overview-simple && ./overview-simple` - Loading an embeded Model: `python -i overview-simple.py` and in C++ `g++ overview-simple.cpp -o overview-simple $(pkg-config --cflags --libs pinocchio) && ./overview-simple`
- Loading a URDF model: `python -i overview-urdf.py` and in C++ `g++ -I $(pkg-config --cflags pinocchio) -g overview-urdf.cpp -o overview-urdf && ./overview-urdf` - Loading a URDF model: `python -i overview-urdf.py` and in C++ `g++ -g overview-urdf.cpp -o overview-urdf $(pkg-config --cflags --libs pinocchio) && ./overview-urdf`
- Using RobotWrapper to encapsulate a URDF model: `python -i robot-wrapper-viewer.py` - Using RobotWrapper to encapsulate a URDF model: `python -i robot-wrapper-viewer.py`
## Computes analytical derivatives of rigid body dynamics algorithms ## Computes analytical derivatives of rigid body dynamics algorithms
- Computing forward kinematics derivatives: `python -i kinematics-derivatives.py` and in C++ `g++ -I $(pkg-config --cflags pinocchio) -g kinematics-derivatives.cpp -o kinematics-derivatives && ./kinematics-derivatives` - Computing forward kinematics derivatives: `python -i kinematics-derivatives.py` and in C++ `g++ kinematics-derivatives.cpp -o kinematics-derivatives $(pkg-config --cflags --libs pinocchio) && ./kinematics-derivatives`
- Computing forward dynamics derivatives: `python -i forward-dynamics-derivatives.py` and in C++ `g++ -I $(pkg-config --cflags pinocchio) -g forward-dynamics-derivatives.cpp -o forward-dynamics-derivatives && ./forward-dynamics-derivatives` - Computing forward dynamics derivatives: `python -i forward-dynamics-derivatives.py` and in C++ `g++ -I -g forward-dynamics-derivatives.cpp -o forward-dynamics-derivatives $(pkg-config --cflags --libs pinocchio) && ./forward-dynamics-derivatives`
- Computing inverse dynamics derivatives: `python -i inverse-dynamics-derivatives.py` and in C++ `g++ -I $(pkg-config --cflags pinocchio) -g inverse-dynamics-derivatives.cpp -o inverse-dynamics-derivatives && ./inverse-derivatives` - Computing inverse dynamics derivatives: `python -i inverse-dynamics-derivatives.py` and in C++ `g++ inverse-dynamics-derivatives.cpp -o inverse-dynamics-derivatives $(pkg-config --cflags --libs pinocchio) && ./inverse-derivatives`
## Displaying the models ## Displaying the models
...@@ -26,13 +26,13 @@ For the following examples, you should have [gepetto-gui](https://github.com/Gep ...@@ -26,13 +26,13 @@ For the following examples, you should have [gepetto-gui](https://github.com/Gep
**Pinocchio** encapsulates [FCL](https://github.com/humanoid-path-planner/hpp-fcl) in it. You can then do collision checking or distance computations with only few lines of code. **Pinocchio** encapsulates [FCL](https://github.com/humanoid-path-planner/hpp-fcl) in it. You can then do collision checking or distance computations with only few lines of code.
- Check collisions using [FCL](https://github.com/humanoid-path-planner/hpp-fcl): `python -i collisions.py` and in C++ `g++ -I $(pkg-config --cflags pinocchio) -g collision.cpp -o collision && ./collision` - Check collisions using [FCL](https://github.com/humanoid-path-planner/hpp-fcl): `python -i collisions.py` and in C++ `g++ collision.cpp -o collision $(pkg-config --cflags --libs pinocchio) && ./collision`
## Multiprecision arithmetic ## Multiprecision arithmetic
Thanks to the full templatization of the project, **Pinocchio** is able to perform full precision arithmetic (via Boost.Multiprecision for instance). Thanks to the full templatization of the project, **Pinocchio** is able to perform full precision arithmetic (via Boost.Multiprecision for instance).
- Multiprecision example: `g++ -I $(pkg-config --cflags pinocchio) -g multiprecision.cpp -o multiprecision && ./multiprecision` - Multiprecision example: `g++ multiprecision.cpp -o multiprecision $(pkg-config --cflags --libs pinocchio) && ./multiprecision`
## Adding new examples ## Adding new examples
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment