技能创建器
skill-creator
创建、改进和评估自定义技能,把专业流程转化为可重复使用的 AI 能力。
trajectories-and-datasets【数据与研究】Record ManiSkill episodes, replay and convert HDF5 trajectories, manage demos/assets, and plan motion-planning or teleoperation data workflows.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this sub-skill from the mani-skill root when the task is about recorded
ManiSkill data: collecting episodes, downloading demonstration or asset bundles,
replaying HDF5 trajectories, converting trajectories, loading trajectory data in
Python, running motion-planning data generation examples, or collecting
teleoperation demonstrations.
Route away from this sub-skill when the request is mainly about:
../environment-usage/.../custom-environments/.| User need | Use |
|---|---|
| Record episodes from an already-created environment | RecordEpisode; see CLI/API notes. |
Understand .h5/.json trajectory bundles | data layout. |
| Validate a trajectory bundle before doing anything expensive | python scripts/inspect_trajectory_bundle.py PATH/trajectory.h5. |
| Plan a replay command without running replay | python scripts/plan_replay_command.py PATH/trajectory.h5 .... |
| Download official demos or required assets | download planning and python scripts/preview_download_options.py. |
| Replay demonstrations to add observations/rewards/videos or convert control modes | replay workflows. |
| Convert ManiSkill trajectories to LeRobot format | LeRobot conversion and python scripts/plan_lerobot_conversion.py. |
| Load data with PyTorch | ManiSkillTrajectoryDataset; see CLI/API notes. |
| Generate data from built-in motion-planning examples | motion-planning workflow. |
| Collect click+drag teleoperation data | teleoperation workflow. |
| Diagnose failed replay, conversion, recording, downloads, or display issues | troubleshooting. |
.h5 file plus a sibling
.json file with the same stem. Replay, dataset loading, and LeRobot
conversion all rely on the JSON metadata.<obs_mode>.<control_mode>.<sim_backend>, but the JSON env_info and each
episode's control_mode, reset_kwargs, and info are authoritative.source_type and source_desc when recording new demos so future agents
can distinguish motion-planning, teleoperation, RL-policy, or other sources.from mani_skill.utils.wrappers.record import RecordEpisode
env = RecordEpisode(
env,
output_dir="demos/PickCube-v1/manual-check",
trajectory_name="trajectory",
save_trajectory=True,
save_video=False,
source_type="manual",
source_desc="short human-readable collection note",
)
Close the wrapper to flush metadata, then validate the bundle:
python scripts/inspect_trajectory_bundle.py demos/PickCube-v1/manual-check/trajectory.h5
python -m mani_skill.trajectory.replay_trajectory \
--traj-path demos/PickCube-v1/teleop/trajectory.h5 \
--save-traj -o state -c pd_joint_delta_pos
For exact visual/state reproduction, prefer --use-env-states; for CPU-to-GPU
or GPU-to-CPU replay attempts, consider --use-first-env-state and keep the
original backend available when precision matters.
python scripts/plan_lerobot_conversion.py \
demos/PickCube-v1/teleop/trajectory.h5 \
converted/pickcube_lerobot
The planner only prints the command and dependency status. Run the printed
python -m mani_skill.trajectory.convert_to_lerobot ... command only after the
user confirms the conversion and output directory.
RecordEpisode, replay, converter, downloader, dataset, and
generation examples.scripts/inspect_trajectory_bundle.py: safe HDF5/JSON bundle validator.scripts/plan_replay_command.py: safe replay-command planner.scripts/plan_lerobot_conversion.py: safe LeRobot conversion-command planner
and dependency checker.scripts/preview_download_options.py: safe demo/asset UID and command planner;
it does not download anything.