• No results found

Designing Behavior-Based Systems

N/A
N/A
Protected

Academic year: 2021

Share "Designing Behavior-Based Systems"

Copied!
35
0
0

Loading.... (view fulltext now)

Full text

(1)
(2)

Objectives

Use schema theory to

design and program

behaviors

Design a complete behavioral system

Understand how to develop a “

behavioral table

for behaviors

(3)

Objectives

Use schema theory to

design and program

behaviors

Design a complete behavioral system

Understand how to develop a “behavioral table”

for behaviors

(4)

Designing Behaviors

Issues

:

More “art” than “science”

How to build up to integrated systems?

Approaches

:

View behaviors as objects in object-oriented

programming (OOP)

Sequence behaviors using:

Finite state automata Scripts

(5)

Behaviors as Objects in OOP

Object-Oriented Programming: data-centered view of

programming

Schema theory is well suited for transferring theoretical

concepts to OOP

An object consists of:

Data (attributes)

Methods (operations)

A Schema contains:

Knowledge of how to act and/or perceive (knowledge, data

structures, models)

Computational process (the algorithms)

Following Arbib, a schema as a programming object will be a

(6)

Behaviors as Objects in OOP

Coordinated control program:

A function that coordinates any methods or schemas in the derived class Perceptual schema:

Has at least one method, which takes sensor input and transforms it into a data

structure, called a percept

Linked to sensor(s) Motor schema:

Has at least one method, which transforms percept into a vector representing an

action

Linked to actuator(s)

Behaviors are composed of at least one perceptual schema and one motor

(7)

Primitive vs. Abstract Behaviors

Primitive behaviors

:

Only one perceptual schema Only one motor schema

No need for coordinated control

Usually programmed as single method

Abstract behaviors

:

Behaviors that are assembled from other behaviors or have

multiple perceptual schema and motor schema

Since they are farther removed from the sensors and

(8)

Example: Pick Up the Trash

1994 AAAI Mobile Robot Competition:

Robot is placed in an empty arena about the size

of an office

Coca-Cola cans (

red

) and

white

Styrofoam cups

at random locations

Blue

recycling bin in two corners; two trash bin

with a different color in the other two corners

The winner robot is the one who picks up the

(9)

Example Primitive Behavior: Move_to_goal

Rather than write

:

Move_to_red

Move_to_blue

Instead, write a single generic behavior

:

Move_to_goal(color)

Minimizes opportunity for introducing

(10)

Move_to_goal as Primitive Behavior

“pfields” is a class

“Attraction” is a method within the pfields class

how to calculate goal_angle

and goal_strength?

(11)

Important Points about Programming with Behaviors

Behavior is the “glue” between perceptual and

motor schemas

The schemas don’t communicate with each other

Behavior puts “percept” created by perceptual schema in a

local place where the motor schema can get it

Behaviors can (and should) use libraries of schemas

E.g., “pfields” class can encapsulate five primitive potential

fields, which any motor schema can use

Behaviors can be reused if written properly

(12)

More Complex Example: Follow-Corridor

Two different implementations possible:

(13)

An Abstract Follow-Corridor Behavior

find-walls

will examine the sonar polar plot and extract the

relative location of the corridor walls and return the

(14)

Second Implementation: Summation of Behaviors

Here, follow corridor composed of two instances of follow wall

(15)

Objectives

Use schema theory to design and program

behaviors

Design a complete behavioral system

Understand how to develop a “

behavioral table

for behaviors

(16)
(17)

Case Study: 1994 Unmanned Ground

Robotics Competition

Objective: have small unmanned

vehicle autonomously navigate

around an outdoor course of white lines painted on grass

Step 1: Describe the task

Follow path with hairpin turns,

stationary obstacles, and sand pit

Robot that went furthest without

going out of bounds is winner

Tie breaker: robot that goes

fastest

Max. velocity: 5mph

Penalties: for going out of bounds,

for hitting and moving obstacles

3 runs allowed, after 2 days of

practice

(18)

Case Study (Con’t.)

Step 2: Describe the robot

Usually: robot provided, which gives fixed

constraints on what is possible

Sensors: only specific sensors available Effectors: max speed, turning radius

In this case study, additional constraints

specified:

Robot footprint within given size

at least 3ft by 3.5ft but no bigger than a golf cart

(19)

The Robot

Camcorder on a Panning mast Sonar on a panning mast 33MHz 486 PC running Lynx (commercial unix)

3 ft wide Omnibot

(20)

Case Study (Con’t.)

Step 3: Describe the environment

Grassy field with gentle slopes

Ten-foot wide lane marked in white paint Exact length and layout of course not

known in advance

Obstacles were stationary, and were

bales of hay wrapped in white or red plastic

2x4 ft obstacle that never extended

more than 3 feet into the lane

Sonar could detect hay bales at 8 feet Run times would be between 9AM and

(21)

Given the task, the environment and the

robot

Think about how this robot is able to

accomplish its task

(22)

Analysis of the Above

Identify the affordance for controlling the robot

white line, which should have a high contrast to the green grass

Potential problem?

lighting value of the white line changed with the weather

Solution?

have the camera pointing directly at one line, instead of trying to see both

lines

reduction in the signal to noise ratio

Have to use computer vision

White should be in the center of the image

Reflections on grass are white, but random, so average out

If stay in the middle, never encounter any obstacle

10-foot wide lane, 2x4 ft obstacle that never extended more than 3 feet

(23)

Case Study (Con’t.)

Step 4: Describe how the robot should act in

response to its environment

Define candidate primitive behaviors

In case study: follow-line

(24)

Behavior Table

Helpful organizing tool

stay-on-path

is reflexive (stimulus-response) and

taxis (it orients the robot relative to the stimulus)

compute-centroid

: extracts an affordance of the

centroid of white from the image as being the line

(25)

Case Study (Con’t.)

Step 5: Refine each behavior

:

Focus on design of each individual behavior Consider:

Both normal range of environmental conditions And conditions in which behavior will fail

Example: follow-line()

Bales of hay are bright compared to grass, change the

centroid to cause collision

Refinement

:

Follow line until “see” an obstacle, then just go straight

until things return to normal

Sonar! Look to the side and when something is close, it’s a

(26)

Oops

In case study:

Follow-line behavior analysis assumed only white things in

environment were lines and plastic bales of hay

(27)

Case Study (Con’t.)

Step 6: Test each behavior independently

Helpful to use simulation

Keep in mind that simulators do not usually

incorporate accurate models of the robot’s

perceptual abilities

Often, only way to verify perceptual schema is to

(28)

Case Study (Con’t.)

Step 7: Test with other behaviors

Integration testing, where behaviors are combined Testing in actual environment

In case study:

Follow_line fooled by hay bales

Perceptual schema included bright pixels from the hay bales Solution: “close robot eyes” for about 2 seconds if hay bale

(29)

Finally, $5K

Round 1

OOPS: sonar connection

off so it hit the bale

Round 2

White shoes and

dandelions, plus Killer Bale

Round 3

Trapped by sand, but $5K

(30)

Some Important Points

Let

the world be its own best representation

“line” wasn’t a line, but just centroid of brightest pixels in

the image

Design process was

iterative

; rarely get a workable

emergent behavior on the first try

There is

no single right answer

Could have been done with subsumption, pfields,

(31)

Assemblages of Behaviors

Many applications: require some concurrent behaviors and

some behaviors in sequence

Question: How to formally represent the releasers so that the

robot execute the behaviors correctly, and so that the human designer can understand what is going on?

Three common methods for behavior sequencing:

Finite state automata (FSA)

Scripts

Skills

Key concept: make world trigger, or release, the next step in

the sequence, rather than on an internal model of what the robot has done recently

(32)

Recall: FSA Sequencing of Motor Schemas

Can sequence motor schemas if one activity

(33)
(34)

Summary

Describe the task

Describe the robot

Describe the environment

Describe how the robot should act in

response to its environment

Refine each behavior

Test each behavior independently

Test with other behaviors

(35)

In-Class Team Design

Form a group of 2 for your lego project

Discuss what you want to do for your lego project

Design the behavior-based system for your

proposed lego project

References

Related documents

It means that the result indicated the use of short story can be used to improve the pronunciation of English vowel sounds of the eighth grade students at MTs

Just as memory is made up of bits in a classical computer, where each bit is represented by either 1 or 0, memory in quantum computers is made up of qubits, where each qubit

◆ the United States has hired record numbers of contractors to serve in the conflict zones of iraq and afghanistan but has not seriously examined their strategic

Even though gender empowerment process is still dragging its feet in that the government machinery to address the phenomenon was established recently through curving a

This study examined the influence of body mass index (BMI) on nerve conduction parameters of commonly studied upper and lower limb nerves.. Results were statistically

In the basic procedure for the Verification by Equipment or End-Use Metering Protocol , one of the numbered items states, “Determine the relationships between load and

Two household arsenic removal units were developed, one based on ferric chloride coagulation and the other based on sorptive filtration through iron coated sand. Field testing of

• Have you had an answered prayer recently ‐ share the story • What do you think delights God above everything else in your life?. • What is the most encouraging thing said