Está en la página 1de 20

Control of two robotic platforms using multi-agent systems

INS - Intelligent Systems

By: Jaime Andres Rincon Arango

INDICE

INS - Intelligent Systems

INDEX
INDEX .......................................................................................................................... 2 1. 2. 3. 4. Introduction. ........................................................................................................... 3 General Purpose.................................................................................................... 3 Specific Goals ........................................................................................................ 3 Hardware Description ............................................................................................ 4 4.1. 4.2. 4.3. 4.4. 4.5. 5. 6. Arduino ......................................................................................................................... 4 RF Communication Modules .................................................................................... 5 Infrared Sensors for distance measuring ................................................................ 7 Optical Flow Sensor ................................................................................................... 7 Robotic platforms ........................................................................................................ 8

Task Planning in the Arduino ................................................................................. 9 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. 8. 9.

Connecting JASON to the Robots ........................................................................ 14 Render 3D ........................................................................................................... 15 In a future ............................................................................................................ 15

10. Bibliography ........................................................................................................ 16 11. Annex A List of Materials ..................................................................................... 16 12. Annex B Robot Photos......................................................................................... 17

INS - Intelligent Systems

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. 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 Operating Voltage Input Voltage Input Voltage (limits) Digital I/O Pins Analog Input Pins DC Current per I/O Pin DC Current for 3.3V Pin Flash Memory SRAM EEPROM Clock Speed ATmega328 5V 7-12V 6-20V 14 (of which 6 provide PWM output) 6 40 mA 50 mA 32 KB (ATmega328) of which 0.5 KB used by bootloader 2 KB (ATmega328) 1 KB (ATmega328) 16 MHz

Table 2. Technical specifications of the Arduino Mega 1280 Microcontrolador Voltaje de funcionamiento Voltaje de entrada (recomendado) Voltaje de entrada (limite) Pines E/S digitales Pines de entrada analgica Intensidad por pin Intensidad en pin 3.3V Memoria Flash SRAM EEPROM Velocidad de reloj 6-20V 54 (14 proporcionan salida PWM) 16 40 mA 50 mA 128 KB de las cuales 4 KB las usa el gestor de arranque(bootloader) 8 KB 4 KB 16 MHz ATmega1280 5V 7-12V

INS - Intelligent Systems

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. 5

INS - Intelligent Systems

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 6

INS - Intelligent Systems

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 7

INS - Intelligent Systems

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

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 Infrared sensor Tx Dates Rx Dates Motor control compass priority 1 2 3 4 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

High-level programming(JAVA, C++, etc)

Low-level programming(Arduino)

Motor Control and Capture Sensor

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.

10

INS - Intelligent Systems

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. Message: Obstacle at position (x, y).

Walls, objects etc.

Detects objects

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. 11

INS - Intelligent Systems

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 12

INS - Intelligent Systems

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 1 1 0 1 0 1 forward left right back

13

INS - Intelligent Systems

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.

Beliefs Desires Intentions


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. 14

INS - Intelligent Systems

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. 15

INS - Intelligent Systems

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). Aplicain 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

16

INS - Intelligent Systems

12.

Annex B Robot Photos

17

INS - Intelligent Systems

18

INS - Intelligent Systems

19

INS - Intelligent Systems

20

También podría gustarte