ICub software: Difference between revisions

From ISRWiki
Jump to navigation Jump to search
mNo edit summary
m (→‎See also: remove dead link)
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
This article deals with the installation of YARP and iCub software. Word of advice: '''always refer to the official iCub documentation first''':
This article deals with the installation of YARP and iCub software. Word of advice: '''always refer to the official iCub documentation first''':
* http://www.yarp.it
* http://wiki.icub.org/wiki/Manual#Six._Software.2C_Installing_YARP_and_iCub
* http://wiki.icub.org/wiki/Manual#Six._Software.2C_Installing_YARP_and_iCub
* http://wiki.icub.org/wiki/ICub_Software_Installation
* http://wiki.icub.org/wiki/ICub_Software_Installation
* http://wiki.icub.org/yarpdoc/index.html
* Virtual Machine that contains pre-installed software: https://github.com/robotology/vagrant-icub


Below, we list some unofficial additional notes provided by [[Vislab|VisLab]] members.
Below, we list some unofficial additional notes provided by [[Vislab|VisLab]] members.
Line 42: Line 43:


Run the following command in a console terminal, typically from the <code>$code</code> directory:
Run the following command in a console terminal, typically from the <code>$code</code> directory:
  git clone git://github.com/robotology/yarp.git
  git clone https://github.com/robotology/yarp.git
 
Note that these addresses and permissions are possible:
* (git read-only)    git://github.com/robotology/yarp.git
* (ssh read+write)    git@github.com/robotology/yarp.git
* (https read+write)  https://github.com/robotology/yarp.git
 
More instructions are located at https://github.com/robotology/yarp.


=== Compiling the yarp repository in Linux ===
=== Compiling the yarp repository in Linux ===
Line 64: Line 58:
Having generated your project file, only the actual compilation remains to be done:
Having generated your project file, only the actual compilation remains to be done:
  make
  make
Don't use <strike><code>sudo make install</code></strike>! Rather, add the location of the binaries to the <code>$PATH</code> environment variable (see below).


=== Updating the yarp repository in Linux ===
=== Updating the yarp repository in Linux ===
Line 72: Line 68:
=== Downloading YARP as a single file ===
=== Downloading YARP as a single file ===


Refer to http://wiki.icub.org/yarpdoc/index.html -> Download YARP. Pre-compiled binaries are also available.
Refer to http://www.yarp.it. Pre-compiled binaries are also available.


== iCub ==
== iCub ==
Line 78: Line 74:
=== Browsing the iCub repository online ===
=== Browsing the iCub repository online ===


'''icub-main''':
'''icub-main'''


https://github.com/robotology/icub-main/
https://github.com/robotology/icub-main/


'''iCub Contrib Software'''


'''icub-contrib, icub-firmware''':
These are small repositories in the Robotology organization page, which contain special components and demos, for example the ball tracking and grasping demo is here:
 
https://github.com/robotology/icub-basic-demos/
http://sf.net/p/robotcub/code/HEAD/tree/trunk/iCub/ (pretty interface, ability to show diffs)
 
or
 
https://svn.code.sf.net/p/robotcub/code/trunk/iCub/ (simple and raw interface, faster to load)


=== Getting the iCub repository in Windows ===
=== Getting the iCub repository in Windows ===
Line 102: Line 94:


Run the following command in a console terminal, typically from the <code>$code</code> directory:
Run the following command in a console terminal, typically from the <code>$code</code> directory:
  git clone git://github.com/robotology/icub-main.git
  git clone https://github.com/robotology/icub-main.git


'''icub-contrib'''
'''contrib software'''


First get these CMake scripts:
Set up icub-contrib-common (see below), then get the contrib application that you wish to install (for example POETICON++), CMake and build it.
git clone git://github.com/robotology/icub-contrib-common.git


Then get the actual icub-contrib programs:
'''firmware''' (only for [[pc104]])
svn co https://svn.code.sf.net/p/robotcub/code/trunk/iCub/contrib icub-contrib


The last command will create a new directory called '''icub-contrib''' that contains the software.
  git clone https://github.com/robotology/icub-firmware-shared
 
  git clone https://github.com/robotology/icub-firmware-build
'''icub-firmware''' (only for [[pc104]])
 
First get these CMake scripts:
  git clone git://github.com/robotology/icub-firmware-shared.git
 
Then get the actual icub-firmware files:
  svn co https://svn.code.sf.net/p/robotcub/code/trunk/iCub/firmware/ icub-firmware
 
The last command will create a new directory called '''icub-firmware'''.


=== Compiling the iCub repository in Linux ===
=== Compiling the iCub repository in Linux ===
Line 146: Line 127:
Don't use <strike><code>sudo make install</code></strike>! Rather, add the location of the binaries to the <code>$PATH</code> environment variable (see below).
Don't use <strike><code>sudo make install</code></strike>! Rather, add the location of the binaries to the <code>$PATH</code> environment variable (see below).


'''icub-contrib'''
'''icub-contrib-common metapackage''' (to use contrib modules, i.e., modules outside icub-main)


We follow the official instructions at the bottom of http://wiki.icub.org/wiki/Linux:Installation_from_sources, with a few differences in order to ensure that binaries and settings used by the system are the ones located in <code>$PATH</code>:
Follow the official instructions at the bottom of http://wiki.icub.org/wiki/Linux:Installation_from_sources but '''make sure to point CMAKE_INSTALL_PREFIX to the full path corresponding to $ICUBcontrib_DIR''', which is accessible without administrator privileges and whose binaries will be within $PATH. To accomplish this, follow these simple instructions, paying attention to the part in bold.


Verify that your <code>.bash_env</code> contains these environment variables:
Verify that your <code>.bashrc_iCub</code> file (or equivalent) contains these environment variables:
  export ICUBcontrib_DIR=$code/icub-contrib-common/build
  export ICUBcontrib_DIR=$code/icub-contrib-common/build
  export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin:$ICUBcontrib_DIR/bin
  export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin:$ICUBcontrib_DIR/bin
  export YARP_DATA_DIRS=$YARP_DIR/share/yarp:$ICUB_DIR/share/iCub:$ICUBcontrib_DIR/share/ICUBcontrib
  export YARP_DATA_DIRS=$YARP_DIR/share/yarp:$ICUB_DIR/share/iCub:$ICUBcontrib_DIR/share/ICUBcontrib


Next, set up the ICUBcontrib meta-package:
Set up the ICUBcontrib metapackage:
  mkdir $ICUBcontrib_DIR
  mkdir $ICUBcontrib_DIR
  cd $ICUBcontrib_DIR
  cd $ICUBcontrib_DIR
'''# the following command sets CMAKE_INSTALL_PREFIX to the path corresponding to $ICUBcontrib_DIR'''
'''# instead of /usr/local'''
'''cmake -DCMAKE_INSTALL_PREFIX=$(echo $ICUBcontrib_DIR) ..'''
  ccmake ..
  ccmake ..
  // set CMAKE_INSTALL_PREFIX to be the full $ICUBcontrib_DIR path, e.g., /usr/local/src/robot/icub-contrib-common/build
  configure, generate, exit
//
make
// configure, generate, exit
  make install
  make install


Don't use <strike><code>sudo make install</code></strike>! Rather, add the location of the binaries to the <code>$PATH</code> environment variable (see above).
Don't use <strike><code>sudo make install</code></strike>! Rather, add the location of the binaries to the <code>$PATH</code> environment variable (see above).


At this point, you can install contrib applications with <code>make install</code> in their own build subdirectory (again, don't use sudo!). Binaries will be installed in $ICUBcontrib_DIR/bin. For example, to compile the POETICON++ build do the following:
At this point, you can install iCub Contrib applications with <code>make install</code> in their own build subdirectory (again, don't use sudo!). Binaries will be installed in $ICUBcontrib_DIR/bin. For example, to compile the POETICON++ build do the following:


  cd $code/icub-contrib/src/poeticon/poeticonpp
  cd $code/poeticon
  mkdir build
  mkdir build
  cd build
  cd build
  cmake ..
  cmake ..
configure, generate, exit
  make
  make
  make install   // without sudo!
  make install


=== Updating the iCub repository in Linux ===
=== Updating the iCub repository in Linux ===


  cd $ICUB_ROOT
  cd $ICUB_ROOT
  git pull (''or'' svn update)
  git pull
 
=== Downloading iCub snapshot files ===
 
There are two types of files:
* iCub-src-x.y.z.tar.gz: the whole iCub repository, version x.y.z
* iCub-dep-x.y.z.txt: a list of the libraries, software packages and environment variables that are required to compile the code in snapshot x.y.z, including YARP version number.


== iCub Simulator ==
== iCub Simulator ==


This component is optional. Refer to the official iCub manual, section 9 (Software), available at http://wiki.icub.org/wiki/Manual#Nine._Software.2C_iCub
This component is optional. Refer to the official iCub manual, section 9 (Software), available at http://wiki.icub.org/wiki/Manual#Nine._Software.2C_iCub
=== Installing iCub_SIM in Windows ===
# Download SDL (Simple DirectMedia Layer) from http://www.libsdl.org/ (Development Libraries), unzip it somewhere and note down the directory
# Download ODE from http://wiki.icub.org/iCub/downloads/packages/windows/msvc8/, unzip it somewhere as well
# Create the environment variables <code>SDLDIR</code>, <code>ODE_DIR</code>:
#* <code>ODE_DIR</code> is ODE dir (e.g., C:/ode-0.11.1).
#* <code>SDLDIR</code> is SDL dir (C:/SDL-1.2.14).
# Add <code>%SDLDIR%/lib</code> to the <code>PATH</code> variable.
# Re-run CMake with the ODE, OPENCV and SDL variables checked.
# Compile project iCub_SIM
=== Installing iCub_SIM in Mac OS X ===
See these pages:
* [http://www.fabioruini.eu/blog/2012/04/30/icub-simulator-on-mac-os-x-lion-the-definitive-tutorial/ iCub simulator on Mac OS X Lion: the definitive (?) tutorial] by Fabio Ruini
* [http://www.martinpeniak.com/index.php?option=com_content&view=article&id=186&Itemid=131 iCub simulator, complete MacOSX installation quide] by Martin Peniak


== See also ==
== See also ==


* http://wiki.icub.org/wiki/Manual#Six._Software.2C_Installing_YARP_and_iCub - official iCub manual
* http://wiki.icub.org/wiki/Manual#Six._Software.2C_Installing_YARP_and_iCub - official iCub manual
* [[VisLab machines configuration]]
* [[iCub machines configuration]]
* http://wiki.icub.org/iCub/downloads/packages/windows/msvc8/


[[Category:Vislab]]
[[Category:Vislab]]

Latest revision as of 17:32, 19 July 2017

This article deals with the installation of YARP and iCub software. Word of advice: always refer to the official iCub documentation first:

Below, we list some unofficial additional notes provided by VisLab members.

See iCub software/Archive for obsolete information.

Dependencies

In Linux, refer to iCub machines configuration#Dependencies.

Environment variables

The following environment variables must be set.

  • YARP_ROOT: location of the yarp source code
  • YARP_DIR: yarp build directory, usually YARP_ROOT/build
  • ICUB_ROOT: location of the icub-main source code
  • ICUB_DIR: icub-main build directory, usually ICUB_ROOT/build

In Linux, refer to iCub machines configuration#Environment variables.

YARP

Browsing the yarp repository online

https://github.com/robotology/yarp

Getting the yarp repository in Windows

Inside TortoiseGit, use the file manager to browse to the location where you would like to download the code; right click on an empty region of the window and select "checkout" from the contextual menu; type the above address in the "URL of repository" field. No password or username will be required.

Note: if you use Cygwin, refer to Linux instructions instead.

Installing yarp in Windows

Note: all environment variables should have '/' and NOT '\' (except in the PATH enviroment variable).

Getting the yarp repository in Linux

Run the following command in a console terminal, typically from the $code directory:

git clone https://github.com/robotology/yarp.git

Compiling the yarp repository in Linux

mkdir $YARP_DIR
cd $YARP_DIR
ccmake $YARP_ROOT

In the CMake interface, set the following

CMAKE_BUILD_TYPE Release
CREATE_LIB_MATH ON

then hit c and g in order to generate the project files, to obtain the Makefile.

Having generated your project file, only the actual compilation remains to be done:

make

Don't use sudo make install! Rather, add the location of the binaries to the $PATH environment variable (see below).

Updating the yarp repository in Linux

cd $YARP_ROOT
git pull

Downloading YARP as a single file

Refer to http://www.yarp.it. Pre-compiled binaries are also available.

iCub

Browsing the iCub repository online

icub-main

https://github.com/robotology/icub-main/

iCub Contrib Software

These are small repositories in the Robotology organization page, which contain special components and demos, for example the ball tracking and grasping demo is here: https://github.com/robotology/icub-basic-demos/

Getting the iCub repository in Windows

Inside TortoiseGit, use the file manager to browse to the location where you would like to download the code; right click on an empty region of the window and select "checkout" from the contextual menu; type the repository address in the "URL of repository" entry.

Note: if you use Cygwin, refer to Linux instructions instead.

Getting the iCub repository in Linux

icub-main

Run the following command in a console terminal, typically from the $code directory:

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

contrib software

Set up icub-contrib-common (see below), then get the contrib application that you wish to install (for example POETICON++), CMake and build it.

firmware (only for pc104)

git clone https://github.com/robotology/icub-firmware-shared
git clone https://github.com/robotology/icub-firmware-build

Compiling the iCub repository in Linux

icub-main

mkdir $ICUB_DIR
cd $ICUB_DIR
ccmake $ICUB_ROOT

In the CMake interface, set the following

CMAKE_BUILD_TYPE Release
ENABLE_icubmod_cartesiancontrollerclient ON
ENABLE_icubmod_cartesiancontrollerserver ON
ENABLE_icubmod_gazecontrollerclient ON

then hit c and g in order to generate the project files, to obtain the Makefile.

Having generated your project file, the actual compilation remains to be done:

make

Provided that YARP_ROBOT_NAME=iCubLisboa01 is set, robot-specific files will be automatically copied by CMake.

Don't use sudo make install! Rather, add the location of the binaries to the $PATH environment variable (see below).

icub-contrib-common metapackage (to use contrib modules, i.e., modules outside icub-main)

Follow the official instructions at the bottom of http://wiki.icub.org/wiki/Linux:Installation_from_sources but make sure to point CMAKE_INSTALL_PREFIX to the full path corresponding to $ICUBcontrib_DIR, which is accessible without administrator privileges and whose binaries will be within $PATH. To accomplish this, follow these simple instructions, paying attention to the part in bold.

Verify that your .bashrc_iCub file (or equivalent) contains these environment variables:

export ICUBcontrib_DIR=$code/icub-contrib-common/build
export PATH=$PATH:$YARP_DIR/bin:$ICUB_DIR/bin:$ICUBcontrib_DIR/bin
export YARP_DATA_DIRS=$YARP_DIR/share/yarp:$ICUB_DIR/share/iCub:$ICUBcontrib_DIR/share/ICUBcontrib

Set up the ICUBcontrib metapackage:

mkdir $ICUBcontrib_DIR
cd $ICUBcontrib_DIR
# the following command sets CMAKE_INSTALL_PREFIX to the path corresponding to $ICUBcontrib_DIR
# instead of /usr/local
cmake -DCMAKE_INSTALL_PREFIX=$(echo $ICUBcontrib_DIR) ..
ccmake ..
configure, generate, exit
make
make install

Don't use sudo make install! Rather, add the location of the binaries to the $PATH environment variable (see above).

At this point, you can install iCub Contrib applications with make install in their own build subdirectory (again, don't use sudo!). Binaries will be installed in $ICUBcontrib_DIR/bin. For example, to compile the POETICON++ build do the following:

cd $code/poeticon
mkdir build
cd build
cmake ..
configure, generate, exit
make
make install

Updating the iCub repository in Linux

cd $ICUB_ROOT
git pull

iCub Simulator

This component is optional. Refer to the official iCub manual, section 9 (Software), available at http://wiki.icub.org/wiki/Manual#Nine._Software.2C_iCub

See also