The main purpose of this project is to generate symbolic represantions of the kinematics and dynamics of a robot by extracting its geometrical and physical parameters from its URDF description. It supports fixed-base, open-chain robots. It uses CasADi to compute the symbolic expressions. It is inspired by urdf2eom.
The software has the following dependencies:
iDynTree has been used to validate the results of the symbolic models. Its documentation can be found at https://robotology.github.io/idyntree/master/. Make sure to compile the bindings to MATLAB. Some usefull turorial can be found at https://github.com/robotology/idyntree#tutorials .
The URDF specifications and its mathematical description that has been used in this repository can be found here. Only joints with the axis
aligned with one of the three directions of the joint frame are supported. Models with fixed joints are not supported.
Add to the MATLAB path the repository and all its subfolders by launching setPath.m
, make sure to insert the correct path to CasADi.Get the URDF of your robot. Then pick one of the functions to create and test the model against IDynTree
in the Verification/ subfolder. Each test* script should be launched from the folder it is contained in.
The code is structured as a MATLAB package. See the MATLAB documentation on how to reference the package members from within and outside the package.
The algorithms generate both symbolic functions and their C code version (that is compiled as a *.mex file):
Computation of the Dynamics of the robot in the form linear in the inertial parameters. This can be used for identification computing the stack of the Regressors. Also the transposed of this last function is provided since it requires less computational time to compute the transposed of the stack of regressor matrices.
Additionally, the algorithms can be used to simulate a Momentum Observer for external force estimation, which can be tested by: