Programming Model Based On Concurrent Objects For
Programming Model Based On Concurrent Objects For
net/publication/228764400
Article
CITATIONS READS
9 2,083
5 authors, including:
All content following this page was uploaded by Vicente Matellán on 27 May 2014.
1 Introduction
Robotics is a research area that has gained increasing attention in recent years.
Its main goal is to build machines capable of carrying out task, with the flexibil-
ity, robustness and performance exhibited by humans. The robots are primarily
intended to dangerous, dull, dirty, or difficult scenarios. Wielding and painting
in car factories, space rovers, or nuclear plant cleaning are only some samples of
their real application scope.
One of the main issues in robotics research is the autonomy, that is, the
generation of autonomous behaviors in robots. Growing in robot autonomy opens
the door to new applications like service or entertainment robotics. Remarkable
advances in such direction are the robotic vacuum cleaner from iRobot and the
AIBO dog from Sony, a best-seller robotic pet.
Mobile robots are no more than platforms where sensors, actuators and com-
puters are combined. The software that runs in such computers determines the
robot behavior, and provides its autonomy steadily deciding how to act. Gener-
ating autonomous behaviors lies in writing programs for the robot computers.
From that programming standpoint the robots, like general purpose computers,
are endowed with some operating system which provides an API for basic access
to hardware resources like sensors and actuator devices.
Besides such basic access, the programming environment may provide some
features to make easier the software development of robot applications. For in-
stance, robot programs usually have to take care of many tasks at the same
368 Programming Model Based on Concurrent Objects for the AIBO Robot
2 OPEN-R
to let the programmers develop efficient software for AIBO. OPEN-R is built
on top of APERTOS operating system. In next sections we will describe both
elements making emphasis in OPEN-R.
2.1 APERTOS
OPENR: Application
APERTOS
are uniquely identified by the service name, which let high modularity in
object construction. Modularity allows parallel processing, clarity of design
and an easy way of reusing pre-existing objects.
Object1
Object2 Object3
The mentioned System Layer’s services that get data from the application layer
(Effector and Speaker), send a event indicating the object that they are ready
to receive more data once they have handled the last sent data. On the other
hand, the services that send data to the application layer (Sensor, FbkImage
and Mic), send a event indicating the object that they have actually sent the
required data.
F. Martı́n, R. González-Careaga, J.M. Cañas, V. Matellán 373
SUBJECT OBSERVER
DoInit DoInit
Notify Event 2
Method
Method
Ready Event 4
3
1
Data
Object definition One object corresponds to one executable file (with .bin
extension) that will be loaded when the system boots. The objects to be
loaded are set up in the OBJECT.CFG file, which is the list of object to load.
Object’s services configuration The number of subjects and observers for
an object is defined in the configuration file STUB.CFG. In this file, the type
of sent data and the methods to be invoked, are also specified. The notion of
stub file is similar to IDL files in CORBA and stubs in Java RMI, where these
files defines the inter-object interfaces to achieve remote method invocation.
OPEN-R also provides a way for execute objects in a distributed way. This
is useful, for instance, for debugging the objects in a PC. This is a example
of STUB.CFG file:
ObjectName : teleoperatorServer
NumOfOSubject : 2
NumOfOObserver : 1
Service : "teleoperatorServer.SendString.char.S", null, null
Service : "teleoperatorServer.Motion.char.S", null, null
Service : "teleoperatorServer.ReceiveString.char.O", null,
Notify()
APMODE=2
#CHANNEL=
DNS_SERVER_1=193.147.71.64
#
# ImageProcesser <--> TeleoperatorServer
#
TeleoperatorServer.SendString.char.S
ImageProcesser.ReceiveString.char.O
ImageProcesser.SendString.char.S
TeleoperatorServer.ReceiveString.char.O
#
# TeleoperatorServer --> Motion
TeleoperatorServer.Motion.char.S Motion.Orden.char.O
#Motion--> locomotion
Motion.ExecuteAA.AtomicAction.S
actuatorControl.ExecuteAA.AtomicAction.O
actuatorControl.ECommander.OCommandVectorData.S
OVirtualRobotComm.Effector.OCommandVectorData.O
actuatorControl.Head.OCommandVectorData.S
OVirtualRobotComm.Effector.OCommandVectorData.O
actuatorControl.Indicators.OCommandVectorData.S
OVirtualRobotComm.Effector.OCommandVectorData.O
actuatorControl.Effectors.OCommandVectorData.S
OVirtualRobotComm.Effector.OCommandVectorData.O
compiling objects For the compilation, we use in a cross compiler for the
MIPS architecture.
Transferring binaries to the robot Once the binaries are generated in the
PC, we transfer them through a card writer to a memory stick that will be
inserted in a slot at the robot
Monitorization through a telnet session at a given port the booting and the
output messages are displayed. This can be used for debugging purposes and
so on.
3 Teleoperator
Here we present an example application that uses the concept discussed before.
The application is an AIBO Teleoperator which is divided in a client and a
server.
The Teleoperator client runs in a PC. It creates a GUI ( figure 6) which is
composed by an image box for display the images captured in the AIBO camera,
box for controlling the direction and velocity of actuators and a set of buttons
376 Programming Model Based on Concurrent Objects for the AIBO Robot
for selecting the image size and mode. Too a small box at the bottom shows the
frame per second rate.
This application is designed for display images on demand from AIBO and
sending commands to actuators.
Three image sizes are defined (hight, medium and low resolution) and two
modes (color and black & white). Obviously, this has an impact in the number
of frames per second the robot can transmit.
When we have active any mode of image capture, the client demands an
image to the server. When it receives the image, it displays the image and it
asks for another one.
When we have the Teleoperator active, clicking in the visual joystick we can
setup the velocity and direction of movement. We can stop the movement in any
moment too, clicking at the stop button.
The communication with the AIBO side uses a TCP/IP protocol for sending
commands and receiving images.
The Teleoperator server runs on the AIBO robot and perform the motion
commands selected in the client, sending the images from its camera.
Teleoperator Server This object receives commands from the client in the Pc
side via TCP/IP. First, it checks whether the message is a motion command
or a vision command. If the message is an image command it sends an OPEN-
R message with the mode of the image asked to the imageProcesser object.
If the message is a motion command it sends an OPEN-R message with the
new kind of movement to the actuatorControl object.
imageProcesser object Each time this object receives and message asking for
a image, the object communicates with the camera and get the image. It may
include some image, and this is the reason for heaving a separate object.
actuatorControl object This object commands the movement of the robot
according to the motion order it received last time. When it receives a new
motion command, it changes its dynamic of movement.
This object has not been implemented by us. It is the motion module im-
plemented in the University of New South Wales (UNSW) [8] and National
ICT Australia (NICTA) for the Robocup Championship. This is so by the
complexity of implement our own motion module.
4 Conclusions
References
[1] Yasuhito Yokote. “The Apertos Reflective Operating System: The Concept
and its implementation”. Sony Computer Science Laboratory Inc. Japan
1992
[2] Jun-ichiro Itoh, Yasuhito Yokote. “Concurrent Object-Oriented Device
Driver Programming in Apertos Operating System”. Sony Computer Sci-
ence Laboratory Inc. Japan 1994
[3] Franois Serra, Jean-Christophe Baillie. “Aibo programming Using OPEN-R
SDK. Tutorial”. ENSTA. France 2003
[4] OPEN-R Documentation. http://openr.aibo.com/
[5] Jean-Charles Fabre and Tanguy Prennou. ”A Metaobject Architecture
for Fault-Tolerant Distributed Systems: The FRIENDS Approach”, IEEE
TRANSACTIONS ON COMPUTERS, Vol 47. January 1998.
[6] H. Mashuhara, S.Mtsuoka, T.Watanabe, and A. Yonezawa. “Object-
Oriented Concurrent Reflective Languages Can Be Implemented Effi-
ciently”, Proc. FTCS-22, pp.386-395, Boston, 1992
[7] Robocup Official Site. http://www.robocup.org/
[8] rUNSWift Robocup Team. University New South Wales (Aus-
tralia).http://www.cse.unsw.edu.au/ robocup/index.phtml