A library for constraint consistent learning

Jeevan Manavalan, Yuchen Zhao, Prabhakar Ray, Hsiu-Chin Lin, Matthew HowardAdv. Robotics 2018

Introduction

In robotics, observing a movement often reveals a complex interplay between the agent's internal goals and external environmental constraints. For instance, when a robot wipes a table, its motion is dictated both by the "wiping" policy and the physical surface of the table. Standard machine learning approaches often treat these as a single "black box" policy, which lacks generalizability when the environment changes.

Constraint Consistent Learning (CCL) offers a framework to disentangle these components. By separating the underlying control policy from the restrictions of the workspace, robots can learn behaviors that are more flexible and transferable. This paper introduces the first open-source software library for CCL, providing a unified suite of tools for researchers to decompose redundant movements into task-space components, null-space components, and learned constraints.

Typical examples in CCL: (a) reaching/pouring, (b) state-independent table wiping, and (c) state-dependent bowl wiping.

Problem Formulation

The core challenge addressed by the CCL library is the decomposition of an observed action $u(x)$ at state $x$. The framework models this relationship as:

$$u(x) = A(x)^\dagger b(x) + N(x)\pi(x)$$

Where $u(x)$ is the observed action, $A(x)$ is the constraint matrix, $b(x)$ defines the task-space requirements, $N(x)$ is the null-space projection matrix, and $\pi(x)$ is the underlying unconstrained policy.

In redundant systems—those with more degrees of freedom than required for a specific task—the robot can move within a "null space" without affecting the primary goal. The CCL library leverages this redundancy to identify the hidden secondary objectives that might otherwise be masked by the primary task. By analyzing variations in how a robot moves its "extra" joints, the library teases out the underlying intent separate from the environmental restrictions.

Library Architecture and Methods

The CCL library is implemented in both C (leveraging the GNU Scientific Library) and Matlab, offering a consistent API for various data-driven algorithms. The library is organized into three primary functional modules, as illustrated in the system dependency diagram:

  1. Constraint Learning (learn A): This module focuses on estimating the constraint matrix $A$. It supports both state-independent constraints (e.g., a flat surface where restrictions are uniform) and state-dependent constraints (e.g., a curved bowl where the restriction changes based on position).
  2. Null-Space Decomposition: These algorithms extract the task-space component ($v$) and the null-space component ($w$) from raw observation data.
  3. Policy Learning (learn policy): This module uncovers the "hidden" null-space control policy $\pi(x)$ that governs the robot's redundant degrees of freedom.
System diagram of the CCL library showing the dependencies between learning constraints, null-space components, and policies.

Key Insights: Modularity and Consistency

A central philosophy of the CCL library is modularity. By treating constraints and policies as separate entities, the framework enables "behavioral transfer." For example, a robot can learn a wiping policy on a flat surface and subsequently apply that same intent to a curved surface by simply updating the constraint model. This separation allows for much higher data efficiency and generalization than monolithic end-to-end models.

Furthermore, the library prioritizes consistency over simple regression. Rather than just fitting a curve to data, CCL algorithms seek a projection that minimizes the error between observed null-space motions and the predicted constraint space. This approach is more robust to noise and better captures the underlying physics of the interaction.

Evaluation and Performance

To facilitate rigorous research, the library includes built-in performance metrics:

  • Normalised Constrained Policy Error (NCPE): Measures how accurately the learned policy matches the ground truth within the constrained space.
  • Null-space Projection Error (NPE): Quantifies the accuracy of the learned constraint manifold.

The authors demonstrate the library's utility across various scenarios, ranging from 2D toy examples to real-world kinematic data from a KUKA LWR3 robot arm and Trakstar 3D electromagnetic tracking sensors. These tests confirm that the library can effectively handle both simulated benchmarks and complex, high-dimensional tasks like reaching, pouring, and drawing.

Conclusion and Future Work

The CCL library provides the robotics community with a powerful, open-source tool for disentangling policies from constraints. While currently focused on kinematic and low-dimensional control problems using parametric models like Radial Basis Functions, future updates are expected to include Python wrappers to reach a broader machine learning audience. By standardizing these methods into a single, interchangeable set of functions, the library paves the way for more generalizable and interpretable robot learning.

Summary updated

BibTeX
@inproceedings{manavalan2018library,
  author = {Jeevan Manavalan and Yuchen Zhao and Prabhakar Ray and Hsiu-Chin Lin and Matthew Howard},
  title = {{A library for constraint consistent learning}},
  booktitle = {Adv. Robotics},
  year = {2018},
  doi = {10.1080/01691864.2020.1786723},
}
Figure