Tracking System

From IridiaWiki
Revision as of 11:05, 29 November 2013 by Msalvaro (talk | contribs)
Jump to navigationJump to search

IRIDIA is currently developing a Tracking System for the robots experiments taking place in the Robotics Arena. The purpose of the Tracking System is to detect the position of all the robots in the Arena, together with recording and storing the frames of the whole experiments.

Hardware

The tracking system is composed by a set of 16 cameras Prosilica GC1600 C, disposed as shown in File:Figure 1. The cameras are set in order to have a collective field of view that covers the entire area of the Arena. The cameras are connected to a dedicated computer, the Arena Tracking System Server, through Ethernet connection. The Arena Tracking System Server hosts the API that the users of the Tracking System can exploit to configure, run and record their experiments. (Ref: Alessandro Stranieri, Arena Tracking System)

Software

The Arena Tracking System's API are built on top of the Halcon library. Halcon is a library by MVTec Software GmbH, used for scientific and industrial computer vision applications. It provides an extensive set of optimized operators and it comes along with a full featured IDE that allows for fast prototyping of computer vision programs, camera calibration and configuration utilities. The library also provides drivers to easily interface with a broad range of cameras. (Ref: Alessandro Stranieri, Arena Tracking System)

Licence

IRIDIA owns a Floating Development Licence. That means that the library can be installed on any computer in the local network, but can be used by at most one of them at any time.

Access Halcon from the Arena Tracking System Server

The Halcon library is hosted in the Arena Traking System Server. In order to use the library is necessary to access the node throgh Secure Shell. There are two available interfaces for this server:

IP Alias Bandwidth

164.15.10.153

liebig.ulb.ac.be

1 Gbit

169.254.0.200

10 Gbit

To access the 10 Gbit interface you must be connected to the Camera Network. To connect to the Camera Network you must plug your cable in the switch in which all the cameras are connected.

The 1 Gbit interface can be accessed directly from the internet.

Run Halcon on local machine

WARNING: this guide is meant for Halcon developers running linux 64 bit. Installation process for other OS can be found at http://www.mvtec.com/halcon/download/release/index-10.html but it has not been tested.

  • Dowload halcon.tar.gz from ______________
  • Extract the content in /opt on your local machine. From the folder where you downloaded halcon.tar.gz:
   sudo cp halcon.tar.gz /opt
   cd /opt
   tar xf halcon.tar.gz
   rm halcon.tar.gz
  • Add execution permission:
   sudo chmod -R a+x /opt/halcon
  • Set environment variables and add paths to path variables (to be done every reboot).

If you are using Bourne shell:

   source /opt/halcon/.profile_halcon

If you are using C shell:

   source /opt/halcon/.cshrc_halcon
  • Connect your cable to the switch used by all the cameras in order to access the Camera Network (currently only the Ethernet port C4 in the Arena is connected to that switch). Then, assign to your local machine a static IP of type 169.254.x.x (but other than 169.254.100.1) with netmask 255.255.0.0.

WARNING: the Camera Network does not provide internet connection. You need to be connected also to the internet while launching Halcon (e.g. through Hashmal Wifi)

  • Open a new terminal and run HDevelop:
   hdevelop

Acquire and create marker model

The creation and acquisition of a marker model is the first step to do when using the Tracking System. The markers must be placed on top of robots, and it is composed by the external and internal patterns. The external pattern is the same for all the robots and it is used for detection. The internal pattern must be different for each robot and it is used for the decoding. (Figure of marker)

The marker for Epucks, for example, has a "house shaped" external pattern in which the roof indicates the orientation of the robot. The internal pattern is a rectangle containing six little black and white squares. The particular configuration of black and white squares is the encoding of a single Epuck. Six squares allow experiments with up to 64 robots. However, it is safer to avoid configurations which differ from each other for only one square.

In the Tracking System decoding, the Epuck's id is calculated by giving each square a position and a value in a six bits string. In this case, the squares are allocated in the bit string, starting from the less significant bit, from the top left corner to the down right corner. Their value is 1 for white and 0 for black.



Adapter for the cameras

In case you need an adaptor for the cameras to attach them to a standard camera mount (e.g., Manfrotto), you can create one using the laser cutter. Here are the files: ecp version dxf version