-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
236 lines (154 loc) · 7.97 KB
/
README
File metadata and controls
236 lines (154 loc) · 7.97 KB
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
=======
Aravis
======
Aravis is a glib/gobject based library for video acquisition using Genicam cameras. It currently only implements an ethernet camera protocol used for industrial cameras.
Aravis is released under the LGPL v2+.
Links
=====
Mailing list: aravis@freelists.org ( http://www.freelists.org/list/aravis )
Releases: http://ftp.gnome.org/pub/GNOME/sources/aravis
Git repository: http://git.gnome.org/cgit/aravis
Bugzilla: https://bugzilla.gnome.org/browse.cgi?product=aravis
Blog: http://blogs.gnome.org/emmanuel/category/aravis/
Genicam standard : http://www.genicam.org
Also see docs/camAravis.tex
Works best with a dhcp server, so that cameras get assigned an IP address.
Things to install to get working... fedora (I think):
sudo yum install gstreamer-plugins-base-devel
sudo yum install libnotify-devel
sudo yum install gtk2-devel
sudo yum install gtk3-devel
sudo yum install gtk+-devel
sudo yum install gstreamer-devel
sudo yum install libxml2-devel
sudo yum install libxml2
sudo yum install libxml-devel
sudo yum install glibc-devel glib2-devel
sudo yum install gstreamer-0.10
sudo yum install gstreamer
sudo yum install glib2
sudo yum install intltool
fc20:
sudo yum install gstreamer-plugins-base-devel libnotify-devel gtk2-devel gtk3-devel gtk+-devel gstreamer-devel libxml2-devel libxml2 libxml-devel glibc-devel glib2-devel gstreamer-0.10 gstreamer glib2 intltool
Ubuntu: intltool gstreamer-0.10 libnotify-dev gtk+-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libgtk2.0-dev gstreamer0.10-plugins-bad
Also, maybe:
gstreamer-tools
These, actually, not required:
gobject-introspection
gtk2.0-dev
./configure --enable-viewer
make
sudo make install
cd src
make -f Makefile.darc
cp libcamAravis.so /path/to/darc/lib/ #(eg /rtc/lib/ or /opt/darc/lib/)
arv-viewer
Set the networking:
ifconfig ethX mtu 9000 # X is the ethernet port with camera on it.
sysctl -w net.core.rmem_max=26214400
Put into /etc/sysctl.conf: (from myricom website)
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096 65536 16777216
net.core.netdev_max_backlog = 250000
Maybe also:
net.core.rmem_default = 4194304
Then use:
sysctl -p /etc/sysctl.conf
Possible options (with defaults for gpuserver shown):
net.ipv4.udp_mem = 579720 772963 1159440
net.ipv4.udp_rmem_min = 4096 # Maybe set to 16384? Or 65536
net.ipv4.udp_wmem_min = 4096
And:
sysctl -w net.core.wmem_max=16777216
sysctl -w net.core.rmem_default=4194304
Other options:
IRQ binding:
http://fasterdata.es.net/host-tuning/interrupt-binding/
Try: echo 0 > /proc/sys/net/ipv4/conf/eth2/rp_filter (or ethX)
to disable reverse path filtering.
Set net.ipv4.conf.default.rp_filter=2 or 0?
eg :
echo 2 > /proc/sys/net/ipv4/conf/default/rp_filter #(or 0?)
echo 2 > /proc/sys/net/ipv4/conf/all/rp_filter #(or 0?)
dhcpd /etc/dhcp*/*.conf
/etc/defualt/isc-dhcp-server
Also - in camAravis - I now set the socket buffer to 16*npxls - so
that it has a large enough buffer to store them all. In reality, for
large cameras it may get set to less than this if rmem_max is
smaller. Also - might want to do something cleverer at some point to
reduce memory...
For a good overview of how to maximise network performance, have a
look at:
https://blog.cloudflare.com/how-to-achieve-low-latency/
To change framerate etc... (bobcats)
arv-tool-0.2 control ProgFrameTimeEnable=true
arv-tool-0.2 control ProgFrameTimeAbs=100000 #to set exp in us.
PixelSize Bpp16
Full list of features can be obtained with arv-tool... (--help is friend!)
Doesn't work when viewer is running...
Other things to set are:
TriggerMode=On/Off
TriggerSource=TimerTrigger/External/Software
ExposureMode=Off/Timed/TriggerWidth (Not available)/IOExposureControl
AcquisitionMode=Continuous/SingleFrame
Various trigger options to test with external triggering.
ExposureTimeRaw
TriggerType=Standard/Fast/Double/Asynchronous/FrameAccumulation
Probably want standard.
GainRaw= an integer...
ExposureTimeRaw= (not sure if works)
Access to pixel stream in arvgvstream.c...
arv_gv_stream_thread
Used in arv_gv_stream_new
Called in arvgvdevice.c function arv_gv_device_create_stream.
Which is called by arv_gv_device_class_init
But, this isn't called anywhere!
arvexample.c:
camera = arv_camera_new (NULL);
stream = arv_camera_create_stream (camera, NULL, NULL);
g_signal_connect (stream, "new-buffer", G_CALLBACK (new_buffer_cb), &data);
arv_camear_create_stream has:
arv_device_create_stream which is in arvdevice.c
This calls the create_stream method of ArvDevice objects.
This is probably the arvgvdevice.c device_create_Stream object.
Can we do it without the g_signal_connect?
The device_create_stream method calls arv_gv_stream_new, which is in
arvgvstream.c
Example in tests/arvcameracallbacktest.c
Multiple cameras...
I think need to look at GMainContext.
Probably g_main_context_push_thread_default ()
Problems on cpuserver after a reboot. dhcpd wasn't configured
correctly - now fixed.
Imperx, inc.-110324 - bobcat2
Imperx, inc.-110323 - bobcat3
Test with tests/arv-camera-callback-test [--name="Imprex, inc.-110323"]
tests/arv-multi-camera --name="Imperx, inc.-110323;Imperx, inc.-110324"
Works with 2 cameras, including setting of parameters... (though needs to close the stream to do this).
gcc -c arvmulticamera.c -I../src/ `pkg-config --cflags glib-2.0`
gcc -o arvmc -L../src -pthread arvmulticamera.o ../src/arvbuffer.o ../src/arvgcfloat.o ../src/arvcamera.o ../src/arvgcgroupnode.o ../src/arvdebug.o ../src/arvgcindexnode.o ../src/arvdevice.o ../src/arvgcintegernode.o ../src/arvdomcharacterdata.o ../src/arvgcinteger.o ../src/arvdomdocumentfragment.o ../src/arvgcinvalidatornode.o ../src/arvdomdocument.o ../src/arvgcnode.o ../src/arvdomelement.o ../src/arvgc.o ../src/arvdomimplementation.o ../src/arvgcport.o ../src/arvdomnamednodemap.o ../src/arvgcpropertynode.o ../src/arvdomnodelist.o ../src/arvgcregisterdescriptionnode.o ../src/arvdomnode.o ../src/arvgcregisternode.o ../src/arvdomparser.o ../src/arvgcregister.o ../src/arvdomtext.o ../src/arvgcstring.o ../src/arvenums.o ../src/arvgcstructentrynode.o ../src/arvenumtypes.o ../src/arvgcswissknife.o ../src/arvevaluator.o ../src/arvgcvariablenode.o ../src/arvgvcp.o ../src/arvgvdevice.o ../src/arvgvinterface.o ../src/arvgvsp.o ../src/arvgvstream.o ../src/arvgcboolean.o ../src/arvinterface.o ../src/arvgccategory.o ../src/arvmisc.o ../src/arvgccommand.o ../src/arvstream.o ../src/arvgcconverter.o ../src/arvstr.o ../src/arvgcenumentry.o ../src/arvsystem.o ../src/arvgcenumeration.o ../src/arvgcfeaturenode.o ../src/arvfakeinterface.o ../src/arvfakedevice.o ../src/arvfakestream.o ../src/arvfakecamera.o ../src/arvzip.o ../src/arvgcfloatnode.o `pkg-config --cflags --libs dbus-1 dbus-glib-1 glib-2.0` -pthread -lgio-2.0 -lgobject-2.0 -lgmodule-2.0 -lxml2 -lgthread-2.0 -lrt -lglib-2.0 -lz -lm
To install the darc module...:
Install the above dependencies, then:
./configure --enable-viewer
make
cd src
make -f Makefile.darc
If get the -fPIC warning, have to edit src/Makefile and add -fPIC to the cflags line. Then do (in src/):
touch *.c
make
make -f Makefile.darc
make -f Makefile.darc install
cp ../conf/configBobcat2cam.py /rtc/conf
If you get an error, check that the config file is pointing to the 2 cameras you want to use...
FOR multicasting:
If it doesn't work out of the box, try the following settings
echo 0 > /proc/sys/net/ipv4/conf/all/rp_filter
echo 0 > /proc/sys/net/ipv4/conf/eth10/rp_filter
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
Or 2...
ifconfig eth10 promisc
For multicasting, in the config file, need to specify the multicast
address, and also whether you are the camera master (responsible for
setting everything up). And, it should be that simple!