iDynTree is a library of robots dynamics algorithms for control, estimation and simulation.
iDynTree is specifically designed for free-floating robots, but it is possible to use it also with fixed-base robots.
iDynTree is written in C++ language, but thanks to SWIG it is possible to use the iDynTree algorithms in several other languages. Support and documentation is provided in particular for C++, Matlab, Python and Lua. If you are interested in using iDynTree with another programming language, feel free to create a new issue requesting support for it.
- Installation
- Tutorials
- Documentation
- Announcements
- Developer Documentation
- Reference Paper
- Acknowledgments
iDynTree is mainly developed and mantained by the Dynamic Interaction Control research line at the Italian Institute of Technology, as part of the iCub project .
For this reason it is usually installed through the robotology-superbuild, an easy way to download, compile and install the robotology software on multiple operating systems, using the CMake build system and its extension YCM. For more informations on the superbuild concept, please check YCM documentation. To get iDynTree when using the robotology-superbuild
, please enable the ROBOTOLOGY_ENABLE_DYNAMICS
CMake option of the superbuild.
If you are not interested in installing all the robotology software it is still possible to install iDynTree without installing the rest of the robotology software, and please read the rest of the Readme for more info on this.
iDynTree requires few external libraries. At the first configuration, the build system of iDynTree enables the use of the dependencies that it finds in the system,
but you can manually make sure that iDynTree searches or ignores a given dependency by enabling or disabling the IDYNTREE_USES_<DEP>
CMake options.
If you need to install also YARP
and ICUB
, it is recommended that you use the robotology-superbuild
, but if you want to install them manually please
check the documentation at ICub Software Installation. The rest of the dependencies can be installed using standard operating system package managers.
There are two ways of installing the required and optional dependencies of iDynTree in Windows: with binary installers or using vcpkg
.
There are several installers that provide the binary dependencies of iDynTree on Windows.
In particular you can run the binary installer of YARP to install Eigen3, Qt5 and YARP itself, the binary installer of ICUB software to install Ipopt and ICUB, and the robotology-additional-dependencies installer to install Libxml2 . Important: make sure that you are installing the 64-bit installers, if you want to compile the robotology-superbuild using the the 64-bit compiler! These installers will set automatically all the enviroment variables necessary to make sure that these libraries are found by CMake, and they will modify the PATH enviroment variable to make sure that the libraries can be used when launching the programs that use them.
If you use vcpkg
, you can install all the required and optional dependencies of iDynTree using the following command:
./vcpkg install --triplet x64-windows eigen3 qt5 libxml2
Use the x86-windows
triplet only if you want to compile iDynTree using the 32-bit compiler.
The default way to use the libraries provided by vcpkg in CMake is to use the vcpkg CMake toolchain.
If you prefer not to use the vcpkg toolchain, to use the libraries installed by vcpkg, it is necessary to use the CMAKE_PREFIX_PATH
, CMAKE_PROGRAM_PATH
and PATH
environment variables. In particular, if your vcpkg is installed in ${VCPKG_ROOT}
,
you need to add ${VCPKG_ROOT}/installed/x64-windows
and ${VCPKG_ROOT}/installed/x64-windows/debug
to CMAKE_PREFIX_PATH
,
${VCPKG_ROOT}/installed/x64-windows/tools
to CMAKE_PROGRAM_PATH
and ${VCPKG_ROOT}/installed/x64-windows/bin
and ${VCPKG_ROOT}/installed/x64-windows/debug/bin
to PATH
.
You can install most of the required and optional dependencies of iDynTree using homebrew with the following command:
brew install eigen qt5 dartsim/dart/ipopt
You can install most of the required and optional dependencies of iDynTree using the following command:
sudo apt-get install libeigen3-dev libxml2-dev coinor-libipopt-dev qtbase5-dev qtdeclarative5-dev qtmultimedia5-dev qml-module-qtquick2 qml-module-qtquick-window2 qml-module-qtmultimedia qml-module-qtquick-dialogs qml-module-qtquick-controls qml-module-qt-labs-folderlistmodel qml-module-qt-labs-settings
Once you installed the necessary dependencies, the iDynTree library can be compiled as any CMake based project.
With make
facilities:
$ git clone https://github.com/robotology/idyntree
$ cd idyntree
$ mkdir build && cd build
$ cmake ..
$ make
$ [sudo] make install
With IDE build tool facilities, such as Visual Studio or Xcode
$ git clone https://github.com/robotology/idyntree
$ cd idyntree
$ mkdir build && cd build
$ cmake ..
$ cmake --build . --target ALL_BUILD --config Release
$ cmake --build . --target INSTALL --config Release
If you need more help on how to build CMake-based projects, please check CGold's First step section.
In the rest of the documentation, <prefix>
will indicate the installation prefix in which you installed iDynTree, i.e. the value that you passed as CMAKE_INSTALL_PREFIX
during the CMake configuration.
Once the library is installed, you can link it using CMake
with as little effort as writing the following line of code in your project's CMakeLists.txt
:
...
find_package(iDynTree 0.MINOR.PATCH REQUIRED)
...
target_link_libraries(<target> PRIVATE ${iDynTree_LIBRARIES})
...
Note that unless you did not use the default value of CMAKE_INSTALL_PREFIX
, the <prefix>
in which you installed iDynTree will need to be appended to the CMAKE_PREFIX_PATH
enviromental
variable to ensure that find_package
can find your iDynTree installation.
See CMake's reference documentation if you need more info on the find_package
or target_link_libraries
CMake commands.
To compile bindings to iDynTree in several scriping languages, you should enable them using the IDYNTREE_USES_PYTHON
, IDYNTREE_USES_LUA
, IDYNTREE_USES_MATLAB
, IDYNTREE_USES_OCTAVE
CMake options.
Several examples for using the bindings are available in https://github.com/robotology-playground/idyntree/blob/master/doc/geometric_classes.md .
Then, properly accessing bindings to iDynTree can require some additional steps.
You should add to the PYTHONPATH
enviromental variable the install path of the iDynTree.py
file.
export PYTHONPATH=$PYTHONPATH:<prefix>/lib/python2.7/dist-packages/
You should add to Matlab path the <prefix>/mex
directory.
You can modify the relative location for Matlab bindings files in the installation prefix using the IDYNTREE_INSTALL_MATLAB_LIBDIR
and IDYNTREE_INSTALL_MATLAB_MFILESDIR
CMake options.
You should add to Octave path the <prefix>/octave
directory.
You can modify the relative location for Matlab bindings files in the installation prefix using theIDYNTREE_INSTALL_OCTAVE_LIBDIR
and IDYNTREE_INSTALL_OCTAVE_MFILESDIR
CMake options.
All the other bindings (Python,Lua, ...) are generated by SWIG and compiled on the fly by the user,
by enabling the IDYNTREE_USES_<LANGUAGE>
option. The Matlab and Octave bindings are an exception because they
rely on an experimental version of Swig, developed for providing Matlab bindings for the casadi project. For this reason, usually the Matlab bindigs
are not generated by the users, but by iDynTree developers that have a special experimental Swig
version installed. The bindings code is then committed to the repository, and the IDYNTREE_USES_MATLAB
option simply enables compilation of the bindings. If you want to regenerate the Matlab bindings,
for example because you modified some iDynTree classes, you can install the experimental
version of Swig with Matlab support from https://github.com/robotology-dependencies/swig/ (branch matlab
) and then enable Matlab bindings generation with the IDYNTREE_GENERATE_MATLAB
options.
For more info on how to modify the matlab bindings, see https://github.com/robotology/idyntree/blob/master/doc/dev/faqs.md#how-to-add-wrap-a-new-class-or-function-with-swig .
Topic | C++ | Matlab | Python |
---|---|---|---|
Use of the ExtWrenchesAndJointTorquesEstimator class for computing offset for FT sensors | NA | examples/matlab/SixAxisFTOffsetEstimation/SixAxisFTOffsetEstimation.m | NA |
How to get the axis of a revolute joint expressed in a arbitary frame using the KinDynComputations class | NA | examples/matlab/GetJointAxesInWorldFrame.m | NA |
Are you interested in a tutorial on a specific feature or algorithm? Just request it on an enhancement issue.
The documentation for the complete API of iDynTree is automatically extracted from the C++ code using Doxygen,
and is available at the URL : http://robotology.gitlab.io/docs/idyntree/master/.
The documentation generated from the devel
branch is available at the URL : http://robotology.gitlab.io/docs/idyntree/devel/.
Announcements on new releases, API changes or other news are done on robotology/QA
GitHub repository. You can watch that repository to get all the iDynTree-related announcements, that will always tagged with the announcement
tag.
If you want to contribute to iDynTree development, please check the Developer's FAQ.
A paper describing some of the algorithms implemented in iDynTree and their use in a real world scenario can be downloaded here . If you're going to use this library for your work, please quote it within any resulting publication:
F. Nori, S. Traversaro, J. Eljaik, F. Romano, A. Del Prete, D. Pucci "iCub whole-body control through force regulation on rigid non-coplanar contacts", Frontiers in Robotics and AI, 2015.
The bibtex code for including this citation is provided:
@ARTICLE{10.3389/frobt.2015.00006,
AUTHOR={Nori, Francesco and Traversaro, Silvio and Eljaik, Jorhabib and Romano, Francesco and Del Prete, Andrea and Pucci, Daniele},
TITLE={iCub Whole-body Control through Force Regulation on Rigid Noncoplanar Contacts},
JOURNAL={Frontiers in Robotics and AI},
VOLUME={2},
YEAR={2015},
NUMBER={6},
URL={http://www.frontiersin.org/humanoid_robotics/10.3389/frobt.2015.00006/abstract},
DOI={10.3389/frobt.2015.00006},
ISSN={2296-9144}}
The initial development of iDynTree was supported by the FP7 EU projects CoDyCo (No. 600716 ICT 2011.2.1 Cognitive Systems and Robotics) and Koroibot (No. 611909 ICT- 2013.2.1 Cognitive Systems and Robotics).
The development is now supported by the Dynamic Interaction Control research line at the Italian Institute of Technology.
iDynTree is licensed under either the GNU Lesser General Public License v3.0 :
https://www.gnu.org/licenses/lgpl-3.0.html
or the GNU Lesser General Public License v2.1 :
https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
at your option.