-
Notifications
You must be signed in to change notification settings - Fork 196
/
Copy pathREADME
250 lines (186 loc) · 9.98 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
__ __ ___ ____ ____ ___
\ \/ // | / __ \ / __ \|__ \
\ // /| | / /_/ // /_/ /__/ /
/ // ___ | / _, _// ____// __/
/_//_/ |_|/_/ |_|/_/ /____/
Welcome to YARP.
YARP is a library and toolkit for communication and device interfaces,
developed by humanoid robotics researchers but useful beyond that field.
Material included in YARP is copyright its authors. YARP is released
under the terms of the LGPL v2.1 or later. See COPYING for details.
Certain optional parts of YARP have dependencies that have more
requirements than the LGPL:
+ libYARP_math uses the GNU Scientific Library, under the GPL.
+ devices urbtc, vfw, dimax_u2c have components that are under the GPL.
===============================================================================
INSTALLATION and COMPILATION
----------------------------
See official instructions at:
http://wiki.icub.org/yarp/specs/dox/user/html/install.html
What follows is a summary.
There are a few different ways to compile YARP.
See if there is a file called "QUICKSTART-*.TXT" whose name matches
your system configuration. If so, then you have a distribution of
YARP tailored to your specific operating system, and the instructions
in this file will give the fastest way to get going.
Compiling YARP requires "cmake" on every platform where YARP is supported.
===============================================================================
PREREQUISITES *** important! read this! ***
-------------
YARP depends on a small, stable subset of the ACE communications
library. Make sure you install ACE before following any of the steps
below. See:
http://www.cs.wustl.edu/~schmidt/ACE.html
or:
http://wiki.icub.org/yarp/specs/dox/user/html/install.html#install_ace
for download and installation instructions. Some linux distributions
have binary packages for ACE (e.g. debian has "libace-dev").
* Read about ACE here: http://www.cs.wustl.edu/~schmidt/ACE.html
* Download ACE here: http://deuce.doc.wustl.edu/Download.html
o For Windows, we suggest: http://deuce.doc.wustl.edu/ACE-5.5.zip
o For all others, we suggest: http://deuce.doc.wustl.edu/ACE-5.5.tar.gz
* Please try using a release and not a beta version of ACE (at the moment of
writing the latest version is 5.5)
* Compile ACE using the instructions here:
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/ACE-INSTALL.html
o Don't panic! The instructions cover a lot of operating systems and
compilers. Just look carefully for your combination.
o Windows/DevStudio instructions are here:
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/ACE-INSTALL.html#msvc
o UNIX/gcc instructions are here:
http://www.cs.wustl.edu/~schmidt/ACE_wrappers/ACE-INSTALL.html#unix_traditional
o OSX/gcc users, follow the UNIX instructions.
On Microsoft Windows, please set the ACE_ROOT environment variable to
the location of your ACE install (a directory called "ACE_wrappers").
The directory in which the ACE library resides will also need to be in
your PATH environment variable in other for YARP executables to be
able to run.
For OSX/gcc, a note from Dimitri Ognibene:
------------------------------------------
(from http://groups.google.com/group/comp.soft-sys.ace/browse_thread/thread/c8fdbd72b3938149)
create an $ACE_ROOT/ace/config.h file with this content:
#define ACE_LACKS_UNSETENV
#define ACE_LACKS_ISCTYPE
#define ACE_NEEDS_DL_UNDERSCORE
#include "ace/config-macosx-tiger.h"
===============================================================================
CMAKE
-----
Cmake (www.cmake.org) can create developer studio projects, makefiles,
or other build files for a number of operating systems and tool sets.
Download cmake from www.cmake.org or install it as a package if available
for your system. For extra tips, see:
http://wiki.icub.org/yarp/specs/dox/user/html/install.html#cmake
In Linux, in the YARP directory, type:
cmake . (or "ccmake ." for a graphical interface with clear options)
cmake . (needed for a few version combinations of cmake/pkg-config/gtk)
make
make test
* Note: CMake tries to remember things you've already told it.
If you run into trouble while setting things up, and decide to
start again, consider deleting the automatically generated
"CMakeCache.txt" file to make sure CMake is really starting agin.
* See GUIS section below for steps needed to compile YARP graphical
interfaces.
In Microsoft Windows, run cmake, answer "Where is the source code" by
browsing to the YARP directory.
* Note: in Microsoft Windows your can run cmake as a GUI (by clicking
on the appropriate icon) or from the command line. We recommend
that you run the GUI - it is easier to see what is going on.
* Note: CMake tries to remember things you've already told it.
If you run into trouble while setting things up, and decide to
start again, consider clicking the "Delete Cache" button to make
sure CMake is really starting agin.
* See GUIS section below for steps needed to compile YARP graphical
interfaces.
Answer "Where to build the binaries" with whatever you like.
Then hit the "Configure" button. You'll be prompted for the Generator
you want (e.g. "NMake Makefiles", "Visual Studio 6", ...). Pick
the build tool you are comfortable with.
A bunch of options will show up. DON'T PANIC. They may
all be correct. If you don't understand them, you can try just
hitting the "Configure" button to accept them.
If applicable for your chosen generator, make sure that
"CMAKE_BUILD_TYPE" is set to "Release" or "Debug", depending on
how you compiled ACE.
Make sure that the "ACE_INCLUDE_DIR" and "ACE_LIBRARY" values are set
to something related to where your installed ACE, fixing them manually
if necessary.
Hit the "Configure" button again if needed, then "OK".
In the directory you gave as "Where to build the binaries" should be
everything you need to compile, by opening a workspace, or running nmake,
etc.
After compilation, executables are in the "bin" directory and libraries are
in the "lib" directory.
===============================================================================
GUIS
----
Graphic User Interface(s) are implemented in YARP with gtk+. By default GUIs
are not compiled, but you can ask cmake to include them.
Simply change the value of the cache variable CREATE_GUIS to ON.
The easiest way to do this is through the graphic interface of cmake
(ccmake in linux), but if you prefer you can manually edit the cache
file instead (either ways are fine with us :)
Before you ask cmake to generate your project/make files, you need to install
gtk+. Needless to say, this procedure is different on Linux and Windows.
-Installing gtk+ on Linux
Follow the installation guide in the gtk web site (www.gtk.org/download).
on Debian: sudo apt-get install libgtk2.0-dev pkgconfig
-Installing gtk+ on Mac OSX
We don't have a lot of experience on Macs, but here's some suggestions.
Please let us know what works for you.
+ Install fink from http://fink.sourceforge.net
+ Then from Terminal run "sudo apt-get install gtk+2-dev pkgconfig"
+ It also seemed necessary to install a few more things: "sudo apt-get install glib2-dev pango1-xft2-dev atk1"
+ Now you should be ready to run cmake and compile.
+ The "stable" gtk+2 version at the time of writing is a little older than
what we're using on Linux/Windows, so some functions are disabled in the
yarpview GUI until we rewrite them.
-Installing gtk+ on Windows
We recommand you install glade for win32, which sets up everything you need
to compile applications with gtk (including yarp guis). Don't be scared, this
installation will not copy files in your windows directory (unless you say so)
and will only add a couple of environment variables. However, we understand
you might want to install gtk manually (indeed this is what the author decided
to do the first time he installed gtk), so we provide a short explanation
of how to do it.
1) Glade for win32. Go to gladewin32.sourceforge.net and get the
gtk+/win32 Development Environment from the download section (at the time
of writing the release 2.8.18 is available). Run the installer and follow
the instructions.When prompted to choose which components you want to install
select "Register Environment Variables" and "Devel headers/libraries". Feel
free to decide if you want "Glade" and the "Documentation" (they are not
required by yarp). Pick the destination folder you prefer and finish the
installation.
The Glade installation defines GTK_BASEPATH environment variable to point
to the directory where gtk was installed. GTK_BASEPATH will be used by cmake
to locate the header files and the libraries required to compile and link gtk.
We also recommend that you append %GTK_BASEPATH%/bin to your PATH so that
the dlls will be correctly found and loaded at runtime.
2) The manual installation of gtk+ is a bit complicated because you need to
download and unpack a few packages. Go to http://www.gtk.org/download/ and
click on "win32 packages", download:
atk and atk-dev
cairo and cairo-dev
glib and glib-dev
gtk+ and gtk+-dev
pango and pango-dev
and
gettext
libiconv
libpng
zlib123-dll
from the "dependencies" subdirectory. As you will see, all the above libraries
come in different versions, pick the most recent ones.
Unpack all zip files in the same directory. Create the environment variable
GTK_BASEPATH to point to it (e.g. if you unpack all zip files in
c:\gtk\ set GTK_BASEPATH=c:\gtk). GTK_BASEPATH will be used by cmake to locate
the required header files and libraries. Also append %GTK_BASEPATH%/bin
to your PATH, so that all dlls are located and loaded at runtime.
Once you you installed gtk+, (please check that the environment variable
GTK_BASEPATH exists and points to the correct location, that is the
root of your gtk+ installation), activates the cache variable CREATE_GUIS
(unless you have already done this) and ask cmake to generate your project
files (click on configure a couple of times). If you installed gtk+ correctly
everything should work fine, otherwise cmake will ask you to locate a few
header files and libraries.