Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As previously mentioned these regions are simply an extension on top of the Actuating  regions. They receive a trigger signal and then wait for a certain amount of time until passing that information onwards (ie. setting the trigger signal connected to one of the Actuating regions seen above.

Prediction

TODOImage Added

This region reacts to the input signals newPos and newFrame, that are coming from the image processing.
Whenever there are two temporally close positions, where the ball was detected, an external function call to the ball physics model is made.

When the ball was not detected for several frames, e.g. when it fell to the drain, or left the detection's region of interest, the information about the last position becomes stale and should be discarded.
In order to decide when to discard an old position the automaton counts frames since the last recognized ball position. After two frames the position is marked as no longer pending and after 10 frames it is discarded.

Launching

This first region determines when the launch lamp is blinking (ie. a ball is ready to launch) and when to launch. When the lamp turns on and the automaton has not received a new ball position from the outside system we assume it is starting to blink. We keep track of the state of the lamp and if for example it only turned on once a cooldown timer will run out and we determine it is not continuously blinking like it does when we are able to launch a ball into the game. If the automaton determines the lamp to be blinking for a long enough time (the 20 million points bonus timing), then a signal is set which is consumed by the following region.

...