-
Notifications
You must be signed in to change notification settings - Fork 7
/
INSTALL
311 lines (233 loc) · 8.96 KB
/
INSTALL
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
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
Quick install:
Ubuntu 10.04:
make ubuntu1004 && sudo make install
Ubuntu 10.10:
make ubuntu1010 && sudo make install
Ubuntu 12.04:
make ubuntu1204 && sudo make install
Ubuntu 14.04:
make ubuntu1404 && sudo make install
Ubuntu 16.04:
make ubuntu1604 && sudo make install
Fedora 12:
make fedora12 && sudo make install
Fedora 14:
make fedora14 && sudo make install
Fedora 20:
make fedora20 && sudo make install
RHEL6:
make rhel6
make omniORB
sudo make install
centos 6:
make centos6
sudo make install
Then set up your environment (see below)
Others may also be available - have a search within the make file (the
distro specific make targets simply install the required packages).
Other distros can be done in a similar way... just use your package
manager to install the required packages, and then "make install" darc.
Also make any specific libraries you need:
e.g. (cd src && make libsl240Int32cam.so && make libjaicam.so && make install)
(assumes you have these cameras, and the right drivers/cards etc).
Environment:
Edit (or create) /etc/omniORB.cfg to have (or larger if using a large AO system)
giopMaxMsgSize = 209715200 # 200 MBytes
And, if you have more than 1 ethernet port, you may wish to use:
endPoint = giop:tcp:YOURIPADDRESS: (because corba doesn't choose a
sensible default)
export PYTHONPATH=$PYTHONPATH:/opt/darc/lib/python:
export PATH=$PATH:/opt/darc/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/darc/lib:/usr/local/lib:/usr/local/lib64
(Also put these in your .bashrc file)
#CORBA name server: (maybe change the address to wherever your
#omniNames is running)
export ORBInitRef="NameService=corbaname::localhost"
#Fedora/redhat/centos installs:
#Put omniORB on your path:
#Note, for fedora12, X==6, for fedora 14, X==7.
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.X/site-packages:/usr/local/lib64/python2.X/site-packages
#And prepare the corba name service, if you're running it locally:
sudo mkdir /var/omninames
sudo chmod 777 /var/omninames
omninames -start
#hereafter, upon rebooting, running omninames won't require the -start option.
Testing:
First start the CORBA name server if necessary (on Ubuntu it starts
automatically, while on Fedora, you need to start it):
As root: omniNames (with -start if running for the first time)
Then run darc one of:
darccontrol /rtc/conf/configcamfile.py -o
darccontrol /opt/darc/conf/configcamfile.py -o
And check the status:
darcmagic status
Unable to connect to nameservice?
Make sure omniNames is running (ps ax | grep omniNames).
If you have the following line in /etc/hosts then remove "localhost"
from this line (affects ubuntu 10.04)
::1 localhost ip6-localhost ip6-loopback
Further notes (mostly ignorable - you probably don't need to read any further):
The dependencies (installed above with make ubuntu1004 etc) can also
be installed by hand, which may give improved performance if they are
compiled for the machine on which they will run.
Example Library dependencies:
Install omniORB, omniORBpy and FFTW:
Either with your repository or for example with (as root):
make fftw
make omniORB (which takes a while)
Note - the --enable-float and --enable-shared options are required
with FFTW (these are probably set by your repository, but if you have
problems, this may be why).
You may also need to install numpy and matplotlib, gtk and pyinotify
(including python bindings) if you are on a non-standard platform. You
can probably get these from your repository or do (as root) make numpy
; make matplotlib. If you are on a very non-standard platform, other
libraries and tools may also be needed (libc, gcc etc)
You may also need packages such as python-dev depending on your distribution.
To test whether you have these, you can do:
python -c "import numpy,matplotlib,gtk,pyinotify"
Edit /etc/omniORB.cfg to have (or larger if using a large AO system)
giopMaxMsgSize = 209715200 # 200 MBytes
DARC installation:
If required, copy Makefile.config to Makefile.config.local and edit as required.
Then run make in the darc directory:
make
Then make any interface libraries that you need (note - these will
probably require specific camera/mirror hardware libraries - you will
know what you need...).
e.g.
(cd src && make libsl240Int32cam.so )
Then do:
make install.
Then copy your interface libraries to lib e.g. (depending what is in Makefile.config.local):
cp src/libsl240Int32cam.so /opt/darc/lib
Copy the contents of /opt/darc/etc/rtc.bashrc after adapting for your
requirements, e.g. into your ~/.bashrc file:
Make sure PYTHONPATH includes lib/python
Make sure your ORBInitRef environment variable points to your name
server: Possibly export ORBInitRef="NameService=corbaname::localhost"
Make sure lib is on your LD_LIBRARY_PATH
Make sure PATH includes bin
To run, you can then do (after running the omniORB nameserver,
omniNames, in the location pointed to by your ORBInitRef variable)):
darccontrol /PATH/TO/YOURCONFIGFILE -o
As an example, you can run
darccontrol /rtc/conf/configCanaryAFile.py -o
Note, the -o flag isn't needed, and shouldn't be used in a production
environment, in which case, standard output is redirected to a file in
/dev/shm, which can then be read by clients. However, it is useful
for debugging as it allows you to view output in your terminal.
Then wait for a bit while it initialises and try:
darcmagic status
If is says "paused" (amongst other things) then there is a
configuration error (illegal parameters), so you should investigate.
If it says "running" then darc is running successfully.
Further installation notes:
sl240 drivers for FC12:
add #include <linux/sched.h> in dcfi.h
add -fPIC to CC_DEFINES in api/makefile.linux-2.6
see /etc/security/limits.conf (man limits.conf) to set up real-time
stuff:
someuser - memlock 51200 #kB
someuser - rtprio 80
or
@somegroup - memlock valInKB
WINDOWS installation of the GUI:
Note, this isn't tested frequently, so may not work out of the box.
In fact, may not work any more.
Install the following:
gtk - check that you can import gtk in python.
numpy
matplotlib
omniORB
omniORBpy
glade
You then need to do:
omniidl -bpython control.idl
or if you can't get this to work, copy control_idl.py from a working installation.
Make directory c:/RTC/shm/
Get the darc code.
The GUI should then run... (rtcgui.py)
Ubuntu 10.04 installation:
Can do "make ubuntu1004 && make install" and then follow the environment
instructions below, or do it manually:
sudo apt-get install the following packages:
git-core
emacs
openssh-server
python-omniorb
fftw3
fftw3-dev
omniidl4
omniidl4-python (omniidl-python for 10.10)
omniorb4-nameserver
python-dev
python-numpy
texlive-latex-base
texlive-fonts-recommended
doxygen
glade
texlive
python-matplotlib
Get the latest version of darc... (you've probably already got it if
you are reading this)
Then (for a local install, rather than system wide):
make installdev
export PYTHONPATH=$PYTHONPATH:/home/XXX/git/darc/lib/python
export PATH=$PATH:/home/XXX/git/darc/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/XXX/git/darc/lib
export ORBInitRef="NameService=corbaname::localhost"
Edit /etc/omniORB.cfg to have (or larger if using a large AO system)
giopMaxMsgSize = 209715200 # 200 MBytes
cd doc
make #(may need running several times)
Now run:
darccontrol conf/configcamfile.py -o
Unable to connect to nameservice?
Make sure omniNames is running (ps ax | grep omniNames).
If you have the following line in /etc/hosts then remove it (comment out)
::1 localhost ip6-localhost ip6-loopback
Fedora 14 installation:
Can do "make fedora14 && make install" and then follow the environment
instructions below, or do it manually:
yum install (as root):
emacs
git
numpy
python-devel
glade3
texlive-latex
doxygen
python-matplotlib
gcc
fftw3-devel
gcc-c++
python-inotify
Get the DARC source (as a user, not root, from git or sourceforge).
If necessary, untar it:
tar -zxvf darc.tgz
cd darc
make omniORB (as root) - not available as a package for fedora.
Then:
make
make installdev
export PYTHONPATH=$PYTHONPATH:/home/XXX/git/darc/lib/python
export PATH=$PATH:/home/XXX/git/darc/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/XXX/git/darc/lib
export ORBInitRef="NameService=corbaname::localhost"
Edit /etc/omniORB.cfg to have (or larger if using a large AO system)
giopMaxMsgSize = 209715200 # 200 MBytes
#Put omniORB on your path:
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages:/usr/local/lib64/python2.7/site-packages
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/lib64
cd doc
make #(may need running several times)
Now run:
omniNames (with -start if running for the first time)
darccontrol conf/configcamfile.py -o
If you use python, and wish to have simple access to darc, you can set
up the following alias, which you would then run with darcpy PREFIX
where PREFIX is the prefix used to start darc (or nothing, if not
used):
alias darcpy="python -i -c \"import sys,controlCorba;darc=controlCorba.controlClient(sys.argv[1] if len(sys.argv)>1 else '')\""
(as seen in etc/rtc.bashrc)