Embedded Motion Control 2015 Group 3/Decision

From Control Systems Technology Group
Jump to navigation Jump to search

Decision

The Decision block was made to be the highest in hierarchical order. It is called every iteration from the main. First, it calls the update function in the Scan block. One of the things this function does is recognizing the type of junction it is headed towards, when within range. It saves this junction in it's scandata, which is the class used for communication between blocks. This junction is an enum with several options:

- Crossroad, where it can go left, right or forward.

- Tjunction_1, where it can go left and right.

- Tjunction_2, where it can go right and forward.

- Tjunction_3, where it can go left and forward.

- Deadend, where it is at a dead end, within the range required for opening the door.

- Corridor, where it can see none of the above junction types, which means either the next junction is outside the range of detection, or the corridor it is following leads to a corner, which, since can be solved with the regular potential field driving, does not require a decision.


This page is part of the EMC03 CST-wiki.