This website uses browsing/session and functional cookies to ensure you get the best experience. Learn More

Windows: installation from sources

From Wiki for iCub and Friends
Jump to: navigation, search
Win-logo.jpg
Instructions in this page allows you to build YARP and iCub on Windows from sources. This allows getting the most recent version of the code from the repositories or a specific snapshot.The following sections will guide you step by step in the installation process.

Contents

Install YARP

Follow instructions here: http://wiki.icub.org/yarp/specs/dox/user/html/install_yarp_windows.html, select Install from sources

Important, for use with the iCub robot when compiling YARP make sure you select the following CMake options:

 CREATE_OPTIONAL_CARRIERS, set to ON 
 ENABLE_yarpcar_bayer_carrier, set to ON

Getting iCub's dependenceis

  • Download and execute the iCub installer (available from Downloads). Disable the iCub tick and proceed with the installation.

Binaries-icub-noicub.jpg

  • Pick installation directory: all dependencies will be installed in separate folders in this directory:

Binaries-icub-noicub2.jpg

Alternatively you can compile all dependencies yourself following the procedure here: PrepareWindows (notice however that this can be tedious, time consuming and error prone).

Getting CMake

If you follow YARP's installation instructions (Install from sources) you should have installed CMake.

Getting revision control system client

To download sources from our repositories you need to set up a revision control system client (git). If you follow YARP's installation instructions (Install from sources) you should have installed a git client.

Getting the iCub sources

Clone the icub-main repository from one of these addresses:

for example:

 cd /home/user
 git clone https://github.com/robotology/icub-main.git

If the above does not work for you can use subversion or download the sources directly from a zipped snapshots: Getting sources using subversion or directly from the snapshots

Compile iCub

In the following we will call ICUB_REPOSITORY the top directory of the repository (i.e. the icub-main directory which contains the files AUTHORS, README and ChangeLog).

Generate project files

  • Run CMake.
  • Point the entry "Where is the source code" of the gui to the directory called "icub-main".
  • Choose a directory that will store the binaries and the project files, e.g. "build" inside the source directory (ICUB_REPOSITORY/build). This is iCub's build directory.
  • Enable the following variables:
 ENABLE_icubmod_cartesiancontrollerclient ON
 ENABLE_icubmod_cartesiancontrollerserver ON
 ENABLE_icubmod_gazecontrollerclient      ON
  • Click on the button "Configure". Select the compiler you would like to use. CMake will normally select the correct compiler (WIN64 is not supported yet). Make sure the compiler matches the one you used to compile YARP.
  • Leave all options to default.
  • Hit "Configure" until the button "Generate" becomes available. Then hit "Generate" and quit. Note: CMake uses red bars to highlight new options, these are not necessarily errors and can be ignored.

Note 1: You can optionally change CMAKE_INSTALL_PREFIX, this is the directory where you would like to install iCub (default is C:\Program Files\iCub). If you do so, you will then need to set up the environment accordingly (see Configure your environment below).

Note 2: Do not select other options unless you know what you are doing.

Compile

Now we are ready to compile. Open the iCub visual studio project file in the build directory. In this order:

  • Select Debug configuration and build the target INSTALL
  • Select Release configuration and build the target INSTALL.

Configure your environment

  • Set the environment variable ICUB_DIR so that it points to CMAKE_INSTALL_PREFIX (e.g. C:\Program Files\iCub).
  • Append %ICUB_DIR%/bin to your PATH, e.g. C:\Program Files\iCub\bin
  • You need to set the YARP_DATA_DIRS environment variable to %YARP_DIR%/share/yarp;%ICUB_DIR%/share/iCub

Setup ICUBcontrib (optional)

If you wish to develop new software for iCub and share it in the contrib repository, you need to set up the ICUBcontrib meta-package, which allows to properly configure your modules/libraries so that they share the same installation prefix.

Checkout the contrib repository.

Clone the icub-contrib-common repository from one of these addresses:

   (git read-only) git://github.com/robotology/icub-contrib-common.git
   (ssh read+write) git@github.com:robotology/icub-contrib-common.git
   (https read+write) https://github.com/robotology/icub-contrib-common.git 

for example:

cd /home/user
git clone https://github.com/robotology/icub-contrib-common.git

Configure ICUBcontrib

  • Run CMake.
  • Point the entry "Where is the source code" of the gui to C:/iCub/icub-contrib-common.
  • Choose a directory that will store the project files, e.g. "build" inside the source directory.
  • You can optionally change the CMAKE_INSTALL_PREFIX entry, this is the directory where you would like to install all modules/libraries.
  • Hit "Generate" and quit.
  • Open the ICUBcontrib Visual Studio solution file in the build directory.
  • Select Release configuration and build the target INSTALL.

Configure your environment

  • Set the environment variable ICUBcontrib_DIR so that it points to CMAKE_INSTALL_PREFIX (e.g. C:\Program Files\ICUBcontrib).
  • Append %ICUBcontrib_DIR%/bin to your PATH.
  • It is suggested to set the CMAKE_PREFIX_PATH environment variable to point to the installation directory (e.g. C:\Program Files\ICUBcontrib).
  • If you installed ICUBcontrib to a different install prefix than YARP's, you need to extend the YARP_DATA_DIRS environment variable so that it matches:
 %YARP_DIR%/share/yarp;%ICUB_DIR%/share/iCub;%ICUBcontrib_DIR%/share/ICUBcontrib

Once you have installed the ICUBcontrib package you can compile the other modules individually.

Check your installation

Now you are ready to check your installation.

Personal tools
Namespaces

Variants
Actions
Navigation
Print/export
Toolbox