BumbleBee

From ImageWiki

(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions not shown)
Line 13: Line 13:
'''1. Install Triclops'''
'''1. Install Triclops'''
-
The first step is to install Triclops, which is the propitiatory library developed by [http://www.ptgrey.com/ Point Grey]. You'll need the ''Triclops3.2.0.8-FC3.tgz'' file which is distributed by Point Grey to do this (if you don't have this file, then you shouldn't be performing these steps). Uncompress this file by typing
+
The first step is to install ''Triclops'', which is the propitiatory library developed by [http://www.ptgrey.com/ Point Grey]. You'll need the ''Triclops3.2.0.8-FC3.tgz'' file which is distributed by Point Grey to do this (if you don't have this file, then you shouldn't be performing these steps). Uncompress this file by typing
  tar -zxvf Triclops3.2.0.8-FC3.tgz
  tar -zxvf Triclops3.2.0.8-FC3.tgz
-
This will produce a directory called ''Triclops3.2.0.8-FC3''.
+
This will produce a directory called ''Triclops3.2.0.8-FC3''. Now, perform the following steps as ''root'':
 +
 
 +
PGR=/opt/point_grey
 +
mkdir $PGR
 +
cp -r Triclops3.2.0.8-FC3/doc Triclops3.2.0.8-FC3/include/ Triclops3.2.0.8-FC3/lib/ $PGR
 +
 
 +
Now, the files have been placed in a proper place. The next step is to create a ''.pc'' file such that ''pkg-config'' can find the new library. Now, create a directory called ''pkgconfig'' in the installation directory:
 +
 
 +
mkdir $PGR/pkgconfig
 +
 
 +
In this directory create a file called ''triclops3.2.pc'' with the following contents:
 +
 
 +
prefix=/opt/point_grey
 +
exec_prefix=${prefix}
 +
libdir=${prefix}/lib
 +
includedir=${prefix}/include
 +
 +
Name: triclops3.2
 +
Description: Triclops Library for Stereo
 +
Version: 3.2.0.8
 +
Libs: -L${libdir} -lpgrlibdcstereo -ltriclops -lpnmutils
 +
Cflags: -I${includedir}
 +
 
 +
Now, you just need to update your environment such that it sees this new file. Add the following line
 +
 
 +
export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/point_grey/pkgconfig
 +
 
 +
to the ''/etc/profile'' file (you can also add this to your ''~/.bashrc'' or similar if that is more appropriate). Now, ''Triclops'' should be installed.
 +
 
 +
'''2. Install pgrlibdcstereo'''
 +
 
 +
The next step is to install ''pgrlibdcstereo'' which essentially is a wrapper library ''libdc1394'' that makes it easier to work with the stereo camera. For this you'll need the ''stereo-examples-libdc-2.0.2.tar.gz'' file which is distributed by Point Grey (if you don't have access to this file, then you shouldn't be performing these steps). Uncompress this file
 +
 
 +
tar -zxvf stereo-examples-libdc-2.0.2.tar.gz
 +
 
 +
Then you'll need to edit the ''Makefile'' in the ''pgrlibdcstereo'' such that is has the following ''CPPFLAGS''
 +
 
 +
TRICLOPS = triclops3.2
 +
DC = libdc1394-2
 +
 +
# compilation flags
 +
CPPFLAGS += `pkg-config --cflags $(DC)`
 +
CPPFLAGS += `pkg-config --cflags $(TRICLOPS)`
 +
CPPFLAGS += -Wall -g
 +
CPPFLAGS += -DLINUX
 +
 
 +
Then change to this directory and compile the library:
 +
 
 +
cd pgrlibdcstereo
 +
make
 +
 
 +
Now install the library by running the following commands as ''root''
 +
 
 +
cp libpgrlibdcstereo.a $PGR/lib
 +
cp *.h $PGR/include
 +
 
 +
Now, ''libpgrlibdcstereo'' should be installed.
 +
 
 +
'''3. Testing the Installation'''
 +
 
 +
With the file ''stereo-examples-libdc-2.0.2.tar.gz'' also comes some test programs. These are located in the ''simplegrab'', ''simplestereo'', and ''xb3stereo'' directories. To compile them edit the ''Makefile'' in each directory such that the flags are
 +
 
 +
TRICLOPS = triclops3.2
 +
DC = libdc1394-2
 +
 +
# compilation flags
 +
CPPFLAGS += `pkg-config --cflags $(DC)`
 +
CPPFLAGS += `pkg-config --cflags $(TRICLOPS)`
 +
CPPFLAGS += -Wall -g
 +
CPPFLAGS += -DLINUX
 +
 +
LDFLAGS += `pkg-config --libs $(DC)`
 +
LIBS    += -pthread `pkg-config --libs $(TRICLOPS)`
 +
 
 +
Now you can compile the programs and run them.

Latest revision as of 13:23, 13 January 2009

How to work with the Bumblebee2 Stereo Camera on Linux

This page contains instructions on how to setup the Bumblebee2 stereo camera on Linux. It also contains examples on how to use the camera.

Note: This page is work-in-progress so you really shouldn't trust anything you read here.

Installation

This guide has been tested on Fedora Core 10. It might work on other platforms, but it has not been verified. We require that you have libdc1394 version 2.0.2 installed, including developer files. You should note that this guide is intended for administrators, and not users. If you just want to use the camera you do not need to go through these steps.

1. Install Triclops

The first step is to install Triclops, which is the propitiatory library developed by Point Grey. You'll need the Triclops3.2.0.8-FC3.tgz file which is distributed by Point Grey to do this (if you don't have this file, then you shouldn't be performing these steps). Uncompress this file by typing

tar -zxvf Triclops3.2.0.8-FC3.tgz

This will produce a directory called Triclops3.2.0.8-FC3. Now, perform the following steps as root:

PGR=/opt/point_grey
mkdir $PGR
cp -r Triclops3.2.0.8-FC3/doc Triclops3.2.0.8-FC3/include/ Triclops3.2.0.8-FC3/lib/ $PGR

Now, the files have been placed in a proper place. The next step is to create a .pc file such that pkg-config can find the new library. Now, create a directory called pkgconfig in the installation directory:

mkdir $PGR/pkgconfig

In this directory create a file called triclops3.2.pc with the following contents:

prefix=/opt/point_grey
exec_prefix=${prefix}
libdir=${prefix}/lib
includedir=${prefix}/include

Name: triclops3.2
Description: Triclops Library for Stereo
Version: 3.2.0.8
Libs: -L${libdir} -lpgrlibdcstereo -ltriclops -lpnmutils
Cflags: -I${includedir}

Now, you just need to update your environment such that it sees this new file. Add the following line

export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/opt/point_grey/pkgconfig

to the /etc/profile file (you can also add this to your ~/.bashrc or similar if that is more appropriate). Now, Triclops should be installed.

2. Install pgrlibdcstereo

The next step is to install pgrlibdcstereo which essentially is a wrapper library libdc1394 that makes it easier to work with the stereo camera. For this you'll need the stereo-examples-libdc-2.0.2.tar.gz file which is distributed by Point Grey (if you don't have access to this file, then you shouldn't be performing these steps). Uncompress this file

tar -zxvf stereo-examples-libdc-2.0.2.tar.gz

Then you'll need to edit the Makefile in the pgrlibdcstereo such that is has the following CPPFLAGS

TRICLOPS = triclops3.2
DC = libdc1394-2

# compilation flags
CPPFLAGS += `pkg-config --cflags $(DC)`
CPPFLAGS += `pkg-config --cflags $(TRICLOPS)`
CPPFLAGS += -Wall -g
CPPFLAGS += -DLINUX

Then change to this directory and compile the library:

cd pgrlibdcstereo
make

Now install the library by running the following commands as root

cp libpgrlibdcstereo.a $PGR/lib
cp *.h $PGR/include

Now, libpgrlibdcstereo should be installed.

3. Testing the Installation

With the file stereo-examples-libdc-2.0.2.tar.gz also comes some test programs. These are located in the simplegrab, simplestereo, and xb3stereo directories. To compile them edit the Makefile in each directory such that the flags are

TRICLOPS = triclops3.2
DC = libdc1394-2

# compilation flags
CPPFLAGS += `pkg-config --cflags $(DC)`
CPPFLAGS += `pkg-config --cflags $(TRICLOPS)`
CPPFLAGS += -Wall -g
CPPFLAGS += -DLINUX

LDFLAGS += `pkg-config --libs $(DC)`
LIBS    += -pthread `pkg-config --libs $(TRICLOPS)`

Now you can compile the programs and run them.

Personal tools