ICub software: Difference between revisions
m (→Committing changes to the repositories: move to Archive subpage) |
|||
Line 171: | Line 171: | ||
See these pages: | 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.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 | * [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 == |
Revision as of 12:10, 2 July 2014
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.
Environment variables
The following environment variables must be set.
YARP_ROOT
: location of the yarp source codeYARP_DIR
: yarp build directory, usuallyYARP_ROOT/build
ICUB_ROOT
: location of the icub-main source codeICUB_DIR
: icub-main build directory, usuallyICUB_ROOT/build
In Linux, refer to VisLab machines configuration#Environment variables for typical variables and instructions on where to set them.
YARP
Browsing the yarp repository online
https://github.com/robotology/yarp
Getting the yarp repository in Windows
Inside TortoiseGit/TortoiseSVN, 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
To clone the repository, you can use one of these addresses:
- (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.
To use this repository through SVN, you will have to do a new checkout (checkouts prior to March 2013 are not compatible):
svn co https://github.com/robotology/yarp/trunk yarp
Compiling the yarp repository in Linux
To compile the yarp repository, go to YARP_DIR
(the first time you must create it) and generate the project files with the CMake program with the command
ccmake $YARP_ROOT
and you obtain a Makefile.
Having generated your project file, only the actual compilation remains to be done:
make
Updating the yarp repository in Linux
cd $YARP_ROOT git pull (or svn update)
Recommended CMake flags for yarp
CMAKE_BUILD_TYPE Release CREATE_LIB_MATH ON
Downloading YARP as a single file
Refer to http://wiki.icub.org/yarpdoc/index.html -> Downloads. Pre-compiled binaries are also available.
iCub
Browsing the iCub repository online
icub-main:
https://github.com/robotology/icub-main/
icub-contrib, icub-firmware:
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
Inside TortoiseGit/TortoiseSVN, 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
Paste the following command in a console terminal, typically from the $code
directory:
svn co https://svn.code.sf.net/p/robotcub/code/trunk/iCub
Notice that this may take some time. Alternatively you can download individual parts of the repository (i.e. main and contrib or firmware).
This will create a new directory called iCub that contains the software. Your environment variable ICUB_ROOT
should be set to that directory (e.g., $code/iCub
).
Compiling the iCub repository in Linux
icub-main
To compile the iCub repository, go to ICUB_DIR
(the first time you must create it) and generate the project files with the CMake program, typing with the command
ccmake $ICUB_ROOT/main
and you obtain a Makefile.
Having generated your project file, the actual compilation remains to be done:
make
With YARP > 2.3.23 and iCub > 1.1.13 software versions, your installation is finished at this point. Provided that YARP_ROBOT_NAME=iCubLisboa01
is set, robot-specific files will be automatically copied by CMake.
With older versions, you needed to define the environment variable ICUB_ROBOTNAME=iCubLisboa01
and type
make install_applications
icub-contrib
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 avoid installing these applications with sudo in system directories (/usr/local/lib
, /usr/local/share
).
Put these into .bash_env
:
export ICUBcontrib_DIR=$ICUB_ROOT/contrib/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
Now:
mkdir $ICUB_ROOT/contrib/build mkdir $ICUB_ROOT/contrib/src/ICUBcontrib/build cd $ICUB_ROOT/contrib/src/ICUBcontrib/build ccmake .. // CMAKE_INSTALL_PREFIX must point to full $ICUBcontrib_DIR path // configure, generate, exit make install
At this point, you can install contrib applications with make install
in their own build subdirectory (don't use sudo!). Binaries will be installed in $ICUBcontrib_DIR/bin.
Updating the iCub repository in Linux
cd $ICUB_ROOT git pull (or svn update)
Recommended CMake flags for iCub
CMAKE_BUILD_TYPE Release
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
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
SDLDIR
,ODE_DIR
:ODE_DIR
is ODE dir (e.g., C:/ode-0.11.1).SDLDIR
is SDL dir (C:/SDL-1.2.14).
- Add
%SDLDIR%/lib
to thePATH
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:
- iCub simulator on Mac OS X Lion: the definitive (?) tutorial by Fabio Ruini
- iCub simulator, complete MacOSX installation quide by Martin Peniak