Incremental learning of motion primitives for full body motions - - PowerPoint PPT Presentation

incremental learning of motion primitives for full body
SMART_READER_LITE
LIVE PREVIEW

Incremental learning of motion primitives for full body motions - - PowerPoint PPT Presentation

Incremental learning of motion primitives for full body motions Dana Kuli c Department of Electrical and Computer Engineering, University of Waterloo, Canada Incremental learning of motion primitives for full body motions p. 1/43


slide-1
SLIDE 1

Incremental learning of motion primitives for full body motions

Dana Kuli´ c Department of Electrical and Computer Engineering, University of Waterloo, Canada

Incremental learning of motion primitives for full body motions – p. 1/43

slide-2
SLIDE 2

Learning from Observation for Humanoids

Learn to accomplish tasks by observing a human teacher, rather than programming or trajectory planning Take advantage of similar structure between human and robot Suitable for non-expert demonstrators

Incremental learning of motion primitives for full body motions – p. 2/43

slide-3
SLIDE 3

Related Work

[Calinon and Billard 2007] HOAP at EPFL [Ikeuchi et al. 2004] HRP-2 at AIST

Incremental learning of motion primitives for full body motions – p. 3/43

slide-4
SLIDE 4

Limitations of the current approaches

Motions are specified manually by the designer In learning systems, motions are segmented and clustered a-priori Off-line, one-shot training No further learning during the execution stage

Incremental learning of motion primitives for full body motions – p. 4/43

slide-5
SLIDE 5

Desired System

  • A robot that cohabits with humans, and learns incrementally over a

lifetime of observations

  • A robot that accumulates knowledge and improves performance over

time

  • Fully autonomous, on-line, continuous learning

System Requirements: Autonomous Motion Segmentation Autonomous, On-line Motion Clustering Autonomous Knowledge Management with fast Retrieval

Incremental learning of motion primitives for full body motions – p. 5/43

slide-6
SLIDE 6

Talk Outline

Robot Learning from Observation Representing full-body Motion On-line Segmentation On-line Clustering and Organization Combining Segmentation and Clustering Learning the sequencing of motion primitives Incremental Memory Consolidation Conclusions and Directions for Future Work

Incremental learning of motion primitives for full body motions – p. 6/43

slide-7
SLIDE 7

Learning from Observation - Mirror Neurons

The same neural structure is used for both recognition and generation [Rizzolatti et al. 2001]

Incremental learning of motion primitives for full body motions – p. 7/43

slide-8
SLIDE 8

Motion Representation by Hidden Markov Models [Inamura et al. 2004]

Stochastic model capturing both spatial and temporal variability Model training (learning) is implemented with the Baum-Welch Algorithm Once the model is trained, the same model can be used for both Recognition (Forward Procedure) Generation (either stochastic or deterministic) Factorial HMMs also used for representing motions with greater accuracy [Kuli´ c et al. IROS 2007]

Incremental learning of motion primitives for full body motions – p. 8/43

slide-9
SLIDE 9

On-line Segmentation

Want to segment with no a-priori knowledge of the motions Must make some assumption about the structure of the data Mean velocity falls below a certain value [Pomplun and Matari´ c, 2000] Zero velocity crossing in some dimensions [Fod et al., 2002] Minimize variance [Koenig and Matari´ c, 2006] Same motion will belong to same underlying distribution [Kohlmorgen and Lemm, 2001] [Janus and Nakamura, 2005]

Incremental learning of motion primitives for full body motions – p. 9/43

slide-10
SLIDE 10

Stochastic Segmentation [Kohlmorgen and Lemm, 2001]

Embed the data into a higher-dimensional space

  • xt = (

yt, yt−1, . . . ,

  • yt−(m−1)τ)

Estimate the density distribution over a sliding window of length W pt(x) = 1 W

W −1

  • w=0

1 (2πσ2)d/2 exp(−(x −

  • xt−w)2

2σ2 )

Incremental learning of motion primitives for full body motions – p. 10/43

slide-11
SLIDE 11

Computing the distance between states

Can compute the distance between windows based on integrated square error between two pdfs d(pt1, pt2) =

  • (pt1(x) − pt2(x))2dx

d(pt1(x), pt2(x)) = 1 W 2(4πσ2)d/2

W −1

  • w,v=0

[exp(−(

  • xt1−w −
  • xt1−v)2

4σ2 ) − 2exp(−(

  • xt1−w −
  • xt2−v)2

4σ2 ) + exp(−(

  • xt2−w −
  • xt2−v)2

4σ2 )

(1)

Incremental learning of motion primitives for full body motions – p. 11/43

slide-12
SLIDE 12

Defining a stochastic model over the data

Define an HMM over a set of sliding windows. Observation Function: p(pt(x)|s) = 1 √ 2πς exp(−d(ps(x), pt(x)) 2ς2 ) State Transition Model: aij =    k k + N − 1 if i = j; 1 k + N − 1 if i = j.

Incremental learning of motion primitives for full body motions – p. 12/43

slide-13
SLIDE 13

Segmentation via the Viterbi Algorithm

Find the optimum state sequence for the specified HMM, given the actual data sequence A simple example:

t

Incremental learning of motion primitives for full body motions – p. 13/43

slide-14
SLIDE 14

Segmentation via the Viterbi Algorithm

Find the optimum state sequence for the specified HMM, given the actual data sequence A simple example:

s1 s2 s3 s4 s5 s6

t

Incremental learning of motion primitives for full body motions – p. 14/43

slide-15
SLIDE 15

Segmentation via the Viterbi Algorithm

Find the optimum state sequence for the specified HMM, given the actual data sequence A simple example:

s1 s2 s3 s4 s5 s6 1 1 1 4 4 4

t

Optimum State Sequence (Viterbi)

Incremental learning of motion primitives for full body motions – p. 15/43

slide-16
SLIDE 16

Improving the Segmentation [Kuli´ c Nakamura IROS 2008]

Bias state transition model towards known states aij =        k C if i = j; 1 C if i = j and i ∈ St; Ks C if i = j and i ∈ Sp. Modify pdf based on active joints in the known state Dw(pt1(x), pt2(x)) = 1 L2(4πσ2

k)d/2 L−1

  • i,j=0

[exp(− W(

  • xt1−i −
  • xt1−j)2

4σ2

k

) − 2exp(− W(

  • xt1−i −
  • xt2−j)2

4σ2

k

) + exp(− W(

  • xt2−i −
  • xt2−j)2

4σ2

k

)

(2)

Incremental learning of motion primitives for full body motions – p. 16/43

slide-17
SLIDE 17

On-line clustering and hierarchy formation [Kuli´ c et al. ISRR 2007, IJRR 2008]

Use HMM representation to abstract motion patterns as they are perceived Cluster individual motion patterns incrementally, based on intra-model distances Use formed clusters to form group models Autonomously select appropriate model type, based on model distances in the considered region of the motion space

3 1 2 4 5 6 3 1 2 4 5 6 7 3 11 11 9 14 14 1 2 4 5 6 7 10 10 13 13 12 12 15 8 1 2 4 5 6 7 11 9 14 3 10 10 17 17 18 18 19 19 16 13 13 12 12 15 20 8

Incremental learning of motion primitives for full body motions – p. 17/43

slide-18
SLIDE 18

Algorithm Pseudo-Code

Following observation of each motion sequence:

Step1 Encode observation sequence Oi into an

HMM λi

Step2 Calculate the distance between λi and each

existing behavior group model λGj

Step3 Place λi into the closest group Gc Step4 Cluster all exemplars within Gc Step5 If a sub-group forms, form a new node Gn,

containing the exemplars of the cluster

Step6 Using the observation sequences from the

exemplars in Gn, form the new sub-group model λGn

Incremental learning of motion primitives for full body motions – p. 18/43

slide-19
SLIDE 19

Combining segmentation and Clustering [Kuli´ c et al. ICRA 2008]

θ

θ t

x y z

Incremental learning of motion primitives for full body motions – p. 19/43

slide-20
SLIDE 20

Experiments

θ

θ t

x y z

4 minutes of continuous whole body motion data of a single subject from motion capture data data is converted to a 20DoF humanoid model by online inverse kinematics First, test the basic segmentation algorithm, with no known states, and compare with manual segmentation

Incremental learning of motion primitives for full body motions – p. 20/43

slide-21
SLIDE 21

Testing the Segmentation

θ

θ t

x y z

Next, test the improvements obtained through adding known motions Provide manually extracted primitives as exemplars

Incremental learning of motion primitives for full body motions – p. 21/43

slide-22
SLIDE 22

Segmentation Results

70 72 74 76 78 80 82 84 RAR RAL SL SR Current Motion Segmentation Result (with known motions) Manual Segmentation Segmentation Result (no known motions) RKE RKR WLR WMID WRL LAR LAL Time [seconds]

Algorithm Correct False Pos False Neg Basic 128 65 43 Scaffolded (with Squat and Kick) 139 59 32 Worst performance occurs at switching points where few joints are moving Sample Video

Incremental learning of motion primitives for full body motions – p. 22/43

slide-23
SLIDE 23

Testing the Combined Segmentation and Clustering

θ

θ t

x y z

Present the complete 4min sequence and apply segmentation The leaf nodes of the resulting tree are used to scaffold the segmentation To facilitate analysis, 4min sequence is presented repeatedly (epochs), and new exemplars are added to the segmentation module at the end of each epoch

Incremental learning of motion primitives for full body motions – p. 23/43

slide-24
SLIDE 24

After Epoch 1

LAL/partial RAR SL WRS WLS WF Epoch = 0 Leaf Groups Formed

LAL / partial WF WRS WLS RAR SL

Example Extracted Motion: Right Arm Raise

Incremental learning of motion primitives for full body motions – p. 24/43

slide-25
SLIDE 25

After Epoch 2

LAL RAR SL KR WRS WLS WF Epoch = 1 Leaf Groups Formed

LAL WF WRS WLS RAR KR SL

Example Extracted Motion: Left Arm Lower

Incremental learning of motion primitives for full body motions – p. 25/43

slide-26
SLIDE 26

After Epoch 3

LAL RAR KR KE SR SL MISC WLS WRS WF RAL LAR Epoch = 2 Leaf Groups Formed

LAL RAL LAR WF WRS WLS RAR KR KE SR MISC SL

Example Extracted Motion: Kick Extend, Squat Raise

Incremental learning of motion primitives for full body motions – p. 26/43

slide-27
SLIDE 27

Motion Primitive Graph [Kuli´ c et al. Humanoids 2008]

1 2 1.00 0.20 3 0.50 4 0.30 0.50 0.50 5 1.00 1.00

At the same time as learning the motion primitives, learn the transition rules between primitives Each node in the motion primitive graph represents a motion primitive, while each edge represents an observed transition between two motion primitives Each time a new motion primitive is abstracted by the clustering algorithm as a leaf node, a corresponding node is added to the motion primitive graph. Each time a transition is observed between two known motions, the edge count is updated The motion primitive graph can then be used to generate valid sequences

Incremental learning of motion primitives for full body motions – p. 27/43

slide-28
SLIDE 28

Experiments with a Humanoid Robot

Collected 16 min of continuous whole body motion data (26 different motion types) of a single subject from motion capture data data is converted to a 32DoF humanoid model by online inverse kinematics

  • nline feed to automated segmentation,

clustering and motion graph extraction

Incremental learning of motion primitives for full body motions – p. 28/43

slide-29
SLIDE 29

Data Flow Diagram

θ

θ t

x y z Incremental learning of motion primitives for full body motions – p. 29/43

slide-30
SLIDE 30

Robot Hardware and Control System

Incremental learning of motion primitives for full body motions – p. 30/43

slide-31
SLIDE 31

The Extracted Motion Primitive Tree

LKR MMID MRL BAR BAD BAU RAR LAR LAL RAL BAL AR RKR LPR SQD MLR SQR Leaf Groups Formed

Incremental learning of motion primitives for full body motions – p. 31/43

slide-32
SLIDE 32

The Extracted Motion Primitive Graph

MRL(3) BAR(4) 0.25 RAR(6) 0.42 BAD(9) 0.08 LAR(10) 0.08 MLR(21) 0.17 BAL(15) 1.00 RAL(11) 1.00 BAU(17) 1.00 LAL(14) 1.00 MMD(13) 1.00 0.25 0.25 0.25 SQD(20) 0.25 0.14 0.27 0.14 0.14 0.05 0.27 RKR(8) 0.20 AR(16) 0.80 0.50 0.50 0.20 0.20 0.20 0.20 0.20 SQR(22) 1.00 1.00 0.25 0.25 0.25 0.25

Due to current hardware limitations of the robot, motions involving foot raising are manually removed from the graph

Incremental learning of motion primitives for full body motions – p. 32/43

slide-33
SLIDE 33

Robot Motion Generation

Video of Experiment

Incremental learning of motion primitives for full body motions – p. 33/43

slide-34
SLIDE 34

Summary on Automated Segmentation

Autonomous, on-line segmentation of full body motion data, by building an HMM over a window of previous observations, and finding the optimum state sequence [Kohlmorgen and Lemm] Input segments into automated incremental clustering algorithm for motion primitive extractions Improve segmentation results by scaffolding with known motion primitives obtained from the clustering As more motions become known, motion model and segmentation results become more accurate At the same time, learn the transition model of the motion primitives by constructing a motion primitive graph

Incremental learning of motion primitives for full body motions – p. 34/43

slide-35
SLIDE 35

Memory Consolidation

Want to re-examine the performance of the clustering algorithm What type of errors can occur during clustering, and how do these errors depend on the algorithm parameters? false negative errors tree structure errors Both errors occur due to the incremental nature of the algorithm, where not enough information is available at the start of the algorithm to identify the correct segmentation boundary

Incremental learning of motion primitives for full body motions – p. 35/43

slide-36
SLIDE 36

Memory Consolidation in Biological Systems

How is motor memory formed in biological systems? Following learning, the motor memory does not remain constant, but changes over time - memory consolidation [Stickgold, 2005] [Krakauer and Shadmehr, 2006] [Shadmehr and Holcomb, 1997] [Diekelmann and Born, 2007] Two Complementary Consolidation Processes: Stabilization Stage (the waking stage) Sleep-dependant Stage (occurs during sleep) During the sleep-dependent stage, brain imaging studies show that brain regions active during memory formation are repeatedly reactivated - rehearsal [Ogata, 2005] During the sleep-dependent stage, evidence of system-level reorganization of memory

Incremental learning of motion primitives for full body motions – p. 36/43

slide-37
SLIDE 37

Using Memory Consolidation for Motion Learning [Kuli´ c Nakamura EpiRob 2008]

In previous work, focused on getting high accuracy at the leaf nodes by using adaptable models [Kuli´ c et al., 2007] However, this may not always be the best approach Results in flat tree structure Delays node formation Alternate approach: form nodes quickly (with lower Kcutoff), and correct any errors later using memory consolidation Repeatedly apply clustering procedure on the same data at a later time - rehearsal As more data become available, initial mistakes can be corrected in an incremental, on-line fashion, analogous to memory consolidation in biological systems Two levels of consolidation: individual motion level, node level

Incremental learning of motion primitives for full body motions – p. 37/43

slide-38
SLIDE 38

Experiments

Tested on a motion database of 137 motions (9 types: KIck, PUnch, THrow, WAalk, Sumo Leg raise, CHeer, SQuat, BOw and DAnce) Data obtained from motion capture studio, converted to 20DoF humanoid model Motions are pre-segmented and presented in random order Tested with no consolidation and with consolidation Consolidation was executed after each 10 exemplars

Incremental learning of motion primitives for full body motions – p. 38/43

slide-39
SLIDE 39

Results: False Negative Errors, Comparison

Walk Cheer Dance Kick Punch Sumo Squat Throw Bow −0.4 −0.2 0.2 0.4 0.6 0.8 1 1.2 Motion Types False Neg Error Rate No Consol, K = 1.2 No Consol, K = 0.9 With Consol, K = 0.9

Incremental learning of motion primitives for full body motions – p. 39/43

slide-40
SLIDE 40

Results: Tree Structure Errors

WA CH SL KI PU TH BO SQ DA RunId = 87 Leaf Groups Formed

Kcutoff Consolidation Mean Error Mean Depth 1.2 No 2.11 2.08 0.9 No 1.96 2.94 0.9 Yes 1.21 3.81

Incremental learning of motion primitives for full body motions – p. 40/43

slide-41
SLIDE 41

Summary

  • 1. Motion primitives are autonomously segmented by building an

HMM over a window of previous observations, and finding the

  • ptimum state sequence over the model
  • 2. Segmented motions are incrementally clustered and organized

into a hierarchical tree structure, with the leaf nodes representing the most detailed representation

  • 3. At the same time, learn the transition model of the motion

primitives by constructing a motion primitive graph

  • 4. The algorithm is able to autonomously extract motion primitives

from a continuous data stream, and is robust to segmentation and real-time measurement errors

  • 5. Generated motion graph can then be used to generate extended

motion sequences composed of motion primitives

  • 6. Errors made by the incremental clustering algorithm due to lack of

Incremental learning of motion primitives for full body motions – p. 41/43

slide-42
SLIDE 42

Current and Future Work

Getting away from motion capture and using simpler sensors [Kuli´ c et al. ICRA 2009] Examining system performance for higher accuracy kinematic models [Kuli´ c Nakamura IROS 2009] Including additional learning modalities: learning from practice and interaction with the teacher [Kuli´ c et al. RO-MAN 2009] Applications for rehabilitation and sports training [Kuli´ c et al. EMBC 2009] Incorporating interaction with the environment Selecting the correct task representation Planning with motion primitives Learning complex behaviors from the motion primitives

Incremental learning of motion primitives for full body motions – p. 42/43

slide-43
SLIDE 43

The End

Questions? Additional Questions or Comments? Email: dkulic@ece.uwaterloo.ca Copies of publications can be obtained from: http://ece.uwaterloo.ca/∼dkulic

Incremental learning of motion primitives for full body motions – p. 43/43