Page 30 - Designing Autonomous Mobile Robots : Inside the Mindo f an Intellegent Machine
P. 30
A Brief History of Software Concepts
Yet no language can be more efficient than assembly language because at some stage
all languages must either generate or run on machine code. If you are willing to
invest the time, you can gather a library of assembly language routines that elevate
application programming to a level similar to a higher level language.
In programming systems on the CyberGuard™ robot, we developed not only an
extensive library of powerful assembly language routines, but also an efficient real-
time operating kernel and several dozen specialized scripting languages. The geo-
metric functions were all specifically written to use the native units of the robot’s
encoders. For example, instead of degrees these routines expected begrees. Begrees are
an angular measurement whereby 1024 begrees is a full circle, the output of the
robot’s angular encoders. Units of measure for vector calculations were all based on
100ths of a foot, the basic odometry scaling. The result was that small, inexpensive,
low-power processors could perform calculations as complex as linear regression with
blazing speed.
The smaller the microprocessor, the more likely you will need to use assembly lan-
guage at some point. This is particularly true in programming sensor and control
systems for mobile robots because this type of real-time programming is not generally
well supported by available languages. As you become more proficient with assembly
language, you will naturally begin to incorporate many of the concepts of higher-
level languages.
As programs become more elegant, they become fractal in nature. Patterns repeat them-
selves, mirroring the most powerful constructs of other languages.
The trade-off between assembly language and higher-level languages is of course
efficiency versus development time and code maintainability. With processing power
as incredibly inexpensive as it is today, only a masochist would program a major ap-
plication for a PC in assembly language. Yet assembly language may yet be the best
(and sometimes only) recourse for programming many subsystems of a mobile robot.
Early conventional languages
As the programs began to diversify into scientific, financial, and engineering appli-
cations, early conventional languages evolved to facilitate programming in each
application area. Languages such as FORTRAN and LISP evolved for scientific
applications while COBOL became dominant in many early finance applications.
Basic soon appeared primarily as an easy-to-learn program for the non-geek masses.
Early versions of Basic violated almost every precept of a good programming disci-
13

