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

Function init

data/kitml_converter.py:60–71  ·  view source on GitHub ↗
(qp)

Source from the content-addressed store, hash-verified

58 world_ang = ase_ang[i][1:]
59
60 def init(qp):
61 pos = jp.index_update(qp.pos, 0, pelvis_trans[i])
62 rot = ase_poses[i][0] / jp.norm(ase_poses[i][0]) # important
63 # print(rot)
64 rot = math.quat_mul(math.euler_to_quat(np.array([0., -90, 0.])), rot)
65 # print(rot)
66 # raise
67 rot = jp.index_update(qp.rot, 0, rot)
68 vel = jp.index_update(qp.vel, 0, ase_vel[i][0])
69 ang = jp.index_update(qp.ang, 0, ase_ang[i][0])
70 qp = qp.replace(pos=pos, rot=rot, vel=vel, ang=ang)
71 return qp
72
73 qp = init(qp)
74 amp_rot = local_rot[joint_order]

Callers 1

convert_to_qpFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected