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

Function serialize_qp

diffmimic/utils/io.py:17–28  ·  view source on GitHub ↗
(qp)

Source from the content-addressed store, hash-verified

15
16
17def serialize_qp(qp) -> jnp.array:
18 pos = qp.pos
19 rot = qp.rot
20 vel = qp.vel
21 ang = qp.ang
22 batch_dim = pos.shape[:-2]
23 nparray = []
24 nparray.append(pos.reshape(batch_dim + (-1,)))
25 nparray.append(rot.reshape(batch_dim + (-1,)))
26 nparray.append(vel.reshape(batch_dim + (-1,)))
27 nparray.append(ang.reshape(batch_dim + (-1,)))
28 return jnp.concatenate(nparray, axis=-1)

Callers 10

show_rollout_trajFunction · 0.90
add_scene_to_trajFunction · 0.90
remove_scene_from_trajFunction · 0.90
execute_actionsFunction · 0.90
add_scene_to_trajFunction · 0.90
remove_scene_from_trajFunction · 0.90
resetMethod · 0.90
execute_actionsFunction · 0.90
trainFunction · 0.90
resetMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected