Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial...

52
Robotics robot navigation Dipartimento di Elettronica Informazione e Bioingegneria @ G. Gini 2015

Transcript of Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial...

Page 1: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

Roboticsrobot navigation

Dipartimento di Elettronica Informazione e Bioingegneria

@ G. Gini 2015

Page 2: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Programming a navigation task

• Different possibilities:Telecontrol the robotStore and replay a set of commands sent to the robotWrite a navigation program

Page 3: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Example: Pioneer

SensorSensor datadata

CommanCommandsds Low Low levellevel

controllercontroller

SensorsSensors(7 Ultra (7 Ultra Sound, 2 Sound, 2

EncodersEncoders))

MotorsMotorsUserUser interfaceinterface

Software Software programmingprogramming

environmentenvironment

Serial radio connectionSerial radio connection

Max velocity: 90 cm/s, 300°/sPayload: 4.5 Kgweight: 7.7 Kg

Page 4: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

software

Saphira, client to executeColbert

Colbert languageSoftware

Page 5: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

commands

Page 6: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Basic instructions

Page 7: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Navigation program ?

Use the same method developed for manipulators:1. The user through manual commands moves the robot

through the environment to the goal2. The sequence is stored as a program3. The program is played back

- BUT- The repeatibility of the task is very low- Guidance systems are needed for a correct execution

- IN ALTERNATIVE:- Autonomous plan generation

Page 8: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

navigation program using a map

IF map THENcompute-path (start, goal);IF complex THEN list subgoalsWHILE not_in_ goal DO

move; IF in sub_goal THEN next_subgoal;IF obstacle THEN stop;IF stationary object THEN

modify mapIF new path to subgoal THEN move on it ELSE recompute path

ELSE wait the object to go away END while

requires methods for mapping and path planning

Page 9: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

navigation without map

---ELSE (no map)WHILE not in goal DO

look aroundIF direction to goal is free THEN goELSEIF other direction is free THEN select and goELSE try again

END whileEND

• This is exploration and covering problem

Page 10: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Navigation components

• Robot navigation means its ability to determine its ownposition in its frame of reference and then to plan a pathtowards a goal location (pose).

It needs a specifice representation of the world and of the robot position in the world

• Navigation can be defined as the combination of1. Localization2. Mapping3. Planning

Page 11: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

The role of process

subsystem MECHANICS

(arm, wheels, …)

subsystem ACTUATORS

(motors, artificial muscles, …)

subsystem CONTROL

(control loop, transformations,

subsystem PROCESS

(task, environment)

subsystem SENSORS

(internal and external)

subsystem PLANNING

(path, grasps, trajectories)

OPERATOR

How muchthe system is task dependent?

Page 12: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Navigation – questions and methods

Where am I ?Where am I ?

What is there?What is there?

How to go there?How to go there?

localizationlocalization

mappingmapping

planningplanning

Page 13: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Localization and mapping

Page 14: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Localization

• Find the pose x, y, θDifficult because actions and sensors are uncertain

- Relative measures: depend on the actionstaken1. Odometry2. Inertial systems

- Absolute measures: depend on infrastructures1. Active beacons – GPS2. Landmarks3. Model matching

Page 15: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Relative Position Measurements

• Acquiring relative measurements is dead reckoningThis is the process of estimating the position of anairplane or a ship, only based on the speed and direction of travel and the time that passed sincethe last known position. Since the position estimates are based on earlierpositions, the error in the estimates increasesover time.

Page 16: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

odometry

• Odometry works by integrating incremental information over time.

By using wheel encoders to count the number of revolutions of each wheel, the robot measures the distance it traveled and its heading direction.

• PROs: it gives good short-term accuracy, is inexpensive, and allows for very high sampling rates.

• CONs: Due to slippage the integration of the wheelrevolutions leads to errors in both traveled distance and orientation. These errors accumulate over time and can cause large positioning errors. Another problem issensitivity to terrain. Also differences in wheel diametercan cause position errors that are not detected byodometry

Page 17: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

How to make an odometer

Encoders:• 1 – on actuated wheels. Can stay near

ICC, but gives wrong data in case ofslipping

• 2 – on a free wheels – is not on ICC, depends on the load on it

• 3 – on two free wheels

Page 18: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Causes of odometric errors

1 Systematic• Encoders precision• Algorithm• Bad calibration2 random• Slipping • terrain

Page 19: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Error grooving

Page 20: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Basic equations (from Where am I?)

Page 21: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Page 22: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Odometry for differential drive

b distanza ruote

Page 23: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Square Test

Page 24: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

We ask also for

• How far is the robot?• Has changed direction?• Where it is now? • Where is it heading?• Is on a rolling plane?• A collision happened?

inertial measures

Page 25: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

F = ma

a =∂v∂t

=∂ 2x∂t 2

Inertial navigation and odometry

Page 26: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

MEMS

AccellerometerMass and spring

Force = m * aForce = displacement * spring-constantdisplacement = m* a / spring-constant

Change in Displacement

MASS

Add Acceleration

MASS

GyroMeasures the angular velocity around its axisAfter integration of the angular velocity, it obtains changes in direction or inclination

Page 27: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Inertial navigation

• Inertial navigation techniques use compass, gyroscopes and accelerometers

A digital compass gives a reading of how its oriented on its axisin relation to the magnetic north. Gyroscope gives a measurement of rate of rotationAccelerometers measure linear accelerations along the x or y axis of the device. When at rest the figures represent the force ofgravity acting on the device. They suffer from extensive drift and are sensitive to bumpy ground (if there is a bump in the floor, the sensor will detect a component of the gravitational acceleration).

• compass is used for finding a heading.• gyro is used to know how fast something is turning,• accelerometer is used to determine tilt (with respect to

the earth)

Page 28: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

examples

• IMU (Inertial Measurement Unit) • combines three gyroscopes and three

accelerometers to provide 6 DoF motionsensing.

Servoflow, Mass•Accelerometer and compass5.5 x 5.5 by 1.5 mm combined one-chip designdetects geomagnetism and gravity.

Page 29: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Problems with inertial estimates

• Like with odometry, position estimates from inertialnavigation are acquired by integrating the obtainedinformation from the sensors;

once for obtaining the speed, twice for obtaining the traveled distance of the robot.

• since measurements are made by integration, the position estimates drift over time, and thus the errorsincrease without bound.

• Usually more sensors are integrated

Page 30: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Absolute position measurements

• Absolute position measurements supply information about the location of the robot independent of previous location estimates, directly from one measurement.

1. GPS2. Landmarks or beacons. Active landmarks (beacons) send out

the position information, and the location is obtained withtriangulation or trilateration (GPS). Passive landmarks have tobe detected, for instance with vision.

3. Map based. Map based positioning use geometric features(lines that describe walls, … ) of the environment to computethe location of the robot. Sensor output is then matched withthese features. Model matching can be used to update a global map. It needs enough sensor information and it requires largeamounts of processing power.

Page 31: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Existing infrastructures - outdoor

• Global positioning system (GPS)24 satellites that orbit the Earth in very precise orbits twice a day. GPS satellites emit continuous navigation signals (location and time). All GPS satellites synchronize operations. The GPS receiver compares the time a signal was transmitted with the time it was received.

Velocity x Time = Distance Velocity is roughly 186,000 miles per second

Problems: GPS transmission are line-of-sight transmissions.• Signals from satellites can be refracted• Signals can interfere

Page 32: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Existing infrastructures - indoor

wireless signals - wifiUse the signal strenghtLow precision because of

• Diffraction, Reflection, Scattering• These effects can cause a signal to follow multiple

paths, not only the line of sight• Estimating the location of a mobile device or a robot

from wireless signal strengthdifficult to generate an adequate likelihood model of signal strength measurements.

• techniques can generate such models from small amounts of calibration data collected in the environment

Ex: iphone locator system

Page 33: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Guiding system

• To reduce the uncertainty on the pose

• Fixed guide: only predetermined path to follow(magnetic, optic)

• Beacons: radio signals sent in the environment fromknown positions

• Landmark: visual signals (natural or artificial)• Integrated with :• Odometry

Page 34: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Trilateration Triangulation

• measures the distance from 3 beacons

The receiver is on the robot• The position of the robot is the

intersection of the 3 circles

• measures the angle from the robot orientation and 3 references in known positions

Page 35: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Navigation – questions and methods

Where am I ?Where am I ?

What is there?What is there?

How to go there?How to go there?

localizationlocalization

mappingmapping

planningplanning

Page 36: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Planning in C-space

C-space (x, y, θ) 2D C Space (x, y) for cylindrical or omni-directional robot

• the robot is a point that moves between enlarged obstacles

• Uniform enlargement (semi-size of the robot) for uncluttered environments

• Different enlargement for different orientations

– rotation on site

Page 37: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

C-ostacle for different orientations

A map for one orientation

Rotation in place -> a new map

Page 38: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

• Unexpected obstacles

The path is no more feasible

Re-planning!

C

G OX

Execution and obstacle avoidance

Page 39: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Models of controllers in robotics

• Use the kinematic model• Use the dynamic model• Use a virtual model• Use a strict integration between sensors and

actions

Page 40: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Find a path, move on a path

Define the path and follow it without collisions• Uses virtual forces generated by an artificial

potential fieldlocal method; if map available, it is a global planning too!

• The robot (a point in C_Space) is a particle in a potential field whose structure represents the space and is subject to virtual forces

Page 41: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Potential Fields method

• Initially proposed for real-time collision avoidance [Khatib1986].

• Hundreds of papers published.

• A potential field is a scalar function over the free space.• To navigate, the robot applies a force proportional to the

negated gradient of the potential field.• A navigation function is an ideal potential field that

has global minimum at the goalhas no local minimagrows to infinity near obstaclesis smooth

The robot moves according to the gradient descent

Page 42: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

attraction/repulsion

- attracts the robot, + repels it

the robot is attracted from the goal and repelled by obstaclesThe potential function is the sum of attractive and repulsive potentials

The repulsive force depends on distance

Page 43: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

2D – potentials and force

yUxU

qUqF

yxFyxFyxF

yxUyxUyxU

repattr

repattr

∂∂∂∂

=−∇=

+=

+=

q)in Uofgradient (negated )()(

dove

),(),(),(

),(),(),(

Page 44: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Attractive potential

• quadratic

• linear

),(21),( 2 yxPyxU goalattr ξ=

),(),( yxPyxU goalattr ξ=

Page 45: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Repulsive potential

η> O

The repulsive potential is the same in any direction

The influence area is a circle of radius threshold.

⎪⎩

⎪⎨

⎧≤⎟⎟

⎞⎜⎜⎝

⎛−=

elsewhere 0

P if1121

),( obstacle

2

thresholdthresholdobstaclerep

PPPyxU η

Page 46: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Attractive & Repulsive Fields

Page 47: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

How Does It Work?

[Latombe 91]

attractive

repulsive

Page 48: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Equi-potential contours

Force field

Path planning

Different views

Use gradient descent to find the pathwhile updating the map using sensors

Page 49: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Potential Field Algorithm

Start at initial pointFind path opposite to gradientSet new point at distance δ along path from old point

Repeat until goal point is reached

Page 50: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Local minima

• Shape and position of obstacles and goal can create points where the attractive and repulsive forces sum to 0

• Local minima are a trap

• Heuristics to exit (for instance a random move)

startgoal

Fattr=-Frep

Page 51: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

For complex objects

• Method developed for manipulators to reach objects in a cluttered environment (Khatib 1980)

• It was used for fine movements of the wrist

• Many control points on the robot

• For maps with elongated obstacles, many control points to cover

Page 52: Robotics - Intranet DEIBhome.deib.polimi.it/gini/robot/docs/Rob11.pdf · G. Gini Inertial navigation • Inertial navigation techniques use compass, gyroscopes and accelerometers

G. Gini

Conclusions potential field

• Spatial paths are not preplanned and can be generated in real time

• Planning and control are merged into one function

• Smooth paths are generated

• Planning can be coupled directly to a control algorithm

•Can work without a map

Pros:

• Trapped in local minima in the potential field

• Does not find optimal path

• Because of this limitation, commonly used for local path planning

• Use random walk, backtracking, etc to escape the local minima

Cons: