Legolog: Inexpensive Experiments in Cognitive Robotics
d>
Below is a cache of http://www.cs.toronto.edu/cogrobo/Legolog/Papers/crw00.pdf. It's a snapshot of the page taken as our search engine crawled the Web.
The web site itself may have changed. You can check the current page or check for previous versions at the Internet Archive.
Yahoo! is not affiliated with the authors of this page or responsible for its content.
Legolog: Inexpensive Experiments in Cognitive Robotics
Legolog: Inexpensive Experiments in Cognitive Robotics
Hector J. Levesque
and Maurice Pagnucco
Abstract.
Researchers and instructors of Cognitive Robotics have
long lamented the lack of affordable hardware platforms upon which
to demonstrate their art. Even with the advent of more recent mobile
robotic platforms that have begun to bring prices within reach, the
amount of low-level programming that needs to be performed means
that signicant time must be spent before work can begin on the prob-
lems upon which they would like to focus. Recently LEGO
R
¡
intro-
duced the MINDSTORMS
TM
Robotics Invention System
TM
a con-
struction kit equipped with a programmable microprocessor that can
accept inputs and control outputs. Together with the vast number of
original LEGO
R
¡
pieces it is now possible to construct all manner of
controllable robotic devices.
In this paper we describe our implementation of Legolog; a system
that uses a controller from the Golog family of planners to control a
MINDSTORMS
TM
robot. Legolog is capable of dealing with prim-
itive actions, exogenous actions and sensing. Moreover, the Golog
controller is easily replaced with an alternate planner. In this way,
our aim is to demonstrate that practical cognitive robotics is already
within reach, and to provide a (Prolog-based) system for cognitive
robotics practitioners to use.
Key words:
Cognitive robotics, Golog, LEGO
R
¡
MINDSTORMS
TM
Robotics Invention System
TM
.
Advances in mobile robot technology have led to a plethora of
such devices becoming commercially available. However, the price
of many of these platforms remains prohibitive for many researchers
whose work could benet from their ready availability. This factor is
even more pertinent when it comes to the use of mobile robots for
pedagogical purposes.
In this paper we describe Legolog,
2
a system developed to allow
experimentation with and demonstration of a Golog [6] planner on
the LEGO
R
¡
MINDSTORMS
TM
Robotics Invention System
TM
(RIS).
We describe the main components of this system and how they inter-
act. While the use of Golog was our initial motivation, one important
consideration during the design was to make it possible to substitute
Golog with any planner and to run the underlying Prolog on different
platforms in a reasonably seamless manner.
The RIS augments the standard LEGO
R
¡
components with a RCX
(Robotic Command Explorer) brick containing a microprocessor
capable of accepting three inputs and controlling three outputs. Fur-
thermore, the RCX has an infrared port for communicating with other
RCXs and an infrared tower that can be attached to the serial port
of a personal computer. The RCX allows one to build a vast array of
different robots of reasonable sophistication and write programs to
¢
Cognitive Robotics Group, Department of Computer Science, Uni-
versity of Toronto, Toronto, ON, M5S 3H5, Canada. Email:
£
hector,
morri
¤
@cs.toronto.edu
¥
Legolog is in no way associated with LEGO
R
¡
or its products.
control them. Currently, the cost of a MINDSTORMS
TM
kit is about
$US 200. One of the main advantages of the RIS over more expensive
mobile robot platforms is the ability to quickly and easily modify the
design of a robot to try different experimental scenarios.
The main aim of this paper is to demonstrate how practical robotics
can be brought within the reach of cognitive robotics researchers and
educators and to provide one such system that is available to be used
and easily adapted for such a purpose.
In the next section we briey describe the RIS and the particular
avour of Golog used in our implementation of Legolog. In Section 2
we describe the various components of Legolog. A discussion of the
main contributions follows in Section 3 with conclusions in Section 4.
1
Platform Components
Legolog is based on two main components: a robot constructed using
the RIS and a Golog robotic controller. The RIS grew out of research
conducted on the Programmable Brick [17] at the MIT Media Labo-
ratory. Golog has its origins in the situation calculus [11, 16] and has
been used to control quite sophisticated robots in real-world environ-
ments. We briey overview these two components before focussing
on their specic roles in Legolog.
1.1
LEGO
R
¡
MINDSTORMS
TM
Robotics Invention
System
TM
The RIS represents a signicant advance on the types of construc-
tions possible with traditional LEGO
R
¡
kits. At the heart of the RIS
is the RCX (Robotic Command Explorer). The RCX contains a Hi-
tachi H8/3297 microprocessor [4]. It allows for up to three input ports
and is capable of controlling three output ports. A variety of sensors
can be attached to the three input ports. Currently LEGO
R
¡
has light,
temperature, rotation and pushbutton sensors available. However, en-
thusiasts have shown how to construct inexpensive additional sensors
[3][5, Chapter 11]. The outputs are primarily for the control of motors
but lights are also available. The RCX is also equipped with an in-
frared port that can be used to download programs from a standalone
computer via an infrared tower attached to the computers serial port
and also allows communication with other RCXs.
The basic idea behind the RIS is that programs are written on a
desktop or laptop machine and downloaded to the RCX via the in-
frared tower which is attached to the machines serial port. There are a
number of options when it comes to programming the RCX. LEGO
R
¡
provides some basic softwareknown as rmwareimplementing a
virtual machine that can be downloaded to the RCX. This virtual ma-
chine allows for ve programs that can be chosen from buttons lo-
cated on the RCX. Each program may consist of up to 32 variables,
8 tasks and 9 subroutines. Tasks can execute concurrently with one
special taskmainbeing the starting point of any program.
Once the rmware is in place it is possible to use LEGOs own
visual programming environment under Windows to write programs
for this virtual machine. However, this method is limited in the types
of behaviour that can be programmed. A more exible alternative is
an independently developed language called NQC (Not Quite C) [1]
that provides a C-like language for programming the RCX rmware.
Other rmware programming environments also exist but we shall
not investigate these here. We opted for NQC as it appears to provide
the best compromise between ease of use and exibility.
An alternative to the rmware oriented approach is LegOS [13].
This makes use of a C cross-compiler for the Hitachi processor. Pro-
grams are a little more sophisticated than NQC since they obviate
the need for the underlying rmware but, in so doing, take longer to
download. This approach is likely to be more powerful and exible
than the others on offer, and remains one aspect worthy of further in-
vestigation.
One other factor that makes the RIS an attractive option is its large
user base. Designs for robots and program code are readily available
on the world wide web. The main sites for such information are the
ofcial RIS site [8] and the LUGNET site [10]. Other pages describe
how to manufacture sensors [3], how the RCX functions [14], how to
use the infrared transmitter/receiver on the RCX to implement a prox-
imity sensor etc. When one considers the vast number of LEGO
R
¡
componentsfrom gears and pulleys, pneumatics, motors, etc.the
number and sophistication of devices is quite vast. While the quality
of sensors does not yet approach that of more expensive robots, they
still permit an adequate level of experimentation.
1.2
Golog
To provide high level control of the robot, we use the programming
language Golog [6]. Golog is similar to traditional imperative pro-
gramming languages, but with three signicant differences: (a) the
primitive statements in a program are domain-dependent actions to
be carried out externally by the robot; (b) the primitive tests in a pro-
gram are domain-dependent conditions in the world (or uents) that
are changed by the actions of the robot; and, (c) a program may con-
tain non-deterministic choice points where reasoned (non-random)
choices need to be made to ensure successful completion of the rest
of the program.
To be able to execute a Golog program, an interpreter needs to cal-
culate how uents are affected by the actions of the robot. To this
end, a Golog program is coupled with a basic action theory [7] for-
mulated in the language of the Situation Calculus [11, 16]. A basic
action theory contains axioms that specify the initial state of the u-
ents, and for each uent, a successor state axiom [15] which species
how the uent is changed as the result of performing any action. Ba-
sic action theories also contain precondition axioms for each action,
stating under what conditions the action can be succes