|
25 | 25 | "cell_type": "markdown",
|
26 | 26 | "metadata": {},
|
27 | 27 | "source": [
|
28 |
| - "### Filter Design\n", |
| 28 | + "### Filter design\n", |
29 | 29 | "\n",
|
30 | 30 | "In this simulation, the robot has a state vector includes 4 states at time $t$.\n",
|
31 | 31 | "\n",
|
32 | 32 | "$$\\textbf{x}_t=[x_t, y_t, \\theta_t, v_t]$$\n",
|
33 | 33 | "\n",
|
34 | 34 | "x, y are a 2D x-y position, $\\theta$ is orientation, and v is velocity.\n",
|
35 | 35 | "\n",
|
36 |
| - "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", |
| 36 | + "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", |
37 | 37 | "\n",
|
38 | 38 | " \n",
|
39 | 39 | "\n",
|
|
49 | 49 | "\n",
|
50 | 50 | "The input and observation vector includes sensor noise.\n",
|
51 | 51 | "\n",
|
52 |
| - "In the code, observation function generates the input and observation vector [code](https://github.com/AtsushiSakai/PythonRobotics/blob/916b4382de090de29f54538b356cef1c811aacce/Localization/extended_kalman_filter/extended_kalman_filter.py#L34-L50)\n", |
| 52 | + "In the code, \"observation\" function generates the input and observation vector with noise [code](https://github.com/AtsushiSakai/PythonRobotics/blob/916b4382de090de29f54538b356cef1c811aacce/Localization/extended_kalman_filter/extended_kalman_filter.py#L34-L50)\n", |
53 | 53 | "\n",
|
54 | 54 | "\n",
|
55 | 55 | "\n",
|
|
58 | 58 | "\n"
|
59 | 59 | ]
|
60 | 60 | },
|
| 61 | + { |
| 62 | + "cell_type": "markdown", |
| 63 | + "metadata": {}, |
| 64 | + "source": [ |
| 65 | + "### Motion Model\n", |
| 66 | + "\n", |
| 67 | + "The robot model is \n", |
| 68 | + "\n", |
| 69 | + "$$ \\dot{x} = vcos(\\phi)$$\n", |
| 70 | + "\n", |
| 71 | + "$$ \\dot{y} = vsin((\\phi)$$\n", |
| 72 | + "\n", |
| 73 | + "$$ \\dot{\\phi} = \\omega$$\n", |
| 74 | + "\n", |
| 75 | + "\n", |
| 76 | + "So, the motion model is\n", |
| 77 | + "\n", |
| 78 | + "$$\\textbf{x}_{t+1} = F\\textbf{x}+B\\textbf{u}$$\n", |
| 79 | + "\n", |
| 80 | + "where\n", |
| 81 | + "\n", |
| 82 | + "$\\begin{equation*}\n", |
| 83 | + "F=\n", |
| 84 | + "\\begin{bmatrix}\n", |
| 85 | + "1 & 0 & 0 & 0\\\\\n", |
| 86 | + "0 & 1 & 0 & 0\\\\\n", |
| 87 | + "0 & 0 & 1 & 0 \\\\\n", |
| 88 | + "0 & 0 & 0 & 0 \\\\\n", |
| 89 | + "\\end{bmatrix}\n", |
| 90 | + "\\end{equation*}$\n", |
| 91 | + "\n", |
| 92 | + "$\\begin{equation*}\n", |
| 93 | + "B=\n", |
| 94 | + "\\begin{bmatrix}\n", |
| 95 | + "sin(\\phi)dt & 0\\\\\n", |
| 96 | + "cos(\\phi)dt & 0\\\\\n", |
| 97 | + "0 & dt\\\\\n", |
| 98 | + "1 & 0\\\\\n", |
| 99 | + "\\end{bmatrix}\n", |
| 100 | + "\\end{equation*}$\n", |
| 101 | + "\n", |
| 102 | + "$dt$ is a time interval.\n", |
| 103 | + "\n", |
| 104 | + "This is implemented at [code](https://github.com/AtsushiSakai/PythonRobotics/blob/916b4382de090de29f54538b356cef1c811aacce/Localization/extended_kalman_filter/extended_kalman_filter.py#L53-L67)\n", |
| 105 | + "\n", |
| 106 | + "\n" |
| 107 | + ] |
| 108 | + }, |
61 | 109 | {
|
62 | 110 | "cell_type": "markdown",
|
63 | 111 | "metadata": {},
|
|
0 commit comments