GenCHiP: Generating Robot Policy Code for High-Precision and Contact-Rich Manipulation Tasks

Kaylee Burns, Ajinkya Jain, Keegan Go, Fei Xia, Michael Stark, Stefan Schaal, Karol Hausman

Large Language Models (LLMs) have proven remarkably adept at high-level robotic planning—think "go to the kitchen and find a snack." However, when it comes to the "gritty" reality of physical interaction—like threading a needle, inserting a peg, or routing a cable—they often stumble. The issue isn't just a lack of precision; it’s a lack of compliance.

A new paper, GenCHiP, proposes a solution: instead of asking LLMs to command exact coordinates, we should give them an action space that understands forces and flexibility.

TL;DR

GenCHiP enables LLMs to generate code for high-precision, contact-rich manipulation tasks by reparameterizing the robot's action space to include compliance and force constraints. By moving from rigid point-to-point commands to force-aware "compliant" moves, the system achieves a 3x-4x improvement in success rates on challenging assembly benchmarks.

What Problem Does This Paper Address?

In robotics, "contact-rich" tasks are those where the robot must physically interact with its environment to succeed. Examples include assembly, plugging in connectors, or wiping a table. Traditionally, these tasks are solved using hand-tuned controllers or thousands of reinforcement learning trials.

LLMs struggle here for two main reasons:

  1. The Precision Gap: Standard robot APIs use "point-to-point" moves. If an LLM-generated coordinate is off by just a millimeter during a peg insertion, a rigid robot will hit the surface, exert massive force, and likely trigger a safety fault.
  2. Lack of Feedback: High-level planners often ignore the "feel" of the task—the resistance felt when a part is misaligned or the sudden drop in force when a peg finds its hole.

The authors ask: Can we bridge this gap by giving LLMs an API that allows them to reason about forces and stiffness?

Fig. 1: (a) We prompt an LLM to generate code for high-precision tasks. By using an action space that paramterizes compliant behavior, the LLM is able to generate action sequences for contact-rich tasks like peg insertion. (b) Language models’ ability to reason about object geometry and make plans by using world knowledge about different object enables zero-shot generalization to new tasks.

Methods

The core innovation of GenCHiP is the Compliant Action Space. Instead of a simple move_to(x, y, z), the authors provide the LLM with a cartesian_admittance_move function. This function accepts:

  • Target Pose: The goal position.
  • Stiffness ($\sigma$): How "rigid" or "soft" the robot should be along different axes.
  • Force Constraints: Termination conditions based on sensed forces (e.g., "stop moving down once you feel 1 Newton of upward resistance").

By using impedance/admittance control, the robot behaves like a spring-mass-damper system. If it hits an obstacle, it "gives" rather than crashing.

The authors use Few-Shot Prompting to teach the LLM how to use this API. They provide a task description, a detailed doc-string of the control API, and a few examples of "search patterns"—like a zigzag motion used to find a hole when the exact location is uncertain.

Fig. 5: Compliance prevents the robot from faulting when in contact. Conditional termination constraints enable the language model to reason about contact forces. In this example, the robot moves a cable back and forth until no more upward force is detected, which indicates that an opening has been found.

Datasets & Benchmarks

The authors evaluated GenCHiP on three challenging real-world benchmarks:

  1. Functional Manipulation Benchmark (FMB): Peg-in-hole insertion tasks using various 3D-printed shapes (circle, star, and the particularly difficult half-pipe).
  2. NIST Assembly Task Board #1: A waterproof connector insertion task requiring high precision.
  3. IROS 2020 Robotic Grasping and Manipulation Competition (RGMC): Deformable object manipulation, specifically routing and unrouting cables around screws and brackets.

Key Insights and Ideas

  • Action Space is the Bottleneck, Not Reasoning: The LLM's "world knowledge" is already sufficient to understand that a star-shaped peg needs rotation to align, while a circular one doesn't. The failure of previous methods wasn't a lack of "intelligence," but a lack of a "language" (the API) to express physical nuances.
  • Robustness to Noise: Because the action space is compliant, the system is surprisingly robust to perceptual errors. Even if the vision system's pose estimate is off by 4mm, the LLM-generated search pattern can "feel" its way to the correct alignment.
  • LLMs as Continuous Reasoners: A common critique is that LLMs can't handle floating-point numbers. The authors found that by simply adding spaces between digits (e.g., 1 . 3 9 3), LLMs like GPT-4 can perform remarkably accurate linear regression and sequence extrapolation, which is vital for generating precise robotic trajectories.

Key Results

GenCHiP significantly outperformed the standard "Code-as-Policies" (CaP) approach, which uses non-compliant moves:

  • 3x to 4x Improvement: On average, GenCHiP was over 3 times more successful than non-compliant baselines.
  • Half-Pipe Success: On the difficult half-pipe insertion (which has only one valid orientation), GenCHiP achieved a 50% success rate, while the non-compliant baseline failed completely (0%).
  • Cable Routing: In the IROS RGMC cable routing task, GenCHiP (Few-Shot) achieved 100% success, compared to 0% for the non-compliant baseline.
The tasks used for evaluation, including FMB shapes and industrial assembly components.

Limitations and Future Work

While GenCHiP is a major step forward, the authors note several areas for improvement:

  • Inferring Force Values: LLMs struggle to guess the exact Newton values for force constraints (e.g., is 1N or 5N appropriate?) without seeing examples first.
  • Complex Logic: In zero-shot settings, the models sometimes generate while loops that are incompatible with the robot's real-time control API.
  • Spatial Reasoning: While the LLM can use pose estimation APIs, it still lacks a deep "visual" understanding of complex 3D scenes. Future work could integrate vision-language models (VLMs) to provide richer spatial context directly into the prompt.

Summary updated

BibTeX
@inproceedings{burns2024genchip,
  author = {Kaylee Burns and Ajinkya Jain and Keegan Go and Fei Xia and Michael Stark and Stefan Schaal and Karol Hausman},
  title = {{GenCHiP: Generating Robot Policy Code for High-Precision and Contact-Rich Manipulation Tasks}},
  booktitle = {IEEE/RSJ International Conference on Intelligent Robots and Systems},
  year = {2024},
  doi = {10.1109/iros58592.2024.10801525},
}
Figure