DynamicMovementPrimitives.DMP2dofType

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 

DynamicMovementPrimitives.DMPoptsType

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

Holds parameters for fitting a DMP

Fields

Nbasis,αx,αz,βz,sched_sig,fitmethod

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

DynamicMovementPrimitives.fitFunction

fit(y, ẏ, ÿ, opts, g=y[end])

Fits a DMP to data

y, ẏ, 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

DynamicMovementPrimitives.forceMethod

force(dmp,x)

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)

DynamicMovementPrimitives.linearizeMethod
A = linearize(dmp::AbstractDMP, y, ẏ, x, y0)

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

DynamicMovementPrimitives.solveFunction

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