Package: idyntree
iDynTreeiDynTree is a library of robots dynamics algorithms for control, estimation and simulation. It is specifically designed for free-floating robots, but it is possible to use it also  with fixed-base robots.Themajor characteristic featuresof iDynTree are:It is written inC++, withPythonandMATLABbindings.It uses anundirected graph data structure(iDynTree::Model) that is used to represent robots, to easily change thebase linkthat you are using for your kinematics and dynamics computations without the need to reload your model or change your joint or link serializations. This is done as iDynTree was developed for floating-base robots such as humanoids, in which the most convenient choice ofbase linkcan change.It contains support forreading and writing URDF filesfrom aiDynTree::Model, making it useful to write tools that modify robot models and saves them back to file. This is done as iDynTree was meant to developtools for identification of kinematics and dynamics parameters.It defaults to use themixed representationto represent link quantities (including the velocity and acceleration of the base link), but it can optionally use alsobody (left-trivialized)orinertial (right-trivialized)representation if requested. This is done because iDynTree was developed to satisfy the needs ofresearch in synthesis of floating-base whole-body controllers. If you are not familiar with the different representation for 6D quantities, checkSection 6 of "Multibody dynamics notation (version 2)".It contains an implementation of the algorithm used in the iCub humanoid robot toestimate the joint torques without the need of collocated joint torque sensors, exploting the specificundirected graph data structure. This is done as this was one of the originally goal for the implementation of iDynTree. See the classiDynTree::ExtWrenchesAndJointTorquesEstimatorandChapter 6 of "Modelling, Estimation and Identification of Humanoid Robots Dynamics".To avoid confusion, it is also useful to clarify whatiDynTree is not:It is not thefastest C++ libraryfor kinematics and dynamics multibody computations for robotics. It is not slow, but if have an application in which you need the absolute fastest library, check outPinocchio.It is not amultibody simulatorlibrary. It provides the building blocks that you could use to build a multibody simulator, but it is not a multibody simulator per se. If you need a simulator library in C++, check outDART,Simbody,Drake,MuJoCoor the abstraction layerGazebo Physics. If you need a simulator implemented in MATLAB/Simulink (built on iDynTree), checkmatlab-whole-body-simulator. If you need a simulator that is differentiable and runs on GPU, checkjaxsimorMuJoCo XLA (mjx).It does not provide algorithms in a form in which they can be used inCasADi,JAXorPyTorch. For a Python library with an interface inspired by iDynTree that provides algorithms compatible with these frameworks, checkadamrobotics library.ContentsInstallationLibrary UsageTools UsageReference DocumentationAnnouncementsDeveloper DocumentationReference PaperAcknowledgmentsInstallationconda (recommended)You can easily install the C++ and Python library with viaconda-forgeusing the following commandconda install -c conda-forge idyntreeIf you need to install also the MATLAB bindings, you can install them with:conda install -c conda-forge -c robotology idyntree-matlab-bindingsIf you are not familiar with conda or conda-forge, you can read an introduction document inconda-forge overview.robotology-superbuild (advanced)If you are installing iDynTree for use as part ofiCub humanoid robot software installation, you may want to install iDynTree through therobotology-superbuild, an easy way to download, compile and install the robotology software on multiple operating systems, using theCMakebuild system and its extensionYCM. To get iDynTree when using therobotology-superbuild, please enable theROBOTOLOGY_ENABLE_DYNAMICSCMake option of the superbuild. If you want to install also iDynTree Python or MATLAB bindings, remember to enable theROBOTOLOGY_USES_PYTHONorROBOTOLOGY_USES_MATLABoptions.Build from source (advanced)If you want to build iDynTree directly from source, you can check the documentation indoc/build-from-source.md.Library UsageUsage in C++Once the library is installed, you can link it in C++ programs usingCMakewith as little effort as writing the following line of code in your project'sCMakeLists.txt:find_package(iDynTreeREQUIRED)target_link_libraries(<target>PRIVATEiDynTree::idyntree-high-leveliDynTree::idyntree-estimation)SeeCMake's reference documentationif you need more info on thefind_packageortarget_link_librariesCMake commands.Usage in MATLABTo make sure that iDynTree is available in MATLAB, try to run some simple code that uses it:p = iDynTree.Position()If this is not working, make sure that you are launchingmatlabafter having activated the conda environment (if you installed iDynTree via conda) or after having sourced por executed the correct setup script (if you installed iDynTree via the robotology-superbuild).TutorialsThese tutorials describe how to use specific parts of iDynTree. Are you interested in a tutorial on a specific feature or algorithm that you can't find in this list? Justrequest it on an enhancement issue.TopicLocationLanguageBasic usage of theKinDynComputations classtogether with the [EigenC++ Matrix library to compute kinematics and dynamics quantities such as forward kinematics, inverse dynamics, mass matrix.examples/cxx/KinDynComputationsWithEigen/main.cppC++How to use theInverseKinematics classfor the IK of an industrial fixed-base manipulator.examples/cxx/InverseKinematics/README.mdC++Use of theExtWrenchesAndJointTorquesEstimator classfor computing offset for FT sensorsexamples/matlab/SixAxisFTOffsetEstimation/SixAxisFTOffsetEstimation.mMATLABHow to get the axis of a revolute joint expressed in a arbitary frame using theKinDynComputations classexamples/matlab/SensorsListParsing/SensorsListParsing.mMATLABHow to read the Six Axis Force Torque sensors information contained in a URDF model.examples/matlab/GetJointAxesInWorldFrame.mMATLABUsage of the MATLAB-native visualizer using theMATLAB high-level wrappers.examples/matlab/iDynTreeWrappers/visualizeRobot.mMATLABBasic usage of theKinDynComputations class.examples/python/KinDynComputationsTutorial.pyPythonBasic usage of theMeshcatVisualizer class.examples/python/MeshcatVisualizerExample.ipynbPythonTools UsageiDynTree also includes some command line tools to use some of the functionality of the library without writing any line of code. The available command line tools are listed in the following, and each tool also includes an online help that is tipically available by passing the-hflag.idyntree-model-infoTool that reads a model from a file, and print some useful information as specified via the command line.Example: Print the total mass of a given modelidyntree-model-info -m <location-of-the-model> --total-massidyntree-model-viewTool that reads a model from a file and visualize it using theidyntree-visualizerlibraryExample: Visualize a given modelidyntree-model-view -m <location-of-the-model>idyntree-model-simplify-shapesTool that reads a model from a file, and returns in output the same model, but with all
solid shapes of the model (both collision and visual) substituted with a primitive shape
that approximates in some way the original solid shape. At the moment, the only conversion
type provided is to approximate each solid shape of the model with its axis aligned bounding box.Example: Approximate a given modelidyntree-model-simplify-shapes -m <location-of-the-input-model> -o <desired-location-of-the-output-model>Reference DocumentationThe documentation for the complete API of iDynTree is automatically extracted from the C++ code usingDoxygen,
and is available at the URL :https://robotology.github.io/idyntree.AnnouncementsAnnouncements on new releases, API changes or other news are done onrobotology/QAGitHub repository. You can watch that repository to get all the iDynTree-related announcements, that will always tagged with theannouncementtag.Developer DocumentationIf you want to contribute to iDynTree development, please check theDeveloper's FAQ.Reference paperA paper describing some of the algorithms implemented in iDynTree and their use in a real world scenario can be downloadedhere.
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}}AcknowledgmentsThe initial development of iDynTree was supported by the FP7 EU projectsCoDyCo (No. 600716 ICT 2011.2.1 Cognitive Systems and Robotics)andKoroibot (No. 611909 ICT- 2013.2.1 Cognitive Systems and Robotics).The development is now supported by theArtificial Mechanical Intelligence research lineat theItalian Institute of Technology.LicenseiDynTree is licensed under either the BSD-3-Clause license :https://spdx.org/licenses/BSD-3-Clause.html.