dart-python
GitHub提供dartpy Python绑定的开发指南,涵盖nanobind绑定、构建流程、测试及API规范。
触发场景
安装
npx skills add dartsim/dart --skill dart-python -g -y
SKILL.md
Frontmatter
{
"name": "dart-python",
"description": "DART Python: dartpy bindings, nanobind, wheels, and API patterns"
}
DART Python Bindings (dartpy)
Load this skill when working with Python bindings or dartpy.
When a binding exposes or changes model/scene loading, dynamics,
collision/contact/constraints, simulation stepping, GUI/Filament output, or a visual example, also
load dart-verify-sim. Pair a focused Python text/behavior oracle with an
assessed, claim-tied Filament capture; document a visual exception when capture is
unavailable or not applicable.
Quick Start
import dartpy as dart
world = dart.simulation.World()
loader = dart.utils.DartLoader()
skel = loader.parseSkeleton("dart://sample/urdf/six_axis_arm/six_axis_arm.urdf")
world.addSkeleton(skel)
for _ in range(100):
world.step()
Full Documentation
For complete Python bindings guide: docs/onboarding/python-bindings.md
For current examples and test patterns: python/examples/ and python/tests/
Quick Commands
pixi run build-py-dev # Build for development
pixi run test-py # Run Python tests that need no graphics device
pixi run test-gui # Run dartpy.gui rendering and integration tests
Wheel Building
This development branch ships Pixi-managed wheel tasks. The core tasks are
wheel-build-core, wheel-repair-linux-core, wheel-repair-macos-core,
wheel-repair-windows-core, wheel-verify-core, and wheel-test-core;
the py312-wheel environment exposes wheel-build, wheel-repair,
wheel-verify, and wheel-test on top of them, and py313-wheel exposes
wheel-test-abi3. Every wheel is cp312-abi3, built by scikit-build-core
from pyproject.toml. CI runs them in
.github/workflows/publish_dartpy.yml (for example
pixi run -e py312-wheel wheel-build). See
docs/onboarding/python-bindings.md for the wheel workflow overview.
Key Patterns
- nanobind is dartpy's only binder on
main, underpython/dartpy/. Use the DART 6.20 compatibility notes in the owner guide. - Until the PLAN-624 rename lands, follow the current binding names in
python/examplesandpython/tests; bind new DART 7 APIs directly in the DART 7 Python style (snake_case, properties, keyword-only options) from the PLAN-624 design doc. - NumPy arrays auto-convert to Eigen types
dartpy.guialways exists: dartpy requiresDART_BUILD_IOandDART_BUILD_GUI. GUI callers use the Filament-backeddart.gui.Viewerand related neutral classes; import and viewer construction need no display.
Key Files
- Package config:
pyproject.toml(scikit-build-core) and the PEP 517 wrapperscripts/pep517/dartpy_backend.py - Package files:
python/dartpy/package/(__init__.py,py.typed,experimental/) - Binding dependencies:
python/CMakeLists.txt - Binding build system:
python/dartpy/CMakeLists.txt
版本历史
-
aa707ae
当前 2026-11-02 12:53
更新示例模型为DART六轴机械臂;重构包结构以支持cp312-abi3 wheel构建。
-
f630c91
2026-10-18 20:26
将 nanobind 设为唯一绑定器并移除 pybind11;替换 OSG 为 Filament 渲染器;确立 main 分支为开发主线;新增针对 DART 7.0 的 API 设计与 ABI3 轮子构建支持。
-
deb9869
2026-09-08 21:46
整合 AI 使用指南并改进模型升级审计流程。
-
bcd584e
2026-09-02 23:41
简化了触发 dart-verify-sim 的场景描述,从具体的模型/场景加载等细节概括为更通用的“3D 结构或行为”。
-
b9fbefc
2026-07-19 11:30
升级AI基础设施并引入视觉验证(#3386)。新增建议:在涉及模型加载、物理仿真或可视化输出时,协同加载dart-verify-skill以进行断言关联的无头捕获和异常文档记录。
- e0d13fd 2026-07-05 10:36


