43
Software Engineering in Robotics Reference Architectures Henrik I. Christensen – [email protected]

Software Engineering in Robotics Reference Architectures

  • Upload
    muriel

  • View
    49

  • Download
    0

Embed Size (px)

DESCRIPTION

Software Engineering in Robotics Reference Architectures. Henrik I. Christensen – [email protected]. Outline. Introduction Architectures? Review of prototypical architectures Some implementation considerations Summary. Introduction. Architecture is about providing structure - PowerPoint PPT Presentation

Citation preview

Page 1: Software Engineering in Robotics Reference Architectures

Software Engineering in RoboticsReference Architectures

Henrik I. Christensen – [email protected]

Page 2: Software Engineering in Robotics Reference Architectures

Outline Introduction Architectures? Review of prototypical architectures Some implementation considerations Summary

Page 3: Software Engineering in Robotics Reference Architectures

Introduction Architecture is about providing structure

Design principles for methods, classes, services, systems

Common design principles Structure – organization & control Behavior – control implementation Conventions – names, … Documentation

Organization to optimize use Cost Re-use Flexibility Foot-print [Wikipedia]

Page 4: Software Engineering in Robotics Reference Architectures

Architecture Typically we consider three different camps

Sense-Plan-Act Behavior based Hybrid Deliberative Architectures

Each approach has it range of pros and cons. Typically we need to consider

Support for parallelism Hardware targetability Support for modular design Robustness Run-time flexibility Performance effectiveness Documentation

Page 5: Software Engineering in Robotics Reference Architectures

Design Dimensions Temporal decomposition

Parallelism

Control decomposition

Page 6: Software Engineering in Robotics Reference Architectures

Temporal decomposition Division according to

temporal requirements

Provides a coarse division of control

Layering can be loosely synchronous

Some layers may be missing

Off-line planning

Strategic planning

Tactical planning

Quasi Real-Time

Hard Real-Time

Page 7: Software Engineering in Robotics Reference Architectures

Example for mobile platform

Division to ensure safety

Consideration for environmental dynamics

Hardware support influences design

Path Planning

Range based Obstacle Avoidance

Emergency stop

PID Speed Control

0.1Hz

1 Hz

10Hz

kHz

Page 8: Software Engineering in Robotics Reference Architectures

Control Decomposition Sense Plan Act –

well known, widely used

Parallel decomposition has some advantages for targeted designs

Behavior based designs may be suited for situated control with clear context

World

Sense Plan Act

World

Arbitration Act

Go To Goal

Arbitration

Arbitration

Page 9: Software Engineering in Robotics Reference Architectures

Hybrid Deliberative Architecture Architecture to

interleave deliberation and reactive control

Provides high degree of flexibility

Widely used in mobile robotics

Page 10: Software Engineering in Robotics Reference Architectures

Example of foraging - FSA

Start Wander

Acquire

Retrieve Halt

Begin Detect

GrabRelease

Done

Page 11: Software Engineering in Robotics Reference Architectures

Foraging in TeamBots Example

Page 12: Software Engineering in Robotics Reference Architectures

Subsumption architecture

Name Subsumption architectureBackground Reactive architecturePrecursors [Braitenburg, 1983][Walters, 1953]Design Method ExperimentalDeveloper Rodney Brooks (MIT)Response Coding Discrete / Rules BasedCoordination CompetitiveProgramming FSA & B-LanguageRobots fielded Allen, Genghis, Squirt Toto, Polly, Seymour,

… References [Brooks 1996] [Horswill 1993]

Page 13: Software Engineering in Robotics Reference Architectures

Augmented Finite State Model

Behavior ModuleInput Output

Suppressor

Inhibitor

Reset

Page 14: Software Engineering in Robotics Reference Architectures

Example of a three layer robot

Wander

Run AwayForward

Go

ReverseCollide

Lost

DriveBrakes

Page 15: Software Engineering in Robotics Reference Architectures

Coordination in subsumption Inhibition prevents signals transmitted from

reaching actuators

Suppression replaces a signal transmitted by the suppressing signal

The end result is a priority based arbitration method

Page 16: Software Engineering in Robotics Reference Architectures

Design of subsumption systems Qualitative specify the behavior need for the

task(s)

Compose and specify the independent behaviors as a set of disjoint actions

Determine behavior granularity

Ground low level behavior onto sensors and actuators

Page 17: Software Engineering in Robotics Reference Architectures

Subsumption foraging robot - Nerd

Homing

Pickup

Avoiding

Wandering

S

S

S [Mataric, USC & MIT]

Page 18: Software Engineering in Robotics Reference Architectures

Evaluation - Subsumption

Advantages Weaknesses Compiles to HW

Support for parallelism

Well adopted to niches

Poor run-time flexibility

Hardwired control

Behavior re-use is hard

Page 19: Software Engineering in Robotics Reference Architectures

Motor Schema Based on motor schema theory [Arbib, 1981]

Large grain modularity

Distributed concurrent agents

Assemblage composition

Strong coupling to neuro- / cognitive modeling.

Page 20: Software Engineering in Robotics Reference Architectures

Design Strategy Response represented as uniform vectors

Cooperative coordination through superposition

Predefined hierarchy – arbitration / orchestration

Arbitration is implicit through gains

Page 21: Software Engineering in Robotics Reference Architectures

Motor Schemas

Name Motor SchemaBackground Reactive part of AuRAPrecursors [Arkin, 1981] [Khatib, 1985]Design Strategy EthologicalDeveloper Arkin (GT)Response Coding Potential FieldsCoordination Cooperative superpositionProgramming Parameterized behavior libraries Fielded Systems Harv, George, Ren, Stimpy, Buzz, BlizzardReferences [Arkin, 1987; 1989; 1992]

Page 22: Software Engineering in Robotics Reference Architectures

Example Schema Based System

ES1

ES2

ES3

PS1

PS2

PS3

PS4

Motor

Robot

ES: Environment SensorPS: Perceptual SchemaMS: Motor Schema

MS1

MS2

Page 23: Software Engineering in Robotics Reference Architectures

Representative schemas

Page 24: Software Engineering in Robotics Reference Architectures

Example composition

Page 25: Software Engineering in Robotics Reference Architectures

Animal parallel

Page 26: Software Engineering in Robotics Reference Architectures

Design with Motors Schemas Characterize motor behaviors needed Compose the primitive control – use biological

inspiration where appropriate (ex grasping, …) Develop model to generate response

mappings Perform simulations to model interactions Determine perceptual needs for motor

schemas Design perceptual schemas to provide data Integrate / Test / Evaluate / Iterate

Page 27: Software Engineering in Robotics Reference Architectures

Foraging ExampleNoise

Avoid ObstacleAvoid Obstacle

NoiseAvoid ObstacleAvoid ObstacleMove to goal

NoiseAvoid ObstacleAvoid ObstacleMove to goal

Generate DirectionDetect ObstaclesDetect Robots

Generate DirectionDetect Obstacles

Detect RobotsDetect Attractor

Generate DirectionDetect Obstacles

Detect RobotsDetect Home Base

Sequencer

Wander

Acquire

Deliver

Page 28: Software Engineering in Robotics Reference Architectures

Evaluation – Motor Schema

Advantages Weaknesses Support for

parallelism

Run-time flexibility

Timeline for development

Support for modularity

Niche targetability

Hardware retargetability

Page 29: Software Engineering in Robotics Reference Architectures

DAMN Architecture

Name DAMNBackground Fine grained subsumptionPrecursors [Brooks, 1986] [Zadeh,1973]Design Method ExperimentalDeveloper Julio Rosenblatt (CMU)Response coding Discrete Vote Sets (Fuzzy)Coordination Winner take all arbitrationProgramming C++ / LispRobots fielded DARPA ALV, NAVLABReferences [Rosenblatt & Payton 1989][Rosenblatt 95]

Page 30: Software Engineering in Robotics Reference Architectures

DAMN Architecture

Avoid Obstacle

Follow Road

Seek Goal

Maintain Heading

Avoid Tip-Over

DAMN arbiter

ModeManager

Vehicle Controller

Page 31: Software Engineering in Robotics Reference Architectures

DAMN - NAVLAB

[frc.ri.cmu.edu, 1992]

Page 32: Software Engineering in Robotics Reference Architectures

DAMN Evaluation

Advantages Weaknesses Easy design of

behaviors

Easily extendable

Loose synchronization

Difficult to analyze stability

Could exhibit chatter

Difficult to integrate

Page 33: Software Engineering in Robotics Reference Architectures

Hybrid Deliberative Architecture (AuRA)

Name AuRABackground Interleaved controlPrecursor [Brooks, 1986] [ Arkin 1986]Design Method ExperimentalDeveloper Ron Arkin (GT)Response Coding Arbitration/CompetitiveCoordination Context arbiterProgramming C/C++/C#/JavaRobots Fielded BERRA, … References [Arkin 1988]

Page 34: Software Engineering in Robotics Reference Architectures

AuRA Architecture

Page 35: Software Engineering in Robotics Reference Architectures

Example of Hybrid Deliberative Arch BERRA a system for tour guiding / office

delivery Designed in by CAS @ KTH Experiments in robot design

Page 36: Software Engineering in Robotics Reference Architectures

BERRA

NAME BERRABackground Schema modelsPrecursors [Arkin 1988] [Arkin 1986]Design Situated activityDeveloper Jensfelt, Oreback (KTH)Response coding Potential fieldsCoordination Arbitration / SuperpositionProgramming Behavior librariesRobots fielded Asterix, Obelix, Minnie, Huey, Dewey,

Louie

Page 37: Software Engineering in Robotics Reference Architectures

BERRA Architecture

Page 38: Software Engineering in Robotics Reference Architectures

CoSy Architecture Schema Toolkit (CAST)

NAME CAST (CoSy Architecture SchemaToolkit)

Background Schema / Hybrid Deliberative Precursors [Arkin 1988] [Arkin 1986] [Sloman …]Design Situated activityDeveloper Hawes, Kruijff, Sloman, Wyatt [2006]Response codingCoordination Arbitration Programming C++ / Java / Robots fielded PlayMate, Explorer, …

Page 39: Software Engineering in Robotics Reference Architectures

CAST Example Schema

Page 40: Software Engineering in Robotics Reference Architectures

CAST Architecture Example

Page 41: Software Engineering in Robotics Reference Architectures

Relation to RDS The integration of systems can in almost all

cases be mapped directly to RDS CCR allow handling of all the communication

issues DSS can map directly to the CAST model of

system design For arbitration mechanisms there is a need to

consider a class for “voting” arbitration. The time dimension can be directly mapped to

data handlers (Dispatcher / TaskQueues)

Page 42: Software Engineering in Robotics Reference Architectures

Summary There are a number of reference architectures

available in literature. Reactive architecture (Subsumption, …) Deliberative architectures (NASREM, RCS) Hybrid Deliberative

Consider adoption path What are reference models for services? What is the appropriate

arbitration/coordination framework? Potential field, Voting based, Fuzzy, …

Frameworks scales better

Page 43: Software Engineering in Robotics Reference Architectures

Acknowledgement This series of lectures has been developed

with generous support from the Microsoft Corporation as part of the project “Software Engineering in Robotics” Contract # 113873. The support is gratefully acknowledged.