From 540d31f201a71575afae99551557c2e0a7629226 Mon Sep 17 00:00:00 2001 From: norikenpi Date: Sun, 17 May 2026 00:36:40 +0900 Subject: [PATCH] fix: update replay_npz for MotionLoader API --- scripts/replay_npz.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/replay_npz.py b/scripts/replay_npz.py index 6d62ae2..c7c8011 100644 --- a/scripts/replay_npz.py +++ b/scripts/replay_npz.py @@ -95,15 +95,14 @@ def run_simulator(sim: sim_utils.SimulationContext, scene: InteractiveScene): else: raise ValueError("Either --motion or --registry_name must be provided.") - # Load npz file to get body names and determine body_indexes - # For K1, we typically use Trunk as anchor body (index 0) - # body_indexes should be a list of indices corresponding to the bodies we want to use - # For replay, we only need the anchor body (Trunk), which is typically at index 0 - body_indexes = [0] # Default to index 0 for anchor body (Trunk) + # For K1, we typically use Trunk as anchor body. + track_body_names = ["Trunk"] + track_joint_names = robot.joint_names motion = MotionLoader( motion_file, - body_indexes, + track_body_names, + track_joint_names, tail_len=0, device=str(sim.device), )