Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
pbdlib-matlab
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
rli
pbdlib-matlab
Commits
8d6dbeee
Commit
8d6dbeee
authored
Dec 28, 2019
by
Sylvain CALINON
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PbDlib v1.0
parent
bd713a21
Changes
379
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
379 changed files
with
37333 additions
and
7166 deletions
+37333
-7166
README.md
README.md
+323
-183
demos/benchmarks/benchmark_DS_GP_GMM01.m
demos/benchmarks/benchmark_DS_GP_GMM01.m
+15
-24
demos/benchmarks/benchmark_DS_GP_raw01.m
demos/benchmarks/benchmark_DS_GP_raw01.m
+12
-20
demos/benchmarks/benchmark_DS_PGMM01.m
demos/benchmarks/benchmark_DS_PGMM01.m
+22
-30
demos/benchmarks/benchmark_DS_TP_GMM01.m
demos/benchmarks/benchmark_DS_TP_GMM01.m
+13
-20
demos/benchmarks/benchmark_DS_TP_GP01.m
demos/benchmarks/benchmark_DS_TP_GP01.m
+17
-25
demos/benchmarks/benchmark_DS_TP_LWR01.m
demos/benchmarks/benchmark_DS_TP_LWR01.m
+16
-24
demos/benchmarks/benchmark_DS_TP_MFA01.m
demos/benchmarks/benchmark_DS_TP_MFA01.m
+54
-33
demos/benchmarks/benchmark_DS_TP_trajGMM01.m
demos/benchmarks/benchmark_DS_TP_trajGMM01.m
+16
-24
demos/data/DataLS01.mat
demos/data/DataLS01.mat
+0
-0
demos/demo_AR01.m
demos/demo_AR01.m
+117
-0
demos/demo_AR_HSMM01.m
demos/demo_AR_HSMM01.m
+302
-0
demos/demo_Bezier01.m
demos/demo_Bezier01.m
+68
-0
demos/demo_Bezier02.m
demos/demo_Bezier02.m
+85
-0
demos/demo_Bezier_illustr01.m
demos/demo_Bezier_illustr01.m
+81
-0
demos/demo_Bezier_illustr02.m
demos/demo_Bezier_illustr02.m
+166
-0
demos/demo_DMP01.m
demos/demo_DMP01.m
+27
-31
demos/demo_DMP02.m
demos/demo_DMP02.m
+110
-38
demos/demo_DMP_GMR01.m
demos/demo_DMP_GMR01.m
+12
-17
demos/demo_DMP_GMR02.m
demos/demo_DMP_GMR02.m
+12
-17
demos/demo_DMP_GMR03.m
demos/demo_DMP_GMR03.m
+13
-18
demos/demo_DMP_GMR04.m
demos/demo_DMP_GMR04.m
+14
-19
demos/demo_DMP_GMR_LQR01.m
demos/demo_DMP_GMR_LQR01.m
+11
-16
demos/demo_DMP_GMR_LQR02.m
demos/demo_DMP_GMR_LQR02.m
+0
-213
demos/demo_DMP_GMR_illustr01.m
demos/demo_DMP_GMR_illustr01.m
+187
-0
demos/demo_DMP_batchLQR01.m
demos/demo_DMP_batchLQR01.m
+183
-0
demos/demo_DPmeans_online01.m
demos/demo_DPmeans_online01.m
+5
-8
demos/demo_DPmeans_online02.m
demos/demo_DPmeans_online02.m
+69
-0
demos/demo_DTW01.m
demos/demo_DTW01.m
+25
-23
demos/demo_GMM01.m
demos/demo_GMM01.m
+7
-10
demos/demo_GMM02.m
demos/demo_GMM02.m
+15
-13
demos/demo_GMM_EM01.m
demos/demo_GMM_EM01.m
+153
-0
demos/demo_GMM_HDDC01.m
demos/demo_GMM_HDDC01.m
+4
-8
demos/demo_GMM_MFA01.m
demos/demo_GMM_MFA01.m
+5
-7
demos/demo_GMM_MPPCA01.m
demos/demo_GMM_MPPCA01.m
+7
-11
demos/demo_GMM_augmSigma01.m
demos/demo_GMM_augmSigma01.m
+116
-0
demos/demo_GMM_logGMM01.m
demos/demo_GMM_logGMM01.m
+107
-0
demos/demo_GMM_logNormal01.m
demos/demo_GMM_logNormal01.m
+137
-0
demos/demo_GMM_profileGMM01.m
demos/demo_GMM_profileGMM01.m
+117
-0
demos/demo_GMM_profileGMM_multivariate01.m
demos/demo_GMM_profileGMM_multivariate01.m
+91
-0
demos/demo_GMM_profileLogGMM01.m
demos/demo_GMM_profileLogGMM01.m
+122
-0
demos/demo_GMM_profileLogGMM_multivariate01.m
demos/demo_GMM_profileLogGMM_multivariate01.m
+105
-0
demos/demo_GMM_semiTied01.m
demos/demo_GMM_semiTied01.m
+7
-12
demos/demo_GMR01.m
demos/demo_GMR01.m
+37
-27
demos/demo_GMR02.m
demos/demo_GMR02.m
+11
-17
demos/demo_GMR03.m
demos/demo_GMR03.m
+9
-18
demos/demo_GMR_3Dviz01.m
demos/demo_GMR_3Dviz01.m
+18
-22
demos/demo_GMR_DS01.m
demos/demo_GMR_DS01.m
+13
-18
demos/demo_GMR_SEDS01.m
demos/demo_GMR_SEDS01.m
+62
-24
demos/demo_GMR_SEDS_augmSigma01.m
demos/demo_GMR_SEDS_augmSigma01.m
+197
-0
demos/demo_GMR_SEDS_discrete01.m
demos/demo_GMR_SEDS_discrete01.m
+53
-18
demos/demo_GMR_SEDS_discrete_augmSigma01.m
demos/demo_GMR_SEDS_discrete_augmSigma01.m
+190
-0
demos/demo_GMR_augmSigma01.m
demos/demo_GMR_augmSigma01.m
+222
-0
demos/demo_GMR_polyFit01.m
demos/demo_GMR_polyFit01.m
+156
-50
demos/demo_GMR_polyFit02.m
demos/demo_GMR_polyFit02.m
+0
-157
demos/demo_GMR_probTraj01.m
demos/demo_GMR_probTraj01.m
+226
-0
demos/demo_GMR_wrapped01.m
demos/demo_GMR_wrapped01.m
+165
-0
demos/demo_GPR01.m
demos/demo_GPR01.m
+25
-36
demos/demo_GPR02.m
demos/demo_GPR02.m
+100
-62
demos/demo_GPR03.m
demos/demo_GPR03.m
+36
-38
demos/demo_GPR04.m
demos/demo_GPR04.m
+151
-0
demos/demo_GPR05.m
demos/demo_GPR05.m
+120
-0
demos/demo_GPR_GMR_illustr01.m
demos/demo_GPR_GMR_illustr01.m
+193
-0
demos/demo_GPR_TP01.m
demos/demo_GPR_TP01.m
+4
-10
demos/demo_GPR_anim01.m
demos/demo_GPR_anim01.m
+173
-0
demos/demo_GPR_closedShape01.m
demos/demo_GPR_closedShape01.m
+185
-0
demos/demo_GPR_closedShape02.m
demos/demo_GPR_closedShape02.m
+165
-0
demos/demo_GPR_linTrend01.m
demos/demo_GPR_linTrend01.m
+131
-0
demos/demo_GPR_paramOptim01.m
demos/demo_GPR_paramOptim01.m
+182
-0
demos/demo_GPR_recursive01.m
demos/demo_GPR_recursive01.m
+105
-0
demos/demo_GaussProd4nullspace_2D01.m
demos/demo_GaussProd4nullspace_2D01.m
+123
-0
demos/demo_GaussProd4nullspace_3D01.m
demos/demo_GaussProd4nullspace_3D01.m
+128
-0
demos/demo_GaussProd_interp_illustr01.m
demos/demo_GaussProd_interp_illustr01.m
+171
-0
demos/demo_Gaussian01.m
demos/demo_Gaussian01.m
+4
-8
demos/demo_Gaussian02.m
demos/demo_Gaussian02.m
+4
-8
demos/demo_Gaussian03.m
demos/demo_Gaussian03.m
+47
-20
demos/demo_Gaussian04.m
demos/demo_Gaussian04.m
+121
-0
demos/demo_Gaussian05.m
demos/demo_Gaussian05.m
+80
-0
demos/demo_Gaussian06.m
demos/demo_Gaussian06.m
+65
-0
demos/demo_Gaussian_illustr01.m
demos/demo_Gaussian_illustr01.m
+173
-0
demos/demo_HMM01.m
demos/demo_HMM01.m
+49
-44
demos/demo_HMM02.m
demos/demo_HMM02.m
+168
-0
demos/demo_HMM_Viterbi01.m
demos/demo_HMM_Viterbi01.m
+144
-21
demos/demo_HSMM01.m
demos/demo_HSMM01.m
+43
-29
demos/demo_HSMM02.m
demos/demo_HSMM02.m
+306
-0
demos/demo_HSMM_MPC01.m
demos/demo_HSMM_MPC01.m
+317
-0
demos/demo_HSMM_adaptiveDuration01.m
demos/demo_HSMM_adaptiveDuration01.m
+358
-0
demos/demo_HSMM_adaptiveDuration_infHor01.m
demos/demo_HSMM_adaptiveDuration_infHor01.m
+350
-0
demos/demo_HSMM_online01.m
demos/demo_HSMM_online01.m
+134
-0
demos/demo_ID01.m
demos/demo_ID01.m
+116
-0
demos/demo_IK01.m
demos/demo_IK01.m
+111
-0
demos/demo_IK02.m
demos/demo_IK02.m
+121
-0
demos/demo_IK_nullspaceAsProduct01.m
demos/demo_IK_nullspaceAsProduct01.m
+125
-0
demos/demo_IK_nullspace_TPGMM01.m
demos/demo_IK_nullspace_TPGMM01.m
+46
-28
demos/demo_IK_pointing_TPGMM01.m
demos/demo_IK_pointing_TPGMM01.m
+8
-6
demos/demo_IK_quat01.m
demos/demo_IK_quat01.m
+82
-0
demos/demo_IK_quat02.m
demos/demo_IK_quat02.m
+113
-0
demos/demo_IK_weighted01.m
demos/demo_IK_weighted01.m
+125
-0
demos/demo_ILC01.m
demos/demo_ILC01.m
+175
-0
demos/demo_IPRA01.m
demos/demo_IPRA01.m
+78
-0
demos/demo_LS01.m
demos/demo_LS01.m
+119
-0
demos/demo_LS_IRLS01.m
demos/demo_LS_IRLS01.m
+163
-0
demos/demo_LS_IRLS_logisticRegression01.m
demos/demo_LS_IRLS_logisticRegression01.m
+71
-0
demos/demo_LS_IRLS_logisticRegression02.m
demos/demo_LS_IRLS_logisticRegression02.m
+76
-0
demos/demo_LS_polFit01.m
demos/demo_LS_polFit01.m
+94
-0
demos/demo_LS_recursive01.m
demos/demo_LS_recursive01.m
+95
-0
demos/demo_LS_recursive02.m
demos/demo_LS_recursive02.m
+115
-0
demos/demo_LS_weighted01.m
demos/demo_LS_weighted01.m
+96
-0
demos/demo_LWR01.m
demos/demo_LWR01.m
+64
-116
demos/demo_MPC01.m
demos/demo_MPC01.m
+111
-0
demos/demo_MPC02.m
demos/demo_MPC02.m
+466
-0
demos/demo_MPC03.m
demos/demo_MPC03.m
+60
-43
demos/demo_MPC04.m
demos/demo_MPC04.m
+214
-0
demos/demo_MPC_Lagrangian01.m
demos/demo_MPC_Lagrangian01.m
+150
-0
demos/demo_MPC_MP01.m
demos/demo_MPC_MP01.m
+185
-0
demos/demo_MPC_MP02.m
demos/demo_MPC_MP02.m
+195
-0
demos/demo_MPC_augmSigma01.m
demos/demo_MPC_augmSigma01.m
+37
-43
demos/demo_MPC_constrained01.m
demos/demo_MPC_constrained01.m
+200
-0
demos/demo_MPC_fullQ01.m
demos/demo_MPC_fullQ01.m
+228
-0
demos/demo_MPC_fullQ02.m
demos/demo_MPC_fullQ02.m
+248
-0
demos/demo_MPC_fullQ03.m
demos/demo_MPC_fullQ03.m
+167
-0
demos/demo_MPC_infHor01.m
demos/demo_MPC_infHor01.m
+145
-0
demos/demo_MPC_infHor02.m
demos/demo_MPC_infHor02.m
+131
-0
demos/demo_MPC_infHor03.m
demos/demo_MPC_infHor03.m
+83
-46
demos/demo_MPC_infHor04.m
demos/demo_MPC_infHor04.m
+87
-39
demos/demo_MPC_infHor_bicopter01.m
demos/demo_MPC_infHor_bicopter01.m
+310
-0
demos/demo_MPC_infHor_incremental01.m
demos/demo_MPC_infHor_incremental01.m
+183
-0
demos/demo_MPC_infHor_incremental02.m
demos/demo_MPC_infHor_incremental02.m
+166
-0
demos/demo_MPC_iterativeLQR01.m
demos/demo_MPC_iterativeLQR01.m
+199
-0
demos/demo_MPC_iterativeLQR02.m
demos/demo_MPC_iterativeLQR02.m
+93
-51
demos/demo_MPC_iterativeLQR03.m
demos/demo_MPC_iterativeLQR03.m
+32
-40
demos/demo_MPC_iterativeLQR04.m
demos/demo_MPC_iterativeLQR04.m
+123
-0
demos/demo_MPC_iterativeLQR_augmSigma01.m
demos/demo_MPC_iterativeLQR_augmSigma01.m
+37
-44
demos/demo_MPC_iterativeLQR_augmSigma_online01.m
demos/demo_MPC_iterativeLQR_augmSigma_online01.m
+33
-40
demos/demo_MPC_noInitialState01.m
demos/demo_MPC_noInitialState01.m
+114
-0
demos/demo_MPC_nullspace01.m
demos/demo_MPC_nullspace01.m
+151
-0
demos/demo_MPC_nullspace_online01.m
demos/demo_MPC_nullspace_online01.m
+164
-0
demos/demo_MPC_online01.m
demos/demo_MPC_online01.m
+129
-0
demos/demo_MPC_online02.m
demos/demo_MPC_online02.m
+290
-0
demos/demo_MPC_online03.m
demos/demo_MPC_online03.m
+240
-0
demos/demo_MPC_robot01.m
demos/demo_MPC_robot01.m
+165
-0
demos/demo_MPC_skillsRepr01.m
demos/demo_MPC_skillsRepr01.m
+272
-0
demos/demo_MPC_viapoints01.m
demos/demo_MPC_viapoints01.m
+500
-0
demos/demo_MPC_viapoints02.m
demos/demo_MPC_viapoints02.m
+63
-26
demos/demo_MPC_viapoints03.m
demos/demo_MPC_viapoints03.m
+158
-0
demos/demo_MPC_viapoints_withProd01.m
demos/demo_MPC_viapoints_withProd01.m
+208
-0
demos/demo_PCA01.m
demos/demo_PCA01.m
+80
-0
demos/demo_Procrustes01.m
demos/demo_Procrustes01.m
+76
-0
demos/demo_Riemannian_Gdp_vecTransp01.m
demos/demo_Riemannian_Gdp_vecTransp01.m
+205
-0
demos/demo_Riemannian_Hd_GMM01.m
demos/demo_Riemannian_Hd_GMM01.m
+238
-0
demos/demo_Riemannian_Hd_interp01.m
demos/demo_Riemannian_Hd_interp01.m
+261
-0
demos/demo_Riemannian_S1_interp01.m
demos/demo_Riemannian_S1_interp01.m
+77
-0
demos/demo_Riemannian_S1_interp02.m
demos/demo_Riemannian_S1_interp02.m
+83
-0
demos/demo_Riemannian_S2_GMM01.m
demos/demo_Riemannian_S2_GMM01.m
+82
-43
demos/demo_Riemannian_S2_GMR01.m
demos/demo_Riemannian_S2_GMR01.m
+92
-59
demos/demo_Riemannian_S2_GMR02.m
demos/demo_Riemannian_S2_GMR02.m
+340
-0
demos/demo_Riemannian_S2_GMR03.m
demos/demo_Riemannian_S2_GMR03.m
+52
-56
demos/demo_Riemannian_S2_GMR04.m
demos/demo_Riemannian_S2_GMR04.m
+39
-44
demos/demo_Riemannian_S2_GaussProd01.m
demos/demo_Riemannian_S2_GaussProd01.m
+53
-60
demos/demo_Riemannian_S2_TPGMM01.m
demos/demo_Riemannian_S2_TPGMM01.m
+143
-48
demos/demo_Riemannian_S2_TPGMM02.m
demos/demo_Riemannian_S2_TPGMM02.m
+113
-75
demos/demo_Riemannian_S2_batchLQR01.m
demos/demo_Riemannian_S2_batchLQR01.m
+362
-0
demos/demo_Riemannian_S2_batchLQR02.m
demos/demo_Riemannian_S2_batchLQR02.m
+279
-0
demos/demo_Riemannian_S2_batchLQR03.m
demos/demo_Riemannian_S2_batchLQR03.m
+273
-0
demos/demo_Riemannian_S2_batchLQR_Bezier01.m
demos/demo_Riemannian_S2_batchLQR_Bezier01.m
+207
-0
demos/demo_Riemannian_S2_infHorLQR01.m
demos/demo_Riemannian_S2_infHorLQR01.m
+198
-0
demos/demo_Riemannian_S2_vecTransp01.m
demos/demo_Riemannian_S2_vecTransp01.m
+25
-23
demos/demo_Riemannian_S3_GMM01.m
demos/demo_Riemannian_S3_GMM01.m
+17
-24
demos/demo_Riemannian_S3_GMR01.m
demos/demo_Riemannian_S3_GMR01.m
+53
-36
demos/demo_Riemannian_S3_GMR02.m
demos/demo_Riemannian_S3_GMR02.m
+45
-35
demos/demo_Riemannian_S3_infHorLQR01.m
demos/demo_Riemannian_S3_infHorLQR01.m
+253
-0
demos/demo_Riemannian_S3_interp01.m
demos/demo_Riemannian_S3_interp01.m
+166
-0
demos/demo_Riemannian_S3_vecTransp01.m
demos/demo_Riemannian_S3_vecTransp01.m
+11
-21
demos/demo_Riemannian_SE2_GMM01.m
demos/demo_Riemannian_SE2_GMM01.m
+149
-0
demos/demo_Riemannian_SE2_interp01.m
demos/demo_Riemannian_SE2_interp01.m
+132
-0
demos/demo_Riemannian_SOd_interp01.m
demos/demo_Riemannian_SOd_interp01.m
+110
-0
demos/demo_Riemannian_SPD_GMM01.m
demos/demo_Riemannian_SPD_GMM01.m
+341
-0
demos/demo_Riemannian_SPD_GMM_tensor01.m
demos/demo_Riemannian_SPD_GMM_tensor01.m
+40
-95
demos/demo_Riemannian_SPD_GMR01.m
demos/demo_Riemannian_SPD_GMR01.m
+398
-0
demos/demo_Riemannian_SPD_GMR02.m
demos/demo_Riemannian_SPD_GMR02.m
+11
-13
demos/demo_Riemannian_SPD_GMR03.m
demos/demo_Riemannian_SPD_GMR03.m
+370
-0
demos/demo_Riemannian_SPD_GMR_tensor01.m
demos/demo_Riemannian_SPD_GMR_tensor01.m
+17
-17
demos/demo_Riemannian_SPD_interp01.m
demos/demo_Riemannian_SPD_interp01.m
+226
-0
demos/demo_Riemannian_SPD_interp02.m
demos/demo_Riemannian_SPD_interp02.m
+233
-0
demos/demo_Riemannian_SPD_interp03.m
demos/demo_Riemannian_SPD_interp03.m
+33
-21
demos/demo_Riemannian_SPD_vecTransp01.m
demos/demo_Riemannian_SPD_vecTransp01.m
+17
-15
demos/demo_Riemannian_SPD_vecTransp02.m
demos/demo_Riemannian_SPD_vecTransp02.m
+217
-0
demos/demo_Riemannian_Sd_GMM01.m
demos/demo_Riemannian_Sd_GMM01.m
+145
-0
demos/demo_Riemannian_Sd_GMM02.m
demos/demo_Riemannian_Sd_GMM02.m
+165
-0
demos/demo_Riemannian_Sd_GMR01.m
demos/demo_Riemannian_Sd_GMR01.m
+204
-0
demos/demo_Riemannian_Sd_GMR02.m
demos/demo_Riemannian_Sd_GMR02.m
+223
-0
demos/demo_Riemannian_Sd_GaussProd01.m
demos/demo_Riemannian_Sd_GaussProd01.m
+187
-0
demos/demo_Riemannian_Sd_MPC01.m
demos/demo_Riemannian_Sd_MPC01.m
+371
-0
demos/demo_Riemannian_Sd_MPC_infHor01.m
demos/demo_Riemannian_Sd_MPC_infHor01.m
+200
-0
demos/demo_Riemannian_Sd_interp01.m
demos/demo_Riemannian_Sd_interp01.m
+162
-0
demos/demo_Riemannian_Sd_interp02.m
demos/demo_Riemannian_Sd_interp02.m
+136
-0
demos/demo_Riemannian_Sd_vecTransp01.m
demos/demo_Riemannian_Sd_vecTransp01.m
+176
-0
demos/demo_Riemannian_Sd_vecTransp02.m
demos/demo_Riemannian_Sd_vecTransp02.m
+195
-0
demos/demo_Riemannian_cov_search01.m
demos/demo_Riemannian_cov_search01.m
+0
-247
demos/demo_Riemannian_pose_GMM01.m
demos/demo_Riemannian_pose_GMM01.m
+202
-0
demos/demo_TPGMM01.m
demos/demo_TPGMM01.m
+16
-22
demos/demo_TPGMM_bimanualReaching01.m
demos/demo_TPGMM_bimanualReaching01.m
+169
-0
demos/demo_TPGMM_teleoperation01.m
demos/demo_TPGMM_teleoperation01.m
+357
-0
demos/demo_TPGMR01.m
demos/demo_TPGMR01.m
+40
-12
demos/demo_TPGMR_DS01.m
demos/demo_TPGMR_DS01.m
+0
-220
demos/demo_TPGMR_LQR01.m
demos/demo_TPGMR_LQR01.m
+0
-208
demos/demo_TPGMR_LQR02.m
demos/demo_TPGMR_LQR02.m
+0
-208
demos/demo_TPGP01.m
demos/demo_TPGP01.m
+6
-12
demos/demo_TPHDDC01.m
demos/demo_TPHDDC01.m
+0
-115
demos/demo_TPMFA01.m
demos/demo_TPMFA01.m
+0
-115
demos/demo_TPMPC01.m
demos/demo_TPMPC01.m
+218
-115
demos/demo_TPMPC02.m
demos/demo_TPMPC02.m
+0
-254
demos/demo_TPMPPCA01.m
demos/demo_TPMPPCA01.m
+0
-115
demos/demo_TPbatchLQR01.m
demos/demo_TPbatchLQR01.m
+0
-426
demos/demo_TPproMP01.m
demos/demo_TPproMP01.m
+111
-21
demos/demo_TPtrajDistrib01.m
demos/demo_TPtrajDistrib01.m
+36
-10
demos/demo_TPtrajGMM01.m
demos/demo_TPtrajGMM01.m
+9
-14
demos/demo_affineTransform01.m
demos/demo_affineTransform01.m
+2
-6
demos/demo_covariance01.m
demos/demo_covariance01.m
+62
-0
demos/demo_ergodicControl_1D01.m
demos/demo_ergodicControl_1D01.m
+123
-0
demos/demo_ergodicControl_2D01.m
demos/demo_ergodicControl_2D01.m
+140
-0
demos/demo_ergodicControl_3D01.m
demos/demo_ergodicControl_3D01.m
+126
-0
demos/demo_ergodicControl_nD01.m
demos/demo_ergodicControl_nD01.m
+164
-0
demos/demo_grabData01.m
demos/demo_grabData01.m
+18
-22
demos/demo_gradientDescent01.m
demos/demo_gradientDescent01.m
+138
-0
demos/demo_gradientDescent02.m
demos/demo_gradientDescent02.m
+130
-0
demos/demo_gradientDescent03.m
demos/demo_gradientDescent03.m
+111
-0
demos/demo_gradientDescent04.m
demos/demo_gradientDescent04.m
+153
-0
demos/demo_kernelPCA01.m
demos/demo_kernelPCA01.m
+102
-0
demos/demo_manipulabilityTracking_mainTask01.m
demos/demo_manipulabilityTracking_mainTask01.m
+99
-109
demos/demo_manipulabilityTracking_mainTask02.m
demos/demo_manipulabilityTracking_mainTask02.m
+206
-221
demos/demo_manipulabilityTracking_secondaryTask01.m
demos/demo_manipulabilityTracking_secondaryTask01.m
+168
-176
demos/demo_manipulabilityTransfer01.m
demos/demo_manipulabilityTransfer01.m
+94
-73
demos/demo_manipulabilityTransfer02.m
demos/demo_manipulabilityTransfer02.m
+532
-514
demos/demo_manipulabilityTransfer03.m
demos/demo_manipulabilityTransfer03.m
+809
-0
demos/demo_proMP01.m
demos/demo_proMP01.m
+170
-0
demos/demo_proMP_Fourier01.m
demos/demo_proMP_Fourier01.m
+164
-0
demos/demo_proMP_Fourier02.m
demos/demo_proMP_Fourier02.m
+181
-0
demos/demo_proMP_Fourier_sampling01.m
demos/demo_proMP_Fourier_sampling01.m
+165
-0
demos/demo_proMP_Fourier_sampling02.m
demos/demo_proMP_Fourier_sampling02.m
+180
-0
demos/demo_regularization01.m
demos/demo_regularization01.m
+8
-21
demos/demo_regularization02.m
demos/demo_regularization02.m
+8
-21
demos/demo_search01.m
demos/demo_search01.m
+148
-0
demos/demo_spring01.m
demos/demo_spring01.m
+103
-0
demos/demo_stdPGMM01.m
demos/demo_stdPGMM01.m
+15
-23
demos/demo_testLQR02.m
demos/demo_testLQR02.m
+0
-110
demos/demo_testLQR03.m
demos/demo_testLQR03.m
+0
-134
demos/demo_testLQR04.m
demos/demo_testLQR04.m
+0
-122
demos/demo_trajDistrib01.m
demos/demo_trajDistrib01.m
+25
-22
demos/demo_trajDistrib_differencingMatrix01.m
demos/demo_trajDistrib_differencingMatrix01.m
+88
-0
demos/demo_trajGMM01.m
demos/demo_trajGMM01.m
+90
-233
demos/demo_trajGMM02.m
demos/demo_trajGMM02.m
+230
-0
demos/demo_trajHSMM01.m
demos/demo_trajHSMM01.m
+26
-27
demos/demo_trajHSMM_adaptiveDuration01.m
demos/demo_trajHSMM_adaptiveDuration01.m
+386
-0
demos/demo_trajHSMM_adaptiveDuration_online01.m
demos/demo_trajHSMM_adaptiveDuration_online01.m
+345
-0
demos/demo_trajMFA01.m
demos/demo_trajMFA01.m
+0
-147
demos/graphs/demo_GMM01.png
demos/graphs/demo_GMM01.png
+0
-0
demos/m_fcts/DTW.m
demos/m_fcts/DTW.m
+7
-2
demos/m_fcts/EM_HDGMM.m
demos/m_fcts/EM_HDGMM.m
+7
-2
demos/m_fcts/EM_HMM.m
demos/m_fcts/EM_HMM.m
+1
-0
demos/m_fcts/EM_MFA.m
demos/m_fcts/EM_MFA.m
+53
-29
demos/m_fcts/EM_MPPCA.m
demos/m_fcts/EM_MPPCA.m
+15
-10
demos/m_fcts/EM_QGMM.m
demos/m_fcts/EM_QGMM.m
+95
-0
demos/m_fcts/EM_TPGMM.m
demos/m_fcts/EM_TPGMM.m
+7
-2
demos/m_fcts/EM_WGMM.m
demos/m_fcts/EM_WGMM.m
+58
-0
demos/m_fcts/EM_blockGMM.m
demos/m_fcts/EM_blockGMM.m
+80
-0
demos/m_fcts/EM_blockGMM2.m
demos/m_fcts/EM_blockGMM2.m
+104
-0
demos/m_fcts/EM_blockGMM_augmSigma.m
demos/m_fcts/EM_blockGMM_augmSigma.m
+82
-0
demos/m_fcts/EM_blockMFA.m
demos/m_fcts/EM_blockMFA.m
+92
-0
demos/m_fcts/EM_logGMM.m
demos/m_fcts/EM_logGMM.m
+54
-0
demos/m_fcts/EM_logGMM_3param.m
demos/m_fcts/EM_logGMM_3param.m
+82
-0
demos/m_fcts/EM_semitiedGMM.m
demos/m_fcts/EM_semitiedGMM.m
+6
-10
demos/m_fcts/EM_stdPGMM.m
demos/m_fcts/EM_stdPGMM.m
+7
-2
demos/m_fcts/EM_tensorGMM.m
demos/m_fcts/EM_tensorGMM.m
+36
-16
demos/m_fcts/EM_tensorHDGMM.m
demos/m_fcts/EM_tensorHDGMM.m
+7
-2
demos/m_fcts/EM_tensorHMM.m
demos/m_fcts/EM_tensorHMM.m
+122
-0
demos/m_fcts/EM_tensorMFA.m
demos/m_fcts/EM_tensorMFA.m
+7
-2
demos/m_fcts/EM_tensorMPPCA.m
demos/m_fcts/EM_tensorMPPCA.m
+7
-2
demos/m_fcts/EM_weighted_logGMM_3param.m
demos/m_fcts/EM_weighted_logGMM_3param.m
+85
-0
demos/m_fcts/EM_weighted_multivariateGMM.m
demos/m_fcts/EM_weighted_multivariateGMM.m
+65
-0
demos/m_fcts/EM_weighted_univariateGMM.m
demos/m_fcts/EM_weighted_univariateGMM.m
+57
-0
demos/m_fcts/GMR.m
demos/m_fcts/GMR.m
+22
-20
demos/m_fcts/GMR_simple.m
demos/m_fcts/GMR_simple.m
+6
-0
demos/m_fcts/GMRwD.m
demos/m_fcts/GMRwD.m
+46
-0
demos/m_fcts/GPR.m
demos/m_fcts/GPR.m
+8
-3
demos/m_fcts/IPRA_GMM.m
demos/m_fcts/IPRA_GMM.m
+194
-0
demos/m_fcts/KLdiv.m
demos/m_fcts/KLdiv.m
+3
-0
demos/m_fcts/OnlineHSMM.m
demos/m_fcts/OnlineHSMM.m
+80
-0
demos/m_fcts/QuatMatrixConj.m
demos/m_fcts/QuatMatrixConj.m
+9
-0
demos/m_fcts/QuatToMatrix.m
demos/m_fcts/QuatToMatrix.m
+9
-0
demos/m_fcts/URDF.m
demos/m_fcts/URDF.m
+219
-0
demos/m_fcts/WGMR.m
demos/m_fcts/WGMR.m
+51
-0
demos/m_fcts/angDiffFromQuat.m
demos/m_fcts/angDiffFromQuat.m
+12
-0
demos/m_fcts/computeGammaHMM.m
demos/m_fcts/computeGammaHMM.m
+9
-10
demos/m_fcts/computeHypergrid_WGMM.m
demos/m_fcts/computeHypergrid_WGMM.m
+20
-0
demos/m_fcts/constructMPC.m
demos/m_fcts/constructMPC.m
+53
-0
demos/m_fcts/constructPHI.m
demos/m_fcts/constructPHI.m
+54
-15
demos/m_fcts/constructTrajMPC.m
demos/m_fcts/constructTrajMPC.m
+39
-0
demos/m_fcts/estimateAttractorPath.m
demos/m_fcts/estimateAttractorPath.m
+7
-2
demos/m_fcts/estimateAttractorPathTPGMR.m
demos/m_fcts/estimateAttractorPathTPGMR.m
+62
-0
demos/m_fcts/gaussLogPDF.m
demos/m_fcts/gaussLogPDF.m
+50
-0
demos/m_fcts/gaussPDF.m
demos/m_fcts/gaussPDF.m
+10
-5
demos/m_fcts/gaussPDF_WGMM.m
demos/m_fcts/gaussPDF_WGMM.m
+24
-0
demos/m_fcts/getRobotDataFromCursor.m
demos/m_fcts/getRobotDataFromCursor.m
+138
-0
demos/m_fcts/grabDataFromCursor.m
demos/m_fcts/grabDataFromCursor.m
+3
-5
demos/m_fcts/grabDataFromCursor02.m
demos/m_fcts/grabDataFromCursor02.m
+81
-0
demos/m_fcts/grayLICExternal.m
demos/m_fcts/grayLICExternal.m
+52
-0
demos/m_fcts/holrr.m
demos/m_fcts/holrr.m
+28
-0
demos/m_fcts/hsmm_fwd_init_hsum.m
demos/m_fcts/hsmm_fwd_init_hsum.m
+6
-8
demos/m_fcts/hsmm_fwd_step_hsum.m
demos/m_fcts/hsmm_fwd_step_hsum.m
+3
-5
demos/m_fcts/initBaxterStructure.m
demos/m_fcts/initBaxterStructure.m
+67
-0
demos/m_fcts/initCOMAN_Larm.m
demos/m_fcts/initCOMAN_Larm.m
+64
-0
demos/m_fcts/initCOMAN_Rarm.m
demos/m_fcts/initCOMAN_Rarm.m
+64
-0
demos/m_fcts/initWAMstructure.m
demos/m_fcts/initWAMstructure.m
+69
-0
demos/m_fcts/init_GMM_kbins2.m
demos/m_fcts/init_GMM_kbins2.m
+71
-0
demos/m_fcts/init_GMM_kgrid.m
demos/m_fcts/init_GMM_kgrid.m
+56
-0
demos/m_fcts/init_GMM_kmeans.m
demos/m_fcts/init_GMM_kmeans.m
+13
-6
demos/m_fcts/init_GMM_logBased.m
demos/m_fcts/init_GMM_logBased.m
+30
-0
demos/m_fcts/init_GMM_timeBased.m
demos/m_fcts/init_GMM_timeBased.m
+15
-17
demos/m_fcts/init_HMM_kbins.m
demos/m_fcts/init_HMM_kbins.m
+39
-0
demos/m_fcts/init_TPGMM_kmeans.m
demos/m_fcts/init_TPGMM_kmeans.m
+7
-2
demos/m_fcts/init_TPGMM_timeBased.m
demos/m_fcts/init_TPGMM_timeBased.m
+7
-2
demos/m_fcts/init_tensorGMM_kmeans.m
demos/m_fcts/init_tensorGMM_kmeans.m
+8
-3
demos/m_fcts/init_tensorGMM_timeBased.m
demos/m_fcts/init_tensorGMM_timeBased.m
+7
-2
demos/m_fcts/initiCubstructure.m
demos/m_fcts/initiCubstructure.m
+47
-0
demos/m_fcts/khatriRao.m
demos/m_fcts/khatriRao.m
+37
-0
demos/m_fcts/logGMR.m
demos/m_fcts/logGMR.m
+33
-0
demos/m_fcts/logGaussPDF.m
demos/m_fcts/logGaussPDF.m
+16
-0
demos/m_fcts/matrixRR.m
demos/m_fcts/matrixRR.m
+93
-0
demos/m_fcts/outprod.m
demos/m_fcts/outprod.m
+48
-0
demos/m_fcts/patchline.m
demos/m_fcts/patchline.m
+119
-0
demos/m_fcts/plot2DArrow.m
demos/m_fcts/plot2DArrow.m
+10
-10
demos/m_fcts/plot2Dframe.m
demos/m_fcts/plot2Dframe.m
+30
-0
demos/m_fcts/plot2DframeAlpha.m
demos/m_fcts/plot2DframeAlpha.m
+42
-0
demos/m_fcts/plot3Dframe.m
demos/m_fcts/plot3Dframe.m
+17
-4
demos/m_fcts/plotArm.m
demos/m_fcts/plotArm.m
+14
-6
demos/m_fcts/plotArmBasis.m
demos/m_fcts/plotArmBasis.m
+11
-6
demos/m_fcts/plotArmLink.m
demos/m_fcts/plotArmLink.m
+11
-6
demos/m_fcts/plotBimanualRobot.m
demos/m_fcts/plotBimanualRobot.m
+7
-2
demos/m_fcts/plotDistPatch.m
demos/m_fcts/plotDistPatch.m
+82
-0
demos/m_fcts/plotDistrib1D.m
demos/m_fcts/plotDistrib1D.m
+66
-0
demos/m_fcts/plotGMM.m
demos/m_fcts/plotGMM.m
+25
-12
demos/m_fcts/plotGMM1D.m
demos/m_fcts/plotGMM1D.m
+100
-0
demos/m_fcts/plotGMM3D.m
demos/m_fcts/plotGMM3D.m
+62
-15
demos/m_fcts/plotGaussian1D.m
demos/m_fcts/plotGaussian1D.m
+9
-9
demos/m_fcts/plotHMMlr.m
demos/m_fcts/plotHMMlr.m
+101
-0
demos/m_fcts/plotHSMM.m
demos/m_fcts/plotHSMM.m
+14
-6
demos/m_fcts/plotMatrix.m
demos/m_fcts/plotMatrix.m
+23
-0
demos/m_fcts/plotQuatCov.m
demos/m_fcts/plotQuatCov.m
+65
-0
demos/m_fcts/plotWGMM.m
demos/m_fcts/plotWGMM.m
+22
-0
demos/m_fcts/plotvfieldColorEffect.m
demos/m_fcts/plotvfieldColorEffect.m
+25
-0
demos/m_fcts/ppdiff.m
demos/m_fcts/ppdiff.m
+53
-0
demos/m_fcts/productTPGMM.m
demos/m_fcts/productTPGMM.m
+7
-2
demos/m_fcts/productTPGMM0.m
demos/m_fcts/productTPGMM0.m
+7
-2
demos/m_fcts/productTPGMR0.m
demos/m_fcts/productTPGMR0.m
+36
-0
demos/m_fcts/quaternionDiff.m
demos/m_fcts/quaternionDiff.m
+11
-0
demos/m_fcts/quaternionExp.m
demos/m_fcts/quaternionExp.m
+17
-0
demos/m_fcts/quaternionLog.m
demos/m_fcts/quaternionLog.m
+19
-0
demos/m_fcts/reproduction_DS.m
demos/m_fcts/reproduction_DS.m
+7
-2
demos/m_fcts/reproduction_LQR_IK_fwd.m
demos/m_fcts/reproduction_LQR_IK_fwd.m
+72
-0
demos/m_fcts/reproduction_LQR_finiteHorizon.m
demos/m_fcts/reproduction_LQR_finiteHorizon.m
+8
-3
demos/m_fcts/reproduction_LQR_finiteHorizon_discrete.m
demos/m_fcts/reproduction_LQR_finiteHorizon_discrete.m
+79
-0
demos/m_fcts/reproduction_LQR_finiteHorizon_withVel.m
demos/m_fcts/reproduction_LQR_finiteHorizon_withVel.m
+80
-0
demos/m_fcts/reproduction_LQR_infiniteHorizon.m
demos/m_fcts/reproduction_LQR_infiniteHorizon.m
+106
-110
demos/m_fcts/reproduction_LQR_infiniteHorizon_withVel.m
demos/m_fcts/reproduction_LQR_infiniteHorizon_withVel.m
+89
-0
demos/m_fcts/reproduction_TPGMM.m
demos/m_fcts/reproduction_TPGMM.m
+8
-3
demos/m_fcts/sample_hsmm_lqr.m
demos/m_fcts/sample_hsmm_lqr.m
+78
-0
demos/m_fcts/simplexManFuns.m
demos/m_fcts/simplexManFuns.m
+141
-0
demos/m_fcts/solveAlgebraicRiccati_eig.m
demos/m_fcts/solveAlgebraicRiccati_eig.m
+6
-1
demos/m_fcts/solveAlgebraicRiccati_eig_discrete.m
demos/m_fcts/solveAlgebraicRiccati_eig_discrete.m
+11
-10
demos/m_fcts/spdManFuns.m
demos/m_fcts/spdManFuns.m
+153
-0
demos/m_fcts/streakarrow.m
demos/m_fcts/streakarrow.m
+79
-0
demos/m_fcts/subs_Jl.m
demos/m_fcts/subs_Jl.m
+43
-0
demos/m_fcts/subs_Jr.m
demos/m_fcts/subs_Jr.m
+43
-0
demos/m_fcts/subs_Rl.m
demos/m_fcts/subs_Rl.m
+19
-0
demos/m_fcts/subs_Rr.m
demos/m_fcts/subs_Rr.m
+19
-0
demos/m_fcts/subs_Tl.m
demos/m_fcts/subs_Tl.m
+13
-0
demos/m_fcts/subs_Tr.m
demos/m_fcts/subs_Tr.m
+13
-0
demos/m_fcts/tmprod.m
demos/m_fcts/tmprod.m
+70
-0
No files found.
README.md
View file @
8d6dbeee
This diff is collapsed.
Click to expand it.
demos/benchmark_DS_GP_GMM01.m
→
demos/benchmark
s/benchmark
_DS_GP_GMM01.m
View file @
8d6dbeee
...
...
@@ -2,11 +2,7 @@ function benchmark_DS_GP_GMM01
% Benchmark of task-parameterized model based on Gaussian process regression,
% with trajectory model (Gaussian mixture model encoding), and DS-GMR used for reproduction.
%
% Writing code takes time. Polishing it and making it available to others takes longer!
% If some parts of the code were useful for your research of for a better understanding
% of the algorithms, please reward the authors by citing the related publications,
% and consider making your own research available in this way.
%
% If this code is useful for your research, please cite the related publication:
% @article{Calinon16JIST,
% author="Calinon, S.",
% title="A Tutorial on Task-Parameterized Movement Learning and Retrieval",
...
...
@@ -36,8 +32,7 @@ function benchmark_DS_GP_GMM01
% You should have received a copy of the GNU General Public License
% along with PbDlib. If not, see <http://www.gnu.org/licenses/>.
addpath
(
'./m_fcts/'
);
addpath
(
'./../m_fcts/'
);
%% Parameters
...
...
@@ -137,7 +132,7 @@ for n=1:nbSamples
end
% %Retrieval of attractor path through GMR
% currTar = GMR(r(n), DataIn, 1, [2:model.nbVar]);
%See Eq. (17)-(19)
% currTar = GMR(r(n), DataIn, 1, [2:model.nbVar]);
%
% %Motion retrieval with spring-damper system
% x = s(n).p(1).b(2:model.nbVar);
...
...
@@ -181,7 +176,7 @@ for n=1:nbRepros
end
%Retrieval of attractor path through GMR
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
GMR
(
rnew
(
n
),
DataIn
,
1
,
[
2
:
model
.
nbVar
]);
%See Eq. (17)-(19)
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
GMR
(
rnew
(
n
),
DataIn
,
1
,
[
2
:
model
.
nbVar
]);
%Motion retrieval with spring-damper system
x
=
rnew
(
n
)
.
p
(
1
)
.
b
(
2
:
model
.
nbVar
);
...
...
@@ -230,27 +225,23 @@ for n=1:nbRepros
h
=
[
h
plot
(
rnew
(
n
)
.
Data
(
1
,
1
),
rnew
(
n
)
.
Data
(
2
,
1
),
'.'
,
'markersize'
,
12
,
'color'
,[
0
0
0
])];
axis
equal
;
axis
(
limAxes
);
%print('-dpng','-r600',['graphs/benchmark_DS_GP_GMM' num2str(n+1,'%.2d') '.png']);
pause
pause
;
end
pause
;
close
all
;
end
%Function to plot pegs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function
h
=
plotPegs
(
p
,
colPegs
,
fa
)
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
\ No newline at end of file
demos/benchmark_DS_GP_raw01.m
→
demos/benchmark
s/benchmark
_DS_GP_raw01.m
View file @
8d6dbeee
...
...
@@ -2,11 +2,7 @@ function benchmark_DS_GP_raw01
% Benchmark of task-parameterized model based on Gaussian process regression,
% with raw trajectory, and spring-damper system used for reproduction.
%
% Writing code takes time. Polishing it and making it available to others takes longer!
% If some parts of the code were useful for your research of for a better understanding
% of the algorithms, please reward the authors by citing the related publications,
% and consider making your own research available in this way.
%
% If this code is useful for your research, please cite the related publication:
% @article{Calinon16JIST,
% author="Calinon, S.",
% title="A Tutorial on Task-Parameterized Movement Learning and Retrieval",
...
...
@@ -36,7 +32,7 @@ function benchmark_DS_GP_raw01
% You should have received a copy of the GNU General Public License
% along with PbDlib. If not, see <http://www.gnu.org/licenses/>.
addpath
(
'./m_fcts/'
);
addpath
(
'./
../
m_fcts/'
);
%% Parameters
...
...
@@ -180,22 +176,18 @@ end
pause
;
close
all
;
end
%Function to plot pegs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function
h
=
plotPegs
(
p
,
colPegs
,
fa
)
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
\ No newline at end of file
demos/benchmark_DS_PGMM01.m
→
demos/benchmark
s/benchmark
_DS_PGMM01.m
View file @
8d6dbeee
function
benchmark_DS_PGMM01
% Benchmark of task-parameterized model based on parametric Gaussian
v
mixture model,
% Benchmark of task-parameterized model based on parametric Gaussian
mixture model,
% and DS-GMR used for reproduction.
%
% Writing code takes time. Polishing it and making it available to others takes longer!
% If some parts of the code were useful for your research of for a better understanding
% of the algorithms, please reward the authors by citing the related publications,
% and consider making your own research available in this way.
%
% If this code is useful for your research, please cite the related publication:
% @article{Calinon16JIST,
% author="Calinon, S.",
% title="A Tutorial on Task-Parameterized Movement Learning and Retrieval",
...
...
@@ -36,7 +32,7 @@ function benchmark_DS_PGMM01
% You should have received a copy of the GNU General Public License
% along with PbDlib. If not, see <http://www.gnu.org/licenses/>.
addpath
(
'./m_fcts/'
);
addpath
(
'./
../
m_fcts/'
);
%% Parameters
...
...
@@ -86,10 +82,10 @@ end
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
fprintf
(
'Parameters estimation of PGMM with EM:'
);
for
n
=
1
:
nbSamples
% %Task parameters rearranged as a vector (position and orientation)
, see Eq. (48)
% %Task parameters rearranged as a vector (position and orientation)
% s(n).OmegaMu = [s(n).p(1).b(2:3); s(n).p(1).A(2:3,3); s(n).p(2).b(2:3); s(n).p(2).A(2:3,3); 1];
%Task parameters rearranged as a vector (position only)
, see Eq. (48)
%Task parameters rearranged as a vector (position only)
s
(
n
)
.
OmegaMu
=
[
s
(
n
)
.
p
(
1
)
.
b
(
2
:
3
);
s
(
n
)
.
p
(
2
)
.
b
(
2
:
3
);
1
];
end
...
...
@@ -121,12 +117,12 @@ nbVarOut = model.nbVar-1;
for
n
=
1
:
nbSamples
%Computation of the resulting Gaussians (for display purpose)
for
i
=
1
:
model
.
nbStates
model
.
Mu
(:,
i
)
=
model
.
ZMu
(:,:,
i
)
*
s
(
n
)
.
OmegaMu
;
%Temporary Mu variable
, see Eq. (48)
model
.
Mu
(:,
i
)
=
model
.
ZMu
(:,:,
i
)
*
s
(
n
)
.
OmegaMu
;
%Temporary Mu variable
end
r
(
n
)
.
Mu
=
model
.
Mu
;
% %Retrieval of attractor path through GMR
% currTar = GMR(model, DataIn, 1, [2:model.nbVar]);
%See Eq. (17)-(19)
% currTar = GMR(model, DataIn, 1, [2:model.nbVar]);
% %Motion retrieval with spring-damper system
% x = s(n).p(1).b(2:model.nbVar);
% dx = zeros(nbVarOut,1);
...
...
@@ -147,25 +143,25 @@ load('data/taskParams.mat'); %Load new task parameters (new situation)
for
n
=
1
:
nbRepros
rnew
(
n
)
.
p
=
taskParams
(
n
)
.
p
;
% %Task parameters re-arranged as a vector (position and orientation)
, see Eq. (7.1.4) in doc/TechnicalReport.pdf
% %Task parameters re-arranged as a vector (position and orientation)
% rnew(n).OmegaMu = [rnew(n).p(1).b(2:3); rnew(n).p(1).A(2:3,3); rnew(n).p(2).b(2:3); rnew(n).p(2).A(2:3,3); 1];
%Task parameters re-arranged as a vector (position only)
, see Eq. (7.1.4) in doc/TechnicalReport.pdf
%Task parameters re-arranged as a vector (position only)
rnew
(
n
)
.
OmegaMu
=
[
rnew
(
n
)
.
p
(
1
)
.
b
(
2
:
3
);
rnew
(
n
)
.
p
(
2
)
.
b
(
2
:
3
);
1
];
%Computation of the resulting Gaussians (for display purpose)
for
i
=
1
:
model
.
nbStates
model
.
Mu
(:,
i
)
=
model
.
ZMu
(:,:,
i
)
*
rnew
(
n
)
.
OmegaMu
;
%Temporary Mu variable
, see Eq. (7.1.4) in doc/TechnicalReport.pdf
model
.
Mu
(:,
i
)
=
model
.
ZMu
(:,:,
i
)
*
rnew
(
n
)
.
OmegaMu
;
%Temporary Mu variable
end
rnew
(
n
)
.
Mu
=
model
.
Mu
;
%Retrieval of attractor path through GMR
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
GMR
(
model
,
DataIn
,
1
,
[
2
:
model
.
nbVar
]);
%See Eq. (3.0.2) to (3.0.5) in doc/TechnicalReport.pdf
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
GMR
(
model
,
DataIn
,
1
,
[
2
:
model
.
nbVar
]);
%Motion retrieval with spring-damper system
x
=
rnew
(
n
)
.
p
(
1
)
.
b
(
2
:
model
.
nbVar
);
dx
=
zeros
(
nbVarOut
,
1
);
for
t
=
1
:
nbD
%Compute acceleration, velocity and position
ddx
=
-
L
*
[
x
-
rnew
(
n
)
.
currTar
(:,
t
);
dx
];
%See Eq. (4.0.1) in doc/TechnicalReport.pdf
ddx
=
-
L
*
[
x
-
rnew
(
n
)
.
currTar
(:,
t
);
dx
];
dx
=
dx
+
ddx
*
model
.
dt
;
x
=
x
+
dx
*
model
.
dt
;
rnew
(
n
)
.
Data
(:,
t
)
=
x
;
...
...
@@ -212,22 +208,18 @@ end
pause
;
close
all
;
end
%Function to plot pegs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function
h
=
plotPegs
(
p
,
colPegs
,
fa
)
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
\ No newline at end of file
demos/benchmark_DS_TP_GMM01.m
→
demos/benchmark
s/benchmark
_DS_TP_GMM01.m
View file @
8d6dbeee
...
...
@@ -2,11 +2,7 @@ function benchmark_DS_TP_GMM01
% Benchmark of task-parameterized Gaussian mixture model (TP-GMM),
% with DS-GMR used for reproduction.
%
% Writing code takes time. Polishing it and making it available to others takes longer!
% If some parts of the code were useful for your research of for a better understanding
% of the algorithms, please reward the authors by citing the related publications,
% and consider making your own research available in this way.
%
% If this code is useful for your research, please cite the related publication:
% @article{Calinon16JIST,
% author="Calinon, S.",
% title="A Tutorial on Task-Parameterized Movement Learning and Retrieval",
...
...
@@ -36,7 +32,8 @@ function benchmark_DS_TP_GMM01
% You should have received a copy of the GNU General Public License
% along with PbDlib. If not, see <http://www.gnu.org/licenses/>.
addpath
(
'./m_fcts/'
);
addpath
(
'./../m_fcts/'
);
%% Parameters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
...
...
@@ -151,22 +148,18 @@ end
pause
;
close
all
;
end
%Function to plot pegs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function
h
=
plotPegs
(
p
,
colPegs
,
fa
)
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
2
:
3
,
2
:
3
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
2
:
3
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
\ No newline at end of file
demos/benchmark_DS_TP_GP01.m
→
demos/benchmark
s/benchmark
_DS_TP_GP01.m
View file @
8d6dbeee
function
benchmark_DS_TP_GP01
% Benchmark of task-parameterized Gaussian process (nonparametric task-parameterized method).
%
% Writing code takes time. Polishing it and making it available to others takes longer!
% If some parts of the code were useful for your research of for a better understanding
% of the algorithms, please reward the authors by citing the related publications,
% and consider making your own research available in this way.
%
% If this code is useful for your research, please cite the related publication:
% @article{Calinon16JIST,
% author="Calinon, S.",
% title="A Tutorial on Task-Parameterized Movement Learning and Retrieval",
...
...
@@ -35,7 +31,7 @@ function benchmark_DS_TP_GP01
% You should have received a copy of the GNU General Public License
% along with PbDlib. If not, see <http://www.gnu.org/licenses/>.
addpath
(
'./m_fcts/'
);
addpath
(
'./
../
m_fcts/'
);
%% Parameters
...
...
@@ -101,14 +97,14 @@ end
%Reproduction with spring-damper system
% for n=1:nbSamples
% currTar = productTPGMM0(model, s(n).p);
%See Eq. (6.0.5), (6.0.6) and (6.0.7) in doc/TechnicalReport.pdf
% currTar = productTPGMM0(model, s(n).p);
%
% %Motion retrieval with spring-damper system
% x = s(n).p(1).b;
% dx = zeros(model.nbVar,1);
% for t=1:s(n).nbData
% %Compute acceleration, velocity and position
% ddx = -L * [x-currTar(:,t); dx];
%See Eq. (4.0.1) in doc/TechnicalReport.pdf
% ddx = -L * [x-currTar(:,t); dx];
% dx = dx + ddx * model.dt;
% x = x + dx * model.dt;
% r(n).Data(:,t) = x;
...
...
@@ -125,14 +121,14 @@ for n=1:nbRepros
rnew
(
n
)
.
p
(
m
)
.
b
=
taskParams
(
n
)
.
p
(
m
)
.
b
(
2
:
end
);
rnew
(
n
)
.
p
(
m
)
.
A
=
taskParams
(
n
)
.
p
(
m
)
.
A
(
2
:
end
,
2
:
end
);
end
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
productTPGMM0
(
model
,
rnew
(
n
)
.
p
);
%See Eq. (6.0.5), (6.0.6) and (6.0.7) in doc/TechnicalReport.pdf
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
productTPGMM0
(
model
,
rnew
(
n
)
.
p
);
%Motion retrieval with spring-damper system
x
=
rnew
(
n
)
.
p
(
1
)
.
b
;
dx
=
zeros
(
model
.
nbVar
,
1
);
for
t
=
1
:
nbD
%Compute acceleration, velocity and position
ddx
=
-
L
*
[
x
-
rnew
(
n
)
.
currTar
(:,
t
);
dx
];
%See Eq. (4.0.1) in doc/TechnicalReport.pdf
ddx
=
-
L
*
[
x
-
rnew
(
n
)
.
currTar
(:,
t
);
dx
];
dx
=
dx
+
ddx
*
model
.
dt
;
x
=
x
+
dx
*
model
.
dt
;
rnew
(
n
)
.
Data
(:,
t
)
=
x
;
...
...
@@ -170,27 +166,23 @@ for n=1:nbRepros
h
=
[
h
plot
(
rnew
(
n
)
.
Data
(
1
,
1
),
rnew
(
n
)
.
Data
(
2
,
1
),
'.'
,
'markersize'
,
12
,
'color'
,[
0
0
0
])];
axis
equal
;
axis
(
limAxes
);
%print('-dpng','-r600',['graphs/benchmark_DS_TP_GP' num2str(n+1,'%.2d') '.png']);
pause
pause
;
end
pause
;
close
all
;
end
%Function to plot pegs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function
h
=
plotPegs
(
p
,
colPegs
,
fa
)
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
1
:
2
,
1
:
2
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
1
:
2
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
1
:
2
,
1
:
2
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
1
:
2
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
\ No newline at end of file
demos/benchmark_DS_TP_LWR01.m
→
demos/benchmark
s/benchmark
_DS_TP_LWR01.m
View file @
8d6dbeee
function
benchmark_DS_TP_LWR01
% Benchmark of task-parameterized locally weighted regression (nonparametric task-parameterized method).
%
% Writing code takes time. Polishing it and making it available to others takes longer!
% If some parts of the code were useful for your research of for a better understanding
% of the algorithms, please reward the authors by citing the related publications,
% and consider making your own research available in this way.
%
% If this code is useful for your research, please cite the related publication:
% @article{Calinon16JIST,
% author="Calinon, S.",
% title="A Tutorial on Task-Parameterized Movement Learning and Retrieval",
...
...
@@ -35,7 +31,7 @@ function benchmark_DS_TP_LWR01
% You should have received a copy of the GNU General Public License
% along with PbDlib. If not, see <http://www.gnu.org/licenses/>.
addpath
(
'./m_fcts/'
);
addpath
(
'./
../
m_fcts/'
);
%% Parameters
...
...
@@ -112,14 +108,14 @@ end
%Reproduction with spring-damper system
% for n=1:nbSamples
% currTar = productTPGMM0(model, s(n).p);
%See Eq. (6.0.5), (6.0.6) and (6.0.7) in doc/TechnicalReport.pdf
% currTar = productTPGMM0(model, s(n).p);
%
% %Motion retrieval with spring-damper system
% x = s(n).p(1).b;
% dx = zeros(model.nbVar,1);
% for t=1:s(n).nbData
% %Compute acceleration, velocity and position
% ddx = -L * [x-currTar(:,t); dx];
%See Eq. (4.0.1) in doc/TechnicalReport.pdf
% ddx = -L * [x-currTar(:,t); dx];
% dx = dx + ddx * model.dt;
% x = x + dx * model.dt;
% r(n).Data(:,t) = x;
...
...
@@ -136,14 +132,14 @@ for n=1:nbRepros
rnew
(
n
)
.
p
(
m
)
.
b
=
taskParams
(
n
)
.
p
(
m
)
.
b
(
2
:
end
);
rnew
(
n
)
.
p
(
m
)
.
A
=
taskParams
(
n
)
.
p
(
m
)
.
A
(
2
:
end
,
2
:
end
);
end
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
productTPGMM0
(
model
,
rnew
(
n
)
.
p
);
%See Eq. (6.0.5), (6.0.6) and (6.0.7) in doc/TechnicalReport.pdf
[
rnew
(
n
)
.
currTar
,
rnew
(
n
)
.
currSigma
]
=
productTPGMM0
(
model
,
rnew
(
n
)
.
p
);
%Motion retrieval with spring-damper system
x
=
rnew
(
n
)
.
p
(
1
)
.
b
;
dx
=
zeros
(
model
.
nbVar
,
1
);
for
t
=
1
:
nbD
%Compute acceleration, velocity and position
ddx
=
-
L
*
[
x
-
rnew
(
n
)
.
currTar
(:,
t
);
dx
];
%See Eq. (4.0.1) in doc/TechnicalReport.pdf
ddx
=
-
L
*
[
x
-
rnew
(
n
)
.
currTar
(:,
t
);
dx
];
dx
=
dx
+
ddx
*
model
.
dt
;
x
=
x
+
dx
*
model
.
dt
;
rnew
(
n
)
.
Data
(:,
t
)
=
x
;
...
...
@@ -186,22 +182,18 @@ end
pause
;
close
all
;
end
%Function to plot pegs
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
function
h
=
plotPegs
(
p
,
colPegs
,
fa
)
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
1
:
2
,
1
:
2
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
1
:
2
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
if
~
exist
(
'colPegs'
)
colPegs
=
[
0.2863
0.0392
0.2392
;
0.9137
0.4980
0.0078
];
fa
=
0.4
;
end
pegMesh
=
[
-
4
-
3.5
;
-
4
10
;
-
1.5
10
;
-
1.5
-
1
;
1.5
-
1
;
1.5
10
;
4
10
;
4
-
3.5
;
-
4
-
3.5
]
'
*
1E-1
;
for
m
=
1
:
length
(
p
)
dispMesh
=
p
(
m
)
.
A
(
1
:
2
,
1
:
2
)
*
pegMesh
+
repmat
(
p
(
m
)
.
b
(
1
:
2
),
1
,
size
(
pegMesh
,
2
));
h
(
m
)
=
patch
(
dispMesh
(
1
,:),
dispMesh
(
2
,:),
colPegs
(
m
,:),
'linewidth'
,
1
,
'edgecolor'
,
'none'
,
'facealpha'
,
fa
);
end
end
\ No newline at end of file
demos/benchmark_DS_TP_MFA01.m
→
demos/benchmark
s/benchmark
_DS_TP_MFA01.m
View file @
8d6dbeee
...
...
@@ -2,11 +2,7 @@ function benchmark_DS_TP_MFA01
% Benchmark of task-parameterized mixture of factor analyzers (TP-MFA),
% with DS-GMR used for reproduction.
%
% Writing code takes time. Polishing it and making it available to others takes longer!
% If some parts of the code were useful for your research of for a better understanding
% of the algorithms, please reward the authors by citing the related publications,
% and consider making your own research available in this way.
%
% If this code is useful for your research, please cite the related publication:
% @article{Calinon16JIST,
% author="Calinon, S.",
% title="A Tutorial on Task-Parameterized Movement Learning and Retrieval",
...
...
@@ -36,7 +32,7 @@ function benchmark_DS_TP_MFA01
% You should have received a copy of the GNU General Public License
% along with PbDlib. If not, see <http://www.gnu.org/licenses/>.
addpath
(
'./m_fcts/'
);
addpath
(
'./
../
m_fcts/'
);
%% Parameters
...
...
@@ -49,6 +45,7 @@ model.dt = 0.01; %Time step
model
.
kP
=
100
;
%Stiffness gain
model
.
kV
=
(
2
*
model
.
kP
)
^.
5
;
%Damping gain (with ideal underdamped damping ratio)
nbRepros
=
4
;
%Number of reproductions with new situations randomly generated
nbStochasticRepros
=
30
;
%Number of reproductions with stochastic sampling
%% Load 3rd order tensor data
...
...
@@ -73,7 +70,7 @@ D(end,end) = 0;
%Create transformation matrix to compute XHAT = X + DX*kV/kP + DDX/kP
K1d
=
[
1
,
model
.
kV
/
model
.
kP
,
1
/
model
.
kP
];
K
=
kron
(
K1d
,
eye
(
nbVarOut
));
%Create 3rd order tensor data with XHAT instead of X
, see Eq. (4.0.2) in doc/TechnicalReport.pdf
%Create 3rd order tensor data with XHAT instead of X
Data
=
zeros
(
model
.
nbVar
,
model
.
nbFrames
,
nbD
*
nbSamples
);
for
n
=
1
:
nbSamples
DataTmp
=
s
(
n
)
.
Data0
(
2
:
end
,:);
...
...
@@ -114,6 +111,21 @@ for n=1:nbRepros
end