dart-io
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese<!-- AUTO-GENERATED FILE - DO NOT EDIT MANUALLY -->
<!-- Source: .claude/skills/dart-io/SKILL.md -->
<!-- Sync script: scripts/sync_ai_commands.py -->
<!-- Run `pixi run sync-ai-commands` to update -->
<!-- 自动生成文件 - 请勿手动编辑 -->
<!-- 来源: .claude/skills/dart-io/SKILL.md -->
<!-- 同步脚本: scripts/sync_ai_commands.py -->
<!-- 运行 `pixi run sync-ai-commands` 进行更新 -->
DART Model Loading (dart::io
)
dart::ioDART模型加载(dart::io
)
dart::ioLoad this skill when working with robot model files or parsers.
在处理机器人模型文件或解析器时加载此技能。
Quick Start
快速开始
cpp
#include <dart/io/Read.hpp>
// Format auto-detection
auto world = dart::io::readWorld("dart://sample/skel/chain.skel");
auto skel = dart::io::readSkeleton("dart://sample/urdf/KR5/KR5 sixx R650.urdf");cpp
#include <dart/io/Read.hpp>
// 自动检测格式
auto world = dart::io::readWorld("dart://sample/skel/chain.skel");
auto skel = dart::io::readSkeleton("dart://sample/urdf/KR5/KR5 sixx R650.urdf");Full Documentation
完整文档
For complete I/O guide:
docs/onboarding/io-parsing.mdFor module-specific details:
dart/io/AGENTS.md完整I/O指南请查看:
docs/onboarding/io-parsing.md模块详细信息请查看:
dart/io/AGENTS.mdSupported Formats
支持的格式
| Format | Extension | Use Case |
|---|---|---|
| URDF | | ROS robots |
| SDF | | Gazebo models |
| MJCF | | MuJoCo models |
| SKEL | | Legacy DART |
| 格式 | 扩展名 | 使用场景 |
|---|---|---|
| URDF | | ROS机器人 |
| SDF | | Gazebo模型 |
| MJCF | | MuJoCo模型 |
| SKEL | | 旧版DART |
Common Patterns
常见模式
cpp
// URDF with package resolution
dart::io::ReadOptions options;
options.addPackageDirectory("my_robot", "/path/to/my_robot");
auto skel = dart::io::readSkeleton("package://my_robot/urdf/robot.urdf", options);
// Force specific format
options.format = dart::io::ModelFormat::Sdf;cpp
// 带包路径解析的URDF
dart::io::ReadOptions options;
options.addPackageDirectory("my_robot", "/path/to/my_robot");
auto skel = dart::io::readSkeleton("package://my_robot/urdf/robot.urdf", options);
// 强制指定格式
options.format = dart::io::ModelFormat::Sdf;Key Files
关键文件
- API:
dart/io/Read.hpp - Tests:
tests/unit/io/test_Read.cpp
- API:
dart/io/Read.hpp - 测试:
tests/unit/io/test_Read.cpp