Skip to content

Commit

Permalink
update lqr examples
Browse files Browse the repository at this point in the history
  • Loading branch information
hanyas committed Aug 11, 2022
1 parent 3d278a1 commit 2c8198a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion examples/lqr/lq.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def double_integrator(
) -> jnp.ndarray:
A: jnp.ndarray = jnp.array([[0.0, 1.0], [0.0, 0.0]])
B: jnp.ndarray = jnp.array([[0.0], [1.0]])
return A @ state + B @ action
c: jnp.ndarray = jnp.array([0.0, 0.0])
return A @ state + B @ action + c


simulation_step = 0.01
Expand Down
3 changes: 2 additions & 1 deletion examples/lqr/lq_ioc.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def double_integrator(
) -> jnp.ndarray:
A: jnp.ndarray = jnp.array([[0.0, 1.0], [0.0, 0.0]])
B: jnp.ndarray = jnp.array([[0.0], [1.0]])
return A @ state + B @ action
c: jnp.ndarray = jnp.array([0.0, 0.0])
return A @ state + B @ action + c


simulation_step = 0.01
Expand Down
3 changes: 2 additions & 1 deletion examples/maxent_lqr/lq.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def double_integrator(
) -> jnp.ndarray:
A: jnp.ndarray = jnp.array([[0.0, 1.0], [0.0, 0.0]])
B: jnp.ndarray = jnp.array([[0.0], [1.0]])
return A @ state + B @ action
c: jnp.ndarray = jnp.array([0.0, 0.0])
return A @ state + B @ action + c


simulation_step = 0.01
Expand Down

0 comments on commit 2c8198a

Please sign in to comment.