Page 33 - Designing Autonomous Mobile Robots : Inside the Mindo f an Intellegent Machine
P. 33
Chapter 2
;//////////////////////////////////////////////////////////////////////
; B13_ABAP.sgv- Path file generated by PathCAD Version 3.63.
;
; Path program from B13_AB to B13_AP.
; Map Name: B13 [B13]
; Map Desc: B13 Warehouse
;
; Generated by: JMH
; Generated on: 01/16/02 at: 08:54
;//////////////////////////////////////////////////////////////////////
; --- INCLUDE FILES ---
;
INCLUDE local.def ;Local operating parameter definitions.
INCLUDE global.def ;System constants and addresses.
INCLUDE B13.def ;Map definitions from GENDEF.
;
;----------------------------------------------------------------------
;
AVOID NC, Far,Wide ;Set sonar, front=Far, side=Wide.
FID 1, TG_7 ;Use FID at TG_7 with diameter of 0.000 feet.
FID 1, TG_8 ;Use FID at TG_8 with diameter of 0.000 feet.
LOOK FarFwd, FarSide,FarSide ;Look using defaults favoring both sides.
PANREL Quick, 255, Ahead ;Pan at Quick speed to Ahead relative azimuth.
RUNON Slow, B13_A1
Figure 2.2. A partial SGV source program for a security robot
(Courtesy of Cybermotion, Inc.)
The beginning of an actual program for a security robot is shown in Figure 2.2.
Notice that this program uses the concept of including files. In this case, the included
files tell the compiler the numeric value for labels such as “Far”, “Ahead”, and
“B13_A1”. When compiled, this fragment would generate only 48 bytes of pseudo-
code, which would be sufficient for the robot to reliably navigate the path segment.
A segment could be as short as a few feet to as long as 256 feet.
Although programs such as the one in Figure 2.2 were originally written by a text
editor, later versions were generated automatically by a GUI (Graphical User Inter-
face). Paths are simply drawn on a map, and objects are dropped onto the map to
define things the robot must know or do. The GUI then generates programs that
can be edited by a standard text editor. Notice that this programming environment
therefore borrows concepts from conventional languages, object-oriented languages,
and visual programming.
Since a single instruction may elicit a complex behavior, scripting is ideal as a programming
technique for robots.
16

