Skip to content
Adrian Kreskowski edited this page Oct 14, 2015 · 2 revisions

In order to run an application using the tracking input obtained from a MoBat-Server three steps have to be considered:

  1. Starting the provided MoBat-Server with an appropriate config-file

  2. Starting your own application that receives the input from MoBat

  3. Playing suitable sounds with your own smartphone

In the following, some comments are made regarding the server and the client application as well as the sound emitting smartphone app, which might come in handy in using MoBat the first time.

1. Starting the MoBat-Server

After checking out the repository, the project inside of the "mobat" folder should be built by using CMake for the platform of your choice. After the compilation, the build folder contains a mobat_localizer binary file. Starting this together with the default_server.conf (mobat/configuration/default_server.conf) file will run the server with default settings, which have to be adjusted slightly for your own setup and particular use-case. Read more about the parameters on the server parameter page of this wiki.

After running the server, it sends out one UDP package per position containing {frequency: uint32_t, x_pos: float, y_pos: float, timestamp: uint32_t}. The timestamp is a logical, relative timestamp, which is incremented for each computational frame on the server, in which at least one position could be determined.

Note, that for N recognized frequencies per frame, N separate packets are sent.


2. Starting your own application

Since you probably want to start your own application that only depends on the received positions, the exact implementation of this part is up to you. However, an example application using a slim network class can be seen in the airhockey source files. As an example, the received positions are interpret as paddle positions for two players in a classical game of airhockey.


3. Playing suitable sounds on your smartphone

The mobat_localizer relies on detecting peak points in the frequency domain of a signal. In order to create distinct peaks, it is necessary to interrupt the signal in certain intervals. During development we found the following sound pattern to work well for our localization: |: 5s 25p :|

, where the number indicates the length of the corresponding part in milliseconds, and p or s indicate a pause or sine wave of a certain frequency, respectively. Although you are free to experiment with other patterns, it is advisable to choose the length of the sine signal shorter than the length of the pause, in order to create sharp peaks.

MoBat offers a Smartphone app, which is configurable to play such an interleaved sine-pause pattern. Installing the MoBat_Sine_Emitter App with Android Studio will give you a quick start into the localization framework. In the near future, MoBat will offer a Web-Service, which allows for streaming the required signal to a smartphone without additional apps to be installed.