|
36 | 36 | <li class="nav-item"><a class="nav-link js-scroll-trigger" href="#lab7">lab7</a></li>
|
37 | 37 | <li class="nav-item"><a class="nav-link js-scroll-trigger" href="#lab8">lab8</a></li>
|
38 | 38 | <li class="nav-item"><a class="nav-link js-scroll-trigger" href="#lab9">lab9</a></li>
|
| 39 | + <li class="nav-item"><a class="nav-link js-scroll-trigger" href="#lab10">lab10</a></li> |
39 | 40 | </ul>
|
40 | 41 | </div>
|
41 | 42 | </nav>
|
@@ -1252,6 +1253,80 @@ <h3 class="mb-0">Part4: Line-Based Map</h3>
|
1252 | 1253 | </section>
|
1253 | 1254 | <hr class="m-0" />
|
1254 | 1255 |
|
| 1256 | + <!-- LAB 10 --> |
| 1257 | + <section class="resume-section" id="lab10"> |
| 1258 | + <div class="resume-section-content"> |
| 1259 | + <h2 class="mb-5">LAB10: Grid Localization using Bayes Filter</h2> |
| 1260 | + |
| 1261 | + <div class="d-flex flex-column flex-md-row justify-content-between mb-5"> |
| 1262 | + <div class="flex-grow-1"> |
| 1263 | + <h3 class="mb-0">Lab Objective</h3> |
| 1264 | + <p>In this lab we will implement grid localization using Bayes filter. The manual for this experiment provided us with a great framework and a lot of useful information.</p> |
| 1265 | + </div> |
| 1266 | + </div> |
| 1267 | + |
| 1268 | + <div class="d-flex flex-column flex-md-row justify-content-between mb-5"> |
| 1269 | + <div class="flex-grow-1"> |
| 1270 | + <h3 class="mb-0">Function1: Compute Control</h3> |
| 1271 | + <p>Firstly, we have a function to compute the actual control result based on actual current pose and previous pose.</p> |
| 1272 | + <script src="https://gist.github.com/dyjin2/95c874a7f2033b7317cabf59562f61bb.js"></script> |
| 1273 | + <p>Note: Pay attention to the order of parameters in atan2 function.</p> |
| 1274 | + </div> |
| 1275 | + </div> |
| 1276 | + |
| 1277 | + <div class="d-flex flex-column flex-md-row justify-content-between mb-5"> |
| 1278 | + <div class="flex-grow-1"> |
| 1279 | + <h3 class="mb-0">Function2: Odom Motion Model</h3> |
| 1280 | + <p>After we obtain observations of the motion that occurred, we can use the Gaussian distribution to calculate the probability of this motion actually occurring under the given control command.</p> |
| 1281 | + <script src="https://gist.github.com/dyjin2/0b4834237e202065f5a70ad0dce1fe78.js"></script> |
| 1282 | + <p>I initially planurate.</p> |
| 1283 | + </div> |
| 1284 | + </div> |
| 1285 | + |
| 1286 | + <div class="d-flex flex-column flex-md-row justify-content-between mb-5"> |
| 1287 | + <div class="flex-grow-1"> |
| 1288 | + <h3 class="mb-0">Function3: Prediction Step</h3> |
| 1289 | + <p>Now we have enough information to update our predictions. For each grid, the new probability is the sum of the probabilities of moving to that grid from every other grid. This is why there are six nested loops in the code: the first three loops iterate over every grid, and the last three loops iterate over all grids from the previous time step to update the probabilities for this grid.</p> |
| 1290 | + <script src="https://gist.github.com/dyjin2/5c1e6120c0956ed25c43cd3d503b7d4a.js"></script> |
| 1291 | + <p>Note that we set a threshold here -- 0.0001. The threshold is used to skip calculations for some grids in order to improve computational speed. These grids with probabilities smaller than the threshold have minimal impact on the result.</p> |
| 1292 | + </div> |
| 1293 | + </div> |
| 1294 | + |
| 1295 | + <div class="d-flex flex-column flex-md-row justify-content-between mb-5"> |
| 1296 | + <div class="flex-grow-1"> |
| 1297 | + <h3 class="mb-0">Function4: Sensor Model</h3> |
| 1298 | + <p>In this step, we will obtain the probabilities of observations from the sensor, which will be used in the final step to correct our predictions.</p> |
| 1299 | + <script src="https://gist.github.com/dyjin2/91d5fc2b2c79dc6205e69dcb412ec627.js"></script> |
| 1300 | + </div> |
| 1301 | + </div> |
| 1302 | + |
| 1303 | + <div class="d-flex flex-column flex-md-row justify-content-between mb-5"> |
| 1304 | + <div class="flex-grow-1"> |
| 1305 | + <h3 class="mb-0">Function5: Update Step</h3> |
| 1306 | + <p>Finally, in the last step, we multiply the probabilities obtained from prediction by the probabilities from the sensor model, and then normalize them to obtain the final probability for each grid.</p> |
| 1307 | + <script src="https://gist.github.com/dyjin2/f84de3c4efd9cd4e99d6f74c951a841f.js"></script> |
| 1308 | + </div> |
| 1309 | + </div> |
| 1310 | + |
| 1311 | + <div class="d-flex flex-column flex-md-row justify-content-between mb-5"> |
| 1312 | + <div class="flex-grow-1"> |
| 1313 | + <h3 class="mb-0">Simulation Result</h3> |
| 1314 | + <p>The completion of the simulation is depicted below. The green path represents ground truth, the blue path represents the robot's belief, and the red path represents odometry measurements.</p> |
| 1315 | + <div class="embed-contaioner"> |
| 1316 | + <iframe width="640" height="360" src="https://youtube.com/embed/cvXI-rzaiNI" frameborder="0" allowfullscreen></iframe> |
| 1317 | + </div> |
| 1318 | + <p>You can see that the results of Bayes Filter look much better than pure odometry measurements.</p> |
| 1319 | + <p>Here I selected some output data of several steps.</p> |
| 1320 | + <img width="640" height="360" class="img-fluid img-centered" src="assets/img/lab10/exp1.png" alt=""> |
| 1321 | + <img width="640" height="360" class="img-fluid img-centered" src="assets/img/lab10/exp5.png" alt=""> |
| 1322 | + <img width="640" height="360" class="img-fluid img-centered" src="assets/img/lab10/exp14.png" alt=""> |
| 1323 | + </div> |
| 1324 | + </div> |
| 1325 | + |
| 1326 | + </div> |
| 1327 | + </section> |
| 1328 | + <hr class="m-0" /> |
| 1329 | + |
1255 | 1330 |
|
1256 | 1331 | </div>
|
1257 | 1332 | <!-- Bootstrap core JS-->
|
|
0 commit comments