Skip to content

Commit

Permalink
Introduction to DMPs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderFabisch committed Nov 28, 2023
1 parent c50bf6f commit c3fab57
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
4 changes: 2 additions & 2 deletions doc/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ You can also search for specific modules, classes, or functions in the
:toctree: _apidoc/
:template: class.rst

~movement_primitives.dmp.DMPBase
~movement_primitives.dmp.WeightParametersMixin
~movement_primitives.dmp.DMP
~movement_primitives.dmp.DMPWithFinalVelocity
~movement_primitives.dmp.CartesianDMP
~movement_primitives.dmp.DualCartesianDMP
~movement_primitives.dmp.DMPBase
~movement_primitives.dmp.WeightParametersMixin
~movement_primitives.dmp.CouplingTermPos1DToPos1D
~movement_primitives.dmp.CouplingTermObstacleAvoidance2D
~movement_primitives.dmp.CouplingTermObstacleAvoidance3D
Expand Down
15 changes: 14 additions & 1 deletion movement_primitives/dmp/__init__.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
"""Dynamical Movement Primitive (DMP)
r"""Dynamical Movement Primitive (DMP)
==================================
This module provides implementations of various DMP types. DMPs consist of
a goal-directed movement generated by the transformation system and a forcing
term that defines the shape of the trajectory. They are time-dependent and
usually converge to the goal after a constant execution time.
Every implementation is slightly different, but we use a similar notation for
all of them:
* :math:`y,\dot{y},\ddot{y}` - position, velocity, and acceleration; these
might be translation components only, orientation, or both
* :math:`y_0` - start position
* :math:`g` - goal of the movement (attractor of the DMP)
* :math:`\tau` - execution time
* :math:`z` - phase variable, starts at 1 and converges to 0
* :math:`f(z)` - forcing term, learned component that defines the shape of the
movement
* :math:`C_t` - coupling term that is added to the acceleration of the DMP
"""
from ._base import DMPBase, WeightParametersMixin
from ._dmp import DMP, dmp_transformation_system
Expand Down
7 changes: 6 additions & 1 deletion movement_primitives/dmp/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@ def reset(self):


class WeightParametersMixin:
"""Mixin class providing common access methods to forcing term weights."""
"""Mixin class providing common access methods to forcing term weights.
This can be used, for instance, for black-box optimization of the weights
with respect to some cost / objective function in a reinforcement learning
setting.
"""
def get_weights(self):
"""Get weight vector of DMP.
Expand Down

0 comments on commit c3fab57

Please sign in to comment.