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

Function car_dynamics

mbd/envs/car2d.py:10–19  ·  view source on GitHub ↗
(x, u)

Source from the content-addressed store, hash-verified

8
9
10def car_dynamics(x, u):
11 # x = x.at[3].set(jnp.clip(x[3], -2.0, 2.0))
12 return jnp.array(
13 [
14 u[1] * jnp.sin(x[2])*3.0, # x_dot
15 u[1] * jnp.cos(x[2])*3.0, # y_dot
16 u[0] * jnp.pi / 3 * 2.0, # theta_dot
17 # u[1] * 6.0, # v_dot
18 ]
19 )
20
21
22def rk4(dynamics, x, u, dt):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected