86
Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO ARGO: A Customized Jason Architecture for Programming Embedded Robotic Agents 1. Instituto de Matemática e Estatística (IME), Universidade de São Paulo (USP), Brazil 2. Escola Politécnica (EP), Universidade de São Paulo (USP), Brazil 3. Centro Federal de Educação Tecnológica (CEFET/RJ), Brazil 4. Universidade Federal Fluminense (UFF), Brazil Laboratório de Técnicas Inteligentes - LTI Carlos Eduardo Pantoja 3,4 Márcio Fernando Stabile Junior 1 Nilson Mori Lazarin 3 Jaime Simão Sichman 2,1 III Workshop on Engineering Multi-Agent Systems EMAS@AAMAS 2016 Singapore 09/05/2016

ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Embed Size (px)

Citation preview

Page 1: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 1

ARGO: A Customized Jason Architecture for Programming Embedded Robotic Agents

1. Instituto de Matemática e Estatística (IME), Universidade de São Paulo (USP), Brazil2. Escola Politécnica (EP), Universidade de São Paulo (USP), Brazil

3. Centro Federal de Educação Tecnológica (CEFET/RJ), Brazil4. Universidade Federal Fluminense (UFF), Brazil

Laboratório de Técnicas Inteligentes - LTI

Carlos Eduardo Pantoja 3,4

Márcio Fernando Stabile Junior 1Nilson Mori Lazarin 3

Jaime Simão Sichman 2,1

III Workshop on Engineering Multi-Agent SystemsEMAS@AAMAS 2016

Singapore 09/05/2016

Page 2: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 2

ARGO

The Argo by Lorenzo Costa

Argo was the ship that Jason

and the Argonauts

sailed in the search of the

golden fleece in Greek

mythology.

Page 3: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 3

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 4: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 4

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 5: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 5

Motivation

MAS A robot is a physical entity, composed by customized hardware, sensors and actuators

How can we program and control a robot including reactive and goal-directed behaviours? .

Page 6: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 6

BDI model

[http://www.inf.ufrgs.br/prosoft/bdi4jade]

Page 7: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 7

Jason

[Bordini et al. 2007]

Page 8: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 8

Motivation

Programming robotic agents using Jason has revealed to be a difficult task• Bottlenecks can occur

» high cost of processing perceptions» large intention stack is generated

• Integration with hardware is not implemented• Hence, the robot may not succeed !

Page 9: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 9

Motivation

Javino [Lazarin and Pantoja 2015]• middleware for communication between Java and

microcontrolers (Arduino)• However, using several sensors may compromise the

robot execution time

Perception filters [Stabile Jr and Sichman 2015] • filters are able to improve Jason agent's performance

in a significant way

Page 10: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 10

Motivation

Instead of taking into account all perceptions ....

MAS

Page 11: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 11

Motivation

One can filter perceptions!

MAS

Page 12: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 12

Objectives

ARGO provides a customized Jason architecture for programming embedded robotic agents• Javino + Perception filters

Layered robot architecture Experiments using a ground vehicle platform in a

real-time collision scenario Evaluations of filters impact

Page 13: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 13

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 14: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 14

Jason [1]

• AgentSpeak Interpreter [2]

[1] [Bordini et al. 2007] [2] [Rao 1996]

Page 15: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 15

Jason [1]

• AgentSpeak Interpreter [2]

Most time-consumingprocesses

[1] [Bordini et al. 2007] [2] [Rao 1996]

Page 16: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 16

Profiling

86% of total processing time

Page 17: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 17

Profiling

99% of total processing time

Page 18: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 18

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 19: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 19

Perception filters

[van Oijen and Dignum 2011] • Integrating agents (2APL, Jadex and Jason) to

computer games;• Middleware responsible for perception filtering;• Interest Subscription Manager.

[Bordeux et al. 1999] • Extend AGENTlib with a perception mechanism;• Perception filter types:

» Range filter;» Field of view filter;» Type detector filter.

Page 20: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 20

Perception filters

Example of Jason perceptions• List of annotated literals

temperature(right,36)temperature(back,38)light(left,143)distance(front,227)distance(right,30)

Page 21: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 21

Perception filters

Example of our perception filter specification<PerceptionFilter> <filter>

<predicate>temperature</predicate> </filter> <filter>

<predicate>light</predicate> </filter> <filter>

<predicate>distance</predicate><parameter operator="NE" id="0">front</parameter>

</filter></PerceptionFilter>

distance(front,227)[source(percept)]

Page 22: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 23

Perception filters

Example of filter change internal action• Name of file passed as parameter

+!carry_to(R)<− ! take (object, R); .change_filter(search); −object (r1); !!search(slots).

Page 23: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 24

Perception filters

[Bordini et al. 2007]

Page 24: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 25

Perception filters

[Bordini et al. 2007]

Page 25: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 26

Perception filters

Changes in Agent class

public void buf(List<Literal> percepts) { if (percepts == null) { return; } int adds = 0; int dels = 0; long startTime = qProfiling == null ? 0 : System.nanoTime();

filter(percepts);

Iterator<Literal> perceptsInBB = getBB().getPercepts(); while (perceptsInBB.hasNext()) { ...

Page 26: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 27

Perception filters

Changes in Agent class

private static void filter(List<Literal> percept) { if(currentObjective==null){ return; } Iterator<Literal> it = percept.iterator(); while (it.hasNext()) { if (remove(it.next())) { it.remove(); } }}

Page 27: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 28

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 28: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 29

Javino

Javino is a protocol for exchanging messages:• between low-level hardware and a high-level

programming language• double-side library for communication• provides error detection

Page 29: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 30

Operation modes

Listen mode• only from hardware to software

AGENTsend a message in

every loopget when it

wants

Page 30: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 31

Operation modes

Request mode• from software to hardware;• the hardware answers.

AGENTrequest a message

answer with a message

Page 31: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 32

Operation modes

Send mode• from software to hardware;• the hardware executes an action.

AGENTsend a

messageexecute a low-level command

Page 32: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 33

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 33: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 34

ARGO is:• a customized architecture for Jason• employs both Javino middleware and perception

filters » Javino provides a bridge between the intelligent agent

and the robots sensors and actuators» Perception filters act blocking specific perceptions in

runtime ARGO aims to be a practical architecture for

programming automated embedded agents using BDI agents

ARGO

Page 34: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 35

It directly controls the actuators at runtime It receives perceptions from the sensors

automatically within a pre-defined time interval It enables changing filters at runtime It enables changing accessed device at runtime ARGO agents may communicate with others

Jason Agents It enables to decide when to perceive the real

world at runtime

ARGO overview

Page 35: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 36

ARGO overview

Page 36: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 37

Overview of Robot’s Architecture

Page 37: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 38

Receiving percepts

Sensors capture raw data from the real world and

send them to the microcontroller employed.

Page 38: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 39

Receiving percepts

In the firmware layer, raw data is transformed into

perceptions based on the AOPL chosen.

Page 39: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 40

Receiving percepts

Javino is responsible for sending the percepts to the reasoning layer using serial

communication

Page 40: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 41

Agent’s reasoning

The agent is able to reason with percepts coming

directly from real world and the MAS can be

embedded in single-board computers (Raspberry,

etc.) or a computer with USB interface

Page 41: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 42

Executing an action

Agent deliberates and if an action has to be executed, an action

message using Javino is sent.

Page 42: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 43

Executing an action

Javino sends the action message to the

microcontroller connected in the USB port described

in the message.

Page 43: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 44

Executing an action

All possible actuator’s functions are programmed to be executed in response to serial messages coming

from Javino.

Page 44: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 45

Executing an action

The actuator is activated.

Page 45: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 46

Jason’s reasoning cycle with filters

Page 46: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 47

ARGO’s reasoning cycle

Page 47: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 48

Customized architecture

Page 48: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 49

Customized architecture

Customized architecture created to differentiate Argo

agents from common Jason’s

agents

Page 49: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 50

Customized architecture

Javino instance for each Argo agent.

Page 50: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 51

Customized architecture

Returns the ARGO agent’s Javino

instance.

Page 51: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 52

Customized architecture

The serial port from which the agent is receiving perceptions and executing

actions.

Page 52: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 53

Customized architecture

Defines if the agent has to perceive or not

the real world.

Page 53: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 54

Customized architecture

A time interval, in milliseconds, for the

next real world sensing

Page 54: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 55

Customized architecture

Function responsible for returning the perceptions

from the real world if:

i) the perceptions is not blocked;

ii) the time limit was reached;

iii) the agent is an ARGO agent

Page 55: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 56

Customized architecture

Responsible for filtering perceptions, as stated

before.

Page 56: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 57

Customized architecture

Changes in TransitionSystem class

public boolean reasoningCycle() {…ag.buf(this.realWorldPerceptions());…}

Page 57: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 58

Customized architecture

New realWorldPerceptions function

public List<Literal> realWorldPerceptions() {long perceiving = System.nanoTime();List<Literal> percepts = new ArrayList<Literal>();

if(((perceiving - lastPerceived) < this.limit) || this.blocked)return null;

lastPerceived = perceiving;

if (this.agArch.getArgo().requestData(this.agArch.getPort(), "getPercepts")) {String rwPercepts = this.agArch.getArgo().getData();String perception[] = rwPercepts.split(";");

for (int cont = 0; cont <= perception.length - 1; cont++) {percepts.add(Literal.parseLiteral(perception[cont]));

}return percepts;

}

Page 58: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 59

Internal Actions

ARGO Internal Actions:• .limit(x)

» defines the sensing interval in milliseconds• .port(y)

» defines which serial port should be used by the agent• .percepts(open|block)

» decides whether or not to perceive the real world • .act(w)

» sends to the hardware an action to be executed by a microcontroller • .change_filter(filterName)

» defines the filter to constrain perceptions in runtime

Page 59: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 60

Limitations Limit of 127 serial ports

• Due to limitation of USB Connection to one port at a time

• Avoids competition• It can be changed at runtime

Only ARGO agents can control devices• Common Jason agents do not have access to Javino

ARGO agents must be atomic• Cannot create more than one instance of the same agent

Page 60: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 61

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 61: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 62

Case study

• The robot configuration: • 4 distance sensors• 4 light sensors• 4 temperature sensors• 1 Arduino board • 1 Arduino 4WD chassis

• Initial distance of 2m from the wall• The robot moves at constant speed• The robot should stop before

achieving a specified desired distance from the wall

Page 62: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 63

Evaluating the experiment

Experimental design guidelines defined by [Jain 1991] Essential terms: Response variable

• Processing time» from the moment the robot perceives the wall until it stops

• Final distance » from the position the robot stops to the wall

Primary Factors• Desired distance • Perception interval • Filter

Page 63: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 64

Evaluating the experiment Essential terms:

• Levels» Values that a factor can assume

Factor LevelsDesired distance 40 cm 80 cm 120 cm

Perception Interval 25 ms 35 ms 50 ms

Filter No Filter Front Side Front Distance

• Replications» Three times for each experiment (81 experiments)

Page 64: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 65

Evaluating the experiment

Desired distance

Initial distance

2 m

Page 65: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 66

Filters

Front side filter<PerceptionFilter> <filter>

<predicate>temperature</predicate><parameter operator="NE" id="0">front</parameter>

</filter> <filter>

<predicate>light</predicate><parameter operator="NE" id="0">front</parameter>

</filter> <filter>

<predicate>distance</predicate><parameter operator="NE" id="0">front</parameter>

</filter></PerceptionFilter>

Page 66: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 67

Filters

Front distance filter <PerceptionFilter> <filter>

<predicate>temperature</predicate> </filter> <filter>

<predicate>light</predicate> </filter> <filter>

<predicate>distance</predicate><parameter operator="NE" id="0">front</parameter>

</filter></PerceptionFilter>

Page 67: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 68

Evaluating the experiment Agent code:

Page 68: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 69

Evaluating the experiment Agent code:

Set serial port COM8. Arduino device.

Page 69: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 70

Evaluating the experiment Agent code:

Set an interval of 25ms for perceiving

the real-world

Page 70: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 71

Evaluating the experiment Agent code:

Open the selected port to start receiving

percepts

Page 71: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 72

Evaluating the experiment Agent code:

Activates frontSide filter

Page 72: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 73

Evaluating the experiment Agent code:

Send a message to the microcontroller to move ahead

Page 73: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 74

Evaluating the experiment Agent code:

Keep moving ahead while

the perceived distance is

greater than the distance

limit

Page 74: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 75

Evaluating the experiment Agent code:

Stop when it perceives the

wall

Page 75: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 76

Evaluating the experiment Agent code:

Some additional

plans

Page 76: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 77

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 77: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 78

Perception Interval 20

Perception Interval 35

Perception Interval 50

Perception Interval 20

Perception Interval 35

Perception Interval 50

Perception Interval 20

Perception Interval 35

Perception Interval 50

Desired Distance 40 Desired Distance 80 Desired Distance 120

0

20

40

60

80

100

120

No filter Front Side

Front Distance

Fina

l Dis

tanc

e

Experiments

In all experiments, the robot

collided with the wall!!!

Page 78: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 79

Perception Interval 20

Perception Interval 35

Perception Interval 50

Perception Interval 20

Perception Interval 35

Perception Interval 50

Perception Interval 20

Perception Interval 35

Perception Interval 50

Desired Distance 40 Desired Distance 80 Desired Distance 120

0

20

40

60

80

100

120

No filter Front Side

Front Distance

Fina

l Dis

tanc

e

Experiments

In some experiments, the robot

didn’t collided with the wall!!!

But it stopped closer to

wall compared to

the front distance

filter

Page 79: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 80

Perception Interval 20

Perception Interval 35

Perception Interval 50

Perception Interval 20

Perception Interval 35

Perception Interval 50

Perception Interval 20

Perception Interval 35

Perception Interval 50

Desired Distance 40 Desired Distance 80 Desired Distance 120

0

20

40

60

80

100

120

No filter Front Side

Front Distance

Fina

l Dis

tanc

e

Experiments

In quite all the

experiments, the robot

didn’t collided with the wall!!!

Page 80: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 81

Experiments

The use of the filter was important for obtaining a better response time

Factor Variation attributedDistance Limit (L) 1,415%Perception Interval (I) 0,165%Filter (F) 88,965%Interaction between L and I 0,525%

Interaction between L and F 3,715%

Interaction between I and F 0,265%

Interaction between L and I and F 1,725%

error 3,285%

Page 81: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 82

Outline

1. Introduction

2. Building Blocks: Jason / Perception Filters / Javino

3. ARGO

4. Case Study

5. Obtained Results

6. Conclusions and Further Work

Page 82: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 83

Conclusions

The main contribution of ARGO is to offer an open architecture that enables Jason agents to integrate with hardware and to use perception filters• Reduction processing

It allows an agent to decide in runtime:• when to start or to stop perceiving• the interval between each perception• which filters to use

Page 83: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 84

Further work

Different filtering methods Extending ARGO for multi-robot systems Testing ARGO in different domains Provide other hardware-side libraries

• PIC16F, Intel and STM32.

Page 84: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 85

References

[Bordini et al. 2007] Bordini, R.H., Hubner, J.F., Wooldridge, M. Programming Multi-Agent Systems in AgentSpeak Using Jason. John Wiley & Sons Ltd., 2007.[Lazarin and Pantoja 2015] Lazarin, N.M., Pantoja, C.E. A Robotic-Agent Platform For Embedding Software Agents Using Raspberry Pi and Arduino Boards. In: Proc. 9th Software Agents, Environments and Applications School (WESAAC 2015), Niterói, RJ, Brazil, 2015.[Rao 1996] Rao, A.S. AgentSpeak(L): BDI Agents Speak Out in a Logical Computable Language. In: de Velde, W.V., Perram, J.W. (eds.) Proc. of the 7th European Workshop on Modelling Autonomous Agents in a Multi-Agent World (MAAMAW 1996). Lecture Notes in Artificial Intelligence, vol. 1038, pp. 42-55. Springer-Verlag, Secaucus. USA, 1996.[Stabile Jr. and Sichman 2015] Stabile Jr., M.F., Sichman, J.S. Evaluating Perception Filters In BDI Jason Agents. In: Proc. 4th Brazilian Conference on Intelligent Systems (BRACIS 2015), Natal, RN, Brazil, 2015.

Page 85: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 86

Acknowledgements

Page 86: ARGO - A Customized Jason Architecture for Programming Embedded Robotic Agents

Pantoja, Stabile, Lazarin and Sichman 2016 EMAS@AAMAS 2016, Singapore, 09/05/16 ARGO 87

END

THANKS FOR YOUR [email protected]

[email protected]@cefet-rj.br

[email protected]