Python Bindings for a Large C++ Robotics Library: The Case of OMPL
Weihang Guo, Theodoros Tyrovouzis, Lydia E. Kavraki

TL;DR
This paper explores using Large Language Models to automate the generation of Python bindings for large C++ robotics libraries, improving efficiency and reliability while maintaining high performance.
Contribution
It introduces a workflow leveraging LLMs with human oversight for generating bindings in large C++ codebases, demonstrating effectiveness through a case study on OMPL.
Findings
LLMs can assist in generating correct binding code with human review.
Prompt design and in-context examples improve LLM reliability.
Bindings achieve performance comparable to legacy solutions.
Abstract
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,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Engineering Research · Computational Physics and Python Applications · Software Testing and Debugging Techniques
