To run the simulation scripts available in this repository, you need to have installed on your computer:
- Matlab/Simulink, at least version R2015b or following.
- WB-Toolbox
These dependencies (in particular WB-Toolbox
) have their own dependencies, so the most convenient way to install them is through the robotology-superbuild
.
You can follow the instructions in https://github.com/robotology/robotology-superbuild/blob/master/README.md, following in particular the steps in https://github.com/robotology/robotology-superbuild/blob/master/README.md#dynamics to install the software that depends on Matlab/Simulink. Regarding the visualization of the robot movements, it is currently dependent on the iDyntree visualizer. In order to be able to use it, enable the options IDYNTREE_USES_MATLAB
and IDYNTREE_USES_IRRLICHT
by running ccmake ./
in iDyntree build directory. If the irrlicht library is not installed on your computer, you can install it by running sudo apt install libirrlicht-dev
.
IMPORTANT: currently, WBToolbox 3.0
requires the yarpserver
to be up and running in order to compile the model. Also, the from YARP to WBI
Simulink block that is inside WBToolbox
requires to read some ports that are opened when the iCub model is up and running in Gazebo. Therefore you need to run both yarpserver
and the gazebo
simulator on a terminal in order to be able to compile the Simulink model. Alternatively, you can void to open Gazebo by commenting out the Visualization block
inside the Simulink model.
Once you followed the installation instructions, you can replicate the experiments present in the paper by running the script. In particular, you can run the simulation of the underactuated flying humanoid robot by simulating the /matlab/momentum-based-flying/momentumBasedFlying.mdl
Simulink model. The parameters, configuration options and reference trajectories for the simulation are specified in the matlab/simulinkModel/initMomentumBasedFlying.m
matlab script, and in the scripts inside the app/robots/icubGazeboSim folder. By changing these script, you can replicate the results contained in the paper. In the next subsection we document how to run the different simulation experiments contained in the paper, by just changing a limited set of parameters.
- Set
Config.references.variousDirFlight
totrue
. - Set
Config.references.elicoidalFlight
tofalse
. - Set
Config.orientationControl
tofalse
. - Set
Config.testRobustness
tofalse
.
- Set
Config.references.variousDirFlight
totrue
. - Set
Config.references.elicoidalFlight
tofalse
. - Set
Config.orientationControl
totrue
. - Set
Config.testRobustness
tofalse
.
Simulation 2 : helicoidal flight with orientation control and non-perfect control model to test controller robustness
- Set
Config.references.variousDirFlight
tofalse
. - Set
Config.references.elicoidalFlight
totrue
. - Set
Config.orientationControl
totrue
. - Set
Config.testRobustness
totrue
.