  Dynamic Movement Primitives (DMP) have found remarkable applicability and
success in various robotic tasks, which can be mainly attributed to their
generalization, modulation and robustness properties. Nevertheless, the spatial
generalization of DMP can be problematic in some cases, leading to excessive or
unnatural spatial scaling. Moreover, incorporating intermediate points
(via-points) to adjust the DMP trajectory, is not adequately addressed. In this
work we propose an improved online spatial generalization, that remedies the
shortcomings of the classical DMP generalization, and moreover allows the
incorporation of dynamic via-points. This is achieved by designing an online
adaptation scheme for the DMP weights which is proved to minimize the distance
from the demonstrated acceleration profile to retain the shape of the
demonstration, subject to dynamic via-point and initial/final state
constraints. Extensive comparative simulations with the classical and other DMP
variants are conducted, while experimental results validate the applicability
and efficacy of the proposed method.
