Team Thirteen/Code Organization

From Maslab 2006

Jump to: navigation, search

We're writing in two languages (possibly three). As such, we better be as organized as possible. That and the fact that our code effectively doubled in one day prompted us to have a meeting and discuss organization.

We're going to have threads for:

  • Imaging
  • Mapping
  • Navigation
  • Strategy/Behavior

Below is how we are organizing our code. The first level is the directory while the second is either a Python Module or a Java/C Class. All entried marked with an asterisk (*) is a class, while all entries marked with a dagger (†) is threaded.

  • Root Code Directory
    • Camera/ -- Main camera capturing
      • Imaging*†
    • IProcess/ -- Simple image processing (note, since we're using python, we're going to use the __init__.py capability to switch between different Image processing techniques. All imaging functions will return "ImageData" which has sufficiently interesting data.
      • Classify*
      • Identify*
      • ImageData*
      • ImageDiff*?
    • Mapping/ -- Advanced image processing and locating
      • We have no clue yet.
    • Sensors/ -- All sensors deserve objects
      • Many sensors, all will be children of some superclass with threading. This will be important for moving averages and time-sensitive calculations.
    • Motors/ -- Miscellaneous motor stuff
      • MotorControl
      • Drive
      • Shoot
    • Navigation/ -- Complex motions and moving around
      • RandomWalk? (since we already have it written...)
    • Aiming/ -- Ball aiming and following
      • Haven't thought of it yet.
    • Watchdog*† -- Threaded class that takes care of everything important (bad scenarios (i.e. stuck), 5 minute timeout...)
    • Startup -- Module that will load everything
    • Strategy -- Main module for strategy of game