Lambdatracker Config Lua API

Lambdatracker Config Lua API

This document describes the config file API for the lambdatracker. Configuration is acheived by creating a Lua config file and passing it as the single argument to the lambdatracker executable. An embedded lua interpreter parses and executes the commands within the file in order to correctly set up the cameras and define device patterns. The configuration functions are within the "LT" namespace. Those functions are listed below:


Device Configuration

These functions define tracked device patterns. Devices are defined by three patterns, one base and two alternates. Alternate patterns are associated with states of the device. For example, a device with "button 1" pressed might illuminate its first alternate pattern, with "button 2" pressed, it might illuminate its second alternate pattern, and with no buttons pressed, it would illuminate its base pattern. These patterns are translated into states for the device. Vertecies in the patterns are referred to in the API as "blips." (I know, It's silly.)



Camera Configuration

These functions define the camera model that is used in the tracker for each camera. The purpose is to generate a unified camera coordinate space in which each camera's pixel buffer is corrected for distortion and correctly transformed relative to the root camera. The lower left pixel of the root camera's buffer sits at 0, 0 in this coordinate space.

Currently the root camera is defined as the first camera instantiated by the tracker at runtime (not necessarily the first camera defined in the config script. Instead this will be the first camera on the bus of the root node of the tracking cluster.)

Mapping configuration

These functions define a mapping from unified camera coordinates to table coordinates.

Network configuration



Example Lua configuration file


Acknowledgements

Thanks Robert Kooima for showing me how effective and simple embedded lua can be, and for the excellent example that is Electro.