My favorites | Sign in
Project Logo
                
Search
for
Updated Sep 21, 2009 by fuzzgun
SurveyorSVSgui  
A graphical user interface for the Surveyor SVS

Installation

To install the GUI:

    sudo dpkg -i surveyorstereo-x.x.deb

or alternatively there is a rpm package and also a zipped archive of files which can be run on Windows systems. If installing from rpm you will need to ensure that the Mono C# core and gtk-sharp packages are installed.

By default the IP address for the SVS is 169.254.0.10 and the ports for the cameras are 10001 and 10002. At the time of writing these are the factory defaults. If the SVS is configured in some other way you'll need to edit the startup script.

    sudo gedit /usr/bin/surveyorstereo.sh

It should look something like this:

    mkdir ~/svs
    cd ~/svs
    mono /usr/bin/sentience/surveyorstereo/surveyorstereo.exe -i 169.254.0.10 -leftport 10001 -rightport 10002

Here you can edit the IP address and port numbers, the re-save the script. Note that the script sends you to a subdirectory called svs within your home directory. This is useful because it means that if images are logged they're always placed in a consistent location.

The GUI can then be run simply by typing:

    surveyorstereo

or on Windows systems run surveyorstereo.exe.

Source code

If you're compiling the GUI from source on Linux systems, or if you're running MonoDevelop on Windows, use the mds solution files, which are in MonoDevelop 1.0 format. Using the older format helps to keep the Gtk and Windows.Forms versions GUI versions separate. Possibly in future support for Windows.Forms may be dropped.

Camera Calibration

A video of the calibration procedure is shown here.

  1. Click on calibrate left camera. A calibration pattern will then appear shown within the right image. Pont the left camera at the pattern, with the red dot towards the centre of the image. The screen should be more or less perpendicular to the axis of the cameras view, with the pattern filling the image.
  2. After a while you will see that the image has been flattened, and ideally the spacing between dots should be constant across the image. You may need to experiment with moving the camera bacwards or forwards to get the ideal distance.
  3. Uncheck calibrate left camera, then click on calibrate right camera. Perform the same operation for the right camera, then uncheck calibrate right camera.
  4. Point the stereo camera at something which is distant - preferably more than five metres away. Click on calibrate alignment. The stereo camera should now be calibrated.
  5. Within your current directory a calibration xml file will be generated. Also there will be two files called svs_left and svs_right. If you wish to use the embedded stereo vision these files can be uploaded to the blackfin processors, using the storecalib1 and storecalib2 scripts.
  6. You can manually check the calibration by clicking on the Tweaks button, or selecting it from the Tools menu. The tweaks utility allows you to manually specify offset values, then visualise the effect. You'll need to have the stereotweaks utility installed for this to work.

It may be necessary to try calibrating a few times before getting good looking images. Sometimes the system isn't able to build an accurate model of the lens distortion, due to misdetection of the dot centres or errors in dot linking. Since camera calibration is generally a one-off procedure (unless the positions of the cameras subsequently change) this isn't a major issue.

Driving

If the SVS is connected to a robot base the buttons can be used to drive the robot as usual. In the current version the screen resolution buttons have no effect, with the resolution being fixed at 320 pixels across.

Logging

Stereo images and driving commands can be logged by clicking on the logging checkbox, or by selecting it from the tools menu. When you uncheck logging all files will be compressed into a single archive for convenience, and assigned the specified log name. This feature is useful if you wish to carry out offline experiments using stereo images, such as visual SLAM or feature detection. The images are saved in jpeg format, which is the same format in which they're transmitted from the SVS. Note that in order for the compression to work you'll need to ensure that GNU tar is installed, or on Windows systems use gzip and ensure that it is included within your PATH environment variable.

You can also replay any prerecorded logs by entering the desired log name then clicking on the replay button. This will replay the same driving commands which were used. This is open loop, so be prepared for accumulating dead reckoning errors.


Sign in to add a comment
Powered by Google Project Hosting