Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions scripts/replay_npz.py
Original file line number Diff line number Diff line change
Expand Up @@ -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),
)
Expand Down