Simulink-based whole body controllers for humanoid robots.
This repository depends upon the following Software/repositories:
- Matlab/Simulink, default version R2017b
- WB-Toolbox
- Gazebo Simulator, default version 9.0
- gazebo-yarp-plugins
- icub-gazebo and icub-gazebo-wholebody to access iCub models.
- codyco-modules (Optional, for using home positions and wholeBodyDynamics device).
NOTE: it is suggested to install whole-body-controllers
and most of its dependencies (namely, codyco-modules
,icub-gazebo
,icub-gazebo-wholebody
, gazebo-yarp-plugins
and WB-Toolbox
and their dependencies) using the robotology-superbuild (enable ROBOTOLOGY_USES_GAZEBO
, ROBOTOLOGY_ENABLE_DYNAMICS
, ROBOTOLOGY_USES_MATLAB
options).
-
clone the repository on your pc by running on a terminal
git clone https://github.com/robotology/whole-body-controllers
, or dowload the repository. -
set the environmental variable
YARP_ROBOT_NAME
in the.bashrc
file to be the name of the robot you want to control. List of supported robot names:Robot Names Associated URDF Model iCubGenova02 model.urdf iCubGenova04 model.urdf iCubGazeboV2_5 model.urdf icubGazeboSim model.urdf -
to use the Simulink controllers, it is required to add the matlab-wbc folder to the Matlab path. There are two different possible ways to add the folder to the path:
- directly add the folder to the Matlab path;
- run only once the startup.m script. In this case, it is required to always start matlab from the folder where the
pathdef.m
file is (usually~/Documents/MATLAB
). For further information see also the WBToolbox documentation.
Note: to use any function inside the package matlab-wbc/+wbc, add the
wbc
prefix to the function name when the function is invoked, i.e.[outputs] = wbc.myFunction(inputs)
. More information can be found in the Matlab documentation.
Please refer to the WBToolbox troubleshooting documentation.
-
config: a collection of scripts for correctly configure this repo. [README]
-
torque-controllers: Simulink torque controllers for balancing and walking of humanoid robots. [README]
-
doc: guidelines on how to create/use Simulink models for control. [README]
-
library: a library of functions/scripts used by the controllers. [README]
-
utilities: Simulink models for debugging sensors on the real robot. [README]
There is the possibility to generate c++ code from the Simulink models using Simulink coder (available only for the momentum-based-yoga). The repositiory that contains the generated c++ code is named autogenerated-whole-body-controllers. Documentation on how to generate the code is available in the repository wiki.
When used for controlling real platforms, heavy Simulink models may violate the user-defined simulation time step, see also this issue. It seems a source of delay is the run-time update of the Simulink interface. For this reason, a static GUI for running the models has been developed. Available only for momentum-based-yoga and momentum-based-standup. If you want to run Simulink with the static GUI, just run the start{$SIM_NAME}WithoutSimulinkGui script.
Official legacy repositories are: mex-wholebodymodel and WBI-Toolbox-controllers. Note: these legacy repos contain undocumented/outdated code, and duplicated or not tested matlab functions. They also contain original code that has been tested on the robot in the past and then never used again, or code that will be ported in the main repository in the future.
- exploit friction and walking controller
- seesaw controller and integration-based-ikin
- automatic gain tuning
- elastic joints control
- walkman control and walkman control-matlab
- joint-space control and centroidal transformation
Gabriele Nava (@gabrielenava)