The result of fitting a DMP #Fields opts,g,y,ẏ,ÿ,w,τ,c,σ2

See example file or the paper by Ijspeert et al. 2013


Same as DMP but contains an extra struct opts2 with 2DOF controller parameters Upgrade a DMP to a DMP2dof using

``` dmp2opts = DMP2dofopts(kp = 25,kv = 10,kc = 10_000,αe = 5) # Specify parameters here

dmp2 = DMP2dof(dmp, dmp2opts) # Upgrade dmp to 2DOF version ```


DMPopts(Nbasis,αx,αz) = DMPopts(Nbasis, αx, αz, βz = αz/4)

Holds parameters for fitting a DMP



sched_sig can be chosen as :canonical (default), :time or position

fitmethod can be chosen as :lwr or :leastsquares

See example file or the paper by Ijspeert et al. 2013


fit(y, ẏ, ÿ, opts, g=y[end])

Fits a DMP to data

y, ẏ, ÿ are position, velocity and acceleration respectively, T×n matrices where T is the number of time steps and n is the number of degrees of freedom.

see also solve, plotdmp



Calculate the forcing term for dmp when the phase variable is x

The return value will be an n Vector or T×n Matrix depending on typeof(x)

A = linearize(dmp::AbstractDMP, y, ẏ, x, y0)

Linearize the dynamics of the DMP around the point (y,ẏ,x). The resulting linear system is on the form q̈ = A*[y; ẏ; x]


t,y,z,x = solve(dmp, t = 0:length(dmp.t)-1; y0 = _1(dmp), g = dmp.g, solver=ode45)

t time vector

Keyword arguments:

y0 start position, defaults to the initial point in training data from dmp g goal, defaults to goal from dmp

solver the ode solver to use, see https://github.com/JuliaLang/ODE.jl

The default solver is solver=ode54, a faster alternative is solver=euler

see also plotdmp