46
L K S-O N -N M Lionel Ott, Hannes Schulz University of Freiburg, ACS November 2008

Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

  • Upload
    cijat

  • View
    1.423

  • Download
    1

Embed Size (px)

DESCRIPTION

Commonly, the kinematic function of robotic manipulators is derived from the robot model analytically and can be represented in closed form. However, there are cases in which a model is not apriori available. We propose an approach that enables an autonomous robot to estimate the kinematic and inverse kinematic function on-the-fly directly from self-observations. As observations, we sample pairs of randomly chosen joint configurations and the resulting world positions. For approximating the kinematic and inverse kinematic function, we use instance-based learning techniques, such as Nearest Neighbour (NN) and Locally Weighted Regression (LWR). The sampled pairs not only contain information about the kinematics, but also implicitly encode the connectivity and reachability both in the configuration and world space. The robot can take advantage of this information to build roadmaps with a combined cost function. We present an analysis of our approach as well as the results obtained from experiments on a real robot and from simulation. We show in our talk, that with our approach, it becomes possible to accurately control robots with unknown kinematic models of various complexity and joint types from little data obtained through self-observation.

Citation preview

Page 1: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

L K S-O N-NM

Lionel Ott, Hannes Schulz

University of Freiburg, ACS

November 2008

Page 2: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

4 R

Page 3: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

4 R

Page 4: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

C S K F

World-Space Configuration-Space

Page 5: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

C S K F

World-Space Configuration-Space

Page 6: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

C S K F

f−1(x, y) 7→ (q1, q2)

f (q1, q2) 7→ (x, y)

Inverse Kinematics

Forward Kinematics

World-Space Configuration-Space

Page 7: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

S E

Represent f/f−1 as closed mathematicalformula derived from robot model

Calibration:Determine parameters of f , f−1

BenefitsAnalytical solutionHigh accuracy

DrawbacksRequires a CAD model of the robotRequires a lot of a priori knowledgeabout the individual jointsEnvironment needs to be representedseparately

Page 8: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

RW

model-basedminimal data

model-freedata driven

Denavit-Hartenberg

Nearest-Neighbour Methods

Body Scheme Learning

Artificial Neural Networks

Page 9: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

4 R

Page 10: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

WM-F?

Robot with unknownkinematic structure

Old, bent robot

Robot with unknownactuator models

Unknown whichconfigurations lead to (self-)collisions

Page 11: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

D A

Zora

Page 12: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

D A

Zora

Page 13: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

D A

AR-Toolkit Markers

Zora

Page 14: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

D A

Zora

Page 15: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

D A

ZoraZoraSend Joint Pos

Observe 3D Pos

Page 16: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

N

q Joint-space coordinates (q1, q2, . . . , qn)

x World-space coordinates (x1, x2, x3)

S = (s1, s2, . . . sm)= (< q1, x1 >, . . . , < qm, xm >)visually observed samples

Page 17: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

Nearest Neighbour Method

Locally Weighted Regression Method

Planning

4 R

Page 18: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

Nearest Neighbour Method

Locally Weighted Regression Method

Planning

4 R

Page 19: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

N-NM

p(q, x)

Join

tPos

itio

n

World Position

World Query

x

F

s = arg mins∈S

∣∣∣∣∣∣xtarget − xs∣∣∣∣∣∣2

2

Achoose closest sample to thetarget in world-space

go to the selected position qs

Pindependent of number of joints

the more samples the better

Page 20: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

N-NM

p(q, x)

Join

tPos

itio

n

World Position

World Neighbours

x

F

s = arg mins∈S

∣∣∣∣∣∣xtarget − xs∣∣∣∣∣∣2

2

Achoose closest sample to thetarget in world-space

go to the selected position qs

Pindependent of number of joints

the more samples the better

Page 21: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

N-NM

p(q, x)

Join

tPos

itio

n

World Position

Nearest Neighbour

x

F

s = arg mins∈S

∣∣∣∣∣∣xtarget − xs∣∣∣∣∣∣2

2

Achoose closest sample to thetarget in world-space

go to the selected position qs

Pindependent of number of joints

the more samples the better

Page 22: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

N-NM

p(q, x)

Join

tPos

itio

n

World Position

q = arg maxq

p(q|x)

x

q

F

s = arg mins∈S

∣∣∣∣∣∣xtarget − xs∣∣∣∣∣∣2

2

Achoose closest sample to thetarget in world-space

go to the selected position qs

Pindependent of number of joints

the more samples the better

Page 23: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

N-NM

p(q, x)

Join

tPos

itio

n

World Position

q = arg maxq

p(q|x)

x

q

F

s = arg mins∈S

∣∣∣∣∣∣xtarget − xs∣∣∣∣∣∣2

2

Achoose closest sample to thetarget in world-space

go to the selected position qs

Pindependent of number of joints

the more samples the better

Page 24: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

Nearest Neighbour Method

Locally Weighted Regression Method

Planning

4 R

Page 25: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

LW RM

p(q, x)

Join

tPos

itio

n

World Position

Joint Neighbours

x

Nearest WorldNeighbour

Page 26: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

LW RM

p(q, x)

Join

tPos

itio

n

World Positionx

Page 27: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

LW RM

p(q, x)

Join

tPos

itio

n

World Positionx

q = arg maxq

p(q|x)

q

AAssume that small jointmovements move end-effector ona straight line

Page 28: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

LW RM

p(q, x)

Join

tPos

itio

n

World Positionx

Distance-Weighted

AAssume that small jointmovements move end-effector ona straight line

Page 29: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

LW RM

p(q, x)

Join

tPos

itio

n

World Positionx

q = arg maxq

p(q|x)

q

A L

w0 +w1x1 +w2x2 +w3x3 = f−1(x)

L-S S

w = arg min ||Xw − Q ||22⇒ w = (XT X)−1XT Q

⇒ w = (XT X)+XT Q

Use SVD for pseudo-inverse(XT X)+

Page 30: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

M J A

q = arg maxq1...qn

p(q1, . . . , qn |x)

= arg maxq1...qn

p(q1|x)p(q2|x, q1) · · · p(qn |x, q1, . . . , qn−1)

arg maxq1

p(q1|x)

arg maxq2

p(q2|x, q1)

. . .

arg maxqn

p(qn |x, q1, . . . , qn−1)

Page 31: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

Nearest Neighbour Method

Locally Weighted Regression Method

Planning

4 R

Page 32: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

E: P

So far,

We can move to arbitrary positions

No control over path to position

. Plan path between positions

. Need waypoints in between

C R PCAD model of the robot

CAD model of theenvironment

Sample virtualrepresentation

M-F R PGathered samples implicitlyrepresent environment androbot model

No further sampling needed

Page 33: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

E: P

So far,

We can move to arbitrary positions

No control over path to position

. Plan path between positions

. Need waypoints in between

C R PCAD model of the robot

CAD model of theenvironment

Sample virtualrepresentation

M-F R PGathered samples implicitlyrepresent environment androbot model

No further sampling needed

Page 34: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

M-F P P

Roadmap: Connect pairs of observed sampleswith world-distance < dmax

s0: NN of start point in config-space

sn: NN of end point in world space

Plan path via A∗, minimizing

n−1∑i=0

∣∣∣∣∣∣xi − xi+1∣∣∣∣∣∣

2 + β∣∣∣∣∣∣qi − qi+1

∣∣∣∣∣∣22

)

s0

sn

squared distance results in smallest possible steps

use world-space distance as heuristic

α = 1/dmax , β: normalize by maximum distance possible

Page 35: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

M-F P P

Roadmap: Connect pairs of observed sampleswith world-distance < dmax

s0: NN of start point in config-space

sn: NN of end point in world space

Plan path via A∗, minimizing

n−1∑i=0

∣∣∣∣∣∣xi − xi+1∣∣∣∣∣∣

2 + β∣∣∣∣∣∣qi − qi+1

∣∣∣∣∣∣22

)

s0

sn

squared distance results in smallest possible steps

use world-space distance as heuristic

α = 1/dmax , β: normalize by maximum distance possible

Page 36: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

O

1 I

2 M

3 M-F A

4 R

Page 37: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

CW V E

N N

0

50

100

150

200

0 200 400 600 800 1000 1200 1400 1600 1800 2000

Acc

ura

cy (

mm

)

Number of samples

Nearest Neighbour - Inverse Kinematics: Accuracy

6 DoF4 DoF2 DoF

NN: Independent of joint count when workspace volume constant

Page 38: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

CW V E

LW R

0

50

100

150

200

0 200 400 600 800 1000 1200 1400 1600 1800 2000

Acc

ura

cy (

mm

)

Number of samples

Linear Weighted Regression - Inverse Kinematics: Accuracy

6 DoF4 DoF2 DoF

LWR: Increased accuracy with more joints

Page 39: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

J T E

I J T

0

50

100

150

200

250

300

Acc

ura

cy (

mm

)

Method

Accuracy vs. Robot Complexity (500 Samples)

LWR (Model A)

LWR (Model B)

NN (Model A)

NN (Model B)

M A 5 rotational joints

M B 2 rotational and 3 prismaticjoints

Page 40: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

S Z

E D

0

20

40

60

80

100

120

140

160

180

0 500 1000 1500 2000 2500 3000 3500 4000

Acc

ura

cy (

mm

)

Sample (Sorted by Accuracy)

Comparison by Sample: Locally Weighted Regression vs. Nearest Neighbour

Locally Weighted Regression 3-DoFLocally Weighted Regression 4-DoFLocally Weighted Regression 6-DoF

Nearest Neighbour 3-DoFNearest Neighbour 4-DoFNearest Neighbour 6-DoF

Due to dimensionality and covered space, both methodsworsen with DoF

LWR always better than NN

Page 41: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

R-W R

A R R

0

50

100

150

200

250

Acc

ura

cy (

mm

)

Method

Real World Data: Locally Weighted Regression vs. Nearest Neighbour

Camera noise levelLocally Weighted Regression

Nearest Neighbour

57 mm accuracy with 250 samples,

Significantly better than Nearest Neighbour(paired-samples t-test, p < 0.0001, df = 1999)

Page 42: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

M-F P

Page 43: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

M-F P

Self-CollisionEnvironment

Roadmap avoids obstacles

Resulting path short in bothspaces

Page 44: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

Introduction Motivation Model-Free Approach Results

C

Model-free learning of kinematic function fromself-observation

Shown to work on (almost) arbitrary robots

Robust in presence of (real-world) noise

Motion planning in world and configuration space

Page 45: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

C NN LWR

0

50

100

150

200

250

300

0 200 400 600 800 1000 1200 1400 1600 1800 2000

Acc

ura

cy (

mm

)

Sample (Sorted by Accuracy)

Comparison by Sample: Locally Weighted Regression vs. Nearest Neighbour 3-DoF

Locally Weighted RegressionNearest Neighbour

Page 46: Learning Kinematics from direct Self-Observation using Nearest-Neighbour Methods

J N N E A

45

50

55

60

65

70

75

80

10 15 20 25 30 35

Acc

ura

cy (

mm

)

Number of Joint Neighbours

LWR: Changing Number of Joint Neighbours (6-DoF)

500 samples 750 samples

1000 samples1250 samples1500 samples