KRolog A Prolog Based Interface For The
KRolog A Prolog Based Interface For The
Edgardo Ferretti
Laboratorio de Investigación y Desarrollo en Inteligencia Computacional (LIDIC)
Universidad Nacional de San Luis
Ejército de los Andes 950 - Local 106, (5700) - San Luis - Argentina
[email protected]
Marcelo Errecalde
Laboratorio de Investigación y Desarrollo en Inteligencia Computacional (LIDIC)
Universidad Nacional de San Luis
Ejército de los Andes 950 - Local 106, (5700) - San Luis - Argentina
[email protected]
and
Guillermo Simari
Departamento de Ciencias e Ingenierı́a de la Computación
Universidad Nacional del Sur
Av. Alem 1253, (8000) Bahı́a Blanca, Argentina
[email protected]
In Section 2 was mentioned that during the entire cation servers that process the images it obtains, and
communication, the host computer acts as a master generate information packets that are then made avail-
and the robot as a slave, and that all the communi- able to be used by the agents that control the robots.
cations were initiated by the master. In consequence, For instance, one alternative would be using the Do-
the robots’ control modules were programmed with raemon video server [7], the one used in the E-League
the corresponding code of a server, while the predi- competition [8].
cates available in the API are seen as clients.
The API
When the API’s predicates should sent a com-
mand to a real or simulated robot, they launch a tem- The API is composed by 24 predicates, one for
porary client (programmed in C) that communicates each KRobot class’ methods. As all the SemCor
to the server (the real or simulated robot) and waits for commands after being issued receive a result or a
its answer. This operation is repeated as many times confirmation from the Khepera robots, all the pred-
as predicates are used in the Prolog code that controls icates have a variable as parameter that matches
the robots behavior. In Figure 3, this communication this answer. Those variables named Outb matches
process is depicted. boolean values, Outint matches integer values,
As a final remark, one advantage of using TCP/IP while Outlist matches list of atoms. These pred-
sockets to develop this layer, is that it makes it pos- icates are used without distinction to communicate
sible to interact with a global camera (that covers the with a real or simulated robot. Next, we can see the
robots’ world) and its video and command communi- predicates and a brief explanation for each one:
Figure 3: Functioning of the interconnection layer