1k
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill dartsim/dart --skill dart-python- SKILL.md1.4 KB
Overview
This skill provides practical guidance for working with DART Python bindings (dartpy), covering building wheels, development workflows, API patterns, and useful commands. It helps engineers integrate C++20 physics simulation features into Python workflows for robotics, animation, and multibody dynamics. The content emphasizes build steps, naming conventions, and common pitfalls when wrapping DART with nanobind.
How this skill works
The skill describes how the dartpy package is built and consumed: a C++ nanobind-based extension compiled via CMake and packaged as Python wheels. It explains development commands for building, testing, and generating stubs, plus wheel-building steps for distribution. It also highlights API behaviors like automatic NumPy-to-Eigen conversion and naming conventions to avoid deprecation warnings.
When to use it
- When you need Python access to DART's collision, constraint, and rigid-body dynamics features.
- When building or distributing dartpy wheels for multiple Python versions or platforms.
- When developing C++ extensions with nanobind and CMake for Python interoperability.
- When converting NumPy data to Eigen types in simulation code.
- When debugging GUI-dependent features that require DART_BUILD_GUI=ON.
Best practices
- Prefer snake_case for Python APIs; camelCase methods may trigger deprecation warnings.
- Use the provided pixi commands to standardize build, test, and wheel workflows.
- Generate and ship type stubs to improve editor and CI type checking (python/stubs/dartpy/).
- Enable DART_BUILD_GUI only when a graphical frontend is required to avoid extra dependencies.
- Test wheels on target platforms using wheel-test and wheel-repair for Linux compatibility.
Example use cases
- Load URDF models and simulate robot dynamics in Python for control algorithm prototyping.
- Build development wheels locally with pixi run build-py-dev and iterate on bindings.
- Publish prebuilt wheels for CI and downstream users using the wheel-build and wheel-test pipeline.
- Use NumPy arrays as inputs to kinematics and dynamics routines without manual conversion.
- Run animation or physics demos that require GUI support by enabling DART_BUILD_GUI.
FAQ
Use the standardized command pixi run build-py-dev which runs the CMake build and produces an importable development package.
Do I need to convert NumPy arrays to Eigen manually?
No. The bindings auto-convert NumPy arrays to Eigen types, so pass arrays directly to kinematics and dynamics functions.