MCPcopy Create free account
hub / github.com/LeCAR-Lab/model-based-diffusion / check_collision

Function check_collision

mbd/envs/car2d.py:30–32  ·  view source on GitHub ↗
(x, obs_center, obs_radius)

Source from the content-addressed store, hash-verified

28
29
30def check_collision(x, obs_center, obs_radius):
31 dist2objs = jnp.linalg.norm(x[:2] - obs_center, axis=1)
32 return jnp.any(dist2objs < obs_radius)
33
34
35@struct.dataclass

Callers 1

stepMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected