Structured Prediction for CRiSP Inverse Kinematics Learning with Misspecified Robot Models

Gian Maria Marconi, Raffaello Camoriano, Lorenzo Rosasco, Carlo Ciliberto

Abstract: With the recent advances in machine learning, problems that traditionally would require accurate modeling to be solved analytically can now be successfully approached with data-driven strategies. Among these, computing the inverse kinematics of a redundant robot arm poses a significant challenge due to the non-linear structure of the robot, the hard joint constraints and the non-invertible kinematics map. Moreover, most learning algorithms consider a completely data-driven approach, while often useful information on the structure of the robot is available and should be positively exploited. In this work, we present a simple, yet effective, approach for learning the inverse kinematics. We introduce a structured prediction algorithm that combines a data-driven strategy with the model provided by a forward kinematics function -- even when this function is misspecified -- to accurately solve the problem. The proposed approach ensures that predicted joint configurations are well within the robot's constraints. We also provide statistical guarantees on the generalization properties of our estimator as well as an empirical evaluation of its performance on trajectory reconstruction tasks.

Introduction

In robotics, Inverse Kinematics (IK) is the task of calculating the joint angles (e.g., shoulder, elbow, wrist) needed to place the robot's end-effector at a specific point in space. This task is notoriously difficult due to redundancy, where multiple joint configurations can reach the same target, and model mismatch, where real-world physical deviations (like link length offsets) render traditional analytical models inaccurate. Purely data-driven methods, such as standard neural networks, often fail to respect physical joint limits or struggle with the non-linear nature of the kinematics map.

Methodology: The CRiSP-FK Framework

The authors propose CRiSP-FK, a structured prediction framework that solves the IK problem by combining data-driven learning with a potentially inaccurate forward kinematics (FK) model. Unlike standard regression that maps inputs directly to outputs, structured prediction identifies the output that minimizes a specific "quality" function.

Workspace vs. Joint Space Loss

A core insight of this work is that measuring error in the Cartesian workspace is more robust than measuring it in joint space. In a redundant system, two very different joint configurations can result in nearly identical end-effector positions. A joint-space loss would penalize these valid alternatives, whereas a workspace loss (FK loss) recognizes them as successful solutions.

Comparison between configuration space loss (a) and forward kinematics loss (b). The FK loss ensures the end-effector reaches the target accurately despite redundancy.

The algorithm operates in two phases:

  1. Training: A kernel-based model is built from a dataset of joint-pose pairs, learning to weight previous examples to solve new instances.
  2. Prediction: For a new target, the system solves a constrained optimization problem (using L-BFGS-B) to minimize the FK loss while strictly adhering to physical joint "box constraints."

Experimental Evaluation

The approach was evaluated using a 5-DoF Planar Manipulator and a 7-DoF Franka Emika Panda robot. The researchers released a new dataset featuring complex trajectories, such as spirals and "eight-shapes," to test generalization.

Key Results

  • Robustness to Bias: When a 3-degree bias was introduced to the robot's joints, standard numerical solvers saw errors explode to 83.7 mm. CRiSP-FK maintained a significantly lower error of 21.2 mm by "correcting" the model's bias through data.
  • Trajectory Tracking: CRiSP-FK demonstrated superior performance in tracking complex paths compared to standard Neural Networks (NN), which often exhibited positional drift.
Trajectory reconstruction of an eight-shape path using CRiSP-FK, showing high fidelity to the original trajectory.

Discussion and Future Work

While CRiSP-FK provides high accuracy and respects physical constraints, its primary limitation is computational speed. Inference takes approximately 0.7 seconds per prediction, which is currently too slow for real-time control requiring millisecond response times. Future research will focus on acceleration strategies, such as Nyström approximations or active learning, to reduce the computational overhead of the kernel-based prediction step.

Summary updated

Abstract

With the recent advances in machine learning, problems that traditionally would require accurate modeling to be solved analytically can now be successfully approached with data-driven strategies. Among these, computing the inverse kinematics of a redundant robot arm poses a significant challenge due to the non-linear structure of the robot, the hard joint constraints and the non-invertible kinematics map. Moreover, most learning algorithms consider a completely data-driven approach, while often useful information on the structure of the robot is available and should be positively exploited. In this work, we present a simple, yet effective, approach for learning the inverse kinematics. We introduce a structured prediction algorithm that combines a data-driven strategy with the model provided by a forward kinematics function -- even when this function is misspecified -- to accurately solve the problem. The proposed approach ensures that predicted joint configurations are well within the robot's constraints. We also provide statistical guarantees on the generalization properties of our estimator as well as an empirical evaluation of its performance on trajectory reconstruction tasks.
BibTeX
@article{marconi2021structured,
  author = {Gian Maria Marconi and Raffaello Camoriano and Lorenzo Rosasco and Carlo Ciliberto},
  title = {{Structured Prediction for CRiSP Inverse Kinematics Learning with Misspecified Robot Models}},
  journal = {IEEE Robotics Autom. Lett.},
  year = {2021},
  url = {https://openreview.net/forum?id=UlyXDajtDhx},
}
Figure