(qp)
| 15 | |
| 16 | |
| 17 | def 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) |
no outgoing calls
no test coverage detected