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模型加载(
dart::io

Load 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.md
For module-specific details:
dart/io/AGENTS.md
完整I/O指南请查看:
docs/onboarding/io-parsing.md
模块详细信息请查看:
dart/io/AGENTS.md

Supported Formats

支持的格式

FormatExtensionUse Case
URDF
.urdf
ROS robots
SDF
.sdf
,
.world
Gazebo models
MJCF
.xml
MuJoCo models
SKEL
.skel
Legacy DART
格式扩展名使用场景
URDF
.urdf
ROS机器人
SDF
.sdf
,
.world
Gazebo模型
MJCF
.xml
MuJoCo模型
SKEL
.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