Difference between revisions of "Tracking System"

From IridiaWiki
Jump to navigationJump to search
Line 23: Line 23:
   
 
* Dowload ''halcon.tar.gz'' from ______________
 
* Dowload ''halcon.tar.gz'' from ______________
* Extract the content in ''/opt'' on your local machine.
+
* Extract the content in ''/opt'' on your local machine. From the folder 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:
 
* Add execution permission:
 
sudo chmod -R a+x /opt/halcon
 
sudo chmod -R a+x /opt/halcon
Line 53: Line 57:
 
* Open a new terminal and run HDevelop:
 
* Open a new terminal and run HDevelop:
 
hdevelop
 
hdevelop
 
   
 
==Adapter for the cameras==
 
==Adapter for the cameras==

Revision as of 18:01, 27 November 2013

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.

How to 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

How to run Halcon on local machine

WARNING: this guide is meant for Halcon developers running linux 64 bit. Intallation 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 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:
   HALCONROOT to /opt/halcon/n
   HALCONARCH to x64-linux2.4-gcc40

and add paths to path variables:

   /opt/halcon/lib/x64-linux2.4-gcc40 to LD_LIBRARY_PATH
   /opt/halcon/bin/x64-linux2.4-gcc40 to PATH

To make the changes permanent it is possible to paste the following lines into your .bashrc file:

   HALCONARCH=x64-linux2.4-gcc40; export HALCONARCH
   HALCONROOT=/opt/halcon; export HALCONROOT
   HALCONEXAMPLES=${HALCONROOT}/examples; export HALCONEXAMPLES
   HALCONIMAGES=${HALCONROOT}/images; export HALCONIMAGES
   PATH=${HALCONROOT}/bin/${HALCONARCH}:${HALCONROOT}/FLEXlm/${HALCONARCH}:${PATH}; export PATH
   
   if [ ${LD_LIBRARY_PATH} ] ; then
     LD_LIBRARY_PATH=${HALCONROOT}/lib/${HALCONARCH}:${LD_LIBRARY_PATH}; export LD_LIBRARY_PATH
   else
     LD_LIBRARY_PATH=${HALCONROOT}/lib/${HALCONARCH}; export LD_LIBRARY_PATH
   fi
  • 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

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