39
Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5, 5.1-5.3, 5.5,

Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Embed Size (px)

Citation preview

Page 1: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Intelligent RoboticsToday: Robot Control Architectures

Next Week: Localization

Reading: MurphySections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5, 5.1-5.3, 5.5,

Page 2: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

how much of the world do we need to represent internally ?

how should we internalize the world ?

what inputs do we have ?

what outputs can we effect ?

what algorithms connect the two ?

how do we use this “internal world” effectively ?

What is a Robot Control Architecture?

Robot Architecture

Page 3: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Robot Architecture

• “The architecture of a robot defines how the job of generating actions from percepts is organized”– Russell & Norvig

– It defines structure of the system, hardware and software, the way in which the robot processes sensor inputs, performs cognitive functions, and provides signals to output actuators.

Page 4: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Robot Control• Robot control is the process of taking

information about the environment and processing it as necessary in order to make decisions about how to act.

• The architecture provides a principled way of organizing a control system.– Low level and high level control.

Page 5: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Robot Control: Layers of Abstraction

Page 6: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Example: Road Runner

Set current goal

Stay on the path, avoid obstacles, set speed, crowd interaction

Acceleration, braking, velocity control, steering control, process sensor readings

Page 7: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Robot: Movement, Sensing, Reasoning

• Defining your robot’s architecture • Assessment of your environment and the robot’s goals

– What situations does it need to sense? (sensor suite, signal processing) (ECE)

– What will it manipulate? How will it move? (ME)– How does it decide what actions to take? (CS)

Page 8: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

What does it take to get an intelligent robot to do a simple task?

Robot Parts: Two Arms, Vision, and Brain

The Brain can communicate with all parts

Arms can take commands as left, right, up, down, forward, and backward

Arms can answer yes/no about whether they are touching something but cannot distinguish what they are touching

The vision system can answer any question the brain asks, but cannot volunteer information.

The vision system can move around to get a better view.

Page 9: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Why is this simple task so difficult?

• Coordination is difficult

• Indirect feedback

• Updating knowledge about the environment

• Unexpected events– Need to re-plan

• Different coordinate systems need to be resolved– Box-centered and arm-centered

Page 10: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Spectrum of AI (high level) Robot Control

Page 11: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Dealing with the Physical WorldA robot needs to be able to handle its environment

or the environment must be altered and controlled.

• Close World Assumption– The robot knows everything relevant to performing

“Complete World Model”– no surprises

• Open World Assumption– The robot does not assume complete knowledge– The robot must be able to handle unexpected events.

Page 12: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Deliberative/Hierarchical Robot Control• Emphasizes Planning

• Robot senses the world, constructs a model representation of the world, “shuts its eyes”, creates a plan of action, makes the action, then senses the results of the action.

Page 13: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Sense - Plan - Act

......1976

SEN

SIN

G

AC

TIN

G

perc

epti

on

worl

d

modelin

gpla

nnin

g

task

execu

tion

moto

r co

ntr

ol

sense

plan act

Stanford Cart

Shakey

1968

MERs

2003-

Page 14: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Deliberative: Good & Bad

• Goal Oriented– Solve problems that need cognitive abilities– Ability to optimize solution

• Predictable• Dependence on a world model

– Requires a closed world assumption• Frame Problem• Symbol Grounding Problem

Page 15: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Reactive/Behavior-Based Control

• Ignores world models• “The world is its own best model”

• Tightly couples perceptions to actions– No intervening abstract representations

• Primitive Behaviors are used as building blocks– Individual behaviors can be made up of

primitive behaviors

• Reactive: no memory• Behavior-Based: Short Term Memory (STM)

Stimulus Behavior Response

SR Diagram

Page 16: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Reactive: Good & Bad• Works with the Open World Assumption

– Provides a timely response in a dynamic environment where the environment is difficult to characterize and contains a lot of uncertainty.

• Unpredictable• Low level intelligence

– Cannot manage tasks that require LTM or planning

• Tasks requiring localization and order dependent steps

Page 17: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Behavior Coordination• If multiple behaviors are possible which one does the

robot do?– Competitive coordination: winner-take-all– Cooperative coordination: behavioral fusion

Page 18: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Where does the overall robot behavior come from?

• No planning, goal is generally not explicit• Emergent Behavior

– Emergence is the appearance of a novel property of a whole system that cannot be explained by examining the individual components, for example the wetness of water.

– Overall behavior is a result of robots interaction with its surroundings and the coordination between the individual behaviors.

Page 19: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Hybrid Paradigm

• Combines Reactive and Deliberative Control

Planner

Sense Act

Page 20: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Planning – Reactive Interaction

• Reactive is primary control and Planner provides advise– Planner configures the Reactive system

• Planner is primary and Reactive provides actions to avoid uncertain situations– Layered approach– Requires re-planning

• Planner and Reactive work concurrently

Page 21: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Reactive/Behavior-Based Control Design

• Design Considerations– What are the primitive behaviors?– What are the individual behaviors?

• Individual behaviors can be made up of primitive and other individual behaviors

– How are behaviors grounded to sensors and actuators?– How are these behaviors effectively coordinated?

• If more than one behavior is appropriate for the situation, how does the robot choose which to take?

Stimulus Behavior Response

Page 22: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Situated Activity Design

• Robot actions are based on the situations in which it finds itself

• Robot perception is characterized by recognizing what situations it is in and choosing an appropriate action

Page 23: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Designing a Behavior-Based Control:Finite State Machine

Page 24: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Design for robot soccer

• What primitive behaviors would you program?• What individual behaviors?• What situations does the robot need to recognize• If the “pass behavior” is active and the “shoot behavior”

is active, how does it choose?

Page 25: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Implementing Behaviors• Schema theory

– Schema: knowledge of how to perceive and act along with computational processes to accomplish the activity

• Perceptual Schema: interpretation of sensory data & instantiates motor schema

• Motor Schema: actions to take.• Releaser: Sensory input that activates the behavior

Page 26: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Schema for Toad Feeding Behavior

Page 27: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Cooperative Coordination• Behavioral Fusion

– Requires the ability to use concurrently the output of more than one behavior at a time

Behavior Fusion via vector summation

Page 28: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Competitive Coordination• Action Selection Method

– Behaviors compete using an activation level– The response associated with the behavior with

the highest activation level wins– Activation level is determined by attention

(sensors) and intention (goals)

Page 29: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Competitive Coordination

• Voting Methods: democratic arbitration– Each behavior casts votes for actions and the action

that receives the most votes wins.

Page 30: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Competitive Coordination

• Suppression Network Method– Response is determined by a fixed prioritization in which a strict

behavioral dominance hierarchy exists. – Higher priority behaviors can inhibit or suppress lower priority

behaviors.

Page 31: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Subsumption Architecture• A suppression network architecture built in layers• Each layer gives the system a set of pre-wired

behaviors• Layers reflect a hierarchy of intelligence.

– Lower layers are basic survival functions (obstacle avoidance)

– Higher layers are more goal directed (navigation)

• The layers operate asynchronously (Multi-tasking)• Lower layers can override the output from

behaviors in the next higher level– Rank ordering

Page 32: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Foraging Example

Page 33: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Using Multiple Behaviors requires the Robot to Multi-task

• Multi-tasking is having more than one computing processing run in parallel.– True parallel processing requires multiple CPU’s.

• IC functions can be run as processes operating in parallel. The processor is actually shared among the active processes– main is always an active process– Each process, in turn, gets a slice of processing time (5ms)– Each process gets its own default program stack of 256bytes

• A process, once started, continues until it has received enough processing time to finish (or until it is “killed” by another process)

• Global variables are used for inter-process communications

Page 34: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

IC: Functions vs. Processes• Functions are called sequentially• Processes can be run simultaneously

– start_process(function-call);• returns a process-id• processes halt when function exits or parent process exits

– processes can be halted by usingkill_process(process_id);

• hog_processor(); allows a process to take over the CPU for an additional 250 milliseconds, cancelled only if the process finishes or defers

• defer(); causes process to give up the rest of its time slice until next time

Page 35: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

IC: Process Example#use pause.icint done; /* global variable for inter-process communication */void main(){ pause(); done=0; start_process (ao_when_stop()); start_process (avoidBehavior()); start_process (cruiseBehavior()); start_process (collisionBehavior()); start_process (arbitrate());

. . . more code . . .} void ao_when_stop(){ while (stop_button() == 0); /* wait for stop button */ done=1; /* signal other processes */ ao(); /* stop all motors */}

Page 36: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,
Page 37: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,
Page 38: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,
Page 39: Intelligent Robotics Today: Robot Control Architectures Next Week: Localization Reading: Murphy Sections 2.1, 2.3, 2.5, 3.1, 3.5, 3.6, 4.1 – 4.3, 4.5,

Localization & NavigationReading

Intro to AI Robotics: Chapters 9, 10 ,11