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

Function set_endpoint_to_zero

tools/demo.py:43–50  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

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
45 end_loc = np.zeros([data.shape[0], data.shape[1], num_obj, 3])
46 end_loc[..., :18, :2] += np.copy(data[:, -1:, None, :2])
47 end_loc[..., 19:, :2] += np.copy(data[:, -1:, None, :2])
48 end_loc = end_loc.reshape([data.shape[0], data.shape[1], num_obj * 3])
49 data[..., :num_obj*3] = np.copy(data[..., :num_obj*3]) - end_loc
50 return data
51
52def set_endpoint_to_xy(data, x, y):
53 num_obj = data.shape[-1] // 13

Callers 2

diffusion_plannerFunction · 0.85
demo.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected