Tank tracks is a set of Python programs that enables the tracking of animals in
tanks. A wide-view "spotter" camera tracks the bulk movement of the animal and
a narrow field-of-view macro lens watches a feature of interest on the animal.
For the sake of robustness, extensibility, and easy multiprocessing in light
of Python's GIL, there are several separate processes that communicate over
ZMQ. The programs can be launched in any order, but certain groups of
programs must be running in order to do anything. It is also possible to run
the various modules on separate computers, as the processes communicate over
TCP (however, note that apparently Windows is smart enough to bypass its actual
TCP stack when communicating to the same machine). The correct IP for each
module would have to updated in Parameters.py
.
Module for interfacing with our two cameras (Point Gray and E-con Systems liquid lens camera). This code grabs frames and publishes them. This functionality is broken out by itself so that frames can be grabbed as quickly as possible, decoupling frame grabbing io from future processing. Also the interface for focusing the liquid lens camera.
Publishes
- CURRENT_FOCUS
- VIDEO_{ZOOM | SPOTTER}
Subscribes
- AUTOFOCUS
NOTES
- should probably implement a zoom interface for the LL camera too
Module for displaying the "spotter camera". It also serves as the interface for tracking, as the user must select what to track on the screen.
Publishes
- TRACK
Subscribes
- VIDEO_SPOTTER
NOT YET IMPLEMENTED. But this will be a display of the macro lens camera. Similar to above module, but probably without the same kind of tracking interface.
Publishes
Subscribes
Module for saving video from either camera. This is separated from grabbing the frames so that grabbing and saving can effectively be "pipelined." Also makes it easy to start/stop saving video without disrupting other things that are running.
Publishes
- nothing
Subscribes
- VIDEO_{ZOOM | SPOTTER}
Module for controlling the Thorlabs stages. Note that it would be relatively simple to swap out the Thorlabs stages for other motors, this module would just have to be rewritten.
Publishes
- CURRENT_POS (NB: Not Yet Implemented)
Subscribes
- TRACK
This file stores all of the important parameters for TankTracks, including the IP address and port number for each of the Pub/Sub topics, tracking parameters, video settings, and more.
Publishes
- AUTOFOCUS
Subscribes
- CURRENT_FOCUS