- Notifications
You must be signed in to change notification settings - Fork113
Shared Vision System For The RoboCup Small Size League
License
RoboCup-SSL/ssl-vision
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
In the past, RoboCup Small Size League rules allowed every team to set up their own global vision system as a primary sensor.This option beared several organizational limitations and costs for the teams, thus impairing the league's progress.Additionally, most teams had converged on similar solutions and produced few significant research results to this global vision problem over the last years.
In 2009, the league committees decided to migrate to a shared vision system (including hardware) that could be used by all teams.This system - named SSL-Vision - is currently developed by volunteers from participating teams.
To find more in-depth and up-to-date information about SSL-Vision (including installation and configuration),please visit theWiki Documentation Page.
Following dependencies are required to build the software:
- g++
- QT >= 4.3 with opengl and networking support
- cmake
- Eigen3
- Google protocol buffers (protoc)
- OpenGL
- GLU
- libjpeg
- libpng
- OpenCV >= 3
- libdc1394 Version >= 2.0
- video for linux 2 (v4l)
To get all of these packages in (k)ubuntu, run theInstallPackagesUbuntu.sh
script.
Or, in archlinux, run theInstallPackagesArch.sh
script.
If you do not have a camera available and want to test or improve ssl-vision, you can use theCaptureFromFile
capture module to play back images.To install some test data, run:make install_test_data
. It will download several test images totest-data.The default configuration of ssl-vision will peak this up automatically.
Multiple cameras are supported:
- 1394B / Firewire 800 (backward compatible with 1394A)
- Basic usb camera support via theVideo for Linux (V4L) drivers
- Matrix-Vision BlueFox (USB 2.0) and BlueFox3 (USB 3.0) cameras viamvIMPACT Acquire SDK
- Basler cameras via thePylon Software Suite (currently supports 7.2.1)
- FLIR cameras via theSPINNAKER and FLYCAP SDK
To enable support for one or more of those cameras, install the corresponding SDK (linked above and described in more details below) first.Then build with the corresponding option:
-DUSE_DC1394=true
-DUSE_SPINNAKER=true
-DUSE_mvIMPACT=true
-DUSE_PYLON=true
-DUSE_FLYCAP=true
-DUSE_V4L=true
Example for a release build:cmake -B build -DUSE_SPINNAKER=true
.As these are cached cmake options, you only need to run this once and can build withmake
afterwards.
In addition to the physical cameras, you can activate virtual cameras with-DUSE_SPLITTER=true
.There will be an additional 'Distributor Thread' that captures from a single physical camera (or from file).The capture mode of the normal camera threads can be set to 'splitter'. That way, a part of the original image from thedistributor thread is used as input.This may speedup processing time for cameras with large resolutions, but at the trait-of of multiple cameras with thesame camera center, which may not work well with some consumers.
USB 2.0BlueFox MLC andUSB 3.0BlueFox3-2 cameras are supported.Please note, that they require different SDKs. The SDK look very similar, but are not compatible. They get installed into the same directory by default.
Tested cameras:
- mvBlueFOX-MLC200wC
- mvBlueFOX3-2089
The SDK can be downloaded from thedriver page. Go to Linux => mvBlueFOX (USB2.0) or mvBlueFOX3 (USB3.0).Download theinstall_mvBlueFOX.sh
script and the correct.tgz
file for your machine.Open a terminal and navigate to your download folder. For a quick installation run:
sh install_mvBlueFOX.sh -u
Basler cameras are supported via thePylon Software Suite.This link should directly download the current supported version, 7.2.1.Installation instructions are contained in the download.
Tested withBasler ace acA1300-75gc.
USB 3.0 cameras are currently supported.
Tested cameras:
- Blackfly S (BFS-U3-51S5C-C) -Documentation
Download and install theSDK and build ssl-vision with-DUSE_SPINNAKER=true
.
Build the code by running:
make
If you need to pass extra parameters to cmake, you need to runcmake
directly:
cmake -B build -DUSE_WHAT_SO_EVER=truemake
TheUSE_*
parameters are cached, so they do not have to be passed in each time.
Depending on your OS, you might need to ensure that you have full access to the firewire devices /dev/fw*.Thismight require logging in as root or adding your user to a certain group.
Run the software using the following command:
./bin/vision
You can automatically start capturing with the-s
option.
If all.
turn into,
in robocup-ssl-teams.xml, you can change this by running
export LC_NUMERIC=en_US.UTF-8
before runningvision
. This is not required, though.
Once the software is running, you should see some empty capture frameson the right, and a data-tree structure on the left. In thisdata-structure you can setup your camera parameters,such as resolution, capture mode, etc.
A quick hint: The text-field below the data-tree allows forfast search through the data-tree.
See the section of DC1394 parameters below to get an idea of what theparameters do.
Once you have them set up, you can start capturing by clicking"Image Capture/Capture Control/Start" in the data-tree.
If you expand the tree then the capture parameters are in"Image Capture/DC1394/Capture Settings"
Furthermore, conversion settings are in"Image Capture/DC1394/Conversion Settings"
"convert to mode" should currently be "yuv422"for best performance, "capture mode" should also be "yuv422",but can also be a different format such as "yuv411" or "rgb"
Alternatively, if you desire, you can do de-bayering in software,but this will take extra CPU cycles. To do so, you would set thecapture mode to e.g. "raw8" and the convert mode to "rgb". Finally,you will need to set "de-bayer" to true, and select the correctde-bayer pattern and desired method.
Capturing supports both DCAM native modes and Format7 modes.This is selected in the "capture format" field. Leaving it on"auto" will attempt native mode first, then
format7_0
.By default, ISO800 support is disabled. To enable it, mark thefield "use ISO800" as true.
Once you start capturing, you should see the realtime video imageon the right. Furthermore, in the data tree, you should be able to go to the"Camera Parameters" node which will then be expandable and showall of your DCAM parameters.
You can adjust all of these parameters in real-time.
Note that the read-out of these parameters from the cameraonly happens automatically if "auto refresh params" in theCapture Control is set to true. Otherwise, you can usethe "re-read params" "Refresh" button to refresh them manually.For performance reasons, it might make sense to set auto refreshto false, so the bus is not being flooded with too much controldata and has full bandwidth available for the video streaming.
When you quit the application normallyparameters will besaved automatically, but on a system crash, they won't.Make sure to regularly save the settings manually by click on the
Save Settings
button immediately under the mainVision System
node.All settings will be automatically restored during the nextprogram start.
In case the files should ever become corrupted, or theprogram refuses to start completely when parsing the XML files(this should normally never occur) then simply delete allXML files and restart. The program will restore its defaultsettings.
About
Shared Vision System For The RoboCup Small Size League