Neural Inverse Kinematics

Raphael Bensadoun, Shir Gur, Nitsan Blau, Tom Shenkar, Lior WolfarXiv 2022 · DOI

Abstract

Inverse Kinematics (IK) is a fundamental challenge in robotics due to its non-linear and redundant nature. We present IKNet, a hierarchical deep learning framework that employs a hypernetwork to sequentially sample valid joint configurations. By modeling joint distributions as Gaussian Mixture Models (GMMs), IKNet effectively captures multiple valid solutions for a single target position. Our evaluation demonstrates that IKNet outperforms traditional optimization-based solvers and standard neural baselines in both computational speed and accuracy across various robotic platforms.

Introduction

In robotics, Forward Kinematics is a mathematically straightforward process: given joint angles, one can easily calculate the end-effector's position. However, the reverse process—Inverse Kinematics (IK)—is significantly more complex. The challenge stems from the non-linear trigonometric relationships and the "one-to-many" problem, where multiple joint configurations can reach the same target point.

Traditional numerical solvers are often slow, iterative, and prone to local minima. Standard neural network approaches often fail because they attempt to average multiple valid solutions, resulting in physically impossible configurations. IKNet addresses these issues by treating IK as a hierarchical sampling problem.

Visualization of the one-to-many IK problem and GMM joint distributions for 2-joint (a, b) and 4-joint (c, d) planar chains.

Methodology

IKNet introduces a novel architecture that mirrors the physical structure of a robot's kinematic chain. Instead of predicting all joint angles simultaneously, it predicts them sequentially from the base to the tip.

The Hypernetwork Architecture

At the core of IKNet is a Hypernetwork ($f$). This network takes the target end-effector position $x$ as input and generates the weights for a series of Primary Networks ($g_1, g_2, \dots, g_N$). This allows the model to dynamically reconfigure the primary networks for every specific target, providing significantly higher representational capacity than standard conditioning methods.

IKNet architecture featuring a hypernetwork f that generates parameters for sequential primary networks g_k to output GMM parameters.

Sequential GMM Sampling

Each primary network $g_k$ outputs the parameters for a Gaussian Mixture Model (GMM) representing the distribution of the $k$-th joint angle. This probabilistic approach allows the model to represent multiple distinct solution modes (e.g., "elbow-up" vs. "elbow-down"). During inference, an angle is sampled from the GMM and fed into the subsequent network ($g_{k+1}$), ensuring physical consistency throughout the chain. During training, Teacher Forcing is utilized to maintain stability by using ground-truth joint angles for sequential inputs.

Experiments and Results

IKNet was evaluated on several configurations, including 2D toy examples, the 4-DoF Digit arm, the 6-DoF UR5 industrial arm, and the 7-DoF Franka Emika Panda arm.

Performance and Speed

  • Accuracy: On the Digit arm, IKNet achieved a 99.5% accuracy (within a 10cm threshold), outperforming the IKPy library's 79.0%.
  • Efficiency: As a feed-forward network, IKNet is 10x to 20x faster than iterative optimization methods. For the UR5 arm, inference took 0.012s compared to 0.120s for traditional solvers.
  • Robustness: The model demonstrated strong generalization capabilities. When tested on a "Robustness Set" with randomized segment lengths ($\pm 20\%$), the model maintained high performance, suggesting resilience to real-world hardware wear.

Conclusion

IKNet provides a robust and efficient solution to the IK problem by leveraging the hierarchical nature of robotic arms and the flexibility of hypernetworks. By utilizing GMMs to handle solution redundancy, it avoids the pitfalls of standard regression models. Future work includes integrating IKNet into end-to-end reinforcement learning pipelines, potentially allowing robots to learn reaching tasks directly from visual inputs.

Summary updated

BibTeX
@misc{bensadoun2022neural,
  author = {Raphael Bensadoun and Shir Gur and Nitsan Blau and Tom Shenkar and Lior Wolf},
  title = {{Neural Inverse Kinematics}},
  year = {2022},
  eprint = {2205.10837},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2205.10837},
}
Figure