PyRoki : A Modular Toolkit for Robot Kinematic Optimization

Chung Min Kim, Brent YiHongsuk ChoiYi MaKen GoldbergAngjoo Kanazawa · 2025

Read PyRoki : A Modular Toolkit for Robot Kinematic Optimization by Chung Min Kim, Brent YiHongsuk ChoiYi MaKen GoldbergAngjoo Kanazawa (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2505-03728.txt.

Introduction

Chung Min Kim and co-authors present a software toolkit for planning robot joint motion. Their 2025 paper notes that robot tasks prize different goals: exact pose, speed, no crashes, or motion like a human demo. The toolkit, called PyRoki, lets users state joint variables and costs in a modular way, then solves with a fast least-squares method.

The same code runs on standard chips, graphics chips, and tensor chips alike. Case studies cover copying human motion onto robots and planning safe paths. In speed tests the toolkit ran about one and a half times faster than a known graphics-chip rival and reached lower errors. Modular design is the main selling point for research labs.

Catalog record

CREATORChung Min Kim, Brent YiHongsuk ChoiYi MaKen GoldbergAngjoo Kanazawa
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE28 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2505-03728

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

PyRoki : A Modular Toolkit for Robot Kinematic Optimization Chung Min Kim, Brent YiHongsuk ChoiYi MaKen GoldbergAngjoo Kanazawa Abstract Robot motion can have many goals. Depending on the task, we might optimize for pose error, speed, collision, or similarity to a human demonstration. Motivated by this, we present PyRoki : a modular, extensible, and cross-platform toolkit for solving kinematic optimization problems. PyRoki couples an interface for specifying kinematic variables and costs with an efficient nonlinear least squares optimizer. Unlike existing tools, it is also cross-platform: optimization runs natively on CPU, GPU, and TPU. In this paper, we present (i) the design and implementation of PyRoki , (ii) motion retargeting and planning case studies that highlight the advantages of PyRoki ’s modularity, and (iii) optimization benchmarking, where PyRoki can be 1.4-1.7x faster and converges to lower errors than cuRobo, an existing GPU-accelerated inverse kinematics library. † † footnotetext: ∗ Equal contribution. UC Berkeley https://pyroki-toolkit.github.io Figure 1: PyRoki is a modular, extensible, and cross-platform toolkit for kinematic optimization. We unify problems like inverse kinematics, trajectory optimization, and motion retargeting using composable kinematic variables and costs. PyRoki aims to support a broad variety of robots and tasks, and runs on CPU, GPU, and TPU. Hardware Supported Robots Tasks Features Method CPU GPU TPU Arm Hand Humanoid IK Traj. Opt. Retargeting Collision Custom Costs TracIK [ 1 ] ✓ ✗ ✗ ✓ ✓ ✓ ✓ ✗ ✗ ✓ ✗ pink [ 2 ] , mink [ 3 ] ✓ ✗ ✗ ✓ ✓ ✓ ✓ ✗ ✗ ✓ ✗ TrajOpt [ 4 ] ✓ ✗ ✗ ✓ ✓ ✓ ✗ ✓ ✗ ✓ ✗ cuRobo [ 5 ] ✗ ✓ ✗ ✓ ✗ ✗ ✓ ✓ ✗ ✓ ✓ Dex-Retargeting [ 6 ] ✓ ✗ ✗ ✗ ✓ ✗ ✓ ✗ ✓ ✗ ✗ H2O [ 7 ] ✓ ✗ ✗ ✗ ✗ ✓ ✓ ✗ ✓ ✗ ✗ PyRoki ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ Table I: Comparison between PyRoki and a selection of existing kinematic optimization tools. This table summarizes the documented features and supported functionalities of different frameworks, highlighting the broad capabilities of PyRoki . I Introduction Numerical optimization is the standard solution for many tasks in robot kinematics. Using objectives like pose error [ 8 ] , smoothness [ 9 ] , and similarity to a human demonstration [ 10 , 6 ] the robotics community has built diverse optimization software for tasks such as inverse kinematics (IK) [ 1 , 11 , 3 , 12 , 13 ] , trajectory optimization [ 4 , 14 , 15 , 5 , 16 , 17 , 18 , 19 ] , and motion retargeting [ 7 , 10 , 6 ] . These tools are fast, mature, and widely adopted in both research and production. Despite the shared structure of kinematic optimization, existing tools are fragmented. Implementations typically rely on task-specific C++ routines [ 1 ] , CUDA kernels [ 5 ] , or task-specific analytical Jacobians [ 3 ] . While these features can improve efficiency, they create barriers for incorporating new objectives. As shown in Table I , different task and robot hardware variations can require different tools. This fragmentation prevents tools from transferring between related problems. Low-level specialization also constrains computation: optimizers tend to be restricted to either only CPU or only GPU operation. We present PyRoki ( Py thon Ro bot Ki nematics), a modular, extensible, and cross-platform toolkit for kinematic optimization. The core idea behind PyRoki is that many tasks that currently require disjoint tools—such as IK, trajectory optimization, and motion retargeting—solve similar optimization problems. PyRoki provides (i) an interface for specifying these problems using modular variable and cost function abstractions, (ii) the ability to efficiently solve them using a Levenberg-Marquardt optimizer, and (iii) a web-based visualizer for interactively tuning cost weights. Furthermore, PyRoki is designed for efficient execution on CPU, GPU and TPU. The goal of PyRoki is to streamline kinematic optimization for robotics, just as deep learning frameworks like PyTorch [ 20 ] have made it easier to define and experiment with deep learning models. The contributions of this paper are as follows: 1. Toolkit. We present PyRoki , a modular toolkit for kinematic optimization for robotics. PyRoki directly supports standards like URDF [ 21 ] , and can run on CPU, GPU, and TPU. It also includes a real-time web-based visualizer to explore robot behavior, such as adjusting the impact of cost functions and adding new scene visualizations. 2. Applications. We demonstrate the effectiveness of PyRoki ’s unified framework across multiple tasks, including inverse kinematics, trajectory optimization, and motion retargeting for robot hands and humanoids. 3. Benchmarking. PyRoki solves optimization problems using a Levenberg-Marquardt solver. We evaluate PyRoki using both automatic and analytic Jacobians. For batched IK, PyRoki can be 1.4-1.7x faster than previous GPU-accelerated methods [ 5 ] . All code is released with an open-source license. II Related work II-A Inverse Kinematics The goal of inverse kinematics (IK) is to recover a joint configuration that achieves a desired end-effector pose. Classical approaches focus on recovering analytical, closed-form solutions for this problem [ 22 , 23 , 24 , 25 , 26 , 27 ] . These approaches are efficient, but require assumptions on kinematic configuration. Recent approaches have therefore focused more on iterative optimization [ 1 , 28 , 5 , 11 , 29 , 30 , 3 , 31 , 32 , 9 ] , which is more flexible. Optimization enables secondary objectives for controlling redundant degrees of freedoms [ 33 ] , both geometric [ 34 , 30 , 5 ] and learned [ 29 ] collision constraints, Critically, iterative optimization also generalizes across robot embodiments. The goal of PyRoki is to take this flexibility a step further. Rather than specialize for the IK task alone, PyRoki provides a kinematic optimization toolkit where IK can be defined using a subset of possible cost functions. II-B Trajectory Optimization While inverse kinematics focuses on solving for a single joint configuration, the goal of trajectory optimization is to output a continuous sequence of joint configurations. Methods include trajectory optimization with collision costs [ 14 , 15 , 16 , 4 , 35 , 36 ] , applications with multiple goal sets [ 37 ] , and simultaneous grasp and trajectory optimization [ 38 , 39 ] . An important insight made by [ 36 ] is that trajectory optimization can be accelerated by exploiting structure: each configuration in the trajectory interacts with its temporal neighbors, leading to sparse optimization problems. Trajectory optimization can therefore benefit from sparse linear algebra routines [ 40 , 41 , 42 , 43 , 44 ] , which PyRoki supports. II-C Motion Retargeting Motion retargeting is the problem of transferring motion from a source embodiment to a target embodiment [ 34 , 45 ] (e.g., from human to robot). Retargeting is critical step for many systems for robot teleoperation [ 6 , 46 ] and for learning from human demonstrations [ 47 , 7 , 48 , 49 ] , but is made challenging by kinematic differences between embodiments—it requires balancing both similarity and physical plausibility objectives [ 50 , 51 ]

Read the complete text