Dynamic SimulatOr of Rigid Systems
A small collection of MATLAB classes and functions that can be used to simulate rigid body systems kinematics, dynamics, and control.
The code has been tested on Ubuntu 20.04.3 LTS.
-
MATLAB, tested up to
R2022a
. -
DynaSoRS is based on the iDyntree library. To install
iDyntree
and its dependencies, refer to the iDyntree README. When compilingiDyntree
, it is required to set the optionIDYNTREE_USES_MATLAB
toON
. In order to use the iDyntree bindings, and the iDyntree wrappers for MATLAB, add to the MATLAB path thepath/where/the/iDyntree/generated/mex/file/is
. -
Some classes depend on casadi library. Download and install the MATLAB bindings from the website.
-
Optional: some examples depend on
wbc
, a MATLAB library for multi-body systems dynamics, kinematics and control available inside whole-body-controllers. To download the library, follow the instructions in the whole-body-controllers README. -
Optional: the example on iRonCub-Mk1_1 depends on
wbc
library and on ironcub-mk1-software.
Provided that the dependencies are met, git clone
or download this repository. Then, run the following commands:
mkdir build & cd build
cmake .. -DCMAKE_INSTALL_PREFIX="/path/to/desired/install/dir"
make install
In order to use the library, add to the MATLAB path the path/where/the/installed/dynasors/package/is
. A script called startupDynasors.m
is generated automatically inside the build
folder. Run the script once to permanently add the (installed) +dynasors
package to the MATLAB path.
The main classes of the library are tested in the tests folder. This is also a good way to verify if the code has been installed correctly.
Examples of usage of the library are given in the examples folder:
- simpleRobot: dynamics simulation and control of a simple fixed-base serial robot.
- iRonCub-Mk1_1 dynamics simulation and QP control of a floating-base jet-powered humanoid robot.
Gabriele Nava (@gabrielenava).