Introduction
Robotic manipulation tasks involving friction and contact—such as plugging in a USB cable or inserting a peg into a hole—are notoriously difficult. Traditional engineering solutions often rely on specialized fixtures or complex force-control models, which are frequently brittle and case-specific. While Learning from Demonstration (LfD) via Dynamic Movement Primitives (DMPs) allows robots to mimic human behavior, these methods often struggle with the "last-inch" problem: the inability to perform fine-grained searching motions when faced with misalignments. Conversely, pure Reinforcement Learning (RL) can learn these behaviors but is sample-inefficient and poses risks to hardware during exploration.
This paper introduces residual Learning from Demonstration (rLfD), a framework that bridges this gap by combining the sample efficiency of DMPs with the flexibility of RL.
Methodology
The rLfD framework decomposes robot control into a hierarchical structure consisting of a base policy and a residual policy.
- Base Policy ($\pi_b$): A standard DMP extracted from a single human demonstration. This provides the coarse trajectory toward the target.
- Residual Policy ($\pi_\theta$): A model-free RL agent (e.g., Soft Actor-Critic) that learns to output a correction term.
Task-Space Residuals and Full Pose Adaptation
A key innovation of rLfD is applying corrections directly to the end-effector's velocity (twist) in Cartesian task space rather than modifying internal DMP parameters. This approach encourages the "jiggling" or searching behaviors necessary to overcome friction. Furthermore, the framework handles full pose adaptation, including orientation. Orientation residuals are calculated in quaternion space to avoid singularities like gimbal lock, which is critical for tasks like gear or LAN cable insertion.
Hierarchical Control
To ensure smooth and safe motion, the system operates at three distinct frequencies:
- RL Residual: 10 Hz
- DMP Base Policy: 100 Hz
- Low-level Impedance Control: 500 Hz
Experimental Evaluation
The framework was evaluated using a 7-DoF Franka Emika Panda arm on three distinct tasks: cylindrical peg-in-hole, gear insertion (requiring rotational alignment), and RJ-45 (LAN cable) insertion.
Key Results
- High Success Rates: In simulation, rLfD achieved a 94.8% success rate on difficult peg-in-hole tasks, compared to 24% for standard DMPs. On the physical robot, the average success rate was 86.9% across all tasks.
- Sample Efficiency: rLfD reached high performance in approximately 700 episodes, whereas pure RL baselines typically require tens of thousands.
- Robustness and Speed: rLfD solved the high-precision RJ-45 task where the base DMP failed completely (0% success). Additionally, rLfD policies were faster, completing insertions in ~5.1 seconds versus ~7.0 seconds for the base DMP.
Conclusion
Residual Learning from Demonstration provides a robust middle ground between imitation and reinforcement learning. By leveraging a strong DMP prior and learning task-space residuals, robots can efficiently master complex, contact-rich manipulation tasks that were previously inaccessible to standard LfD methods. Future work will look into incorporating visual and tactile feedback to further enhance robustness and force optimization.
Summary updated