A Generalized Robotic Handwriting Learning System based on Dynamic Movement Primitives (DMPs)

Qian Luo, Jing Wu, Matthew C. GombolayarXiv 2020

This research presents a refined approach to robotic handwriting, moving beyond simple mimicry toward a system that understands and adapts human "style." By optimizing the mathematical foundations of Dynamic Movement Primitives (DMPs), the researchers created a system that can learn from human demonstrations and generalize those skills to new contexts.

Introduction

Teaching a robot to write like a human is surprisingly difficult. While humans write with fluid, variable strokes, robots typically require rigid programming. Learning from Demonstration (LfD) is a popular alternative where a robot observes a human and tries to replicate the motion. The standard tool for this is the Dynamic Movement Primitive (DMP)—a mathematical framework that treats motion like a spring-damper system pulled by a "forcing function."

However, standard DMPs suffer from hyperparameter sensitivity (specifically regarding kernel count and width) and goal instability. If a robot needs to finish a stroke at a different location than the human did, the original math often causes the robot to produce "jumps" or nonsensical shapes. This paper introduces DMP*, an augmented algorithm designed to overcome these hurdles.

The DMP* Framework

The authors introduce three key improvements to the standard DMP architecture to enhance precision and robustness:

  1. Kernel Optimization: The team conducted a systematic study on Gaussian kernels, discovering that truncated kernels are superior. By cutting off kernels after a certain distance, they prevent "interference" between different parts of a stroke, allowing for more localized and accurate weight calculations.
  2. Mathematical Reformulation: A modified forcing function was adopted to decouple the shape of the movement from the goal position. This ensures that even if the end-target moves, the "style" of the curve remains intact.
  3. Stroke Segmentation: To handle complex letters like 'B' or 'P', the system uses a "difference method" to monitor vertical ($z$-axis) movement. When the human lifts the pen, the system automatically segments the data into individual "primitives" that can be learned separately and recombined.
The DMP* system pipeline, illustrating the flow from human demonstration via motion capture to robotic execution.

Experimental Methodology

To validate the system, the researchers built a custom data collection pipeline involving 15 participants. A high-precision motion capture system recorded the 3D trajectories of a sensor attached to the writer's finger with accuracy up to $10^{-3}$ meters. The system was tested on a variety of alphanumeric characters, specifically focusing on 'a', 'b', 'e', 'm', 'D', and 'P'.

Through this process, the authors identified the "1/10 Rule": the error in handwriting reproduction drops significantly as kernels are added but stabilizes once the number of kernels reaches roughly 1/10th the number of total sample points. This provides a clear heuristic for balancing computational efficiency with accuracy.

Key Results and Physical Validation

The DMP algorithm demonstrated superior robustness compared to traditional methods. In tests where the goal position was shifted by 0.1 meters, the original DMP algorithm produced massive "jumps," whereas DMP maintained a highly similar shape to the ground truth, only adjusting the "tail" to meet the new goal.

Furthermore, the system enables style transfer. Because the goal is decoupled from the trajectory, the robot can take a curved stroke learned from a letter 'D' and apply it to a new goal position to create a letter 'P' that retains the original writer's unique stroke patterns.

Sequence showing the Fetch robot successfully reproducing the letter 'a' on physical paper using the learned DMP* model.

The team successfully deployed the algorithm on a Fetch robot, demonstrating that the theoretical improvements translate effectively to real-world hardware and physical pen-on-paper writing.

Conclusion and Future Work

DMP* represents a significant step forward in making robotic motion more human-like and adaptable. While currently focused on individual alphanumeric characters, future work will involve testing the system on continuous cursive and long-form drawing. Additionally, the researchers aim to integrate more accessible data sources, such as standard cameras, to move beyond the requirement for expensive motion capture equipment.

Summary updated

BibTeX
@misc{luo2020generalized,
  author = {Qian Luo and Jing Wu and Matthew C. Gombolay},
  title = {{A Generalized Robotic Handwriting Learning System based on Dynamic Movement Primitives (DMPs)}},
  year = {2020},
  eprint = {2012.03898},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2012.03898},
}
Figure