reference-motion
Load, classify, interpolate, validate, and safely inspect MyoSuite fixed, randomized, and tracked reference motions.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- reference-motion
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Load, classify, interpolate, validate, and safely inspect MyoSuite fixed, randomized, and tracked reference motions.
- disable-model-invocation
- true
02 资源文件 4
- 参考文档references/api-reference.md2.2 KB
- 参考文档references/troubleshooting.md3.1 KB
- 参考文档references/workflows.md2.2 KB
- 脚本scripts/reference_motion_smoke.py2.2 KB
03 SKILL.md 正文
MyoSuite reference motion
Use this route when a task involves reference trajectories, motion playback,
fixed/random/track targets, interpolation, initialization states, reference
logs, or examine_reference diagnostics.
Route the request
- Core task IDs, reset/step, and action/observation contracts:
environments. - Window/offscreen rendering and MuJoCo camera behavior:
simulation-rendering. - JAX parity or accelerated MJX reference handling:
mjx-acceleration. - Long-running policy training or learner configuration:
training-integration.
Read the API reference for the data contract,
workflows for bounded recipes, and
troubleshooting before diagnosing malformed
files or out-of-range times. The bundled
scripts/reference_motion_smoke.py is a safe in-memory check and does not need
original repository data.
Fast path
- Choose NumPy
ReferenceMotionfor a normal CPU environment. - Supply either a dict or a
.npz/.pkl/.picklepath containingtimeand the relevantrobot,robot_vel, andobjectarrays. - Let the class infer
FIXED(one frame),RANDOM(two low/high frames), orTRACK(more than two frames). - Call
get_init(), thenget_reference(time)at bounded times; callreset()before replaying a trajectory from its beginning. - Use
--render nonefor CLI playback in headless verification. Rendering is a separate route, not a prerequisite for checking interpolation.
import numpy as np
from myosuite.logger.reference_motion import ReferenceMotion
reference = {
"time": np.array([0.0, 1.0, 2.0]),
"robot": np.zeros((3, 2)),
"robot_vel": np.zeros((3, 2)),
"object": np.zeros((3, 7)),
}
motion = ReferenceMotion(reference)
robot_init, object_init = motion.get_init()
frame = motion.get_reference(0.5) # linearly interpolated TRACK frame
Validate dimensions and time bounds before coupling a motion to a task. Keep reference arrays and returned structures copied when storing them beyond one simulation step.
Verification boundary
Core NumPy reference handling and bounded synthetic fixed/random/track behavior
are suitable for CPU verification. JAX parity, large .npz corpora, and full
playback remain optional or data-dependent; never claim they pass from a CPU
import alone. The source-native candidate is the reference-motion test family,
run only when its data and optional dependencies are available.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).