> Next Usage
< Previous get-software-version

5.3 Level 2: Symbolic abstraction

This level is a fairly simple abstraction around level 1 which allows us to use Guile symbols to refer to parts of the robot, and to use real degrees to specify both absolute positions and relative motions of the joints. In this way, we are not tied to a particular configuration of the robot (joints to motor control outlets on the control board), and we have an immediate understanding of just how far each joint is going to move. This also allows us to move different joints by the same amount, even though there are detail differences in this at level 1. Finally, the big benefit is the relative ease of writing programs which scan more like natural english, and the attendant improvement in code maintainability this brings.

This level also introduces the idea of a robot (software) object; an item that can be passed around from one part of the code to another, and which stands as a representation of the physical device. This abstraction would allow in future for us to have two (or more) robots connected to either the PC or the control board, and we will be able to use the developed subroutines (both now and the future ones at higher hierarchical levels) equally on both robots without them interfering.

A further advantage of this so-called software encapsulation of the robot concept is that, in future, we might acquire a different type of robot which takes different low-level commands. When this happens we can just write some new low-level (Level 2, actually) routines which make the robot behave the same way as the present model, and then all higher software levels (including software that you end up developing yourself) will work with the new model just as well as it did with the old one!

> Next Usage
< Previous get-software-version
Copyright © 2010, 2012 DM Bespoke Computer Solutions Ltd
All rights reserved