### ContinuousWalkBot-v0

State

$$
\mathbf{x} = \begin{bmatrix} 
x \\ 
y \\ 
v_x \\ 
v_y
\end{bmatrix}
$$

control

$$
\mathbf{u} = \begin{bmatrix}
a_x \\
a_y
\end{bmatrix}
$$

subject to constraints

$$
\begin{align}
 0 \leq x \leq 10 \\
 0 \leq y \leq 10 \\
 -10 \leq v_x \leq 10 \\
 -10 \leq v_y \leq 10 \\
 -2 \leq a_x \leq 2 \\
 -2 \leq a_y \leq 2
\end{align}
$$

and cost function

$$
Q = \begin{bmatrix}
1 & 0 & 0 & 0\\
0 & 1 & 0 & 0\\
0 & 0 & 1 & 0\\
0 & 0 & 0 & 1
\end{bmatrix},\, 
R = \begin{bmatrix}
0 & 0 \\
0 & 0
\end{bmatrix}
$$

State matrix

$$
A = \begin{bmatrix}
0 & 0 & 1 & 0 \\
0 & 0 & 0 & 1 \\
0 & 0 & 0 & 0 \\
0 & 0 & 0 & 0
\end{bmatrix}
$$

Input matrix

$$
B = \begin{bmatrix}
0 & 0 \\
0 & 0 \\
1 & 0 \\
0 & 1 \\
\end{bmatrix}
$$


```python
import numpy as np
import sys
sys.path.append('../..')
from wizluk.envs.walker import WalkBot
```

    /usr/local/lib/python3.5/dist-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
      from ._conv import register_converters as _register_converters
    Using TensorFlow backend.



```python
model = WalkBot(0,'walker')
```


```python
model.add_bounds('x', 0.0, 10.0)
model.add_bounds('y', 0.0, 10.0)
model.add_bounds('vx', -10.0, 10.0)
model.add_bounds('vy', -10.0, 10.0)
model.add_bounds('ax', -2.0, 2.0)
model.add_bounds('ay', -2.0, 2.0)
```


```python
x = np.array([ [x] for x in [2.0, 8.0, -1.0140,0.2664]])
```


```python
print(x)
```

    [[ 2.    ]
     [ 8.    ]
     [-1.014 ]
     [ 0.2664]]



```python
u = np.zeros((2,1))
```


```python
print(u)
```

    [[0.]
     [0.]]



```python
x + 0.5*(model._state_matrix.dot(x)+model._input_matrix.dot(u))
```




    array([[ 1.493 ],
           [ 8.1332],
           [-1.014 ],
           [ 0.2664]])




```python
model.simulate_evolution(x,u, dt=0.5)
```




    array([[ 1.493 ],
           [ 8.1332],
           [-1.014 ],
           [ 0.2664]])




```python

```

a06802ca5209c03e6862893550d2b91de1cdc396
ipynb
Jupyter Notebook
notebooks/envs/continuous_walkbot_demo.ipynb
miquelramirez/width-lookaheads-python
122442136d8254be44f9dbcae365327e0f669bfa
MIT
2019-09-10T20:36:48.000Z
2019-09-10T20:36:48.000Z
notebooks/envs/continuous_walkbot_demo.ipynb
miquelramirez/width-lookaheads-python
122442136d8254be44f9dbcae365327e0f669bfa
MIT
notebooks/envs/continuous_walkbot_demo.ipynb
miquelramirez/width-lookaheads-python
122442136d8254be44f9dbcae365327e0f669bfa
MIT
2019-09-10T20:36:52.000Z
2019-09-10T20:36:52.000Z
Qwen/Qwen-72B
1. YES
2. YES