L ECTURE 13: R EACTIVE CONTROLLERS B EHAVIOR -B ASED C ONTROL N - - PowerPoint PPT Presentation

l ecture 13
SMART_READER_LITE
LIVE PREVIEW

L ECTURE 13: R EACTIVE CONTROLLERS B EHAVIOR -B ASED C ONTROL N - - PowerPoint PPT Presentation

16-311-Q I NTRODUCTION TO R OBOTICS L ECTURE 13: R EACTIVE CONTROLLERS B EHAVIOR -B ASED C ONTROL N AVIGATION & O BSTACLE AVOIDANCE I NSTRUCTOR : G IANNI A. D I C ARO A CONTROLLER FOR PHOTOTAXIS BEHAVIORS? The robot has two sensors, to the


slide-1
SLIDE 1

16-311-Q INTRODUCTION TO ROBOTICS

LECTURE 13:

REACTIVE CONTROLLERS BEHAVIOR-BASED CONTROL NAVIGATION & OBSTACLE AVOIDANCE

INSTRUCTOR: GIANNI A. DI CARO

slide-2
SLIDE 2

2

A CONTROLLER FOR PHOTOTAXIS BEHAVIORS?

We need to switch between two opposite behaviors What type of feedback controller should we use?

  • The robot has two sensors, to the left and the

right side respectively

  • Each sensor reports the amount of detected light
  • If the amount of light, averaged from the two

sensors, is less than L, than the robot exhibits phototaxis: it heads toward the light

  • If the amount of light, averaged from the two

sensors, is greater than L, than the robot exhibits anti-phototaxis: it escapes from the light

slide-3
SLIDE 3

3

BANG-BANG CONTROLLERS: BINARY FEEDBACK

Wall following State 1: Too near - State 2: Too far Threshold: Binary output from a proximity sensor (wall y/n) Gain parameter: The ICR radius for moving to/away the wall Hysteresis: In absence of a distance measure, a time interval

  • Two-states systems
  • State transitions happen

depending on a threshold value

  • The action at each state depends
  • n a fixed gain parameter G
  • Hysteresis can be helpful (in

general) to avoid over reacting State 1 State 2 >=Threshold < Threshold >= Threshold < Threshold Output(1, Gain) Output(2, Gain)

slide-4
SLIDE 4

4

HYSTERESIS

Input Output

Out(1, Gain) Out(2, Gain)

Input ≥ Θ Θ ≦ Θ Δ ≥ Θ Θ Θ Δ Input < Θ ≥ Θ Θ

Input Output

Input ≦ Θ - Δ

Out(1, Gain) Out(2, Gain)

Input ≥ Θ Θ Θ - Δ Θ

No hysteresis With hysteresis State 1 State 2 >=Threshold < Threshold >= Threshold < Threshold Output(1, Gain) Output(2, Gain)

Bang–bang controls with hysteresis provide optimal controls in some cases, although they are

  • ften implemented just because of

their simplicity or when binary behaviors are required

slide-5
SLIDE 5

Braitenberg vehicle basics Implementation as simple electronic circuits

  • Sensors directly connect to motors
  • Can increase or decrease motor activity
  • Behavior depends on
  • geometrical arrangement of sensors
  • geometrical arrangement of motors
  • cross connection of sensors
  • Emergent behaviors
  • Competing stimulation / inhibition creates complex actions

5

B R A I T E N B E R G V E H I C L E S

Basic vehicle ∼ One single neuron / motor that fires proportionally to the external input (from the sensor) Activation can be + or - Two or more “neurons” can be put together …

slide-6
SLIDE 6

6

B A S I C T Y P E S

Basic three types of Braitenberg vehicles

  • Sensors stimulate same-side motors
  • Sensors stimulate opposite motor
  • Sensors go to both (all) motors, some

stimulating, some inhibiting

slide-7
SLIDE 7

7

O B S TA C L E AV O I D A N C E

  • Sensors generate proximity value
  • The closer to an object, the higher the sensor output
  • Obstacle left
  • Obstacle right
  • Obstacle center
slide-8
SLIDE 8

8

L I G H T S E E K I N G

  • Sensors generate light value
  • The more light, the higher the sensor output
  • Obstacle left
  • Obstacle right
  • Obstacle center
slide-9
SLIDE 9

9

C O M P L E X B E H AV I O R S

Braitenberg: Light seeking + obstacle avoidance Depending on weights, different behaviors

  • Following a path
  • Docking to a charger station
  • Coordinated moments of a swarm of robots
  • ... and many more
slide-10
SLIDE 10

10

F R O M A N O B S E R V E R P O I N T O F V I E W …

Out of simple rules (and possibly imprecisions in actuations that naturally break symmetries) a number of different behaviors can be displayed that, to an external

  • bserver, could look like expressions of some personality, emotion, social interaction …
slide-11
SLIDE 11

11

F O R M O R E I N F O …

https://www.youtube.com/watch?v=A-fxij3zM7g A nice video talking in general about Braitenberg’s book and his vehicles + nice small robots programmed to act as the vehicles and show a complex world …

slide-12
SLIDE 12

12

REACTIVE PARADIGM FOR ROBOT CONTROL: DON’T THINK, REACT!

Starting from the mid 1980s, a number of different views (mostly bio-inspired) and approaches were developed and employed in robotics (and in AI, that started moving from symbolic to sub-symbolic / neural models) Deliberative paradigm Internal models Look ahead

Functional pipeline

Top-down problem solving Requires a closed world Reactive paradigm Model free React to inputs

Concurrent modules

Bottom-up problem solving Works in an

  • pen world
slide-13
SLIDE 13

13

Sense

Model

Plan Act Environment

ARCHITECTURE BASED ON REACTIVE PARADIGM

Environment

Sense Act

Rule 3 Rule n Rule 1 Rule 2

Sense-Act Transfer rules Behaviors

Vertical decomposition vs. Horizontal decomposition

Ethological view (Behavior): Direct mapping of sensory inputs to a pattern of motor actions that are then used to achieve a task Mathematical view (Function): A transfer function, transforming sensory inputs into actuator commands

Concurrent mode vs. Sequential mode

slide-14
SLIDE 14

14

EXAMPLES OF SENSE-ACT RULES

Environment

Sense

Identify Objects Monitor Changes Explore Wander Avoid Objects

Act

Environment

Sense

Build Map Find Path Track Person Follow Wall Avoid objects

Act

slide-15
SLIDE 15

15

Good reference books, plenty of ideas and discussions on the Reactive / Behavioral paradigm:

QUESTIONS TO CLARIFY

  • 1. Where the Reactive paradigm finds its roots?
  • 2. What is the exact nature/characteristic of the SENSE-ACT rules?
  • 3. How the ACTion output from the different rules is arbitrated to result into

a single, coherent Action command to the Effectors?

  • R. Arkin, Behavior-Based Robotics, MIT Press, 1998
  • R. Murphy, An Introduction to AI Robotics, MIT Press, 2000
  • M. Mataric, The Robotics Primer, MIT Press, 2007
  • J. Jones, A Practical Guide to Behavior-based Robotics, McGraw-Hill, 2004
slide-16
SLIDE 16

16

THE BIOLOGICAL ROOTS

Many “simple” animals exhibit individual and collective intelligent behavior yet have virtually no

  • brain. Therefore, they must be doing something

to manage world’s representation complexity!

Animals live in an open world, and roboticists would like to overcome the closed world assumption

Historical track: Cybernetics (back to the 40’s, N. Wiener, G. Walter’s Turtoises),

  • V. Braintenberg’s (conceptual) vehicles based on direct SENSE-ACT
  • 1. Where the Reactive paradigm finds its roots?

Dissatisfaction with the limitations of the Deliberative approach

slide-17
SLIDE 17

17

REACTIVE RULES AS BEHAVIORS

  • 2. What is the exact nature/characteristic of the SENSE-ACT rules?

A fundamental building block of natural intelligence is a behavior: a mapping of sensory inputs to a pattern of motor actions, which then are used to achieve a task Ethology: study of animal behaviors

Sensor Inputs Pattern of Motor Action

Behavior

Releaser

Sensor input: Water source detected Releaser: Giraffe is thirsty Releaser: No predators Action pattern:

Move head checking for predators Put legs in right position, Lower the neck Adjust legs position Drink rapidly Neck up and check surroundings

Task: Drinking

slide-18
SLIDE 18

18

CATEGORIZATION OF (ANIMAL) BEHAVIORS

Reflexive behaviors: Stimulus-response (S-R), “hardwired” behaviors. The stimulus is directly connected to the motor action to produce the fastest response time. No cognition: if you sense it, you do it!

Arctic tern feeding: When hungry, babies peck at the closest red blob

Source: R. Murphy, AI Robotics, MIT Press, 2000

  • R. Arkin, Behavior-Based Robotics, MIT Press, 1998

Increase of complexity

In ethology, a reactive behavior means a learned behavior or a skill In robotics, the word reactive (mostly) connotes a reflexive behavior.

Conscious behaviors: Deliberative, requiring conscious thought, possibly combining previously developed behaviors

Assembly a robot?

Reactive behaviors: Learned, and then consolidated to where they can be executed without conscious thought, but can be changed by conscious thought.

Hunting “Muscle memory”

slide-19
SLIDE 19

19

CATEGORIES OF REFLEXIVE (ANIMAL) BEHAVIORS

Taxes

Response: to move to a particular orientation marked by a stimulus intensity Phototaxis Chemotaxis

Reflexes Stimulus t1 ——— t2 Response t1 ——— t2

Value Axis 50 100 Category Axis AprilMayJune July

Stimulus intensity Response

Short/Instantaneous

Fixed-action patterns Stimulus t1 — t2 Response t1 ———— t3 t2

Keep fleeing after predator detection Persistent

slide-20
SLIDE 20

20

FROM ANIMAL TO ROBOT BEHAVIORS

  • A. Ethology / Animal behaviors have been, are, and will be a major source
  • f inspiration to design effective robotic behaviors!
  • B. As a matter of fact, in terms of taxonomy, design principles, architectural
  • rganization, the reactive paradigm in robotics has mirrored very much

the results coming from the ethology field

  • C. What we have discussed so far has been translated /adapted into a

number of different views of the reactive paradigm: Subsumption, Motor schema, Potential fields, Behavior-based control, … Why all this discussion about animal behaviors when we are (mainly) interested to robot behaviors?

slide-21
SLIDE 21

21

A PRACTICAL EXAMPLE: OBJECT COLLECTION

The robot:

  • Frontal IR emitters / detectors
  • Light sensors
  • Frontal bumper
  • Two standard wheels

Does it look like as a simple task to program/control?

  • The robot searches for type A objects
  • When an A object is found, it has to be

brought (by pushing) at a storing location identified by a bright light

  • The robot has to collect as many A
  • bjects as possible
  • Other objects cannot be pushed
  • The environment can feature walls

Robot

Storage

A A A A A A A A

Task specification:

slide-22
SLIDE 22

22

BEHAVIOR-BASED ARCHITECTURE FOR OBJECT COLLECTION

Environment

Sense

Escape No dark-push Anti-moth Go to objects Home

Motor control

Cruise

IR

detectors

Light

sensor

Bumper

force

Arbiter Priority

From: J. Jones, A Practical Guide to Behavior-based Robotics, McGraw-Hill, 2004

Bottom-up design: try to devise a set of simple behaviors that, when acting together, produce the overall desired activity

Emergent (global) behavior

A A A A A A A A

slide-23
SLIDE 23

23

BEHAVIOR ARBITRATION

  • 3. How the ACT output from the different rules is arbitrated to result into a

single, coherent Action command to the Effectors?

Environment

Sense Act

Behavior 3 Behavior n Behavior 1 Behavior 2

A r b i t r a t i

  • n

Conflict resolution module

It might be needed also to access / adjust sensory systems

slide-24
SLIDE 24

24

BEHAVIOR ARBITRATION STRATEGIES

Averaging / Composition B1 ⊕ B2 Voting {R1, R2, R3}: X {R4}: Y

⇒ X

Least Commitment {R1}: DON’T X Fixed priority B1(t) ≻ B2(t), ∀t Alternate B2([t1,t2]), B1([t2,t3]) Variable priority B1(t1) ≻ B2(t1), B2(t2) ≻ B1(t2), Subsumption Suppression: BNew ≻ BOld Inhibition: BNew ⋀ BOld ⇒ ∅

slide-25
SLIDE 25

25

BEHAVIORS FOR MOVING TO A POINT IN PRESENCE OF OBSTACLES

Bug 1 and Bug 2 Insect-inspired Algorithms (1987)

  • Local decisions, map-free!
  • Complete algorithms: find a

path if it exists, otherwise returns with a failure.

  • No guarantees in terms of

finding a good (short) path!

  • “Nasty” obstacle structure and

placement or “wrong” left/ right turning choices can make things going arbitrarily bad.

slide-26
SLIDE 26

26

BUG 1: ~EXHAUSTIVE SEARCH

cannot

slide-27
SLIDE 27

27

BUG 2: GREEDY SEARCH

slide-28
SLIDE 28

28

B U G 2 : I S S U E S

slide-29
SLIDE 29

29

B U G 1 O R B U G 2 ?

slide-30
SLIDE 30

30

(STRONG) ASSUMPTIONS

Localization: The robot must know where it is in the world, and must be able to maintain a (robust) estimate of this while it moves Mapping: The location of the goal is known within the robot’s representation

  • f the world.

Mapping/Localization: The robot must be able to mark a location in its representation of the world and be able to determine that it has returned to it. Sensing: Obstacles need to be sensed with precision, in order to circumnavigate them. Actuation/Control: The robot needs to be able to smoothly change and adapt its trajectory … velocities?

slide-31
SLIDE 31

31

G E N E R A L O B S TA C L E AV O I D A N C E

Dynamic Window Approach (DWA, 1987) ICR

  • D. Fox, W. Burgard, S. Thrun, The Dynamic Window Approach to Collision Avoidance, IEEE Robotics & Automation Magazine

4(1):23 - 33 · April 1997

slide-32
SLIDE 32

32

D WA : F E A S I B L E F R E E S PA C E V E L O C I T I E S

Vs = Velocities admissible by robot kinematic constraints

slide-33
SLIDE 33

33

D WA : A D M I S S I B L E V E L O C I T I E S I N T I M E W I N D O W T

Time interval

slide-34
SLIDE 34

34

D WA : A D M I S S I B L E V E L O C I T I E S G I V E N O B S TA C L E S

Admissible velocities (allow the robot to stop without colliding with obstacle)

Decelerations for breakage

  • nce reaching the obstacle

Distance to the closest

  • bstacle on the circular

trajectory defined by (v,𝜕)

slide-35
SLIDE 35

35

O B J E C T I V E F U N C T I O N / B E H AV I O R

Clearance from obstacles Target reaching Velocity (fast, smooth)

slide-36
SLIDE 36

36

O B J E C T I V E F U N C T I O N / B E H AV I O R

Admissible velocities given accelerations dvb/dt = 50 cm/s2, d𝜕/dt = 60 deg/s2 Non admissible velocities are dark shaded areas. E.g., all velocities in area right wall II would cause a sharp turn to the right and thus cause the robot to collide with right wall.

Admissible velocities in the time window are in the white area