This paper, presented at RSS 2019, introduces Conditional Neural Movement Primitives (CNMPs), a framework that leverages recent advances in deep probabilistic modeling to help robots learn and execute complex movements. By building on Conditional Neural Processes (CNPs), the authors provide a way for robots to learn from a few demonstrations, handle high-dimensional sensory data, and adapt to unexpected changes in real-time.
TL;DR
CNMPs are a deep learning-based framework for robotic movement that learns to predict sensorimotor trajectories as conditional distributions. This allows robots to handle multi-modal tasks (multiple ways to achieve a goal) and adapt to real-time perturbations—like an object suddenly becoming heavier—without needing explicit task parameters or re-planning.
What Problem Does This Paper Address?
Learning from Demonstration (LfD) is a popular way to teach robots skills, but traditional methods like Dynamic Movement Primitives (DMPs) or Probabilistic Movement Primitives (ProMPs) face several hurdles:
- Multi-modality: If a human demonstrates two different ways to avoid an obstacle (e.g., going left vs. going right), traditional models often average these paths, leading to a collision right in the middle.
- High-Dimensionality: Integrating raw sensory data like images or haptic feedback usually requires manual feature engineering.
- Real-time Adaptation: Robots need to react to "surprises"—like an external force or a change in object properties—on the fly, which is difficult for static trajectory models.
CNMPs aim to solve these by treating movement generation as a conditional inference problem.
Methods
The core of the CNMP is the Conditional Neural Process (CNP) architecture. It consists of three main components:
- Encoder ($E$): Takes "observations" (pairs of time points and sensorimotor states $(t_i, SM_i)$) and maps them into a latent representation. If the input is an image, the encoder uses Convolutional layers (CNN); if it's low-dimensional (like joint angles), it uses a Multi-Layer Perceptron (MLP).
- Aggregator ($A$): Combines multiple latent representations into a single "task representation" ($r$) using a mean operation. This makes the system invariant to the number or order of observations provided.
- Query Network ($Q$): Takes the task representation $r$ and a target time $t_q$, then predicts the mean ($\mu$) and variance ($\sigma$) of the robot's state at that time.
The Feedback Loop: During execution, the robot is continuously "conditioned" on its current sensor readings. If the actual state deviates from the predicted distribution (e.g., a force sensor detects a heavier weight than expected), the model naturally shifts its prediction to match a trajectory consistent with that new information.
Datasets
The authors evaluated CNMPs across four distinct setups:
- Simulated 2D Obstacle Avoidance: A basic benchmark to test multi-modal learning (passing an obstacle on either side).
- High-Dimensional Image Masks: A simulated environment where the robot learns to navigate a 2D room based on raw top-down image masks of obstacles.
- Real Robot (UR10) - Height Generalization: A pick-and-place task where the robot must adapt to varying heights of objects and obstacles.
- Real Robot (UR10) - Weight/Shape Adaptation: A task where the robot must change its placement location based on the weight and shape of a container, perceived through force/torque sensors and finger proprioception.
Key Insights and Ideas
- Unsupervised Multi-modality: CNMPs can learn that there are two distinct ways to solve a task (e.g., going left vs. right) without being told. When conditioned on a point to the left, the model "collapses" the distribution to the left-side mode automatically.
- Implicit Parameter Learning: The robot doesn't need to be told "this object weighs 1kg." Instead, it learns the relationship between the force sensor readings and the required trajectory. The "task parameters" are discovered through the sensorimotor experience itself.
- Variance as a Tool: Because the model outputs variance, it provides a measure of uncertainty. High variance indicates multiple possible paths or a lack of data, which can be used to adjust robot compliance (stiffness).
Key Results
- Superiority over ProMPs: In the 2D avoidance task, ProMPs failed when conditioned on intermediate points between two modes, whereas CNMPs successfully generated valid, non-colliding trajectories.
- Generalization: In real-robot experiments, the system successfully interpolated to novel obstacle heights with a maximum average error of only 0.28 degrees in joint space.
- Dynamic Adaptation: In a standout experiment, the robot began moving a "light" box. Mid-motion, marbles were added to the box. The CNMP detected the increased weight via force sensors and immediately updated the trajectory to place the box in the "heavy object" zone, all without stopping or re-planning.
Limitations and Future Work
- Extrapolation: Like most neural networks, CNMPs struggle when asked to perform tasks far outside the range of their training data (extrapolation error was significantly higher than interpolation error).
- Control Guarantees: The system relies on a high-level PD controller to realize the predicted trajectories. The authors note that this setup lacks formal convergence or goal-achievement guarantees.
- Search and Memory: The current model is reactive. The authors suggest future work could involve mechanisms to "search" through execution history or "rewind" steps to reach new environment states more effectively.
Summary updated