update doc

This commit is contained in:
Atsushi Sakai
2019-01-13 10:30:08 +09:00
parent e3c1a69f2e
commit f27177170f
6 changed files with 31 additions and 27 deletions

View File

@@ -4,7 +4,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Simulation"
"### Simulation"
]
},
{
@@ -44,7 +44,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## Equation generation"
"### Equation generation"
]
},
{

View File

@@ -60,9 +60,9 @@
"\n",
"In this simulation, the robot has a state vector includes 4 states at time $t$.\n",
"\n",
"$$\\textbf{x}_t=[x_t, y_t, \\theta_t, v_t]$$\n",
"$$\\textbf{x}_t=[x_t, y_t, \\phi_t, v_t]$$\n",
"\n",
"x, y are a 2D x-y position, $\\theta$ is orientation, and v is velocity.\n",
"x, y are a 2D x-y position, $\\phi$ is orientation, and v is velocity.\n",
"\n",
"In the code, \"xEst\" means the state vector. [code](https://github.com/AtsushiSakai/PythonRobotics/blob/916b4382de090de29f54538b356cef1c811aacce/Localization/extended_kalman_filter/extended_kalman_filter.py#L168)\n",
"\n",
@@ -256,7 +256,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.6.6"
"version": "3.6.7"
}
},
"nbformat": 4,

View File

@@ -123,28 +123,28 @@
"\n",
"Motion model is\n",
"\n",
"$\\dot{x}=vcos\\theta$\n",
"$$\\dot{x}=vcos\\theta$$\n",
"\n",
"$\\dot{y}=vsin\\theta$\n",
"$$\\dot{y}=vsin\\theta$$\n",
"\n",
"$\\dot{\\theta}=\\frac{v}{WB}sin(u_{\\delta})$ (tan is not good for optimization)\n",
"$$\\dot{\\theta}=\\frac{v}{WB}sin(u_{\\delta})$$ (tan is not good for optimization)\n",
"\n",
"$\\dot{v}=u_a$\n",
"$$\\dot{v}=u_a$$\n",
"\n",
"Cost function is \n",
"\n",
"$J=\\frac{1}{2}(u_a^2+u_{\\delta}^2)-\\phi_a d_a-\\phi_\\delta d_\\delta$\n",
"$$J=\\frac{1}{2}(u_a^2+u_{\\delta}^2)-\\phi_a d_a-\\phi_\\delta d_\\delta$$\n",
"\n",
"Input constraints are\n",
"\n",
"$|u_a| \\leq u_{a,max}$\n",
"$$|u_a| \\leq u_{a,max}$$\n",
"\n",
"$|u_\\delta| \\leq u_{\\delta,max}$\n",
"$$|u_\\delta| \\leq u_{\\delta,max}$$\n",
"\n",
"So, Hamiltonian is\n",
"\n",
"$J=\\frac{1}{2}(u_a^2+u_{\\delta}^2)-\\phi_a d_a-\\phi_\\delta d_\\delta\\\\ +\\lambda_1vcos\\theta+\\lambda_2vsin\\theta+\\lambda_3\\frac{v}{WB}sin(u_{\\delta})+\\lambda_4u_a\\\\ \n",
"+\\rho_1(u_a^2+d_a^2+u_{a,max}^2)+\\rho_2(u_\\delta^2+d_\\delta^2+u_{\\delta,max}^2)$\n",
"$$J=\\frac{1}{2}(u_a^2+u_{\\delta}^2)-\\phi_a d_a-\\phi_\\delta d_\\delta\\\\ +\\lambda_1vcos\\theta+\\lambda_2vsin\\theta+\\lambda_3\\frac{v}{WB}sin(u_{\\delta})+\\lambda_4u_a\\\\ \n",
"+\\rho_1(u_a^2+d_a^2+u_{a,max}^2)+\\rho_2(u_\\delta^2+d_\\delta^2+u_{\\delta,max}^2)$$\n",
"\n",
"Partial differential equations of the Hamiltonian are:\n",
"\n",

View File

@@ -61,28 +61,32 @@ Mathematical Formulation
Motion model is
:math:`\dot{x}=vcos\theta`
.. math:: \dot{x}=vcos\theta
:math:`\dot{y}=vsin\theta`
.. math:: \dot{y}=vsin\theta
:math:`\dot{\theta}=\frac{v}{WB}sin(u_{\delta})` (tan is not good for
optimization)
.. math:: \dot{\theta}=\frac{v}{WB}sin(u_{\delta})
:math:`\dot{v}=u_a`
\ (tan is not good for optimization)
.. math:: \dot{v}=u_a
Cost function is
:math:`J=\frac{1}{2}(u_a^2+u_{\delta}^2)-\phi_a d_a-\phi_\delta d_\delta`
.. math:: J=\frac{1}{2}(u_a^2+u_{\delta}^2)-\phi_a d_a-\phi_\delta d_\delta
Input constraints are
:math:`|u_a| \leq u_{a,max}`
.. math:: |u_a| \leq u_{a,max}
:math:`|u_\delta| \leq u_{\delta,max}`
.. math:: |u_\delta| \leq u_{\delta,max}
So, Hamiltonian is
:math:`J=\frac{1}{2}(u_a^2+u_{\delta}^2)-\phi_a d_a-\phi_\delta d_\delta\\ +\lambda_1vcos\theta+\lambda_2vsin\theta+\lambda_3\frac{v}{WB}sin(u_{\delta})+\lambda_4u_a\\ +\rho_1(u_a^2+d_a^2+u_{a,max}^2)+\rho_2(u_\delta^2+d_\delta^2+u_{\delta,max}^2)`
.. math::
J=\frac{1}{2}(u_a^2+u_{\delta}^2)-\phi_a d_a-\phi_\delta d_\delta\\ +\lambda_1vcos\theta+\lambda_2vsin\theta+\lambda_3\frac{v}{WB}sin(u_{\delta})+\lambda_4u_a\\
+\rho_1(u_a^2+d_a^2+u_{a,max}^2)+\rho_2(u_\delta^2+d_\delta^2+u_{\delta,max}^2)
Partial differential equations of the Hamiltonian are:

View File

@@ -39,9 +39,9 @@ Filter design
In this simulation, the robot has a state vector includes 4 states at
time :math:`t`.
.. math:: \textbf{x}_t=[x_t, y_t, \theta_t, v_t]
.. math:: \textbf{x}_t=[x_t, y_t, \phi_t, v_t]
x, y are a 2D x-y position, :math:`\theta` is orientation, and v is
x, y are a 2D x-y position, :math:`\phi` is orientation, and v is
velocity.
In the code, “xEst” means the state vector.

View File

@@ -1,6 +1,6 @@
Simulation
----------
~~~~~~~~~~
.. code-block:: ipython3
@@ -21,7 +21,7 @@ Simulation
gif
Equation generation
-------------------
~~~~~~~~~~~~~~~~~~~
.. code-block:: ipython3