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

Function convert

data/kitml_converter.py:196–208  ·  view source on GitHub ↗
(x)

Source from the content-addressed store, hash-verified

194
195
196def convert(x):
197 x = np.array(x)
198 if x.shape[0] == 3:
199 x = x[[0, 2, 1]]
200 x[1] *= -1
201 return x
202 if x.shape[0] == 1:
203 x = euler_to_quaternion(np.array([0, -1 * x[0], 0]))
204 return x
205 else:
206 x = x[[0, 1, 3, 2]]
207 x[2] *= -1
208 return x
209
210
211def interpolate(y, dt, target_dt, gt=None):

Callers

nothing calls this directly

Calls 1

euler_to_quaternionFunction · 0.85

Tested by

no test coverage detected