ICub software: Difference between revisions
(→See also: more links) |
m (change section level) |
||
Line 55: | Line 55: | ||
This will create a new directory called '''yarp2''' that contains the software. Your environment variables <code>YARP_DIR</code> and <code>YARP_ROOT</code> should be set to that directory (e.g., <code>/home/yourname/yarp2</code>). | This will create a new directory called '''yarp2''' that contains the software. Your environment variables <code>YARP_DIR</code> and <code>YARP_ROOT</code> should be set to that directory (e.g., <code>/home/yourname/yarp2</code>). | ||
== Compiling the yarp2 repository in Linux == | === Compiling the yarp2 repository in Linux === | ||
To compile the yarp2 repository, go to <code>YARP_DIR</code> and '''generate the project files''' with the CMake program with the command | To compile the yarp2 repository, go to <code>YARP_DIR</code> and '''generate the project files''' with the CMake program with the command | ||
Line 110: | Line 110: | ||
This will create a new directory called '''iCub''' that contains the software. Your environment variables <code>ICUB_DIR</code> and <code>ICUB_ROOT</code> should be set to that directory (e.g., <code>/home/yourname/iCub</code>). | This will create a new directory called '''iCub''' that contains the software. Your environment variables <code>ICUB_DIR</code> and <code>ICUB_ROOT</code> should be set to that directory (e.g., <code>/home/yourname/iCub</code>). | ||
== Compiling the iCub repository in Linux == | === Compiling the iCub repository in Linux === | ||
To compile the iCub repository, go to <code>ICUB_DIR</code> and '''generate the project files''' with the CMake program, typing with the command | To compile the iCub repository, go to <code>ICUB_DIR</code> and '''generate the project files''' with the CMake program, typing with the command |
Revision as of 14:04, 28 September 2010
Effective August 2009, YARP and iCub software repositories have been moved to SourceForge.net servers and must be downloaded with Subversion (SVN).
It is recommended that you rename your old (CVS) iCub and yarp2 directories and do a fresh download of the new SVN repositories.
Preliminaries
You should install an SVN client on your system if you do not have one already. For Windows, TortoiseSVN is recommended. If you run Linux or other UNIX flavours, chances are high that you can just go ahead using svn
in command line (if that is not the case, install it with apt-get install subversion
or equivalent).
Furthermore, you should install CMake.
YARP
Browsing the yarp2 repository online
http://yarp0.svn.sf.net/viewvc/yarp0/trunk/yarp2/
Getting the yarp2 repository in Windows
Inside 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 "SVN checkout" from the contextual menu.
Type the following string in the entry "URL of repository":
https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2
No password or username will be required.
Note: if you use Cygwin, refer to Linux instructions instead.
Installing yarp2 in Windows
Note: all environment variables should have '/' and NOT '\' (except in the PATH enviroment variable)! The directories do not need to be the same as the ones presented here, just be sure to alter the environment variables correctly.
- Download ACE and GLS from http://eris.liralab.it/iCub/downloads/packages/windows/msvc8/ ; unzip them to anywhere (don't forget where :)).
- If you want GUIs, download GTKMM from http://live.gnome.org/gtkmm/MSWindows and use the installer.
- Create environment variable: ACE_ROOT, GTK_BASEPATH, GTKMM_BASEPATH, GSL_DIR.
- Add this to the PATH environment variable: %ACE_ROOT%/lib (important: make sure you put it at the beginning of the PATH environment variable, to avoid conflicts with other existing ACE versions on the system)
- ACE_ROOT is ACE dir (e.g., C:/ace_wrappers).
- GTK_BASEPATH and GTKMM_BASEPATH is GTKMM dir (C:/gtkmm).
- GSL_DIR is GSL dir (C:/gsl-1.8).
- Set the YARP_ROOT, YARP_DIR environment variables.
- Add this to the PATH enviroment variable: %YARP_DIR%/bin/Release (and/or Debug). Note: these directories will be created later
- YARP_ROOT is yarp dir (C:/yarp2).
- YARP_DIR is yarp build dir (C:/yarp2/build).
- Use CMake to build the YARP SLN files. Point the source code to the yarp2 dir, and build to the yarp2/build dir (which will be created now).
- In CMake, check: CREATE_DEVICE_LIBRARY_MODULES, CREATE_LIB_MATH and, optionally, CREATE_GUIS (don't uncheck anything!).
- Click: Configure, Configure, Generate.
- Go to your YARP_DIR and open YARP.sln with Visual Studio
- Go to Build->Batch Build
- Check ALL_BUILD (Release and/or Debug) and Build!
Getting the yarp2 repository in Linux
Paste the following command in a console terminal:
svn co https://yarp0.svn.sourceforge.net/svnroot/yarp0/trunk/yarp2
This will create a new directory called yarp2 that contains the software. Your environment variables YARP_DIR
and YARP_ROOT
should be set to that directory (e.g., /home/yourname/yarp2
).
Compiling the yarp2 repository in Linux
To compile the yarp2 repository, go to YARP_DIR
and generate the project files with the CMake program with the command
ccmake .
and you obtain a Makefile.
Having generated your project file, only the actual compilation remains to be done. In Linux type make
.
Updating the yarp2 repository in Linux
cd $YARP_ROOT svn update
Downloading YARP as a single file
If for whatever reason you cannot use SVN on a machine, or you do not want the very latest revision of the repository, you may just download a single file containing YARP here: [1]. Pre-compiled binaries are also available.
iCub
Browsing the iCub repository online
http://robotcub.svn.sf.net/viewvc/robotcub/trunk/iCub/
Getting the iCub repository in Windows
Inside 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 "SVN checkout" from the contextual menu.
Type the following string in the entry "URL of repository":
https://robotcub.svn.sourceforge.net/svnroot/robotcub/trunk/iCub
No password or username will be required.
Note: if you use Cygwin, refer to Linux instructions instead.
Installing iCub in Windows
- Create enviroment variable: ICUB_ROOT, ICUB_DIR.
- ICUB_ROOT is iCub dir (e.g., C:/icub).
- ICUB_DIR is iCub build dir (C:/icub/main/build).
- Install OpenCV 1.0, available at http://sourceforge.net/projects/opencvlibrary/files/ . Make sure that the variable OPENCV_DIR was created and add %OPENCV_DIR%/bin to the PATH environment variable.
- If you intend to use the iKin kinematics modules (normally you don't - this is only needed on servers), then download IPOPT, unzip it and create the environment variable IPOPT_DIR, e.g. C:\Ipopt-3.7.0-win32-msvc8-yarp
- Use CMake to build the iCub SLN files. Point the source code to the icub/main dir, and build to the icub/main/build dir (which will be created now).
- In CMake, check YARP_AUTO_LINK (not sure why?) and the modules you might want working (don't unheck anything!).
- Click: Configure, Configure, Generate.
- Go to your ICUB_DIR open iCub.sln
- Go to Build->Batch Build
- Check ALL_BUILD (Release and/or Debug) and Build! (sometimes frameGrabberGui2 will not compile correctly)
Getting the iCub repository in Linux
Paste the following command in a console terminal:
svn co https://robotcub.svn.sourceforge.net/svnroot/robotcub/trunk/iCub
This will create a new directory called iCub that contains the software. Your environment variables ICUB_DIR
and ICUB_ROOT
should be set to that directory (e.g., /home/yourname/iCub
).
Compiling the iCub repository in Linux
To compile the iCub repository, go to ICUB_DIR
and generate the project files with the CMake program, typing with the command
ccmake .
and you obtain a Makefile.
Having generated your project file, only the actual compilation remains to be done. In Linux type make
.
Updating the iCub repository in Linux
cd $ICUB_ROOT svn update
Downloading iCub snapshot files
Periodic snapshots of the iCub repository are available at http://eris.liralab.it/iCub/downloads/src/
Note that 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
Installing iCub_SIM in Windows
To install iCub Simulator (optional):
- Download the SDL (Simple DirectMedia Layer) from http://www.libsdl.org/ (Development Libraries), unzip it somewhere and note down the directory
- Download ODE from http://eris.liralab.it/iCub/downloads/packages/windows/msvc8/, unzip it somewhere as well
- Create 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 the PATH variable.
- Re-Run CMAKE with the ODE, OPENCV and SDL variables checked.
- Compile project iCub_SIM
Committing changes to the repositories
If you are a developer and you need to add/modify files within the repository, you need two things:
- a SourceForge.net account; once you have that, send an email to the RobotCub project administrators to join the project
- make sure that your SVN client is configured correctly with regard to auto-props, which is a mechanism that takes care of line endings and MIME filetypes according to wildcards (for example, setting some flags for *.txt files and other flags for *.sh). Go here for a better explanation, and check the 'Subversion client flags' page (linked below) for auto-props adopted by RobotCub developers.
See also
- http://eris.liralab.it/wiki/Manual#Six._Software.2C_Compiling_YARP_and_iCub
- http://eris.liralab.it/wiki/Getting_Subversion
- http://eris.liralab.it/wiki/GettingYARP_svn
- http://eris.liralab.it/wiki/Getting_the_iCub_software
- http://eris.liralab.it/wiki/Subversion_client_flags
- http://eris.liralab.it/wiki/PrepareWindows
- http://eris.liralab.it/iCub/downloads/packages/windows/msvc8/