Date post: | 16-Apr-2015 |
Category: |
Documents |
Upload: | jaime-andres-rincon-arango |
View: | 1,968 times |
Download: | 2 times |
Control of two robotic platforms using multi-agent systems
INS - Intelligent Systems
By: Jaime Andres Rincon Arango
INDICE
INS - Intelligent Systems
2
INDEX INDEX .......................................................................................................................... 2
1. Introduction. ........................................................................................................... 3
2. General Purpose .................................................................................................... 3
3. Specific Goals ........................................................................................................ 3
4. Hardware Description ............................................................................................ 4
4.1. Arduino ......................................................................................................................... 4
4.2. RF Communication Modules .................................................................................... 5
4.3. Infrared Sensors for distance measuring ................................................................ 7
4.4. Optical Flow Sensor ................................................................................................... 7
4.5. Robotic platforms ........................................................................................................ 8
5. Task Planning in the Arduino ................................................................................. 9
6. Connecting JADE to Robots .................................................................................. 9
6.1 Behavioral data reception ............................................................................................. 10
6.2. Mailing FIPA-ACL ......................................................................................................... 11
6.3. Reactive behavior ......................................................................................................... 12
6.4. Transmission of data to the robot control motors .................................................... 13
7. Connecting JASON to the Robots ........................................................................ 14
8. Render 3D ........................................................................................................... 15
9. In a future ............................................................................................................ 15
10. Bibliography ........................................................................................................ 16
11. Annex A List of Materials ..................................................................................... 16
12. Annex B Robot Photos......................................................................................... 17
INS - Intelligent Systems
3
1. Introduction.
Today the use of multi-agent systems (MAS) in robotics is a branch of research that
seeks coordination among the agents and the real world. A robot in a real environment
perceives the world with its sensors and thus knows if there are obstacles in front and
what position. With this information and using MAS, as the rational part of the system
that is responsible for the interpretation of these data to a higher level of computing and
applying different artificial intelligence techniques, the robot will be able to make
decisions.
With social interaction between agents and the ability to share information from the
world around them, we can create a Robot-Net that allows solving problems together,
integrating different specialized aspects to each of the agents and using other
techniques Machine-Learning environment for learning.
This paper aims to address the issue of how to link two programming platforms with
multi-agent systems, using JADE and JASON through wireless communication as a
way of connection between the MAS and the robots. The hardware will be integrated
an Arduino development kit to interface the motor control and the acquisition of data
captured by the sensors. Future is intended to create a more complex Agent-Robot,
establishing in each specific roles and features.
2. General Purpose
Simulate with JADE a blind robot, which has no knowledge of the world only of his position, and a guide robot with sensors that can capture the world. Using FIPA-ACL messages the guide robot will sent to blind robot the obstacle position.
3. Specific Goals
To design and build robotic platforms using commercial robot kits.
Building the agents using JADE and JASON.
Create different behaviors in agents.
Implement communication between agents using FIPA-ACL
INS - Intelligent Systems
4
4. Hardware Description
4.1. Arduino Arduino is an open platform of hardware and software, which allows for a simple and didactic creating countless applications. In this project we used two kits, the Arduino Mega and Arduino Uno, the specifications are showed below:
Table 1. Technical specifications of the Arduino UNO
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage 7-12V
Input Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by
bootloader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Table 2. Technical specifications of the Arduino Mega 1280
Microcontrolador ATmega1280
Voltaje de funcionamiento 5V
Voltaje de entrada
(recomendado)
7-12V
Voltaje de entrada (limite) 6-20V
Pines E/S digitales 54 (14 proporcionan salida PWM)
Pines de entrada analógica 16
Intensidad por pin 40 mA
Intensidad en pin 3.3V 50 mA
Memoria Flash 128 KB de las cuales 4 KB las usa el gestor
de arranque(bootloader)
SRAM 8 KB
EEPROM 4 KB
Velocidad de reloj 16 MHz
INS - Intelligent Systems
5
The Arduino Mega is responsible for controlling the robot guide. It sends the
information that the sensors have captured to the MAS and also is responsible for
motor control and receiving data sent by the MAS. Figure 1 shows the physical
appearance of the Arduino Mega.
Figure 1. Arduino Mega
The Arduino Uno which controls the Blind Robot, is responsible for only receive the
data sent by the MAS and control motors. Figure 2 shows Arduino UNO appearance.
Figure 2. Arduino UNO
4.2. RF Communication Modules
This design uses two wireless communication modules: The guide robot use a Xbee module which is shown in Figure 3 and a Bluetooth module to the blind robot which is shown in Figure 4. Each of these modules use the RS-232 protocol for establishing communication between the modules and power Arduino send data to the computer.
INS - Intelligent Systems
6
The computer is integrated by a Bluetooth that allows the agent that controls the blind robot communicate to it and a Xbee module for receiving data from the robot guide. This module has an interface for USB communication with the computer which can be seen in Figure 3.
Figure 3. Xbee module connected to the Arduino
Figura 4. Bluetooth Module
Figura 5. Xbee module connected to the computer
INS - Intelligent Systems
7
4.3. Infrared Sensors for distance measuring
Managers to detect the obstacle distance are the GP2Y0A02YK0F Sharp sensors, these sensors have an effective range comprised between 10 and 150 cm, use infrared light to calculate distance. The sensors are shown in Figure 6.
Figure 6. Sensor Sharp GP2Y0A02YK0F
4.4. Optical Flow Sensor
The optical flow sensor is currently used in our computer mouse, they measure the
quantity of movement in a 2D space using image processing.
This sensor ensures a coordinate in X, Y, which is used to determine the position on
the map. For this I use an optical mouse with PS2 connection using the library for
Arduino.
Figure 7. Optical flow sensor
INS - Intelligent Systems
8
4.5. Robotic platforms
I use commercial kits platforms 4WD types which are connected electronic components
of control processing. Figure 8 shows the platform of the robot used to guide and in
Figure 9 for the blind robot platform.
Figure 8. Robot guide
Figure 9. Blind robot platform.
INS - Intelligent Systems
9
5. Task Planning in the Arduino
In Arduino is where we can find the data capture sensors, motors control and all that is required for the lowest level for controling the robot. Because with Arduino have not the opportunity to work with threads, we can not do actions in parallel so is that why all programming is sequential programming. Then I established a schedule for tasks, giving each task a high or low priority. The tasks and their priorities are shown in Table 3 where the lower number indicates a higher priority.
Tabla 3. Task planing
Tasks priority
Infrared sensor 1
Tx Dates 2
Rx Dates 3
Motor control 4
compass 5
Although different scheduling techniques, I use a cyclical planning, in which each task
has a runtime, these tasks are ordered from highest priority to lowest priority, taking
into account the execution time of each task and a timeout, known as the Deadline, to
ensure that each task is executed.
The reactive behavior is a task that runs at the end of each of the above tasks, this
allows for a change so that the reactive behavior in the Arduino microcontroller, can be
only executed if the condition that the obstacle is at a distance less than 20 cm. This
behavior causes the robot to react and avoid the obstacle without having to send this
information to the agent.
This step is perhaps the most important in making the robot programming, since in this
stage are divided the different tasks and planning tasks statically that which initiate first
and which second etc.. After this stage I passed to the high-level programming, which
in this case is done with JAVA, in which the agents are programmed.
The programming structure shown in Figure 10.
6. Connecting JADE to Robots As mentioned above I want to connect JADE to a couple of robotic platforms, each with an agent. The two agents will communicate with each other, where the robot with sensors will send to the robot with no sensors information about the objects position. First of all we should set the java environment, to which we must add the libraries jar, to connect the robot with the JADE agent, and this requires the following files: comm.jar, win32com.dll and javax.comm.properties. Next is program the agents by creating behaviors, which are described below.
INS - Intelligent Systems
10
Figure 10. Programming Structure
6.1 Behavioral data reception This behavior consists in a tikerbehavious behavior, which lets us define a cyclic behavior periodically run a task (the period indicated in the constructor) to be implemented by overriding the abstract method onTick (). His methods action () and done () are already implemented. Furthermore, the method has GetTickCount () which returns the number of ticks since the last reset behavior. This behavior is the agent responsible for receiving data that are transmitted from the robot and the data from the sensors. These data are necessary for the agent to be placed inside the map position of objects. The data reception behavior decodes the data frame sent by the robot, separating and storing each different variables in the data frame like is shown below.
High-level programming(JAVA,
C++, etc)
Low-level programming(Arduino)
Motor Control and Capture Sensor
INS - Intelligent Systems
11
The angle is given in compass degrees, the interruption is a value between one and zero and the sensor distance in centimeters. These data are necessary for the robot to place obstacles in the map which consists of a 32x32 matrix. It has limited map size for practical reasons and due to only work indoors. However the guide platform has a GPS operation could climb agents to open environment with GPS coverage.
6.2. Mailing FIPA-ACL This behavior is responsible for the social relation between players; sends messages under the FIPA-ACL protocol. The message structure is shown below in Figure 11
Figure 11. FIPA-ACL Message Structure
The message sent by the transmitting agent is the speed and direction of rotation of the
motors, the receiving agent decodes the data and sends it to the behavior of the
transmitter and sends data to the motors.
Figure 12 shows the communication process between agents.
Figure 12. Communication structure between agents.
In block world is the environment where robots have to develop and act. The Robot 1 is
the guide, and is able to see the environment with sensors and communicate with the
Robot 2 and tell where the obstacles are.
Walls,
objects etc.
Message:
Obstacle at
position (x, y).
… Detects
objects
INS - Intelligent Systems
12
6.3. Reactive behavior In the structure of an MAS is the reactive layer, this layer is the most basic part of the
agents. In robots, this layer is only found in the guide robot since it has the sensors.
The robot reacts to obstacle located at distances less than 20 cm, if the distance is
greater and at that moment finds an obstacle, that obstacle is placed in the map that
share to the agents before being evaded by some AI search algorithm.
If the robot encounters an obstacle with a distance less than 20 cm in the left sensor,
the robot will react immediately rotating clockwise, at that moment the robot stops
sending data to the agent and only cares about reacting to the stimulus. React the
same way, but in reverse, if the right sensor detects an obstacle. There is also two
additional reactions: if the center and the left sensor activates the robot will move
backward a X distance and then rotated clockwise an angle α and if the center and left
sensor activates the robot move backward a X distance and then rotates clockwise an
angle α.
In Figures 13, 14, 15 and 16 shows how the robot acts reactive behavior.
Figura 13. Obstacle less than 20 cm, Left sensor
Figura 14. Obstacle less than 20 cm, Right sensor
INS - Intelligent Systems
13
Figure 15. Obstacle less than 20 cm, Right and Center sensor
Figure 16. Obstacle less than 20 cm, Left and Center sensor
6.4. Transmission of data to the robot control motors The MAS sends data to the robot control via wireless serially. Within the data packet are the speed, direction of rotation of the motors and the bridge H reset. When using an 8-bit PWM, the range of values that can be used is between 0 and 255. Due to the weight and to break the rest state of the robot using the minimum value is 60 and the maximum is 255. The direction of rotation established for engines is shown in Table 4.
Table 4. Combination for the direction of rotation of the motors
0 0 forward
0 1 left
1 0 right
1 1 back
INS - Intelligent Systems
14
The reset has only two possible logic states 1 and 0. The first stage allows the engines
to be moving and the second state to shutdown the engines.
Below in Figure 17 is described as the structure consists of data transmission, which
will decode the Arduino for controlling each motor.
Figure 17. Data transmission structure
7. Connecting JASON to the Robots
Within the branch of the MAS, JASON interface development is a multi-agent system
that allows to use the BDI structure.
With this development environment, leaving only the base intended for the realization
of the connection between Jason and robotic platforms, creating a basic example of the
robot control.
Desires
Intentions
Beliefs
INS - Intelligent Systems
15
The structure sending data from the robot to the MAS and from the MAS to the robot is
the same used in JADE.
8. Render 3D
3D Rendering is programmed using Visual C++ and OpenGL, it communicates with the
MAS using TCP / IP. I chose this form of communication because it allows to connect
the render to the MAS by accessing the IP address of the computer where I can
reconstruct a map of what the robot is capturing. The MAS can be in one computer and
the render can be execute by other computer. An image of the render is shown in
Figure 19.
Figure 19. 3D Render
9. In a future
With an eye on the continuation of this project, as ideas near future, robots can not be
used to build more computers to centralize each agent, but each agent possesses its
own processor either X86 or ARM, which allows to create individual agents, that
communicate over the Internet.
Enable aerial platform using quadcopters, as shown in Annex images. Although it is the
fully armed quadricopter but currently not implemented with agent for controlling it.
In this stage the project is only working on the ground robots. Mapping and sharing
such a map using an agent manager that control the map and can access by the
agents.
INS - Intelligent Systems
16
10. Bibliography
Programming Multi-Agent Systems in AgentSpeak using Jason. (2004). Michael Wooldridge,
University of Liverpool, UK.
Fabio Bellifemine, G. C. (2004). Developing Multi-Agent Systems with JADE. Michael
Wooldridge, Liverpool University, UK.
Ribes, M. T. (2011). Aplicaión de Sensores de flujo óptico para el desarrollo de nuevos sistemas
de medida de bajos coste.
Wu, J. L. (2001). MULTI-AGENT ROBOTIC SYSTEMS. Boca Raton London New York Washington,
D.C.: L.C. Jain, Ph.D., M.E., B.E. (Hons), Fellow I.E. (Australia).
11. Annex A List of Materials
One Platform 4WD
One Pirate-4WD Mobile Platform
Oner Arduino Uno
Oner Arduino Mega2560 Rev3
Oner Adjustable Infrared Sensor Switch
One 50 Channel GS407 Helical GPS Receiver
One 50A Current Sensor(AC/DC)
Four DC-DC Convert
One Optical Mouse PS2
One Bluetooth Bee
Two XBee 2mW PCB Antenna - Series 2 (ZigBee Mesh)
One Xbee USB adapter
Three Sharp GP2Y0A02YK IR ranger sensor (20-150cm)
One CMPS10 - Tilt Compensated Magnetic Compass
INS - Intelligent Systems
17
12. Annex B Robot Photos
INS - Intelligent Systems
18
INS - Intelligent Systems
19
INS - Intelligent Systems
20