Saved in:
Bibliographic Details
Main Authors: Guo, Weihang, Tyrovouzis, Theodoros, Kavraki, Lydia E.
Format: Preprint
Published: 2026
Subjects:
Online Access:https://arxiv.org/abs/2603.04668
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866915835540406272
author Guo, Weihang
Tyrovouzis, Theodoros
Kavraki, Lydia E.
author_facet Guo, Weihang
Tyrovouzis, Theodoros
Kavraki, Lydia E.
contents Python bindings are a critical bridge between high-performance C++ libraries and the flexibility of Python, enabling rapid prototyping, reproducible experiments, and integration with simulation and learning frameworks in robotics research. Yet, generating bindings for large codebases is a tedious process that creates a heavy burden for a small group of maintainers. In this work, we investigate the use of Large Language Models (LLMs) to assist in generating nanobind wrappers, with human experts kept in the loop. Our workflow mirrors the structure of the C++ codebase, scaffolds empty wrapper files, and employs LLMs to fill in binding definitions. Experts then review and refine the generated code to ensure correctness, compatibility, and performance. Through a case study on a large C++ motion planning library, we document common failure modes, including mismanaging shared pointers, overloads, and trampolines, and show how in-context examples and careful prompt design improve reliability. Experiments demonstrate that the resulting bindings achieve runtime performance comparable to legacy solutions. Beyond this case study, our results provide general lessons for applying LLMs to binding generation in large-scale C++ projects.
format Preprint
id arxiv_https___arxiv_org_abs_2603_04668
institution arXiv
publishDate 2026
record_format arxiv
spellingShingle Python Bindings for a Large C++ Robotics Library: The Case of OMPL
Guo, Weihang
Tyrovouzis, Theodoros
Kavraki, Lydia E.
Robotics
Python bindings are a critical bridge between high-performance C++ libraries and the flexibility of Python, enabling rapid prototyping, reproducible experiments, and integration with simulation and learning frameworks in robotics research. Yet, generating bindings for large codebases is a tedious process that creates a heavy burden for a small group of maintainers. In this work, we investigate the use of Large Language Models (LLMs) to assist in generating nanobind wrappers, with human experts kept in the loop. Our workflow mirrors the structure of the C++ codebase, scaffolds empty wrapper files, and employs LLMs to fill in binding definitions. Experts then review and refine the generated code to ensure correctness, compatibility, and performance. Through a case study on a large C++ motion planning library, we document common failure modes, including mismanaging shared pointers, overloads, and trampolines, and show how in-context examples and careful prompt design improve reliability. Experiments demonstrate that the resulting bindings achieve runtime performance comparable to legacy solutions. Beyond this case study, our results provide general lessons for applying LLMs to binding generation in large-scale C++ projects.
title Python Bindings for a Large C++ Robotics Library: The Case of OMPL
topic Robotics
url https://arxiv.org/abs/2603.04668