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

Function display

tools/demo.py:24–41  ·  view source on GitHub ↗
(traj, history)

Source from the content-addressed store, hash-verified

22
23
24def display(traj, history):
25 if history is not None:
26 traj = np.concatenate([history[:, :-1], traj], axis=1)
27 env = envs.get_environment(
28 env_name="humanoid_mimic_hit",
29 system_config='smpl',
30 )
31 traj = traj.transpose(1, 0, 2) # TxNxD
32 num_row, num_col = 2, 2
33 seed = 0
34 for _ in range(num_row):
35 for col in st.columns(num_col):
36 with col:
37 qp = [deserialize_qp(traj[i, seed]) for i in range(traj.shape[0])]
38 components.html(html.render(env.sys, qp, height=300), height=300)
39 seed += 1
40 # qp = [deserialize_qp(traj[i, 0]) for i in range(traj.shape[0])]
41 # components.html(html.render(env.sys, qp, height=300), height=300)
42
43def set_endpoint_to_zero(data):
44 num_obj = data.shape[-1] // 13

Callers 1

demo.pyFile · 0.85

Calls 1

deserialize_qpFunction · 0.90

Tested by

no test coverage detected