tddc17 percetion2 2010 presentation
Transcript of tddc17 percetion2 2010 presentation
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Robotics/Perception II
Mariusz WzorekArtificial Intelligence and Integrated Computer Systems Division (AIICS)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
2
Outline
• Sensors - summary• Computer systems• Robotic architectures• Mapping and Localization• Motion planning• Motion control
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
3
Some of the key issues in robotics• Motion
– object manipulation– locomotion: holonomic ↔ non-holonomic
• Navigation– localization (where am I, where are objects relative to me?)– planning (how do I get there?)
• Mapping– building an environmental map from sensor inputs– for navigation purpose– for exploration (where haven’t I been)
Related areas: perception, control, situation awareness, monitoring, planning, reasoning, communication, software architectures, power systems
Video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
4
Anatomy of Robots
Robots consist of:• Motion mechanism
– Wheels, belts, legs,propellers, rotors
• Manipulators – Arms, grippers
• Sensors• Computer systems
– Microcontrollers, embedded systems• Body/Frame
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
5
Sensors
Summary of most commonly used sensor for mobile robots.
Any weather
Any light
Detection in 15m
Fast response Weight Affordable
CCD Camera/stereo/Omnidirectional/o. flow C C C C
Ultrasonic C C C C
Scanning laser C C C C
3D Scanning laser C C C*Millimeter Wave Radar C C C C
* scanning laser on a tilting unit
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Sensors cont’d - common interfaces
• analog - voltage level• digital:
– serial connections e.g.:• RS232• I2C• SPI• USB
– pulse width modulation - PWM–
6
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Computer systems
Many challenges and trade-offs!– power consumption– size & weight– computational power– robustness– different operational conditions - moisture,
temperature, dirt, vibrations, etc.
7
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Computer systems cont’d
PC104 - standardized form factor• industrial grade,• relatively small size,• highly configurable,• >200 vendors world-wide,• variety of components• variety of processors
8
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Computer systems cont’d
Custom made embedded systems• with integrated sensor suite• micro scale, light weight• fitted for platform design
9
• application specific
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Computer systems cont’dExample system design:
10
!"#$• !"#$!%&'!()*+,-./!
• !"!%0!12/!
• !"!%0!3456!789:)!
%&#$• !;<<!/&'!()*+,-!===!
• !>?@!/0!12/!
• !?">!/0!3456!789:)!
'%#$• !;<<!/&'!()*+,-!===!
• !>?@!/0!12/!
• !?">!/0!3456!789:)!
AB6)8*)B!
CD9BE6!
FFG!FHIH8!
F4-)84!
J6)8-4I!
F4-)84!
(4*!
J9IB!
K*9B!
L4-464!1/2M!NL2CO!L2FCP!
048H-)B89E!(8)55,8)!2I+-)B)8!
%(C!1)E)9:)8!
Q45)8!14*R)!S9*7)8!
/H7,I)!
AB6)8*)B!T97)H!C)8:)8!
U<>#""V!W98)I)55!0897R)!
%C/!/H7)-5!
()8E)X+H*!C)*5H8!C,9B)!
FH--,*9E4+H*!/H7,I)!
(SF!C)*5H8!C,9B)!
CB)8)H.T959H*!
/H7,I)!
(HD)8!/4*4R)-)*B!K*9B!
AB6)8*)B!
1C>Y>!
2*4IHR!
S98)D98)!
/9*9GT!
1)EH87)85!
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
11
Outline
• Sensors - summary• Computer systems• Robotic architectures• Mapping and Localization• Motion planning• Motion control
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
12
Telesystems/Telemanipulators
Video
Delay
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
13
TelepresenceExperience of being fully present at live eventwithout actually being there• see the environment through robot’s camera• feel the surrounding through robot sensors
Realized by for example: • stereo vision,• sound feedback,• cameras that follow the operator’s head movements,• force feedback and tactile sensing
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
14
Reactive systems
Robot responses directly to sensor stimuli.Intelligence emerges from combination of simple behaviors.Subsumption architecture (Rodney Brooks, MIT):• concurrent behaviors• higher levels subsume behavior of lower layers• no internal representation• finite state machines
SENSE ACT
Video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
15
Limitations of Reactive Systems• Agents without environment models must have sufficient
information available from local environment• If decisions are based on local environment, how does it
take into account non-local information (i.e., it has a “short-term” view)
• Difficult to make reactive agents that learn• Since behavior emerges from component interactions plus
environment, it is hard to see how to engineer specific agents (no principled methodology exists)
• It is hard to engineer agents with large numbers of behaviors (dynamics of interactions become too complex to understand)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
16
Hierarchical Systems
SENSE PLAN ACT
extractfeatures
combine features into model
plantask
executetask
controlmotors
Sensors
Actuators
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
17
Hierarchical Systems (Shakey Example)Shakey (1966 - 1972)• Developed at the Stanford Research Institute • Used STRIPS planner (operators, pre and post conditions)• Navigated in an office environment, trying to satisfy a goal given to it
on a teletype. It would, depending on the goal and circumstances, navigate around obstacles consisting of large painted blocks and wedges, push them out of the way, or push them to some desired location.
• Primary sensor: black-and-white television camera• Sting symbolic logic model of the world in the form of first order
predicate calculus• Very careful engineering of the environment
Video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
18
Hybrid systems (three-layer architecture)
SENSE
PLAN
ACT
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
19
Hybrid systems (Minerva Example)Tour guide at the Smithsonian's NationalMuseum of American History (1998)
Video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
20
Outline
• Sensors - summary• Computer systems• Robotic architectures• Mapping and Localization• Motion planning• Motion control
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
21
Laser Range Finder
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
22
Laser Range Finder - the principle
0°
View from top
Video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Laser Range Finder - the principle cont’d
23
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
24
0°
40° 140°
α
β
View from top
α=180°β=100°
SICK LMS Resolution Modes Angular range
Angular resolution
0°..100° 1°0°..100° 0.5°0°..100° 0.250°..180° 1°0°..180° 0.5°
Mode Measurement Range
mm mode 0..8191mm = 8.191meterscm mode 0..8191cm = 81.91meters
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
25
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
26
Mapping
Based only on odometry + range data
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
Mapping cont’d
27
Based only on odometry + range data + matching 3D Mapping video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
28
Mapping cont’d
Based only on odometry + range data + matching
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
29
Robotic perceptionRobot perception viewed as temporal inference from sequences of actions and measurements → dynamic Bayes network of first order Markov processExample: localization - holonomic robot with range sensor, estimate pose while moving
next belief state? → Bayesian inference problem
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
30
Recursive filtering equation
using Bayes’ rule, Markov assumption, theorem of total probability
Motion model: deterministic state prediction + noiseSensor model: likelihood of making observation ot when
robot is in state xt
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
31
Motion and sensor model
Assume Gaussian noise in motion prediction, sensor range measurements
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
32
Localization algorithmsParticle filter (Monte Carlo localization):• belief state represented by collection of particles that correspond to
states• belief state sampled, each sample weighted by likelihood it assigns
to new evidence, population resampled using weightsKalman filter:• belief state represented as single multivariate Gaussian• each step maps a Gaussian into a new Gaussian, i.e. it computes a
new mean and covariance matrix from the previous mean and covariance matrix
• assumes linear motion and measurement models (linearization →extended KF)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
33
Global Localization (Particle Filter Examples)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
34
Video_sonar
Video_laser
Global Localization (Particle Filter Examples; sonar vs laser)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
35
Extended Kalman Filter Examples
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
36
More Localization Examples
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
37
SLAMLocalization: given map and observed landmarks, update pose
distributionMapping: given pose and observed landmarks, update map
distributionSLAM: given observed landmarks, update pose and map
distributionProbabilistic formulation of SLAM:add landmark locations L1, . . . , Lk to the state vector, proceed as for
localizationProblems:• dimensionality of map features has to be adjusted dynamically• identification of already mapped features
Laser-based SLAM Video Distributed SLAM Video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
38
Outline
• Sensors - summary• Computer systems• Robotic architectures• Mapping and Localization• Motion planning• Motion control
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
39
One DOF for each independent direction in which robot can move
Configuration of robot specified by 6 numbers => 6 DOFsNon-holonomic: number of effective DOFs less than controllable DOFs
Car has 3 effective DOF and 2 controls =>non-holonomic
Degree of freedom (DOF)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
40
Motion PlanningMotion types:• point-to-point• compliant motion (screwing, pushing boxes)Representation: configuration space vs workspaceKinematic state: robot’s configuration (location, orientation, joint
angles), no velocities, no forces
Path planning: find path from one configuration to anotherProblem: continuous state space, can be high-dimensional
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
41
WorkspacePhysical 3D space (e.g. joint positions)Robot has rigid body of finite sizeWell-suited for collision checkingProblem: linkage constraint (not all workspace coordinates
attainable) makes path planning difficult in workspaceKinematics: given kinematic robot state in configuration
space, calculate workspace coordinates by applying chain of coordinate transformations (simple, well-posed problem)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
42
Configuration SpaceSpace of robot states (e.g. joint angles)Robot is a point, obstacles have complex shapeProblem: tasks expressed in workspace coordinates, obstacle
representation problematicInverse kinematics: given workspace coordinates, calculate
kinematic robot state in configuration space (often hard and ill-posed problem)
Free space (attainable configurations) ->occupied space (not attainable configurations, obstacles)
Planner may generate configuration in configuration space, apply inverse kinematics and check in workspace for obstacles
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
43
Workspace vs. Configuration Space
ϕelb
ϕshou
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
44
Workspace vs. Configuration Space
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
45
Path PlanningBasic problem: infinite number of states ->convert to finite state
spaceCell decomposition:• divide up space into simple cells,• each of which can be traversed “easily”Skeletonization:• identify finite number of easily connected points/lines• that form a graph such that any two points are connected by a
path on the graphGraph search and coloring algorithmsAssumptions: motion deterministic, localization exact, static scenesNot robust with respect to small motion errors, doesn’t consider
limits due to robot dynamics
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
46
Cell DecompositionProblem: may be no path in pure free space cells
Soundness(wrong solution if cells are mixed)
vs.Completeness
(no solution if only pure free cells considered)
Solution: recursive decomposition of mixed (free+obstacle) cells or exact decompositionDoesn’t scale well for higher dimensions
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
47
Cell Decomposition
Grayscale shading - cost from the grid cell do the goal
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
48
SkeletonizationVisibility graphs: find lines connecting obstacle vertices through
free space, build and search graph; not for higher dimensionsVoronoi graphs: find all points in free space equidistant to two or
more obstacles, build and search graph; maximizes clearance, creates unnecessarily large detours, doesn’t scale well for higher dimensions
Probabilistic roadmaps:• generate randomly large number of configurations in free space,
build graph (construction phase) • search graph (query phase)scales better to higher dimensions but incomplete
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
49
Visibility and Voronoi Graph
qinit
qqoal
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
50
Probabilistic Roadmaps(PRM planning procedure example)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
51
Probabilistic Roadmaps(PRM planning procedure example: Construction phase )
Generate randomconfigurations
Make connections
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
52
Probabilistic Roadmaps(PRM planning procedure example: Query Phase )
start
goal
start
goal
Curve Replacement & Smoothing
Add start andgoal configurationsto the roadmap
start
goal
A*
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
53
Probabilistic Roadmaps
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
54
Potential FieldsAdditional cost function in connectivity graph:potential grows when closer to obstaclesMaximizes clearance from obstacles while minimizing path length:• creates safer paths
Problem: choosing appropriate weight
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
55
Motion Control• Path following involves forces: friction, gravity, inertia,• Dynamic state: kinematic state + robot’s velocities• Transition models expressed as differential equations• Path planner assumes robot can follow any path• Robot’s inertia limits maneuverability
Problem: including dynamic state in planners makes motionplanning intractableSolution: simple kinematic planners + low-level controller for forcecalculationOther solution: motion control without planning: potential field andreactive control
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
56
Controllers• Techniques for generating robot controls in real time
using feedback from the environment to achieve a control objective
• Reference controller: keep robot on pre-planned path (reference path)
• Optimal controller: controller that optimizes a global cost function, e.g. optimal policies for MDPs
• Stable: small perturbations lead to bounded error between robot and reference signal
• Strictly stable: able to return to reference signal
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
57
Closed-loop control
Performance of controller:• stability• overshoot ← inertia• steady-state error ← friction• rise time• settling timeP controller:
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
58
Closed-loop controlPD controller:• decreases overshoot• decreases settling timePID controller:
• eliminates steady-state error
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
59
Closed-loop control
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
60
Potential Field ControlMotion planning: pot. field as additional cost functionGenerating robot motion directly: superpose potential field of
obstacles with field generated by an attractive force, follow the gradient
Efficient calculation possible, especially compared to path planningProblem: local minima, only kinematic method
Video
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
61
Potential Field ControlRobot is treated as a point under the influence
of an artificial potential field.Generated robot movement is similar to a ball
rolling down the hill• Goal generates attractive force• Obstacle are repulsive forces
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
62
Reactive ControlBefore: model of environment required (reference path, potential
field)Problems with model based approaches:• accurate models are difficult to obtain, especially in complex or
remote environments• computational difficulties, localization errors → reactive controlEvent driven systems (↔transformational systems) →finite state
machinesEnvironment feedback plays crucial role in the generated behaviorReactive controller are an implementation of a policy for a MDP,
policies can be learned (e.g. Q-learning)
Mariusz WzorekArtificial Intelligence & Integrated Computer Systems DivisionDepartment of Computer and Information ScienceLinköping University, Sweden
63
Reactive Control
Emergent behavior: behavior that emerges through interplay of (simple) controller and (complex) environment
Characteristic of great number of biological organisms
Video