[Trac] [AllemaniACs] #30: Skill Plugin for Fawkes
trac-notifications at lists.kbsg.rwth-aachen.de
Sat Jan 19 19:55:22 CET 2008
#30: Skill Plugin for Fawkes
Reporter: tim | Owner: tim
Type: feature | Status: new
Priority: critical | Milestone:
Component: Fawkes | Keywords: Skills, Lua
We need to write a new skill module for Fawkes. Note that skill plugin and
skill module are used interchangeably.
The skill module's task is to provide a set of basic actions that the
robot can do, like "goto_xy", "intercept_ball", "grab_can". These actions
can then be used in a high level control program (agent) to plan and
execute actions or a sequence of actions. By this definition the skill
module is kind of our "middleware" sitting between the actuators on the
one side and the high level control on the other side.
The skill module shall use all the information and only the information
that is provided by the world model. It shall not access any low level
sensory component directly. The skill module shall be the only component
to send commands to the components that drive the actuators.
In general we consider it to be beneficial if the skills themselves can be
encoded in a scripting language rather than in C++ directly as up to now.
We see the following possible benefits from this approach:
* Faster development cycles. As there is no compilation involved (which
has been very time expensive in the past, especially when exploiting all
available C++ features) the scripts can be executed faster after modifying
them. There can even be an "auto-load" mode where changed scripts are
reloaded automatically when changed
* Less risks of running into typical C++ pitfalls, especially memleaks
come to my mind
* We assume that it will be easier for newcomers to dive into a scripting
language to program a robot's behavior than it would be if they had to
learn about the C++ internals of the framework. We "abstract away" some
parts of the underlying Fawkes infrastructure to make it easier to start
Several approaches have been discussed in the mid-size group (and beyond).
We came up with three possible solutions:
[http://www.urbiforge.com/ URBI] is a robot platform in itself. It has
a completely new and unique scripting language specifically for driving a
robot. In URBI terms a plugin would have to be written that embeds URBI
and acts as the URBI Engine. Inside this engine the URBI scripts would run
to facilitate the skills. The major problem is, that URBI is closed, and
rather voluminous, as it tries to solve many problems that Fawkes solves
The idea was raised in incorporate the [http://www.lua.org Lua]
scripting language. "Lua is a powerful, fast, light-weight, embeddable
scripting language." It has been used in many projects in industries,
academia and game development (see [http://www.lua.org/uses.html Lua
projects]). Especially the later seems interesting for us, as basic game
AI has been development with Lua. Lua has many ways for interaction
between C++ and Lua code. Thus we can have simple wrappers for instance
for our BlackBoard interfaces in Lua. Since it is explicitly written to be
embeddable implementation should not be too hard.
Stay with C++::
It was also discussed to stay with the old approach. But because of the
benefits of the scripting language approach discussed above that was
abandoned right away.
With the licensing problems and the non-availability of source code of
URBI and the lightweightness and embedability as a design goal of Lua we
decided for Lua.
We will now implement a skill plugin that provides the basic
infrastructure for skills. That means that access to the BB interfaces has
to be established. It was decided that it will be easier at least for the
beginning to run the script interpreter in a continuous thread that does
not care about the outer timing. A second thread will manage the opened
interfaces and call a read operation on the interfaces as soon as this is
possible. The agent will be integrated in the skill module to omit agent-
to-skill-plugin communication for now. This will change in the future.
Just to make it clear: this feature task is about creating the basic
infrastructure of the new skill plugin.
Ticket URL: <https://lechuck.informatik.rwth-aachen.de:2342/trac/ticket/30>
More information about the fawkes-trac