dart-python
GitHub提供dartpy Python绑定的开发指南,涵盖模型加载、动力学仿真及渲染等核心功能。包含快速启动代码、构建测试命令、轮子打包流程及关键编程模式(如命名规范与类型转换),并关联验证技能以确保仿真准确性。
Trigger Scenarios
Install
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/rendering output, or a visual
example, also load dart-verify-sim. Pair a focused Python text/behavior oracle
with an assessed, claim-tied headless capture; document a visual exception when
rendering is unavailable or not applicable.
Quick Start
import dartpy as dart
world = dart.World()
skel = dart.io.read_skeleton("dart://sample/urdf/KR5/KR5 sixx R650.urdf")
world.add_skeleton(skel)
for _ in range(100):
world.step()
Full Documentation
For complete Python bindings guide: docs/onboarding/python-bindings.md
For module-specific details: python/AGENTS.md
Quick Commands
pixi run build-py-dev # Build for development
pixi run test-py # Run Python tests
pixi run generate-stubs # Generate type stubs
Wheel Building
pixi run -e py314-wheel wheel-build
pixi run -e py314-wheel wheel-repair # Linux only
pixi run -e py314-wheel wheel-test
Key Patterns
- snake_case preferred (camelCase emits DeprecationWarning)
- NumPy arrays auto-convert to Eigen types
- GUI requires
DART_BUILD_GUI=ON
Key Files
- Package config:
pyproject.toml - Build system:
python/dartpy/CMakeLists.txt - Type stubs:
python/stubs/dartpy/
Version History
-
b9fbefc
Current 2026-07-19 11:30
升级AI基础设施并引入视觉验证(#3386)。新增建议:在涉及模型加载、物理仿真或可视化输出时,协同加载dart-verify-skill以进行断言关联的无头捕获和异常文档记录。
- e0d13fd 2026-07-05 10:36


