cvs -d :pserver:email@example.com:/cvsroot/phission login cvs -z3 -d :pserver:firstname.lastname@example.org:/cvsroot/phission checkout phission cd phission ./scripts/autogen.sh ./configure make make install
$ cvs -d :pserver:email@example.com:/cvsroot/phission login
After a successful login, the Phission code base can be checked out from CVS:
$ cvs -z3 -d :pserver:firstname.lastname@example.org:/cvsroot/phission checkout -d <phissiondir> phission
The -d <phissiondir> parameter is a checkout command parameter and is optional. It merely specifies the name of the directory where the Phission code base is stored. Use cvs –help checkout for more checkout command options. Don't confuse the checkout command's -d switch with the cvs program's -d switch which overrides the default environmental variable for $CVSROOT (if it's defined).
If you're subscribed to the CVS mailing list , saw some important fix and want to update code that was checked out a while ago:
$ cd phission $ make clean $ cvs -z3 update -dR
You should now be able to run configure and make, make install as you would an ordinary packaged release.
$ ./configure --help
This can be useful if, for example, some optional feature isn't compiling properly. You can disable it and then re-run make to allow you to get some minimum of Phission built. Any problems should be emailed to the author or the email@example.com mailing list.
If you don't have root access or just want to test out Phission. You can install to your home directory by using the --prefix configure switch. Suppose you have a directory called local in your home directory. (Make sure that you have created the local directory in your home directory before running the configure script.) The following will set up the Makefiles so they will install to /home/myusername/local:
$ ./configure --prefix=/home/myusername/local
If you're interested in specific features, like Python support, you'll want to pay careful attention to the final report printed when configure finishes successfully. It lists the supported packages and whether the relevant Phission code will be compiled for those packages. If a capability has no after it, this may be the default setting or there may have been an error when the configure script tested for that package support. Looking at config.log can be useful in determining what could have potentially gone wrong if the default is yes or the configure switch was supplied to enable the package support. The following is an example print out from configure when it finishes:
configure: -------------------------------------------------- configure: Using Network capabilities: yes configure: Using ZLib: yes configure: Using libjpeg: yes configure: Using JRTPLIB: no configure: Using JTHREAD: no configure: Using AVCODEC: yes configure: Using OpenCV: yes configure: Using VideoForWindows: no configure: Using Video4Linux: yes configure: Using GDI: no configure: Using X11: yes configure: Using XShm: yes configure: Using Xdbe: yes configure: Using XF86DGA: yes configure: Using XVlib: yes configure: Using XF86VMode: yes configure: Using SDL: yes configure: Using FLTK: no configure: Using SWIG: yes configure: Using Python: no configure: Using Java: no configure: Why? Java option not enabled configure: Building Vision Classes: yes configure: --------------------------------------------------
If you aren't the super user you'll need to install to your own directory.
$ export PATH=/home/username/installs/:$PATH
This will allow phission/examples/cpp/Makefile.example (which is sourced from all the subdirectory Makefiles) to find phission-config and retreive the required compilation and linking flags/arguments.
$ make uninstall
SDL ( Simple Direct Media Layer ) is a fast portable media library that is being used here for it's high performance capabilities and is required by the SDLDisplay class. See the documentation below on Display classes for more information. on using a display class. It is possible to only have one 1.2.x SDL version window open in any instance of an application. For this reason, the X11Display and GDIDisplay displays were written for Linux/Cygwin and Windows respectively. Even with this limitation, the SDLDisplay is likely to provide way better performance than the X11 or GDI displays. SDL can be used in conjunction with the X11 and GDI displays if more than one window is necessary.
I'd suggest use of the source RPM (src.rpm) and that one build a binary version using the following command (must have root access):
$ rpm -q SDL $ rpm -q SDL-devel $ which sdl-config $ locate sdl-config | grep bin
$ rpmbuild --rebuild SDL-1.2.6.src.rpm
rpmbuild will proceed to compile and assemble a binary RPM file and will display the full path to that file at the end of the build.
Install the rpm using the following command(as root or using sudo):
$ rpm -iUh /path/to/binary/package.i386.rpm
FLTK is a GUI library and is required for the FLDisplay class. The FLTK library is also used for some of the OpenCV library routines internal to the OpenCV package which aren't used by Phission but are useful when exploring OpenCV examples. The inclusion of a display class that uses a GUI package like FLTK is to provide the basis for a C/C++ program with menus and buttons to allow manipulation of the Phission classes during runtime. The phFLImageWindow class contains the GUI specific code and could be contained in a full blown FLTK application that connects it to any of the constantly updating phImage sources internal to a capture class or a pipeline.
$ rpm -q fltk $ rpm -q fltk-devel $ which fltk-config $ locate fltk-config | grep bin
Version 1.1.x should be downloaded and installed. Newer versions have not been tested with Phission. I used the SourceForge servers and downloaded the tarball (tar.gz).
The FLTK tarball has an RPM .spec file (fltk.spec) file packaged with it and can potentially be built into a binary RPM package using the following command:
$ rpmbuild -ta fltk-1.x.x.tar.gz
If that fails, you can still untar ( tar -xvzf fltk-1.x.x.tar.gz ) the tarball and build it manually:
$ cd fltk-1.x.x $ ./configure $ make $ make install
OpenCV is going to be required for most the filters in furture releases of Phission, but is currently only required for one filter (which resides in the phission/filter/video/ directory): cv_canny_Filter. OpenCV provides many image processing filters and has a long detailed and thorough manual documenting their use. I suggest learning and using OpenCV if you really want top quality high performance image filters. The Phission filters have been C/C++ optimized only to a certain extent in order to provide as decent performance as possible using C/C++. If you write a phFilter that uses an OpenCV filter, please submit it one of the mailing lists or myself so it can be included in the Phission distribution.
$ rpm -q OpenCV
$ which opencv-config
$ locate opencv-config | grep bin(v0.9.5)
$ locate opencv.pc(v0.9.6)
Downloading version 0.9.5 is recommended. There is an RPM .spec file within the tarball (tar.gz) but may need to be edited. To try and build the binary RPM package:
$ rpmbuild -ta OpenCV-0.9.5.tar.gz
If this doesn't work, you can untar the tarball:
$ tar -xvzf OpenCV-0.9.5.tar.gz
edit the .spec file or create it if necessary:
$ ./configure(will use OpenCV.spec.in to create OpenCV.spec)
Save the old tarball and repackage the tarball:
$ mkdir backup $ mv OpenCV-0.9.5.tar.gz backup/ $ tar -cvzf OpenCV-0.9.5.tar.gz OpenCV-0.9.5
Build the RPM binary package:
$ rpmbuild -ta OpenCV-0.9.5.tar.gz
Finally, install the RPM package rpmbuild created:
$ rpm -iUh /path/to/OpenCV-0.9.5.i386.rpm
If you've gone through all that with no luck, you can still untar ( tar -xvzf OpenCV-0.9.5.tar.gz ) the tarball and build it manually:
$ cd OpenCV-0.9.5 $ ./configure $ make $ make install
SWIG supplies the facilities to bind/wrap Phission's API into any of the supported SWIG langauges. Each language being bound to usually has some amount of differences from C/C++ syntax and capabilities. This requires changes to the Phission code base to support those differences. Python and Java are currently the only alternative supported languages.
$ rpm -q swig $ which swig $ locate swig | grep bin $ swig -version
I suggest getting the latest version (1.3.24) of SWIG.
You may be able to create an RPM binary package using the tarball:
$ rpmbuild -ta swig-1.x.x.tar.gz
After building the RPM, install it:
$ rpm -iUh /path/to/swig-1.x.x.i386.rpm
Otherwise, follow the SWIG directions for installing this package.
Python is the language in which Pyro (Python for Robots) is written. Support for Python wrapping is supplied by the SWIG package and without it Python will not be supported.
You'll want to download the SDK so the Java classes and modules can be built correctly. Phission uses J2SE 1.4.2 for Java development and other versions have not yet been tested. SWIG 1.3.24 is required for correct Java support and without it the Java language bindings won't be supported.
libjpeg is usually installed in most distributions. Instructions on building and installing libjpeg are similar to instructions for building and installing other packages above.
FFmpeg is a group of tools and libraries that allow reading, converting and playing of supported audio and video files. Even raw device reading and writing are supported by the FFmpeg project. The libavcodec and libavformat libraries supplied by the FFmpeg project allow Phission to read (and potentially write) video files. There are a large number of audio and video formats that are supported as outlined by the documentation: Supported File Formats and Codecs. Phission's ability to read video files allows researchers to capture videos, in any way that is convenient for them, and have Phission play the video as a regular source. The difference of any code written to use a Video4Linux device and input from a video file are very minimal and lie only in the particular configuration differences between the V4LCapture class and the phAvcodecSource class. (Capture and Source terms are interchangeable as in a Capture device is a Source of video data and a Source uses Captured data. The names are still in a bit of flux. ) While Phission tries to keep up with the CVS changes of FFmpeg, version 0.4.9-pre1 is the package that is recommended if you want stability. The CVS version has newer codec support which can come in handy.
Check to see if you have ffmpeg installed:
$ locate ffmpeg | grep bin $ which ffmpeg $ rpm -q ffmpeg $ rpm -q ffmpeg-devel
Check to see if you have the libraries installed:
$ locate libavcodec.so $ locate libavcodec.a $ locate avcodec.h | grep include $ locate libavformat.so $ locate libavformat.a $ locate avformat.h | grep include
Shared libraries usually end in '.so' and static libraries end in '.a'; you'll need one of the two. If you're using the RPMs, you'll need the -devel library.
If you don't have ffmpeg installed, go to the FFmpeg web site and follow the download instructions for CVS or downloading from their file release page. Once you have the source you can run ./configure --enable-shared and make. to build the source. You can then make install the FFmpeg binaries along with the libavcodec and libavformat libraries. Without configuring to build with the --enable-shared, the shared libraries are not installed and neither are the header files required to build with the libraries.
“Pyro supplies a programming environment for ... artificial intelligence and robotics...”. See the http://pythonrobotics.org website for installation instructions. The current version as of this writing is 1.4.2. However, the last tested version is 1.3.x and there are significant differences between the two versions. The examples provided should work in 1.3.x and modifications to run in 1.4.x are left to the reader until such time as the examples can be updated.
Pyrobot has it's own vision system that is extremely simplistic and quite slow. It runs serially with all the control code so any large amount of vision processing could potentially hold up the processing of sonar or laser information and may cause a robot to collide with objects. Phission was originally written to allow a separate vision processing sub-system to prevent the control loop from being blocked by any slow vision algorithms. While it isn't integrated with Pyrobot yet, it can still provide the Pyrobot system with a vision processing sub-system capable of better performance and robustness than the integrated system. Phission's phSimpleVision class is used as a container for the usual setup of the Phission system: one capture card, histogramming & blobbing and debug displays for local computers or network computers ( JPEG compressed images ).
|Copyright (C) 2002 - 2007||
Philip D.S. Thoren ( firstname.lastname@example.org )
University Of Massachusetts at Lowell