IRISNET Documentation
Last Updated: January 13, 2003.
Table of Contents
Installation
The easiest way to install IRISNET is to check out everything from the CVS
repository and do a full installation.
- Download
- Set environment variables
- Add "IRISNET/packages/opencv-0.9.3/otherlibs/highgui/.libs/" and
"IRISNET/packages/opencv-0.9.3/cv/src/.libs/" to your LD_LIBRARY_PATH
environment variable. These environment variables tell where OpenCV is
installed.
- If Java is not installed on your system, add "IRISNET/packages/jdk1.3.1_06/jre/bin"
to your path.
- Configure webcam
- You need to install the appropriate webcam drivers for your webcam.
For USB Quickcam 3000 Pro webcams, use the driver on http://www.smcc.demon.nl/webcam/
- As root, run "insmod -f pwcx-i386.o" to load the Quickcam drivers.
- Run Test Suite (optional)
- You can optionally run "testall.sh" in the IRISNET/TestSuite directory
to see if everything is installed correctly.
Software Dependencies
Sensing Agents
- Sensing agent coordinates the loading and execution of senselets.
- Dependent on Webcam for getting sensor feed.
- Intel OpenCV Library
- Intel's open source computer vision and graphics library.
- Intel IPP/IPL
- OpenCV used to depend on Intel's Image Processing Library (IPL). Therefore,
OpenCV still shares a lot of data structures with the IPL. IPL is being
moved into Intel's Integrated Performance Primivites (IPP), which is not
free. OpenCV will use IPP to improve its performance if IPP is available,
but is not dependent on it. IPP is available for both Windows and Linux
platforms.
- Intel Site: http://www.intel.com/support/performancetools/libraries/ipp/ia/
- Richard Stevens Unix Network Programming Library
- CSAPP
Webcam
- Webcam loads video frames into shared memory for use by the senselets.
- Camstream
- C++ wrapper for Video4Linux and demo application. We use its
libraries for ease of implementation, but in theory we can call the Video4Linux
API directly.
- It has a nice GUI that lets us test the cameras easily.
- Camstream is dependent on Qt.
- http://www.smcc.demon.nl/camstream/
- Qt
- USB Quickcam drivers
- Video4Linux
- API used by Camstream and other programs to access video devices under
linux. Most webcam drivers provide this interface.
- http://www.exploits.org/v4l/
- Shared Memory API
Organizing Agents
Logger
- All IRISNet nodes send debugging to the logger, which reconstruct the
flow of packets in the network.
- Nam
Technologies, API's, and
Standards
XML
- We use XML as a distributed database for each application, and also
as a data format for network communication. XML is handled mostly by
the Organizing Agents.
- We rely heavily on Apache XML libraries. http://xml.apache.org/
Coding Style and Documentation
Test Suite
The test suite tests the components in system. All tests are in IRISNET/TestSuite/.
Within each directory, there is a script called testall.sh that runs the tests
the components. Also within each directory, there is a testcases.txt file
that describes each test in detail, the possible causes of failure for each
test, and possible remedies. Listed below are the tests and the two letter
code of each test in parentheses.
- Network (NT)
- Pings various sites to see if network connectivity is good.
- Sensing A
gent (SA)
- Builds the dummy2 application and tries to have the SA load it.
Checks to see that both are running.
- Video Test (VD)
- Checks whether there are any compatible video devices on the system.
Checks that we can get a live image from the video device.
- Webcam (WC)
- Checks that the webcam utility is working correctly. Runs the webcam
and checks that we can get a live image from it.
- OA
(OA)
- Checks whether Java is present on the system and that we can start
Xindice.
Parking Space Finder Application
The parking space finder application is an example application to demonstrate
what can be done with IRISNET. It uses the video feed to detect which
parking spaces are full or empty, and reports them to the OA's. There is a
web based GUI that queries the OA's to find parking lots with free spaces.
The application files are in IRISNET/Applications/parking/
- XML Schema for OA
- Files are located in IRISNET/Applications/parking/OA
- The example schemas have hard coded IP addresses of our demo machines.
- Web based front end
- Files are located in IRISNET/Applications/parking/FrontEnd
- The example html forms have hard coded IP addresses to our demo
machines.
- Application code for SA
- Files are located in IRISNET/Applications/parking/SA
- These files are general enough to be run on any SA
Running the Parking Space Finder on SA
We now describe the process of setting up an application on the SA. The
Parking Space Finder files can be used as a template to create other
applications.
- Compiling and Installing
- Run "configure" in IRISNET/Applications/. This will generate the
proper make files for SA applications.
- Run "make" in IRISNET/Applications/. This will compile the common
libraries and the applications.
- In IRISNET/Applications/parking/SA/, run installSA.sh. This copies
the parking space application to the proper SA directories.
- Similarly, run "configure" and "make" in IRISNET/SA/IrisWebcam/.
This builds the application to load images into the shared memory.
- Run "configure" and "make" in IRISNET/SA/IrisSA/ to build the SA
- Run "make" in IRISNET/Util/SAControl/ and also IRISNET/Util/PortSink/.
These are helper applications that facilitate running and debugging SA
applications without an OA running.
- Running the application
- Open up a new terminal and run IRISNET/Util/PortSink/portsink 6789.
This program listens on port 6789 and reads all data from that socket.
It simulates an OA listening for SA data.
- Do one of the following:
- cd into IRISNET/SA/IrisWebcam/. Run "./loadImage images/calibrate.bmp
75". This loads the calibration image into shared memory key 75.
- As root, load the Quickcam driver. Not as root, run "runwebcam.sh"
in IRISNET/SA/IrisWebcam/. This loads the live sensor feed into the
shared memory.
- cd into IRISNET/SA/IrisSA/src/parking/. Run "./calibrate >
pspots.conf". This program finds where the parking spots are from the
calibration image and writes the reference images for empty parking spots to
"pspot?.jpg".
- run "./updateconf". This copies the reference images and
calibration configuration to the proper SA directory.
- cd into IRISNET/SA/IrisSA/src/. Run "./runsa". This starts
the SA, listening on port 3456 for commands from the OA.
- In IRISNET/Util/SAControl/, run ` ./SAControl 127.0.0.1 3456 "S
127.0.0.1 6789 parking" ', without the single quotes. This simulates
the OA asking the SA to start the parking space finder application.
You should see an image pop up displaying the free and empty parking spaces.
- cd into IRISNET/SA/IrisWebcam/. Run "./loadImages". This
script loads a series of images into the shared memory, simulating cars
coming into the parking lot. The parking space finder application
should reflect the updated status of the parking lots.
- Finally, in IRISNET/Util/SAControl/, run ` ./SAControl 127.0.0.1 3456 "U
127.0.0.1 6789 parking" ' to terminate the parking space finder application.