Skip to content

robotology/whole-body-controllers

Repository files navigation

whole-body-controllers

Simulink-based whole body controllers for humanoid robots.

Dependencies

This repository depends upon the following Software/repositories:

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).

Installation and usage

  • 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.

Troubleshooting

Please refer to the WBToolbox troubleshooting documentation.

Structure of the repo

  • 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]

Interesting features

Automatic generation of c++ code from Simulink

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.

Static GUI for Simulink

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.

Where do I find new features and legacy repos?

Available controllers

Matlab functions library

Active Forks (new features)

Legacy

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.

Associated repositories

Mantainers

Gabriele Nava (@gabrielenava)