Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
769 changes: 0 additions & 769 deletions Localization/Kalmanfilter_basics.ipynb

This file was deleted.

381 changes: 0 additions & 381 deletions Localization/Kalmanfilter_basics_2.ipynb

This file was deleted.

Binary file removed Localization/bayes_filter.png
Binary file not shown.
Binary file removed Localization/extended_kalman_filter/ekf.png
Binary file not shown.

This file was deleted.

72 changes: 0 additions & 72 deletions Localization/particle_filter/particle_filter.ipynb

This file was deleted.

8 changes: 4 additions & 4 deletions docs/modules/appendix/Kalmanfilter_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ described with two parameters, the mean (:math:`\mu`) and the variance

f(x, \mu, \sigma) = \frac{1}{\sigma\sqrt{2\pi}} \exp\big [{-\frac{(x-\mu)^2}{2\sigma^2} }\big ]

Range is

.. math:: [-\inf,\inf]
Range is :math:`[-\inf,\inf]`

This is just a function of mean(\ :math:`\mu`) and standard deviation
(:math:`\sigma`) and what gives the normal distribution the
Expand Down Expand Up @@ -279,7 +278,8 @@ New mean is

.. math:: \mu_\mathtt{new} = \frac{\sigma_z^2\bar\mu + \bar\sigma^2z}{\bar\sigma^2+\sigma_z^2}

New variance is

New variance is

.. math::

Expand Down Expand Up @@ -336,7 +336,7 @@ of the two.
.. math::

\begin{gathered}\mu_x = \mu_p + \mu_z \\
\sigma_x^2 = \sigma_z^2+\sigma_p^2\, \square\end{gathered}
\sigma_x^2 = \sigma_z^2+\sigma_p^2\, \end{gathered}

.. code-block:: ipython3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@
Extended Kalman Filter Localization
-----------------------------------

.. code-block:: ipython3

from IPython.display import Image
Image(filename="ekf.png",width=600)




.. image:: extended_kalman_filter_localization_files/extended_kalman_filter_localization_1_0.png
:width: 600px

Expand All @@ -18,8 +10,6 @@ Extended Kalman Filter Localization
.. figure:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Localization/extended_kalman_filter/animation.gif
:alt: EKF

EKF

This is a sensor fusion localization with Extended Kalman Filter(EKF).

The blue line is true trajectory, the black line is dead reckoning
Expand Down Expand Up @@ -127,7 +117,7 @@ The observation function states that

Its Jacobian matrix is

:math:`\begin{equation*} J_g = \begin{bmatrix} \frac{\partial x'}{\partial x} & \frac{\partial x'}{\partial y} & \frac{\partial x'}{\partial \phi} & \frac{\partial x'}{\partial v}\\ \frac{\partial y'}{\partial x}& \frac{\partial y'}{\partial y} & \frac{\partial y'}{\partial \phi} & \frac{\partial y'}{ \partialv}\\ \end{bmatrix} \end{equation*}`
:math:`\begin{equation*} J_g = \begin{bmatrix} \frac{\partial x'}{\partial x} & \frac{\partial x'}{\partial y} & \frac{\partial x'}{\partial \phi} & \frac{\partial x'}{\partial v}\\ \frac{\partial y'}{\partial x}& \frac{\partial y'}{\partial y} & \frac{\partial y'}{\partial \phi} & \frac{\partial y'}{ \partial v}\\ \end{bmatrix} \end{equation*}`

:math:`\begin{equation*}  = \begin{bmatrix} 1& 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ \end{bmatrix} \end{equation*}`

Expand Down
26 changes: 23 additions & 3 deletions docs/modules/localization/localization.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ This is a sensor fusion localization with Unscented Kalman Filter(UKF).

The lines and points are same meaning of the EKF simulation.

Ref:
References:
~~~~~~~~~~~

- `Discriminatively Trained Unscented Kalman Filter for Mobile Robot
Localization`_
Expand All @@ -37,9 +38,26 @@ It is assumed that the robot can measure a distance from landmarks

This measurements are used for PF localization.

Ref:
How to calculate covariance matrix from particles
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The covariance matrix :math:`\Xi` from particle information is calculated by the following equation:

.. math:: \Xi_{j,k}=\frac{1}{1-\sum^N_{i=1}(w^i)^2}\sum^N_{i=1}w^i(x^i_j-\mu_j)(x^i_k-\mu_k)

- :math:`\Xi_{j,k}` is covariance matrix element at row :math:`i` and column :math:`k`.

- :math:`w^i` is the weight of the :math:`i` th particle.

- :math:`x^i_j` is the :math:`j` th state of the :math:`i` th particle.

- :math:`\mu_j` is the :math:`j` th mean state of particles.

References:
~~~~~~~~~~~

- `PROBABILISTIC ROBOTICS`_
- `Improving the particle filter in high dimensions using conjugate artificial process noise`_

Histogram filter localization
-----------------------------
Expand All @@ -59,12 +77,14 @@ localization.

Initial position is not needed.

Ref:
References:
~~~~~~~~~~~

- `PROBABILISTIC ROBOTICS`_

.. _PROBABILISTIC ROBOTICS: http://www.probabilistic-robotics.org/
.. _Discriminatively Trained Unscented Kalman Filter for Mobile Robot Localization: https://www.researchgate.net/publication/267963417_Discriminatively_Trained_Unscented_Kalman_Filter_for_Mobile_Robot_Localization
.. _Improving the particle filter in high dimensions using conjugate artificial process noise: https://arxiv.org/pdf/1801.07000.pdf

.. |2| image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Localization/unscented_kalman_filter/animation.gif
.. |3| image:: https://github.com/AtsushiSakai/PythonRoboticsGifs/raw/master/Localization/particle_filter/animation.gif
Expand Down