Skip to content

Aravis (Basler) GigE Camera Install Guide

Anthony Oliver edited this page Aug 23, 2013 · 5 revisions

This is a short guide on how to install Aravis for connecting to GigE cameras. This has only been tested with Basler cameras with SimpleCV, until it has been further tested it is recommended you use the separate Allied Vision Camera interface (AVTCamera class) when using an Allied Vision Camera.

You will need to use the modified version of Aravis to work as there seems to be a bug between handling GObject introspection and python.

Note: This has only been tested on Ubuntu 12.04 (LTS)

Install prerequisites:

sudo apt-get install autoconf intltool libxml2-dev python-gobject-dev gobject-introspection gtk-doc-tools libgstreamer0.10-dev python-gst0.10-dev

Clone the Sight Machine aravis repo:

git clone https://github.com/sightmachine/aravis.git
cd aravis
./autogen.sh
./configure --enable-viewer --enable-gst-plugin --enable-introspection=yes
make
sudo make install

To test it, make sure your camera is plugged in, then:

cd test/python
./launch arv-camera-test.py 

You should see output similar to the following:

Camera vendor : Basler
Camera model  : acA1300-30gc
Camera id     : 21343333
ROI           : 128x128 at 0,0
Payload       : 16384
Pixel format  : Mono8
Start acquisition
Acquisition
<Buffer object at 0x1844690 (ArvBuffer at 0x1e39900)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e399e0)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e39a50)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e39ac0)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e39b30)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e50c00)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e50c70)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e50ce0)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e50d50)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e50dc0)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e39900)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e399e0)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e39a50)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e39ac0)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e39b30)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e50c00)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e50c70)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e50ce0)>
<Buffer object at 0x1844690 (ArvBuffer at 0x1e50d50)>
<Buffer object at 0x18446e0 (ArvBuffer at 0x1e50dc0)>
Stop acquisition

Now you know the python bindings built correctly.

If you want to use the Camera within SimpleCV it will need the environment variables setup correctly. To do this you may need to add the static path, or from the aravis directory run:

export GI_TYPELIB_PATH=$GI_TYPELIB_PATH:../../src
export LD_LIBRARY_PATH=../../src/.libs

These can also be set in your .bashrc file so they load every time, could be set dynamically from within python, but keep in mind if you use the above that it has to be ran from the aravis directory. Other best practice maybe to copy the aravis folder to something like: /usr/local/share/ and then link the full path in your export.