MCPcopy Create free account
hub / github.com/MotrixLab/insactor / show_rollout_traj

Function show_rollout_traj

visualize.py:23–40  ·  view source on GitHub ↗
(rollout_traj, tag)

Source from the content-addressed store, hash-verified

21
22
23def show_rollout_traj(rollout_traj, tag):
24 if len(rollout_traj.shape) == 3:
25 seed = st.slider(f'Random seed ({tag})', 0, rollout_traj.shape[1] - 1, 0)
26 rollout_traj = rollout_traj[:, seed]
27
28 if rollout_traj.shape[-1] > 247:
29 env_name = 'humanoid_mimic_hit'
30 else:
31 env_name = 'humanoid_mimic'
32
33 rollout_qp = [deserialize_qp(rollout_traj[i]) for i in range(rollout_traj.shape[0])]
34 rollout_traj = serialize_qp(deserialize_qp(rollout_traj))
35
36 env = envs.get_environment(
37 env_name=env_name,
38 system_config='smpl',
39 )
40 components.html(html.render(env.sys, rollout_qp, height=500), height=500)
41
42
43def main():

Callers 1

mainFunction · 0.85

Calls 2

deserialize_qpFunction · 0.90
serialize_qpFunction · 0.90

Tested by

no test coverage detected