Tuesday, 6 January 2009

End-project. PART V

Date: 06 01 2009
Duration of activity: 3 hours
Group members participating: all group members

1. The Goal

The goal of this lab session was to discuss and agree on the architecture of our project by deciding on what exactly a particular layer does and defining methods that have to be realized in those layers.

2. The Plan

  • Discuss the motor layer.

  • Discuss the calibration layer.

  • Discuss the navigation layer.

  • Discuss the gradient interpreter layer.

  • Discuss the bogus handler layer.

3. The Results

The illustration of the hierarchy.

The whole lab session took discussions about the layers of our thought-up layered architecture. The summary of all that we came up with can be seen in the table below. It gives the description of the whole structure of the architecture.

LayerLayer descriptionMethodMethod description
BogusHandlerThis is the upper most layer handling inputs.
GradientInterpreterIt is all about interpreting incoming gradients and vectors. It includes queue making for pending drawing assignment and reassuring itself with respect to 'map' by re-zeroing.
enqueue()Keeps gradients in the queue array until they are drawn.
wipeQueue()Emptying the queue.
reZero()Go to the zero coordinates in the system in oder to be sure of 'where I am' and thus keeping the precision.
NavigationLayerThis layer does corrective movement. It is given a coordinate tuple that expresses where the robot was supposed be at, and is expected to make a corrective movement to that end.
void gotoCoordinates (double x, double y, double z)Go to some set of pre-difined coordinates.
gotoCoordinates (double[] coords)Go to coordinates taken from coordinate array.
double[] getCoordinates ()Get a set of coordinates.
double getXCoordinate ()Get specific coordinate X.
double getYCoordinate ()Get specific coordinate Y.
double getZCoordinate ()Get specific coordinate Z.
CalibrationLayerThis layer handles mm-to-tacho's calibration and re-calibration of the axis. Obviously, it's a part of the state of this class to know how much a millimeter's worth, in tacho's.
getCoordinate(String motor)Returns the current coordinate (in mm's) for the given motor.
setSpeed(String motor, int speed)This sets the motor speed of the given motor. The speed is in the interval [-100;100]. Zero means stop; as opposed to float.
reCalibrate()This starts an interactive re-calibration of the axis. While the calibration is running, the coordinate progress is hidden from the interfacing layers: getCoordinate returns cached results, and setSpeed does nothing.
MotorLayerThis interface handles low-level tacho-count-based movements. It is expected to be a lowermost layer of the layered architecture. The layer is supposed to keep count of the tacho counts, and it is supposed to re-zero upon hitting an endpoint.
int getTachoCount(String motor)Returns the current coordinate (in tacho's) for the given motor.
setSpeed(String motor, int speed)This sets the motor speed of the given motor. The speed is in the interval [-100;100]. Zero means stop; as opposed to float.

The table, however, is only half of it. At the same time, methods were defined in Java interfaces, so that the method names are also defined at the syntactical level. Nicely commented Java interfaces were written.

4. Conclusion

With this layered architecture we tried to separate different aspects of the robot handling (in order): Motor abstraction, correlation to millimeters, navigation to coordinates, high-level description interpretation, and actual drivers. This structure is the first sketch and not yet implemented, therefore it will get a lot of changes along the process. The skeletal structure however remains stable.

No comments: