(rollout_traj, tag)
| 21 | |
| 22 | |
| 23 | def 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 | |
| 43 | def main(): |
no test coverage detected