-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·1001 lines (961 loc) · 45.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Interactive Robotics Algorithms</title>
<!-- Bootstrap CSS -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/9.8.0/css/bootstrap-slider.css">
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous">
<!-- Materialized CSS -->
<link rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/css/materialize.min.css">
<!-- JQuery -->
<script src="https://code.jquery.com/jquery-3.2.1.min.js"
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
crossorigin="anonymous"></script>
<!--Bootstrap Slider JavaScript-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-slider/9.8.0/bootstrap-slider.min.js"></script>
<!--jQuery appear plugin-->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.appear/0.3.3/jquery.appear.min.js"></script>
<!-- Bootstrap JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"
integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa"
crossorigin="anonymous"></script>
<!-- Compiled and Materialized minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.99.0/js/materialize.min.js"></script>
<!-- Customized CSS -->
<link href="css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>
<!-- Core Javascript -->
<script src="general/js/map_data.js"></script>
<script src='general/js/path_data.js'></script>
<script src="general/js/utils.js"></script>
<script src="general/js/view.js"></script>
<script src="general/js/odometry.js"></script>
<script src="general/js/measurement.js"></script>
<script src="general/js/particle.js"></script>
<script src="general/js/particle_filter.js"></script>
<script src="general/js/robot.js"></script>
<script src="demo/js/demo_controls.js"></script>
<script src="demo/js/robot_demo.js"></script>
<script src="demo/js/sensor_demo.js"></script>
<script src="demo/js/actuation_demo.js"></script>
<script src="demo/js/measurement_beam_demo.js"></script>
<script>
$(document).ready(function () {
$('.tooltipped').tooltip({delay: 50, position: "top"});
$(".col ul").addClass("collection");
$("ul.collection li").addClass("collection-item")
});
</script>
</head>
<body onload="init();">
<nav class="black" role="navigation">
<div class="nav-wrapper container">
<a id="title-container" href="#" data-activates="nav-mobile"
class="brand-logo left">Home</a>
</div>
</nav>
<div id="index-banner" class="parallax-container">
<div class="section no-pad-bot">
<div class="container">
<div class="row">
<div class="col l12">
<h1>Interactive Robotics Illustration</h1>
</div>
</div>
<div class="row">
<div class="col l8">
<blockquote class="blockquote">
<p>
Robotics is the science of perceiving and manipulating the
physical world through computer-controlled devices.
</p>
<p>
Robotics systems are situated in the physical world,
perceive information on their environments through sensors,
and manipulate through physical forces.
</p>
<footer class="blockquote-footer">
<cite title="Source Title">Probabilistic
Robotics
</cite>
</footer>
</blockquote>
</div>
</div>
</div>
</div>
<div class="parallax"><img src="images/background1.jpg" alt="Unsplashed background img 1"></div>
</div>
<div class="container">
<div class="row">
<div class="col l12">
<h2>Mobile Robot Localization</h2>
<p>
Intelligent autonomous mobile robots need to know where they are, in order to function correctly. For
example, a self-driving car needs to know which street, and which intersection it it at, in order to
plan when and which turn it should take next. While some robots have access to GPS readings, such GPS
readings are still not sufficiently accurate to make accurate decisions - the error of a commercial GPS
is greater than the width of a driving lane, and the decisions taken by a self-driving car need to
account specifically for not only which lane it is in, but exactly where in the lane it is.
</p>
<p>
Similarly, indoor mobile robots similarly need to accurately know where they are, despite having no
access to GPS. Thus, to reason more accurately about their locations in the world, mobile robots rely on
additional on-board sensors such as laser range-finders and depth cameras.
</p>
<p>
The problem of estimating where a robot is, given its on-board sensor readings over time, is called
<b>mobile robot localization</b>.
</p>
<p>
In this page, we explain the sources of uncertainty for the problem of mobile robot localization, and
one popular algorithm for mobile robot localization, called <b>Monte-Carlo Localization</b>, works on
robots.
</p>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
<div class="row">
<div class="col l8">
<h2 style="color:black">Uncertainties in Robotics</h2>
<p style="color:black">
Robots, as physical entities acting in the real world, inherently suffer from errors in sensing,
and locomotion. Such errors result in uncertainty of the robot’s estimates of its location. Let
us investigate the nature of the uncertainties arising from a robot’s motion, and its sensing.
</p>
</div>
</div>
</div>
</div>
<div class="parallax"><img src="images/background2.jpg" alt="Unsplashed background img 2"></div>
</div>
<div class="container">
<div class="row"><h3>Uncertainties in Robotics</h3></div>
<br>
<div class="row">
<div class="col l4 s12">
<h4>Uncertainty Arising From Motion</h4>
<!--When we command robots to move forward and turn, it would be nice if robots can-->
<!--carry out our commands with perfect precision. But in reality, they can't.-->
<p>
Uncertainty in a robot’s motion arises from a large number of factors, including differences in wheel
diameter, tire inflation, friction with respect to the ground, and uneven terrain. Thus, even when asked
to execute the same command repeatedly, a robot will inevitably have errors in its actual execution.
This demo simulates the errors in execution of motion commands on a real world robot. The blue line
represents the planned motion, while the red line represents the robot's actual motion.
</p>
</div>
<div class="col l4 s12">
<h4>Try the demo</h4>
<p>
This demo simulates how real world robots follow commands. The blue line
represents planned motion while the red line represents robot's actual motion.
</p>
</div>
<div class="col l4 s12 center">
<br>
<canvas id="simple_actuation"></canvas>
<button class="waves-effect waves-light btn-large"
onclick="simpleActuation.simulateActuation();">
Simulate Robot Movement
</button>
</div>
</div>
</div>
<div class="container">
<div class="row"><h4>Different Types of Actuation Noise</h4></div>
<div class="row">
<div class="col l12 s12">
<h6>The errors in execution of motion commands can be broken down into four components:</h6>
</div>
</div>
<div class="row">
<div class="col s12 m3">
<div class="card">
<div class="card-content">
<span class="card-title">E1</span>
<p>
When the robot is commanded to rotate by a certain angle, the true rotation of the robot might
differ from the commanded angle.
</p>
</div>
<div class="card-action">
<a>Rotational error from rotational movement</a>
</div>
</div>
</div>
<div class="col s12 m3">
<div class="card">
<div class="card-content">
<span class="card-title">E2</span>
<p>
When the robot is commanded to move straight by a certain distance, the robot may not drive
straight, and instead turn by some amount while traversing the commanded distance.
</p>
</div>
<div class="card-action">
<a>Rotational error from translational movement</a>
</div>
</div>
</div>
<div class="col s12 m3">
<div class="card">
<div class="card-content">
<span class="card-title">E3</span>
<p>
When the robot is commanded to move straight by a certain distance, the robot may not move by
that same distance.
</p>
</div>
<div class="card-action">
<a>Translational error from translational movement</a>
</div>
</div>
</div>
<div class="col s12 m3">
<div class="card">
<div class="card-content">
<span class="card-title">E4</span>
<p>
When the robot is commanded to rotate by a certain angle, the robot might, in addition to
turning, skid sideways or forward. This type of error is significant on robots with tank treads
and multiple wheels with skid-steering.
</p>
</div>
<div class="card-action">
<a>Translational error from rotational movement</a>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col l12 s12">
<p>
You can see the impact of each of these types of error on a robot’s motion. In the demos below, you can
observe the impact of each type of error on the overall executed path of the robot. Try adjusting the
slider to control the magnitude of the noise, and observe its impact on the path followed by the robot.
</p>
</div>
</div>
<div class="row">
<div class="col l3 s12 center">
<button class="btn-large waves-effect waves-light" onclick="simulateAllActuations();">
Simulate All!
</button>
</div>
<div class="col l9 s12">
<div class="range-field">
<br>
<input id='actuation_noise' type="range" min="0" max="0.3" step="0.01"
title="Noise">
</div>
</div>
</div>
<div class="row">
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Rotational error from Rotation">E1</h6>
<canvas id="actuation_a1"></canvas>
<button class="btn waves-effect waves-light" onclick="a1Demo.simulateActuation();">
<span class="glyphicon glyphicon-play"></span>
</button>
</div>
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Rotational error from Translation">E2</h6>
<canvas id="actuation_a2"></canvas>
<button class="btn waves-effect waves-light" onclick="a2Demo.simulateActuation();">
<span class="glyphicon glyphicon-play"></span>
</button>
</div>
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Translational error from Translation">E3</h6>
<canvas id="actuation_a3"></canvas>
<button class="btn waves-effect waves-light" onclick="a3Demo.simulateActuation();">
<span class="glyphicon glyphicon-play"></span>
</button>
</div>
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Translational error from Rotation">E4</h6>
<canvas id="actuation_a4"></canvas>
<button class="btn waves-effect waves-light" onclick="a4Demo.simulateActuation();">
<span class="glyphicon glyphicon-play"></span>
</button>
</div>
</div>
<div class="row">
<h4>More About Error</h4>
</div>
<div class="row">
<div class="col l12 s12">
<p>
While the demos above simulated a single outcome of a robot at a time for each type of error, we can
also concurrently simulate many possible outcomes for the errors. The demos below simulate each of the
four types of errors in a robot’s motion over many possible outcomes simultaneously, to demonstrate the
range, and distribution, of the robot’s possible locations over time as affected by the different types
of motion errors.
</p>
</div>
</div>
<div class="row">
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Rotational error from Rotation">E1</h6>
<canvas id="motion_a1_demo" width="1" height="1" class="tooltipped"
data-tooltip="Robots spread in many directions due to rotational error from rotational movements">
</canvas>
<div class="center">
<button class="btn waves-effect waves-light"
onclick="a1MDemo.start(event);">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn waves-effect waves-light"
onclick="a1MDemo.stop(event);">
<span class="glyphicon glyphicon-repeat"></span>
</button>
</div>
</div>
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Rotational error from Translation">E2</h6>
<canvas id="motion_a2_demo" width="1" height="1" class="tooltipped"
data-tooltip="Robots going in all directions due to rotational error generated by moving forward"></canvas>
<div class="center">
<button class="btn waves-effect waves-light"
onclick="a2MDemo.start(event);">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn waves-effect waves-light"
onclick="a2MDemo.stop(event);">
<span class="glyphicon glyphicon-repeat"></span>
</button>
</div>
</div>
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Translational error from Translation">E3</h6>
<canvas id="motion_a3_demo" width="1" height="1" class="tooltipped"
data-tooltip="Robots dispersed along a line due to translational error">
</canvas>
<div class="center">
<button class="btn waves-effect waves-light"
onclick="a3MDemo.start(event);">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn waves-effect waves-light"
onclick="a3MDemo.stop(event);">
<span class="glyphicon glyphicon-repeat"></span>
</button>
</div>
</div>
<div class="col l3 s6 center">
<h6 class="tooltipped" data-tooltip="Translational error from Rotation">E4</h6>
<canvas id="motion_a4_demo" width="1" height="1" class="tooltipped"
data-tooltip="Robots dispersed all over the place due to translational errors from rotating">
</canvas>
<div class="center">
<button class="btn waves-effect waves-light"
onclick="a4MDemo.start(event);">
<span class="glyphicon glyphicon-play"></span>
</button>
<button class="btn waves-effect waves-light"
onclick="a4MDemo.stop(event);">
<span class="glyphicon glyphicon-repeat"></span>
</button>
</div>
</div>
</div>
<div class="row">
<div class="col l8 s12">
Note how the errors accumulate over time: The possible outcomes of the robot spread apart, but in a
different manner for each type of motion error.
</div>
</div>
<div class='row'>
<div class="col l12 s12">
<h4>Simulating A Robot’s Motion On A Map</h4>
<p>
Putting together all the four types of errors in a robot’s motion, we can simulate how a robot’s path
may diverge from its planned path, over time. In this demo, a robot is asked to follow a fixed
trajectory(shown as the green path) in an indoor office building. The blue outlines are simulated
outcomes of the robot’s location over time. Note how the many simulated outcomes of the robot’s location
diverge over time. You may adjust the magnitude of each type of motion error, and see how it affects the
outcomes.
</p>
</div>
</div>
<div class='row'>
<div class="col l8 s12 center">
<canvas id="motion_canvas" width="7" height="4"
class="tooltipped"
data-tooltip="Click PLAY to simulate some of the possible motions">
</canvas>
<button onclick="motionDemo.stop(event)" class="btn waves-effect waves-light red">
<span class="glyphicon glyphicon-repeat"></span>
</button>
<button class="btn waves-effect waves-light blue disabled">
<span class="glyphicon glyphicon-step-backward"></span>
</button>
<button onclick="motionDemo.start(event)" class="btn waves-effect waves-light">
<span class="glyphicon glyphicon-play"></span>
</button>
<button onclick="motionDemo.stepForward(event)"
class="btn waves-effect waves-light blue">
<span class="glyphicon glyphicon-step-forward"></span>
</button>
</div>
<div class='col l4 s12'>
<canvas id="motion_minicanvas" width="7" height="4"></canvas>
<fieldset>
<table>
<tbody>
<tr>
<td>
<label for="motion_stride">Moving Speed</label>
</td>
<td>
<input type='text' id="motion_stride"
onblur='motionDemo.stride = Number(event.target.value);'
value="0.04"
data-slider-min="0.01" data-slider-max="0.5"
data-slider-step="0.01"
data-slider-value="0.04">
</td>
</tr>
<tr>
<td>
<label for="motion_a1">Rotational error from rotation</label>
</td>
<td>
<input id='motion_a1' value="1" type="text">
</td>
</tr>
<tr>
<td>
<label for="motion_a2">Rotational error from translation</label>
</td>
<td>
<input id='motion_a2' value="1" type="text">
</td>
</tr>
<tr>
<td>
<label for="motion_a3">Translational error from translation</label>
</td>
<td>
<input id='motion_a3' value="1" type="text">
</td>
</tr>
<tr>
<td>
<label for="motion_a4">Translational error from rotation</label>
</td>
<td>
<input id='motion_a4' value="1" type="text">
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
</div>
<div class="row">
<div class="col l12 s12">
<p>
Clearly, in order to effectively work in the real world, the robot cannot expect its true location to
match its planned path. However, we can see that we can simulate many possible outcomes for the robot’s
location over time: this will be crucial to our goal of performing mobile robot localization. While we
may not know exactly where the robot is after executing a motion command, we can simulate the
distribution of possible outcomes. This distribution of possible outcomes can then be further refined by
additionally taking into account observations from additional sensors.
</p>
</div>
</div>
<div class="row"><h3>Uncertainty in Sensor Readings</h3></div>
<div class="row">
<div class="col l12 s12">
<h4>Sensor Limitations</h4>
<p>
To assist in the task of localization, a robot relies on observations made with its on board sensors,
and a known map of the environment. Laser range-finders are one type of commonly used sensors on mobile
robots. They allow the robot to sense how far obstacles are from the robot by measuring the time taken
for a laser beam to traverse from the sensor, to the obstacle, and back. The laser beam in a laser
range-finder is swept in a circular arc, thus allowing the robot to make distance measurements for a wide
angle around the robot. Laser range-finders have a maximum range beyond which they cannot sense objects,
and they also have a fixed number of angles they can sense along, and the overall angle over which they
can make observations.
</p>
<p>
Each ray of the laser range-finder thus provides a measurement of the distance to the closest obstacle in
that direction. This measurement inherently has errors, due to the variations in the optical properties
of the obstacle, errors in time measurements from the electronics in the sensor, and dust particles in
the air. The demo below simulates multiple readings for a single ray of a laser range-finder, when the
actual distance to the obstacle is 10 meters. The demo graphs the distribution of the number of times
the sensor makes a particular observation. Note that the actual observations vary, and their
distribution is spread out, but the peak is centered around the true reading. The average over all the
observations, despite the noisy nature of the observations, tends towards the expected value. Try
changing the magnitude of the sensor noise, and the number of observations: note how the average sensor
reading more closely matches the true distance when the sensor noise is low, and when the number of
observations is high.
</p>
</div>
</div>
<div class="row">
<div class="col l8 s12">
<canvas id="sensor_demo"></canvas>
</div>
<div class="col l4 s12">
<fieldset>
<table>
<tbody>
<tr>
<td>
<label for="sensor_demo_sensorNoise">
Sensor Noise : </label>
<input id="sensor_demo_sensorNoise" type="text"
value="2">
</td>
</tr>
<tr>
<td><input id="nSamples" type="text"
value="100">
<label for="nSamples">
. Times </label>
</td>
</tr>
<tr>
<td class="center">
<button type="button" class="btn-large waves-effect waves-light center"
onclick="sensorDemo.sample(Math.pow(10, Number(document.getElementById('nSamples').value)));">
Sense
</button>
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
</div>
<div class="row">
<div class="col l8 s12">
<p>
Despite the errors in individual readings of the sensor, the average error over a large number of
readings tends to zero as the number of readings increases, and the distributions of the readings follow
a known pattern, modelled by a <a href="https://en.wikipedia.org/wiki/Normal_distribution">Normal
Distribution,</a>.
</p>
</div>
</div>
<div class="row">
<div class="col l12 s12">
<h4>Simulating Robot Sensor Model</h4>
<p>
The robot's sensor model is responsible for incorporating the robot's sensor
readings. The readings might be an image taken from a camera, data returned by a
laser scanner, data gathered by ultrasonic sensors, etc. Whatever the data is,
sensor models are supposed to analysis them and give a judgement of where the robot
is. In other words, sensor models are robot's perception of the environment around
it. Just like humans look around and figure out where they are, robots do the same:
with sensor models. There is one important precondition, the sensor model must have
a map of the environment.
</p>
<p>
Robot's sensors have noises, meaning that measurements are not
exactly accurate. The robot's internal model must be aware of
this when estimating its location. <b>Click</b> to place the
robot, <b>hold and move</b> to change direction of robot. You
can also use the <b>Mini Map</b> on the right to move the area
of the map that you want to have a look at.
</p>
<p>
Just like it was mentioned before, the sensor model can only
estimate the position of the robot due to inaccuracy. The sensor
model will calculate the <b>probability</b> of the robot at a
given position base on its sensor readings. Click <b>color the
map</b> to calculate the probability of the robot in the map
with density in pixels.
</p>
</div>
</div>
<div class="row">
<div class="col l8 s12">
<canvas id="sensor_model_demo"></canvas>
</div>
<div class="col l4 s12">
<canvas id="sensor_model_mini"></canvas>
<fieldset>
<table>
<tbody>
<tr>
<td>
<label for="nLasers">Number of Lasers</label>
</td>
<td>
<input id="nLasers" data-slider-value="18">
</td>
</tr>
<tr>
<td>
<label for="sensorRadius">Sensor Radius</label>
</td>
<td>
<input id="sensorRadius" data-slider-value="3">
</td>
<td>m</td>
</tr>
<tr>
<td>
<label for="sensorNoise">Sensor Noise</label>
</td>
<td>
<input id="sensorNoise" data-slider-value="0.1">
</td>
<td>m</td>
</tr>
<tr>
<td>
<label for="colorRes">Coloring Resolution</label>
</td>
<td>
<input id="colorRes" data-slider-value="10">
</td>
<td>pixels</td>
</tr>
<tr>
<td>
<label for="shouldColor">Color the Map</label>
</td>
<td>
<div class="switch">
<label>
Off
<input type="checkbox" id="shouldColor"
onchange='measurementDemo.setColoring(event.target.checked);'>
<span class="lever blue"></span>
On
</label>
</div>
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
</div>
<div class="row">
<div class="col s12 l6">
<h4>Inherently Unpredictable Environment</h4>
<p>
Let's take self driving car as an example. When it is moving,
it is impossible for it to predict the weather conditions, motion
dynamics of pedestrians and other cars, traffic lights, or
car accidents that is not given in the map.
</p>
</div>
<div class="col s12 l6">
<h4>Model Limitations</h4>
<p>
Some uncertainty is caused by the robot’s software. All internal
models of the world are approximate. Models are abstractions of
the real world. As such, they only partially model the
underlying physical processes of the robot and its environment.
</p>
</div>
</div>
</div>
<div class="parallax-container valign-wrapper">
<div class="section no-pad-bot">
<div class="container">
<div class="row">
<div class="col l8 s12">
<h2>Probabilistic Robotics</h2>
<p>
Probabilistic robotics is a relatively new approach to robotics
that pays tribute to the uncertainty in robot perception and
action. The key idea in probabilistic robotics is to represent
information by probability distributions over a whole space of
guesses instead of a single best guess. By doing so, they can
represent ambiguity and degree of belief in a mathematically
sound way.
</p>
</div>
</div>
</div>
</div>
<div class="parallax"><img src="images/background3.jpg" alt="Unsplashed background img 3"></div>
</div>
<div class="container">
<div class="row"><h3>Monte Carlo Localization</h3></div>
<div class="row">
<div class="col lg 8">
<p>
Given that all actuators and sensors have some degrees of noise, how should we use
these actuators and sensors? Over time, people have developed algorithms and
mathematical models to take these uncertainties into account. <b>Monte Carlo
Localization (MCL)</b> is an example of such algorithms.
</p>
<p>
The MCL algorithm can be applied to robots with the following conditions
</p>
<ul>
<li>The robot is in a <b>known area</b>, which means the robot has the map of the
environment.
</li>
<li>The robot has some kinds of <b>sensors</b>.</li>
<li>The robot can <b>move around</b> freely.</li>
</ul>
<blockquote style="font-size: 0.9em;">
Trivia: Amazon uses such robots. Check <a
href="https://www.youtube.com/watch?v=cLVCGEmkJs0">this</a> out.
</blockquote>
<p>
The MCL algorithms works by maintaining many possible locations of the robot. As the
robot moves and senses, MCL incorporates additional information gathered and updates
each of its possible locations. The possible locations that seem to be consistent
with the robot's motion and measurement data will be kept, vice versa.
</p>
<p>
Each guess(also called hypothesis) is represented by a "particle" consists of
location(such as x, y coordinates) of the robot and direction it's facing. Each
particle is also associated with a weight, which represents how likely the particle
represents the robot's true location(and direction).
</p>
<h4>
Overview of MCL at each time step:
</h4>
<ol>
<li>
If the robot moves, the algorithm <b>update each particle's location and direction
according to the robot's motion</b>(robots often have internal motion sensors that can
tell how much the robot has moved approximately). When updating, <u>uncertainties
of motion readings must be taken into account</u>
</li>
<li>
If the robot performed a scan of the environment, <b>update each particle's
weight</b> according to the sensor readings.
The new weight should be associated with <u>how likely the robot is at this
location given the scanned data</u>.
</li>
<li>
Create a new set of particles with equal size by selecting particles from the old set
according to the weights of the particles. Particles with higher weights are more likely
to be selected. This is called the <b>resampling process</b>.
</li>
<li>
If all particles are clustered around a small region, that should be a good bet
of where the robot actually is.
</li>
</ol>
<br/>
<p>
There are many applications of such algorithm. For example, warehouse robots that
deliver objects inside a building. The robot would need to keep track of where it is
when moving and adjust its motion accordingly if it wanders off path. GPS is not a
good choice since most civilian GPS devices are only accurate to about 16 ft under
open sky. The accuracy of GPS is even worse inside a building due to signal blockage.
</p>
<h4>Common Q&A</h4>
<blockquote>Why do we need to take uncertainties of odometry readings into account?
</blockquote>
<p>
Noise exists in robots' motion sensors. If the motion sensor reports a movement
of 5 meters, the actual distance moved may or may not be exactly 5. It is probably
close to 5, say 5.1, 4.9, 4.8, etc. The accuracy of motion sensors determines how
far the readings deviate from reality. In practice, it is turns out that taking
these noises into account produces better results.
</p>
<blockquote>How do we take uncertainties of odometry into account?</blockquote>
<p>
The mathematical model should be aware of such uncertainties. The mathematical model
to handle is is often called a <b>motion model</b>. When updating particles
according to the robot's motion, the motion model draws a sample from all possible
outcomes. For example, if the robot's odometry sensor reports a forward movement of
10 meters, the motion model would draw a sample according the patter of noise, for
example, 9.8m, 10.3m, 10.1m, etc. But it is extremely unlikely to draw a sample of
3m. Because the motion model knows that the robot is not that inaccurate.
</p>
<blockquote>Why do we need to resample? Why don't we just keep the best ones?
</blockquote>
<p>
The weights of particles represent the robot's judgement of how likely that particle
is the true location. Just because the robot think a particle is a good guess,
doesn't mean that particle is actually good. If you only keep the best one and drop
the rest, it is very likely that you are throwing away the good particles. By
performing a resampling process, we are kind of maintaining a natural selection
process. And the hope is that, some of the good particles will survive and
propagate, giving us a good result.
</p>
</div>
</div>
<div class='row'>
<div class="col l8 s12">
<canvas id="mcl_canvas" width="7" height="4"></canvas>
<p class="center">
<button onclick="mclDemo.stop(event);" class="btn waves-effect waves-light red">
<span class="glyphicon glyphicon-repeat"></span>
</button>
<button class="btn waves-effect waves-light blue disabled">
<span class="glyphicon glyphicon-step-backward"></span>
</button>
<button onclick="mclDemo.start(event);" class="btn waves-effect waves-light">
<span class="glyphicon glyphicon-play"></span>
</button>
<button onclick="mclDemo.stepForward(event);"
class="btn waves-effect waves-light blue">
<span class="glyphicon glyphicon-step-forward"></span>
</button>
</p>
<span id="probability"></span>
</div>
<div class='col l4 s12'>
<canvas id="mcl_minicanvas" width="70" height="27"></canvas>
<fieldset>
<table>
<tbody>
<tr>
<td>
<label for="mcl_nParticles"># of particles</label>
</td>
<td>
<input type='text' id="mcl_nParticles"
onblur='mclDemo.setParticleCount(Number(event.target.value));'
onkeypress='return isNumber(event);'
class="form-control" value="500"
size="3" style="padding: 0">
</td>
</tr>
<!--<tr>-->
<!--<td>-->
<!--<label for="mcl_pRatio">% of particles-->
<!--resampled-->
<!--</label>-->
<!--</td>-->
<!--<td>-->
<!--<input type='text' id="mcl_pRatio" data-slider-value="0.9">-->
<!--</td>-->
<!--</tr>-->
<tr>
<td>
<label for="mcl_stride">Speed</label>
</td>
<td>
<input type='text' id="mcl_stride" value="0.04">
</td>
</tr>
<tr>
<td>
<label for="mcl_a1">Rotational error from
rotation
</label>
</td>
<td>
<input id='mcl_a1' value="1" type="text">
</td>
</tr>
<tr>
<td>
<label for="mcl_a2">Rotational error from
translation
</label>
</td>
<td>
<input id='mcl_a2' value="1" type="text">
</td>
</tr>
<tr>
<td>
<label for="mcl_a3">Translational error from
translation
</label>
</td>
<td>
<input id='mcl_a3' value="1" type="text">
</td>
</tr>
<tr>
<td>
<label for="mcl_a4">Translational error from
rotation
</label>
</td>
<td>
<input id='mcl_a4' value="1" type="text">
</td>
</tr>
<tr>
<td>
<label for="mcl_sensorRadius">Sensor Radius</label>
</td>
<td>
<input id="mcl_sensorRadius" type="text" data-slider-value="3">
</td>
</tr>
<tr>
<td><label for="mcl_sensorNoise">Sensor Noise</label>
</td>
<td><input type='text' id="mcl_sensorNoise" data-slider-value="0.2"></td>
</tr>
<tr>
<td>
<label for="mcl_colorRes">Coloring
Resolution
</label>
</td>
<td>
<input type="text" id="mcl_colorRes" data-slider-value="10">
</td>
</tr>
<tr>
<td>
<label for="mcl_shouldColor"
class="custom-control custom-checkbox">Color
the Map</label>
</td>
<td>
<div class="switch">
<label>
Off
<input id="mcl_shouldColor"
onchange='mclDemo.setColoring(event.target.checked);'
type="checkbox">
<span class="lever blue"></span>
On
</label>
</div>
</td>
</tr>
</tbody>
</table>
</fieldset>
</div>
</div>
</div>
<footer class="page-footer teal">
<div class="container">
<div class="row">
<div class="col l6 s12">
<h5 class="white-text">Questions and Comments?</h5>
<p class="grey-text text-lighten-4">Contact
<a style="color: aqua" href="mailto:[email protected]">Kelvin</a> or
<a style="color: aqua" href="mailto:[email protected]">William</a>
<p>
<h5 class="white-text">Special Thanks to Joydeep Biswas for instructions</h5>
</div>
</div>
<div class="footer-copyright center">
<div class="container">
<a class="grey-text text-lighten-3">
Probabilistic Robotics Interactive Algorithm
Team
2017 All Rights Reserved
</a>
</div>
</div>
</div>
</footer>
</body>