This module implements a reactive omnidirectional walking controller for the biped humanoid robot iCub.
Given desired velocity (vx, vy, wz) of the center of mass (CoM) of the robot (actually the frame attached the the CoM), the controller compute and execute the footstep positions and orientation required to realized the desired velocity of the CoM.
The robot under this walking controller can be driven in two mode:
- Direct velocity based reactive walking mode or
- Interaction forces based reactive walking (where an admittance is used to convert the applied forces into velocity)
For more details see Capture-point based balance and reactive omnidirectional walking controller
Ubuntu 16.04 and Gazebo >=7
Prior to the compilation of this controller, make sure you have installed the following software:
- YARP
- ICUB (Install from sources!)
- Eigen3: Eigen 3 version >=3.2.9 is necessary for yarpWholeBodyInterface, you should install it from source, follow instructions here
- qpOASES
- yarpWholeBodyInterface
For simulation
- Gazebo: Gazebo7 and libgazebo7: installation instructions
- gazebo_yarp_plugins
- icub-gazebo
Easiest option (on clean installation):
- Install latest version of Eigen3 as above.
- Install Gazebo7 and libgazebo7: installation instructions
- Install all yarp/iCub/gazebo-plugin libraries with robotology-superbuild
- YARP needs CMake version >3.5, if you have Ubuntu 14.04, this can be installed by following the instructions here
- If you're trying to install YARP in Ubuntu 14.04 with ROS-Indigo installed in it, you will probably get a compiling error regarding yarpcar_xmlrpc component, solution is found here
- GCC/G++ version >=5 is necessary, to install follow instructions here
- gazebo_yarp_plugins needs Boost version >=1.55, Ubuntu 14.04 comes with version 1.54. To upgrade boost by follow instructions here.
Update:
libgazebo7-dev
which is needed to add plugins to gazebo only works withlibboost-all-dev
which becomes conflicted when installinglibboost1.55-dev
as it is hard-coded to point tolibboost1.54-dev
. This was a waste of time. You NEED Ubuntu 16! Otherwise, if someone finds the solution, please write it here. -Nadia
Clone the repository
$ git clone https://github.com/epfl-lasa/biped-walking-controller.git
Edit first the CMakeLists.txt
file to indicate :
- the correct paths of qpOASES lib file (
libqpOASES.so
) and qpOASES directory - the correct path to eigen3
Once the CMakeList.txt edited, the controller can be built. Just run
$ cd ~/biped-walking-controller
$ mkdir build && cd build
$ cmake .. && make
This will create the ./WalkingGrasping
executable which runs the controller. It will be placed in ~/biped-walking-controller/build
.
Running this controller in its current version is still quite elaborate.
- start yarpserver, in one terminal type the following
$ yarpserver
- (simulation) start gazebo simulator and import include the robot model (
iCub (no hands)
)
$ cd ~/robotology-superbuild/robotology
$ gazebo ./icub-gazebo/worlds/icub.world
- Bring the robot in home position
$ yarpmotorgui --from homePoseBalancing.ini --robot robot_name
robot_name: (e.g. icub or icubSim) and then press the 'Home All' button
- Launch the controller as follows :
$ ./WalkingGrasping --from ../config/BalanceWalkingController.ini
This code will run the controller with a constant velocity (defined in the config file below) for a predetermined duration (in seconds, also defined in the config file).
- If you get the error
did not find model.urdf
you must replace,model.urdf
in theBalanceWalkingController.ini
config file with~/robotology-superbuild/build/install/share/codyco/robots/icubGazeboSim/model.urdf
The behavior of the controller is demonstrated here
The configuration file is BalanceWalkingController.ini
locate in the config
folder. The parameters are
-
robot
: name of the robot to connect to (e.g icubSim for simulation and icub for the real robot) -
name
: name of the module. All ports open by the controller will include this name (default: walkingGrasping) -
wbi_config_file
: name of the configuration file of yarpWholeBodyInterface (yarpWholeBodyInterface.ini) -
wbi_joint_list
: list of joints within thewbi_config_file
to be loaded by the wholeBodyInterface (default: ROBOT_DYNAMIC_MODEL_JOINTS) -
period
: period of the controller thread (default 40 ms) -
modulePeriod
: period of the module -
duration
: running time duration in secondes, once reached the robot stops and goes back to its initial standing posture -
FT_feedback
: mode of reactive walking (0: direct velocity mode with no force interaction; 1: admittance control using feet forces/moments and 2: admittance using measured arms forces/momemts) -
VelocityX
: the initial forward or backward velocity of the robot in [m/s] -
VelocityY
: the initial lateral velocity of the robot in [m/s] -
OmegaZ
: the initial rotational velocity of the robot about the vertical axis in [m/s]
Note: should you want to change the velocity at run time, you can do it in the while loop of the main.cpp file.
An input port will be added for that purpose soon.
Others parameters are in the src/InitBalWlkParameters.cpp
file.
In case you want to cite the content of this controller implementation, please refer to Capture-point based balance and reactive omnidirectional walking controller and use the following bibtex entry:
@inproceedings{bombile2017capture,
title={Capture-point based balance and reactive omnidirectional walking controller},
author={Bombile, Michael and Billard, Aude},
booktitle={Humanoid Robotics (Humanoids), 2017 IEEE-RAS 17th International Conference on},
pages={17--24},
year={2017},
organization={IEEE}
}