Skip to content

Dynamics Library designed for Free Floating Robots

License

LGPL-2.1, LGPL-3.0 licenses found

Licenses found

LGPL-2.1
LICENSE.LGPL2
LGPL-3.0
LICENSE.LGPL3
Notifications You must be signed in to change notification settings

nunoguedelha/idyntree

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iDynTree License: LGPL v3 License: LGPL v2 ZenHub

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.

Contents

Installation

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.

Dependencies

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.

Build dependencies
Required
Optional
Optional for the optimal control part
Deprecated

Install dependencies

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.

Windows

There are two ways of installing the required and optional dependencies of iDynTree in Windows: with binary installers or using vcpkg.

Installers

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.

vcpkg

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.

macOS

You can install most of the required and optional dependencies of iDynTree using homebrew with the following command:

brew install eigen qt5 ipopt

Debian/Ubuntu

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

Build

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.

Link

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.

Bindings

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.

Python

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/

Matlab

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.

Octave

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.

Matlab/Octave bindings modifications

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 .

Matlab/Octave high level wrappers

They are a collection of Matlab/Octave functions that wraps the functionalities of (mainly) the iDyntree class KinDynComputations into functions with a typical Matlab/Octave interface. The purpose of the high-level wrappers is to provide a simpler and easy-to-use interface for Matlab/Octave users who want to use iDyntree inside Matlab/Octave, also helping in designing code which is less error-prone and easier to debug (e.g. in case the interface of an iDyntree function will change in the future). More details and a complete list of the wrappers can be found in the wrappers README.

Usage: the wrappers package is installed together with the iDyntree bindings when compiling iDyntree with option IDYNTREE_USES_MATLAB or IDYNTREE_USES_OCTAVE set to ON. The functions can be called from Matlab/Octave using the namespace iDynTreeWrappers, i.e. iDynTreeWrappers.name_of_the_corresponding_iDynTree_method.

Tutorials

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
How to use the InverseKinematics class for the IK of an industrial fixed-base manipulator. examples/InverseKinematics/README.md NA NA

Are you interested in a tutorial on a specific feature or algorithm? Just request it on an enhancement issue.

Documentation

The documentation for the complete API of iDynTree is automatically extracted from the C++ code using Doxygen, and is available at the URL : https://robotology.github.io/idyntree/master/. The documentation generated from the devel branch is available at the URL : https://robotology.github.io/idyntree/devel/.

Announcements

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.

Developer Documentation

If you want to contribute to iDynTree development, please check the Developer's FAQ.

Reference paper

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}}

Acknowledgments

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.

License

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.

About

Dynamics Library designed for Free Floating Robots

Resources

License

LGPL-2.1, LGPL-3.0 licenses found

Licenses found

LGPL-2.1
LICENSE.LGPL2
LGPL-3.0
LICENSE.LGPL3

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 93.0%
  • MATLAB 3.9%
  • CMake 2.7%
  • SWIG 0.3%
  • Python 0.1%
  • C 0.0%