├── .gitignore ├── README.md ├── lecture_1 ├── MotionControl.JPG ├── Slip_Disk_Example.pdf ├── Standard_Wheel.pdf ├── cast.JPG ├── license.txt ├── main.pdf ├── main.tex ├── mcode.sty ├── swedish.jpg ├── tricycle.JPG └── unicycle.JPG ├── lecture_10 ├── egbib.bib ├── ieee.bst ├── img │ ├── Cond_Prob_Example.png │ ├── DAVE.png │ ├── DAVE2_network.png │ ├── DAVE2_road.png │ ├── DAVE2_system.png │ ├── DAVE_network.png │ ├── R-CNN.png │ ├── Siegwart_5_6.png │ ├── Siegwart_beliefs.png │ ├── Siegwart_maps.png │ ├── YOLO.png │ ├── rnn.jpg │ ├── sliding_window.png │ └── two_headed_network.png ├── main.pdf └── main.tex ├── lecture_11 ├── EKF_bad.JPG ├── EKF_best.JPG ├── EKF_high_var.png ├── EKF_low_var.png ├── EKF_med_var.png ├── EKF_transform.PNG ├── HMM_w_map.png ├── KF_algorithm.png ├── KF_linearity.png ├── UKF_high.JPG ├── UKF_high_var.png ├── UKF_low.JPG ├── UKF_low_var.png ├── UKF_med_var.png ├── UKF_transform.PNG ├── gaussian_multivariate.png ├── gaussian_univariate.png ├── histogram_belief.png ├── lecture_11_biblio_.bib ├── main.pdf ├── main.tex └── particle_localization.png ├── lecture_12 ├── lecture_12_biblio.bib ├── main.pdf └── main.tex ├── lecture_12_scribe_notes.pdf ├── lecture_13 ├── lecture_13_biblio.bib ├── main.pdf └── main.tex ├── lecture_13_scribe_notes.pdf ├── lecture_14 ├── Resampling_Figure.JPG ├── fastSLAM_fig1.PNG ├── graphSLAM_fig1.PNG ├── graphSLAM_fig2.PNG ├── main.pdf └── main.tex ├── lecture_15 ├── lecture_13_biblio.bib ├── main.pdf └── main.tex ├── lecture_15_scribe_notes.pdf ├── lecture_16 ├── 3Dslide1.PNG ├── 3Dslide2.PNG ├── 3Dslide3.PNG ├── Pseudocode.png ├── SlideRobot.PNG ├── SlideRobot2.PNG ├── drift.png ├── driftless.png ├── fmt.png ├── main.pdf ├── main.tex ├── prm_collision.png ├── rrt_new_sample.png └── rrt_portfolio_of_trajectories.png ├── lecture_17 ├── lecture_17_biblio.bib ├── main.pdf └── main.tex ├── lecture_17_scribe_notes.pdf ├── lecture_1_scribe_notes.pdf ├── lecture_2 ├── AA274Lecture2.pdf ├── AA274Lecture2.tex ├── ChatRoom.png ├── Gazebo.PNG ├── ModularityPhoto.png ├── PR2.PNG ├── ROSPackage.JPG └── USBCamera.JPG ├── lecture_2_scribe_notes.pdf ├── lecture_3 ├── RhoAlphaDelta.png ├── RhoAlphaDelta2.png ├── XYTheta.png ├── aa274-lecture-3-3.pdf ├── main.pdf └── main.tex ├── lecture_3_scribe_notes.pdf ├── lecture_4 ├── AA274_Scribe_Notes.pdf ├── Enc.png ├── gyro.png ├── imgs │ ├── GaussianDistribution.PNG │ ├── IMU.png │ ├── Lens.PNG │ ├── Lens0.jpg │ ├── LightRays0.jpg │ ├── PinholeMath0.jpg │ ├── light.png │ ├── q1b.png │ ├── smd.png │ └── ultra.png ├── main.pdf ├── main.tex └── reference.bib ├── lecture_4_scribe_notes.pdf ├── lecture_5 ├── Lecture_5_Scribe_Notes.pdf ├── imgs │ ├── GaussianDistribution.PNG │ ├── IMU.png │ ├── Lens.PNG │ ├── Lens0.jpg │ ├── LightRays0.jpg │ ├── PinholeMath0.jpg │ ├── diagram_1_vik.png │ ├── distortion.png │ ├── light.png │ ├── measuring_depth.png │ ├── q1b.png │ ├── smd.png │ ├── stepping_on_tower.png │ ├── traintracks.jpg │ ├── ultra.png │ ├── vik_image_2.png │ ├── vik_image_3.png │ └── vik_image_4.png ├── main.pdf ├── main.tex └── reference.bib ├── lecture_6 ├── SFM.PNG ├── SFM_ambiguities.png ├── SFM_ambiguity.PNG ├── approximation.png ├── correspondence.png ├── correspondence2.jpg ├── correspondence3.PNG ├── disparity_map.PNG ├── epipolar.png ├── lecture_6_scribe.pdf ├── main.pdf ├── main.tex ├── rectified_image.PNG ├── rectified_triangulation_1_.PNG ├── rectified_triangulation_2_.PNG ├── references.bib ├── thinlens.png └── triangulation.png ├── lecture_7 ├── 2d_equivalent.PNG ├── Lecture 7 scribe notes.pdf ├── application.PNG ├── better_kernel.PNG ├── blur.png ├── corner.JPG ├── gaussian.PNG ├── harris.JPG ├── main.pdf ├── main.tex ├── noisy_uncorrected.PNG └── ref.bib ├── lecture_8 ├── images │ ├── ErrorPropagation_1D.png │ ├── PolarCoordinates.png │ ├── RANSACEx.png │ ├── RANSACOverview.png │ ├── bag_of_words.JPG │ ├── bias_vs_var.png │ ├── cat_classifier.png │ ├── classification.png │ ├── errorpropagation_general.png │ ├── gradient_descent.png │ ├── hough1.JPG │ ├── hough2.JPG │ ├── hough3.JPG │ ├── hough4.JPG │ ├── hough5.JPG │ ├── hough6.JPG │ ├── hyper_parameters.png │ ├── iterativesplit.png │ ├── knn.png │ ├── least_squares.png │ ├── linear_classifier.png │ ├── linear_regression.png │ ├── regression.png │ ├── sgd.png │ ├── spline_fitting.png │ └── splitandmerge.png ├── main.pdf ├── main.tex └── sample.bib ├── lecture_9 ├── main.pdf ├── main.tex ├── pics │ ├── Leaky.png │ ├── Logistic_regression.png │ ├── cnn.png │ ├── cnn2.png │ ├── deep_learning.png │ ├── deep_neural_net.png │ ├── lecture_8_HOG.jpg │ ├── lecture_8_classification.jpg │ ├── lecture_8_dot_prod_-1.jpg │ ├── lecture_8_dot_prod_0.jpg │ ├── lecture_8_dot_prod_1.jpg │ ├── lecture_8_eigenfaces.jpg │ ├── lecture_8_feature_extraction.jpg │ ├── lecture_8_generalized_models.jpg │ ├── lecture_8_grad_desc_options.jpg │ ├── lecture_8_k_nearest.jpg │ ├── lecture_8_knn_1.jpg │ ├── lecture_8_knn_10.jpg │ ├── lecture_8_knn_100.jpg │ ├── lecture_8_linear_classifier.jpg │ ├── lecture_8_linear_classifier_example.jpg │ ├── lecture_8_linear_classifier_interpretation.jpg │ ├── lecture_8_linear_regression.jpg │ ├── lecture_8_num_opt1.jpg │ ├── lecture_8_num_opt2.jpg │ ├── lecture_8_parameters.jpg │ ├── lecture_8_regression.jpg │ ├── lecture_8_regularization_loss.jpg │ ├── lecture_8_spline_fitting.jpg │ ├── lecture_8_stochastic_grad_desc.jpg │ ├── maxpool.jpeg │ ├── neuron.png │ ├── neuron_model.jpeg │ ├── overfitting.png │ ├── pool.jpeg │ ├── relu.jpeg │ ├── sigmoid.jpeg │ ├── tanh.jpeg │ ├── threshold.png │ └── training_net.png └── references.bib └── scribe_notes_template └── template.tex /.gitignore: -------------------------------------------------------------------------------- 1 | ## Core latex/pdflatex auxiliary files: 2 | *.aux 3 | *.lof 4 | *.log 5 | *.lot 6 | *.fls 7 | *.out 8 | *.toc 9 | *.fmt 10 | *.fot 11 | *.cb 12 | *.cb2 13 | .*.lb 14 | 15 | ## Intermediate documents: 16 | *.dvi 17 | *.xdv 18 | *-converted-to.* 19 | # these rules might exclude image files for figures etc. 20 | # *.ps 21 | # *.eps 22 | # *.pdf 23 | 24 | ## Generated if empty string is given at "Please type another file name for output:" 25 | .pdf 26 | 27 | ## Bibliography auxiliary files (bibtex/biblatex/biber): 28 | *.bbl 29 | *.bcf 30 | *.blg 31 | *-blx.aux 32 | *-blx.bib 33 | *.run.xml 34 | 35 | ## Build tool auxiliary files: 36 | *.fdb_latexmk 37 | *.synctex 38 | *.synctex(busy) 39 | *.synctex.gz 40 | *.synctex.gz(busy) 41 | *.pdfsync 42 | 43 | ## Auxiliary and intermediate files from other packages: 44 | # algorithms 45 | *.alg 46 | *.loa 47 | 48 | # achemso 49 | acs-*.bib 50 | 51 | # amsthm 52 | *.thm 53 | 54 | # beamer 55 | *.nav 56 | *.pre 57 | *.snm 58 | *.vrb 59 | 60 | # changes 61 | *.soc 62 | 63 | # cprotect 64 | *.cpt 65 | 66 | # elsarticle (documentclass of Elsevier journals) 67 | *.spl 68 | 69 | # endnotes 70 | *.ent 71 | 72 | # fixme 73 | *.lox 74 | 75 | # feynmf/feynmp 76 | *.mf 77 | *.mp 78 | *.t[1-9] 79 | *.t[1-9][0-9] 80 | *.tfm 81 | 82 | #(r)(e)ledmac/(r)(e)ledpar 83 | *.end 84 | *.?end 85 | *.[1-9] 86 | *.[1-9][0-9] 87 | *.[1-9][0-9][0-9] 88 | *.[1-9]R 89 | *.[1-9][0-9]R 90 | *.[1-9][0-9][0-9]R 91 | *.eledsec[1-9] 92 | *.eledsec[1-9]R 93 | *.eledsec[1-9][0-9] 94 | *.eledsec[1-9][0-9]R 95 | *.eledsec[1-9][0-9][0-9] 96 | *.eledsec[1-9][0-9][0-9]R 97 | 98 | # glossaries 99 | *.acn 100 | *.acr 101 | *.glg 102 | *.glo 103 | *.gls 104 | *.glsdefs 105 | 106 | # gnuplottex 107 | *-gnuplottex-* 108 | 109 | # gregoriotex 110 | *.gaux 111 | *.gtex 112 | 113 | # htlatex 114 | *.4ct 115 | *.4tc 116 | *.idv 117 | *.lg 118 | *.trc 119 | *.xref 120 | 121 | # hyperref 122 | *.brf 123 | 124 | # knitr 125 | *-concordance.tex 126 | # TODO Comment the next line if you want to keep your tikz graphics files 127 | *.tikz 128 | *-tikzDictionary 129 | 130 | # listings 131 | *.lol 132 | 133 | # makeidx 134 | *.idx 135 | *.ilg 136 | *.ind 137 | *.ist 138 | 139 | # minitoc 140 | *.maf 141 | *.mlf 142 | *.mlt 143 | *.mtc[0-9]* 144 | *.slf[0-9]* 145 | *.slt[0-9]* 146 | *.stc[0-9]* 147 | 148 | # minted 149 | _minted* 150 | *.pyg 151 | 152 | # morewrites 153 | *.mw 154 | 155 | # nomencl 156 | *.nlg 157 | *.nlo 158 | *.nls 159 | 160 | # pax 161 | *.pax 162 | 163 | # pdfpcnotes 164 | *.pdfpc 165 | 166 | # sagetex 167 | *.sagetex.sage 168 | *.sagetex.py 169 | *.sagetex.scmd 170 | 171 | # scrwfile 172 | *.wrt 173 | 174 | # sympy 175 | *.sout 176 | *.sympy 177 | sympy-plots-for-*.tex/ 178 | 179 | # pdfcomment 180 | *.upa 181 | *.upb 182 | 183 | # pythontex 184 | *.pytxcode 185 | pythontex-files-*/ 186 | 187 | # thmtools 188 | *.loe 189 | 190 | # TikZ & PGF 191 | *.dpth 192 | *.md5 193 | *.auxlock 194 | 195 | # todonotes 196 | *.tdo 197 | 198 | # easy-todo 199 | *.lod 200 | 201 | # xmpincl 202 | *.xmpi 203 | 204 | # xindy 205 | *.xdy 206 | 207 | # xypic precompiled matrices 208 | *.xyc 209 | 210 | # endfloat 211 | *.ttt 212 | *.fff 213 | 214 | # Latexian 215 | TSWLatexianTemp* 216 | 217 | ## Editors: 218 | # WinEdt 219 | *.bak 220 | *.sav 221 | 222 | # Texpad 223 | .texpadtmp 224 | 225 | # Kile 226 | *.backup 227 | 228 | # KBibTeX 229 | *~[0-9]* 230 | 231 | # auto folder when using emacs and auctex 232 | ./auto/* 233 | *.el 234 | 235 | # expex forward references with \gathertags 236 | *-tags.tex 237 | 238 | # standalone packages 239 | *.sta 240 | 241 | # generated if using elsarticle.cls 242 | *.spl 243 | 244 | .DS_Store 245 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # AA274_lecture_notes 2 | Compiled lecture notes for AA274. These notes are not official course material, but rather are compiled, edited and maintained by students in the course to serve as a useful reference for future students as well as others interested in robotic autonomy. If you notice a mistake in the notes and want to contribute a correction, please submit a pull request. 3 | 4 | Each lecture has a folder containing the `.tex` file as well as any additional files (figures, images, etc.) 5 | 6 | ## How to contribute 7 | 8 | Students contribute to these notes through _pull requests_. 9 | 10 | When it is your turn to scribe: 11 | 12 | 1. One person from your group should [fork this repository](https://help.github.com/articles/fork-a-repo/), and clone it to their computer. This person should then add the other team members as collaborators to the forked repo. 13 | 1. Make your improvements and updates, and commit the changes to this forked repository. 14 | 1. To submit your improvements, create a pull request [from your fork](https://help.github.com/articles/creating-a-pull-request-from-a-fork/) to the `master` branch of this repository. Outline the changes your team made in the message. 15 | 16 | The course instructors will review your edits, give feedback (potentially requesting revisions), and then incorporate your changes. 17 | -------------------------------------------------------------------------------- /lecture_1/MotionControl.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/MotionControl.JPG -------------------------------------------------------------------------------- /lecture_1/Slip_Disk_Example.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/Slip_Disk_Example.pdf -------------------------------------------------------------------------------- /lecture_1/Standard_Wheel.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/Standard_Wheel.pdf -------------------------------------------------------------------------------- /lecture_1/cast.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/cast.JPG -------------------------------------------------------------------------------- /lecture_1/license.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2014, Florian Knorn 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are 6 | met: 7 | 8 | * Redistributions of source code must retain the above copyright 9 | notice, this list of conditions and the following disclaimer. 10 | * Redistributions in binary form must reproduce the above copyright 11 | notice, this list of conditions and the following disclaimer in 12 | the documentation and/or other materials provided with the distribution 13 | 14 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 15 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 18 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 19 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 20 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 21 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 22 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 23 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 24 | POSSIBILITY OF SUCH DAMAGE. 25 | -------------------------------------------------------------------------------- /lecture_1/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/main.pdf -------------------------------------------------------------------------------- /lecture_1/main.tex: -------------------------------------------------------------------------------- 1 | % \documentclass{article} 2 | 3 | 4 | \documentclass[twoside]{article} 5 | 6 | \usepackage[math]{kurier} 7 | \usepackage[sc]{mathpazo} 8 | \renewcommand{\sfdefault}{kurier} 9 | \usepackage[utf8]{inputenc} 10 | \usepackage{graphicx} 11 | \usepackage{caption} 12 | \usepackage{hyperref} 13 | \usepackage{subcaption} 14 | \usepackage{wrapfig} 15 | \usepackage{amsmath} 16 | \usepackage{enumitem} 17 | \usepackage{float} 18 | \usepackage{framed} % or, "mdframed" 19 | \usepackage[framed]{ntheorem} 20 | \newframedtheorem{frm-def}{Definition} 21 | \usepackage{graphics} 22 | \setlength{\oddsidemargin}{0.25 in} 23 | \setlength{\evensidemargin}{-0.25 in} 24 | \setlength{\topmargin}{-0.6 in} 25 | \setlength{\textwidth}{6.5 in} 26 | \setlength{\textheight}{8.5 in} 27 | \setlength{\headsep}{0.75 in} 28 | \setlength{\parindent}{0 in} 29 | \setlength{\parskip}{0.1 in} 30 | 31 | 32 | \newcounter{lecnum} 33 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 34 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 35 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 36 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 37 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 38 | 39 | 40 | \newcommand{\lecture}[3]{ 41 | \pagestyle{myheadings} 42 | \thispagestyle{plain} 43 | \newpage 44 | \setcounter{lecnum}{#1} 45 | \setcounter{page}{1} 46 | \noindent 47 | \begin{center} 48 | \framebox{ 49 | \vbox{\vspace{2mm} 50 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 51 | \hfill Winter 2019} } 52 | \vspace{4mm} 53 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 54 | \vspace{2mm} 55 | %\hbox to 6.28in { {\it \hfill Scribes: #4} } 56 | \vspace{2mm}} 57 | } 58 | \end{center} 59 | \markboth{Lecture #1: #2}{Lecture #1: #2} 60 | 61 | \vspace*{4mm} 62 | } 63 | 64 | 65 | \begin{document} 66 | 67 | \lecture{1}{Mobile Robot Kinematics}{}{} 68 | 69 | The following notes summarize the first lecture of AA 274: Principles of Robotic Autonomy. This lecture covers two introductory materials (Mobile Robot Kinematics and Motion Control), is organized into meaningful sections, and is annotated with formal definitions, graphics and literature references. 70 | 71 | \section*{Course Introduction} 72 | 73 | This goal of this course is to learn the theoretical, algorithmic and implementation aspects of the 74 | main techniques for robot autonomy. The four following pillars of the ``autonomy stack" will be covered: 75 | 76 | \begin{enumerate} 77 | \item motion control (2 lectures); 78 | \item perception, from classic to deep learning approaches (6 lectures); 79 | \item localization and SLAM (4 lectures); 80 | \item planning, decision making and system architecting (4 lectures). 81 | \end{enumerate} 82 | 83 | In addition to covering the above theoretical topics on robot autonomy, the course will also emphasize hands on practical experience - this will happen through the extensive use of the Robotic Operating System (ROS) in both assignments and the final project. For more details on ROS, see lecture 2. 84 | 85 | \section*{Lecture 1 Introduction} 86 | 87 | Lecture 1 will describe kinematic constraints on mobile robots, and different robot wheel configurations. We will merge these concepts to describe a few wheeled robot kinematic models. Outlined below 88 | \begin{enumerate} 89 | \item Kinematic Constraints 90 | \begin{enumerate} 91 | \item Holonomic Constraints 92 | \item Nonholonomic Constraints 93 | \end{enumerate} 94 | \item Wheel Configurations 95 | \begin{enumerate} 96 | \item Standard Wheels 97 | \item Castor Wheels 98 | \item Omni-directional Wheels 99 | \end{enumerate} 100 | \item Mobile Robot Models 101 | \begin{enumerate} 102 | \item Unicycle (a.k.a. "differential drive") 103 | \item Tricycle (simple car) 104 | \end{enumerate} 105 | \end{enumerate} 106 | 107 | In this class, an emphasis will be placed on mobile robots and vehicles as opposed to stationary machines. With mobile robots, the focus is on motion and trajectories rather than configurations and interactions with the environment. As such, we need to consider the dynamics and kinematic constraints that govern the motion of each robot. 108 | 109 | \section*{Kinematic Constraints} 110 | \subsection*{Holonomic Constraints} 111 | 112 | The motion state, or configuration, of a robot at any point in time is given by the configuration vector \cite{ssvo}: 113 | 114 | $$ 115 | \xi = [\xi_1, \xi_2, \ ... \ \xi_n]^T 116 | $$ 117 | 118 | For example, a differential drive robot would have $ \xi = [x, y, \theta]^T, $ denoting a 2D position and an orientation angle. 119 | 120 | A time series of changing configurations $ \xi(t) $ is called a trajectory, and the set of differential equations $ \dot{\xi} = f(\xi,u) $ that govern the robot's motion is known as the robot's dynamic model. We will see later that general dynamic models are already known for most robots. They can, however, also be derived from any given robot's kinematic constraints. 121 | 122 | Kinematic constraints take the form of mathematical statements involving $\xi$, that must hold at all times during robot operation. We introduce some formal notation and terminology at this point: 123 | 124 | \begin{frm-def}[Holonomic Constraints] 125 | A kinematic constraint is holonomic if it can be expressed as: 126 | $$ 127 | h_i(\xi) = 0,\;\;\textup{for}\;\;i = 1,...,k < n 128 | $$ 129 | Each holonomic constraint reduces the number of degrees of freedom of the robot's configuration by 1 (i.e. it reduces the space of accessible configurations of the vehicle to an \textit{n-k} dimensional subset. 130 | \end{frm-def} 131 | 132 | \begin{frm-def}[Kinematic Constraints] 133 | A mobile robot system with $n$ degrees of freedom has kinematic constraints that can be described in a general way as follows: 134 | $$ 135 | a_i (\xi, \dot{\xi})=0,\;\;\textup{for}\;\;i = 1,...,k < n 136 | $$ 137 | A subcategory of kinematic constraints can be expressed in the Pfaffian form: 138 | $$ 139 | a_i(\xi) \cdot \dot{\xi} = 0,\;\;\textup{for}\;\;i = 1,...,k < n 140 | $$ 141 | \end{frm-def} 142 | 143 | We can see that a holonomic constraint always also imposes a kinematic constraint: 144 | $$ 145 | h_i(\xi) = 0 \Rightarrow \frac{d\,h_i(\xi)\, }{dt} = \frac{\partial\,h_i(\xi)}{\partial \xi} \dot{\xi} = 0,\;\;\textup{for}\;\;i = 1,...,k < n 146 | $$ 147 | However, the converse is generally not true \cite{ssvo}. 148 | 149 | \subsection*{Nonholonomic Constraints} 150 | 151 | The general kinematic constraint in the form $ a_i (\xi, \dot{\xi}) $ can either be a holonomic or a nonholonomic constraint. It is holonomic if it can be integrated to the holonomic form of $ h_i(\xi) = 0 $. Otherwise, it is nonholonomic \cite{ssvo}. 152 | 153 | In practice, both types of constraints affect the system differently: holonomic constraints reduce accessibility of the robot by limiting the robot configuration to a lower-dimensional subspace (each constraint removes one degree of freedom), whereas nonholonomic constraints do not limit accessibility at all; instead, they constrain the possible velocities at each configuration state. In particular, Pfaffian form constraints $ a_i(\xi) \cdot \dot{\xi} = 0 $ allow only velocities from the null space of $ a_i (\xi) $. 154 | 155 | A kinematic system with any nonholonomic constraints is denoted as a nonholonomic mechanical system. 156 | 157 | \subsubsection*{Example: Single No Slip Disk \cite{ssvo}} 158 | 159 | \begin{figure}[H] 160 | \centering 161 | \includegraphics[width=0.35\textwidth]{Slip_Disk_Example} 162 | \caption{Single No Slip Disk Diagram} 163 | \end{figure} 164 | 165 | We consider a disk rolling on its edge to demonstrate a nonholonomic system. Like a differential drive robot, the configuration vector of this system is $ \xi = [x, y, \theta]^T $. The kinematic constraint on this system is the no slip constraint, i.e. the disk cannot move laterally - only longitudinally along its orientation. 166 | 167 | To formulate this constraint mathematically, we express the two orthogonal directions like this: 168 | 169 | \[ d_{long} = 170 | \begin{pmatrix} \cos \theta \\ \sin \theta \end{pmatrix} 171 | \perp 172 | d_{lat} = 173 | \begin{pmatrix} \sin \theta \\ -\cos \theta \end{pmatrix} 174 | \] 175 | 176 | We can enforce the no slip condition with a dot product statement between the velocity vector and $ d_{lat} $ as follows: 177 | 178 | $$ 179 | [\dot{x}, \dot{y}] \begin{pmatrix} \sin \theta \\ -\cos \theta \end{pmatrix} = 0 \iff 180 | [\sin \theta, -\cos \theta, 0] \dot{\xi} = 0 181 | $$ 182 | 183 | This is a nonholonomic constraint in Pfaffian form. In this system there is no loss of accessibility. 184 | 185 | The example shows that wheeled vehicles are generally nonholonomic, meaning they can reach any configuration $[x,y,\theta]^T$ but will have constrained trajectories to get there. A common holonomic system, on the other hand, would be a robotic arm that cannot reach any possible configuration due to mechanical interactions. In this case, its joints may constrain it such that some configurations are unreachable. 186 | 187 | \subsection*{Types of wheels} 188 | 189 | There are four main wheel types in mobile robotics. Since they are different in the way they constrain the robot's motion, knowing them is important to finding out the kinematic constraints and dynamic model of the vehicle. 190 | 191 | The \textbf{Standard Wheel} is the most ubiquitous of the wheel types. Its defining property is that the wheel is mounted on the robot's frame directly above the wheel's point of contact with the ground. They can either be of fixed orientation, or they can be fitted to be steerable\cite{sns}. 192 | 193 | \begin{figure}[H] 194 | \centering 195 | \includegraphics[width=0.6\textwidth]{Standard_Wheel} 196 | \caption{Standard Wheel} 197 | \end{figure} 198 | 199 | 200 | The \textbf{Castor Wheel} differs from the fixed wheel in that it is mounted on the robot in an off-centered position and always fastened to a rotating axis. The wheel's orientation is then either actively steered or passively governed by the robot's motion. The main advantage of the Castor Wheel is that the off-centered axis of rotation essentially allows the wheel to circumvent the no-slip constraint. Of course, it still cannot achieve true omnidirectional motion because it can only exert force along its orientation\cite{sns}. 201 | 202 | \begin{figure}[h] 203 | \centering 204 | \includegraphics[width=0.4\textwidth]{cast} 205 | \caption{Castor Wheel} 206 | \end{figure} 207 | 208 | The \textbf{Swedish Wheel} and the \textbf{Spherical wheel} are special wheel designs that both achieve omnidirectional motion in different ways. The Swedish Wheel is a big wheel with smaller rollers mounted on the rim allowing active movement in all directions\cite{sns}. The Spherical Wheel uses a different concept, where the "wheel" itself is actually ball-shaped. This wheel is suspended in a cage where it is in contact with a series of small motors that can turn the sphere to roll in any direction. They are quite rare however, so they will not play a large part in this class. 209 | 210 | \begin{figure}[H] 211 | \centering 212 | \includegraphics[width=0.5\textwidth]{swedish} 213 | \caption{Omnidirectional Swedish Wheel \cite{swed}} 214 | \end{figure} 215 | 216 | \subsection*{Kinematic Models and Degree of Mobility} 217 | 218 | By putting together all the constraints that arise from the no slip conditions, we can come up with a kinematic model of our robot. While we do not have to do this in this class, to derive the kinematic model for your given robot, you would compile the no slip constraints into a matrix, then look at the null space of that constraint matrix. This will tell you the set of possible velocities of your robot. The reason the null space of the constraint matrix forms the set of possible velocities is that the no slip conditions each impose a constraint in the Pfaffian form $$a_i(\xi) \cdot \dot{\xi} = 0.$$ Thus it is possible to reach a given velocity if and only if it is orthogonal to each row of the constraint matrix, or equivalently if it lies in the null space of the constraint matrix. 219 | 220 | More specifically, a nonholonomic constraint matrix $C_1(\beta_s)$ is derived by stacking all the no slip conditions for the fixed wheels and steerable wheels: 221 | $$C_1(\beta_s)= \begin{bmatrix} 222 | C_{1f} \\ 223 | C_{1s}(\beta_s) \\ 224 | \end{bmatrix}$$ 225 | where $C_{1f}$ is the matrix of no slip conditions for the fixed wheels and $C_{1s}(\beta_s)$ is the matrix of no slip conditions for the steerable wheels, which are steerable by the wheel angle $\beta_s$. The dimension of the null space of $C_1(\beta_s)$ determines the number of degrees of freedom the robot can move in by manipulating the wheel velocities, also known as the robot's degree of mobility $\delta_m$. The possible range of mobility values for any robot is $0 \leq \delta_m \leq 3.$ The degree of mobility is $\delta_m=3$ only if there are no independent kinematic constraints, i.e. if there are neither fixed nor steerable wheels attached to the robot. A degree of mobility of $\delta_m=0$ is only possible if there are three independent kinematic constraints (e.g. if the robot has three fixed wheels at different angles). In this case, the robot can not move in any direction. 226 | 227 | By finding the null space of the nonholonomic constraint matrix you can express the set of possible velocities in a parameterized form. This is what is known as a kinematic model. We will use some simple kinematic models in this class to describe the motion of our mobile robot: 228 | 229 | \subsubsection*{"Unicycle" (a.k.a. "differential drive") Model:} 230 | 231 | This configuration type utilizes two rear standard wheels and an optional passive wheel in the front of the vehicle. In order to achieve rotation, the unicycle model makes use of differential drive by controlling the rate/direction of rotation for each wheel independently\cite{sns}. 232 | 233 | \begin{figure}[H] 234 | \centering 235 | \includegraphics[width=0.35\textwidth]{unicycle} 236 | \caption{Unicycle Model} 237 | \end{figure} 238 | 239 | The kinematic model of unicycle robots is as follows: 240 | 241 | \[ \begin{pmatrix} 242 | \dot{x} \\ \dot{y} \\ \dot{\theta} 243 | \end{pmatrix} = 244 | \begin{pmatrix} \cos \theta \\ \sin \theta \\ 0 \end{pmatrix} v + \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} w 245 | \] 246 | This kinematic model is governed by the no lateral slip and pure rolling constraints of the fixed unicycle wheel. The differential-drive robot, although mechanically different, yields the same kinematic model. This is because the collection of constraints on a differential-drive robot can be combined to form one independent constraint. First, the passive wheel is free to move in any direction and can be ignored. Second, the two fixed drive wheels are parallel, therefore, the constraints do not allow the robot to move orthogonal to the wheel plane but allows the robot to rotate with respect to the global reference frame without translating. Finally, the pure rolling constraint is the same in both cases, the addition of the second wheel not changing the kinematics of the robot. Therefore, the kinematics of both robots are the same, both rotating and translating with respect to a constant point on the chassis. 247 | 248 | \subsubsection*{"Tricycle" (or simple car) Model:} 249 | 250 | Unlike the unicycle model, this configuration type utilizes two rear standard wheels and an active steering wheel(s) in the front of the vehicle. The use of both differential drive and active steering allow the tricycle model to naturally model the kinematic constraints of a simple car\cite{sns}. 251 | 252 | \begin{figure}[H] 253 | \centering 254 | \includegraphics[width=0.4\textwidth]{tricycle} 255 | \caption{Tricycle Model} 256 | \end{figure} 257 | 258 | The kinematic model of tricycle robots is as follows: 259 | 260 | \[ \begin{pmatrix} 261 | \dot{x} \\ \dot{y} \\ \dot{\theta} \\ \dot{\xi} 262 | \end{pmatrix} = 263 | \begin{pmatrix} \cos \xi \cos \theta \\ \cos \xi \sin \theta \\ \sin \xi \\ 0 \end{pmatrix} u_1 + \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} u_2 264 | \] 265 | 266 | \textbf{Warning:} A kinematic state space model should only be interpreted as a subsystem of a more general dynamical model of the robot. 267 | 268 | You control the robot by controlling actual forces and torques, not linear and angular speeds. Usually we assume that there is a black box that converts desired angular and linear velocities to actual torques on each wheel. Alternatively, we could reason directly with the dynamical model, but we won't do this until later in the class. 269 | 270 | \subsection*{Simplified car models} 271 | 272 | Assuming we do not care about the direction of the front wheels, we can set $v = u_1 \cos \xi$, and $w = u_1 \sin \xi$, and plug these two equalities into our kinematic model of the tricycle model, yielding: 273 | 274 | \begin{center} 275 | $ 276 | \begin{pmatrix} 277 | \dot{x} \\ \dot{y} \\ \dot{\theta} \\ \dot{\xi} 278 | \end{pmatrix} = 279 | \begin{pmatrix} \cos \xi \cos \theta \\ \cos \xi \sin \theta \\ \sin \xi \\ 0 \end{pmatrix} u_1 + \begin{pmatrix} 0 \\ 0 \\ 0 \\ 1 \end{pmatrix} u_2 280 | $ $\Rightarrow$ $ 281 | \begin{pmatrix} 282 | \dot{x} \\ \dot{y} \\ \dot{\theta} 283 | \end{pmatrix} = 284 | \begin{pmatrix} \cos \theta \\ \sin \theta \\ 0 \end{pmatrix} v + \begin{pmatrix} 0 \\ 0 \\ 1 \end{pmatrix} w 285 | $ 286 | \end{center} 287 | 288 | As it can clearly be seen, this assumption has reduced our simple car-like system to the equivalent kinematic representation of the unicycle model. Of note, however, is that while the kinematic model reduces to become indiscriminate of the unicycle model, there is a coupling of the constraints that changes the behavior of the vehicle. 289 | 290 | Below are a few examples of how the relationship of $v$ and $w$ relate to $u_{1,max}$ \cite{jp}: 291 | \\\\ 292 | $ 293 | |v| \leq u_{1,max}\;\textup{cos}(\zeta_{max}),\;|w|\leq |v|\;\textup{tan}(\zeta_{max}) \rightarrow \textup{Car-like robot} 294 | $ 295 | 296 | $ 297 | |v|= u_{1,max}\;\textup{cos}(\zeta_{max}),\;|w|\leq |v|\;\textup{tan}(\zeta_{max}) \rightarrow \textup{Reeds \& Shepp's car} 298 | $ 299 | 300 | $ 301 | v= u_{1,max}\;\textup{cos}(\zeta_{max}),\;|w|\leq |v|\;\textup{tan}(\zeta_{max}) \rightarrow \textup{Dubin's car} 302 | $ 303 | 304 | \section*{Further Readings and Additional Resources} 305 | 306 | \begin{itemize} 307 | \item Additional information on holonomic vs. nonholonomic constraints 308 | \begin{itemize} 309 | \item \url{https://alliance.seas.upenn.edu/~meam535/cgi-bin/pmwiki/uploads/Main/Constraints10.pdf} 310 | \item \url{http://www.cs.cmu.edu/afs/cs/academic/class/16741-s07/www/lectures/lecture5.pdf} 311 | \end{itemize} 312 | \item PowerPoint slides on dynamics, wheels, and constraints 313 | \begin{itemize} 314 | \item \url{http://www.csc.kth.se/utbildning/kth/kurser/DD2426/robot-h08/mtrl/Kinematics2x2.pdf} 315 | \end{itemize} 316 | \item Rotation Matrices Review 317 | \begin{itemize} 318 | \item \url{http://mathworld.wolfram.com/RotationMatrix.html} 319 | \end{itemize} 320 | \end{itemize} 321 | 322 | 323 | \begin{thebibliography}{9} 324 | 325 | \bibitem{ssvo} 326 | B. Siciliano, L. Sciavicco, L. Villani, G. Oriolo.\textit{ Robotics: Modelling, Planning, and Control.} \\Springer, 2008 (chapter 11). 327 | 328 | \bibitem{sns} 329 | R. Siegwart, I. R. Nourbakhsh, D. Scaramuzza. \textit{Introduction to Autonomous Mobile Robots.} MIT Press, 2nd Edition, 2011. 330 | 331 | \bibitem{jp} 332 | J.-P. Laumond. \textit{Robot Motion Planning and Control.} 1998 \\texttt{https://homepages.laas.fr/jpl/promotion/chap1.pdf} 333 | 334 | \bibitem{swed} 335 | L. Lin, H. Shih. \textit{Modeling and Adaptive Control of an Omni-Mecanum-Wheeled Robot.} \\Intelligent Control and Automation, 4, 166-179. doi: 10.4236/ica.2013.42021. 336 | 337 | \end{thebibliography} 338 | 339 | \subsubsection*{Contributors} 340 | Winter 2019: S. Bernardon, T. DeWeese, A. Jagesten, P. Pipatpinyopong, G. Spellman, J. Malmstrom, M. Ricks, and V. Zhang 341 | \\ 342 | Winter 2018: S. Spears, C. Covert, A. Hosler, Z. Chase, and H.M. Ewald 343 | 344 | \end{document} 345 | -------------------------------------------------------------------------------- /lecture_1/mcode.sty: -------------------------------------------------------------------------------- 1 | %% 2 | %% This is file `mcode.sty' 3 | %% 4 | %% It is supposed to help you easily include MATLAB source code 5 | %% into LaTeX document, but have it nicely highlighted, using 6 | %% the great listings package. 7 | %% 8 | %% PLEASE NOTE that this package does nothing but save you from 9 | %% figuring out some configurations in setting up the LISTINGS 10 | %% package. ALL the work is done by that package! Thus, please 11 | %% refer your questions to the listings package documentation. 12 | %% 13 | %% Usage: You have three ways of including your MATLAB code. As 14 | %% environment, as inline object and directly from an external 15 | %% file. 16 | %% 17 | %% 1) Environment: 18 | %% 19 | %% \begin{lstlisting} 20 | %% YOUR CODE HERE 21 | %% \end{lstlisting} 22 | %% 23 | %% 24 | %% 2) Inline object*: 25 | %% 26 | %% Bla bla \mcode{CODEFRAGMENT} bla bla. 27 | %% 28 | %% 29 | %% 3) Include external file (in environment form) 30 | %% 31 | %% \lstinputlisting{YOUR-FILE.m} 32 | %% 33 | %% 34 | %% For your convenience this package has the following options: 35 | %% 36 | %% - bw if you intend to print the document (highlighting done 37 | %% via text formatting (bold, italic) and shades of gray) 38 | %% 39 | %% - numbered if you want line numbers 40 | %% 41 | %% - autolinebreaks if you want the package to automatically 42 | %% wrap your code. This is buggy as it may well break 43 | %% break syntax and it doesn't work well with comments. 44 | %% You REALLY should wrap your code manually. 45 | %% 46 | %% - useliterate if you want some characters / relations in 47 | %% your code to be replace with something more readable. 48 | %% Example: ~= becomes $\neq$, >= becomes $\geq$, delta 49 | %% becomes $\delta$ and so on. 50 | %% 51 | %% - framed if you want a frame around the source code blocks 52 | %% 53 | %% - final if you have ``gloablly'' set the draft option, the 54 | %% listings package will not output the code at all. to 55 | %% force it to do so anyway, load this package with the 56 | %% final option (passes the ``final'' on to listings). 57 | %% 58 | %% For example, you may use \usepackage[numbered,framed]{mcode} 59 | %% in your document preamble. 60 | %% 61 | %% * If you want to place some inline code in a footnote, use 62 | %% \mcodefn{} instead (this will reduce the font size a bit). 63 | %% 64 | %% Note: Inside code blocks you can escape to LaTeX text mode 65 | %% using §...§. For ex. §text and some math: $x^2$§, which is 66 | %% especially useful in comments for putting nicely typeset 67 | %% equations etc. To get the same colour/style as in the rest 68 | %% of the comment use \mcommentfont, i.e. §\mcommentfont $x^2$§ 69 | %% 70 | %% To change the font used, edit the first line in the "custo- 71 | %% mise below" section. And feel free to edit other things as 72 | %% well. Refer to the documentation of the listings package to 73 | %% see what else you could do. If an extra small font is re- 74 | %% quired, use {\fontfamily{pcr}\fontsize{3}{4.6}\selectfont} 75 | %% in the definition of \lstbasicfont. 76 | %% 77 | %% Author: 78 | %% Florian Knorn | florian@knorn.org | www.florian-knorn.com 79 | %% 80 | %% Version history: 81 | %% 2.5 -- Renamed internal variables (thx S. Kranenbarg!) 82 | %% 2.4 -- Added \mcodefn{} command (thx Tony Almeida!) 83 | %% 2.3 -- More keywords (thx Dominik Wild!) 84 | %% 2.2 -- Bugfix (thx Willi Gerbig!) 85 | %% 2.1 -- Finally automatic detection between end and end 86 | %% 2.0 -- New options for line breaking and literate prog. 87 | %% 1.8 -- Fixed typo in documentation regarding §...§ 88 | %% 1.7 -- Added MATLAB block comment syntax %{ ...... %} 89 | %% 1.6 -- Added some infos, dealing with keyword ``end'' 90 | %% 1.5 -- Tweaked check to see wether textcomp is loaded 91 | %% 1.4 -- Fixed misconfig (mathescape now set to false) 92 | %% 1.3 -- Purely cosmetic (tabs replaced by spaces) 93 | %% 1.2 -- Added \lstset{showstringspaces=false} 94 | %% 1.1 -- Added \mcode command and [final] option 95 | %% 1.0 -- Release 96 | 97 | 98 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 99 | % D O N ' T T O U C H T H I S % 100 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 101 | \def\fileversion{2.5} 102 | \def\filedate{2014/03/06} 103 | 104 | \typeout{-- Package: `mcode' \fileversion\space <\filedate> --} 105 | \NeedsTeXFormat{LaTeX2e} 106 | \ProvidesPackage{mcode}[\filedate\space\fileversion] 107 | 108 | % for bw-option 109 | \newif\ifmcode@bw 110 | \DeclareOption{bw}{\mcode@bwtrue} 111 | 112 | % numbered option 113 | \newif\ifmcode@numbered 114 | \DeclareOption{numbered}{\mcode@numberedtrue} 115 | 116 | % final option 117 | \newif\ifmcode@final 118 | \DeclareOption{final}{\mcode@finaltrue} 119 | 120 | % autolinebreaks option 121 | \newif\ifmcode@autolinebreaks 122 | \DeclareOption{autolinebreaks}{\mcode@autolinebreakstrue} 123 | 124 | % literate programming (replace certain characters/relations 125 | \newif\ifmcode@useliterate 126 | \DeclareOption{useliterate}{\mcode@useliteratetrue} 127 | 128 | % framed option 129 | \newif\ifmcode@framed 130 | \DeclareOption{framed}{\mcode@framedtrue} 131 | 132 | \DeclareOption*{% default 133 | \PackageWarning{mcode}{Unknown option `\CurrentOption' !}% 134 | } 135 | \ProcessOptions 136 | 137 | \ifmcode@bw\typeout{ - settings optimized for printing (bw formating)} 138 | \else\typeout{ - settings optimized for display (colour formating)}\fi 139 | \ifmcode@numbered\typeout{ - line numbering enabled}\else\fi 140 | \ifmcode@useliterate\typeout{ - literate programming (character replacements) enabled}\else\fi 141 | \ifmcode@autolinebreaks\typeout{ - automatic line breaking enabled (careful, buggy!)}\else\fi 142 | \ifmcode@framed\typeout{ - framed listings}\else\fi 143 | 144 | % This command allows you to typeset syntax highlighted Matlab 145 | % code ``inline''. The font size \small seems to look best... 146 | \newcommand{\mcode}[1]{\lstinline[basicstyle=\lstbasicfont\small]|#1|} 147 | 148 | % Same, but for footnotes 149 | \newcommand{\mcodefn}[1]{\lstinline[basicstyle=\lstbasicfont\footnotesize]|#1|} 150 | 151 | % check if color command exists 152 | \ifx\color\undefined% 153 | \RequirePackage{xcolor}% 154 | \fi 155 | 156 | % check if listings has been loaded 157 | \ifx\lstset\undefined% 158 | \ifmcode@final 159 | \RequirePackage[final]{listings} 160 | \else 161 | \RequirePackage{listings} 162 | \fi 163 | \fi 164 | 165 | % Check if textcomp has been loaded (this package is needed for 166 | % upright quotes '' (instead of typographic ones `´)... 167 | \ifx\textquotesingle\undefined% 168 | \RequirePackage{textcomp}% 169 | \fi 170 | 171 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 172 | % C U S T O M I S E B E L O W % 173 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 174 | 175 | % --------------------------------------------------------------------------------- 176 | % default font 177 | \def\lstbasicfont{\fontfamily{pcr}\selectfont\footnotesize} 178 | 179 | % --------------------------------------------------------------------------------- 180 | % matlat languate definition 181 | \lstdefinelanguage{matlabfloz}{% 182 | alsoletter={...},% 183 | morekeywords={% % keywords 184 | break,case,catch,continue,elseif,else,end,% 185 | for,function,global,if,otherwise,persistent,% 186 | return,switch,try,while,methods,properties,% 187 | events,classdef,...},% 188 | comment=[l]\%, % comments 189 | morecomment=[l]..., % comments 190 | morecomment=[s]{\%\{}{\%\}}, % block comments 191 | morestring=[m]' % strings 192 | }[keywords,comments,strings]% 193 | 194 | % --------------------------------------------------------------------------------- 195 | % general definitions 196 | \lstset{% 197 | basicstyle={\lstbasicfont}, % set font 198 | showstringspaces=false, % do not emphasize spaces in strings 199 | tabsize=4, % number of spaces of a TAB 200 | mathescape=false,escapechar=§, % escape to latex with §...§ 201 | upquote=true, % upright quotes 202 | aboveskip={1.5\baselineskip}, % a bit of space above listings 203 | columns=fixed % nice spacing 204 | } 205 | 206 | % --------------------------------------------------------------------------------- 207 | % define colours and styles 208 | \ifmcode@bw % use font formating and gray 'colors' 209 | \def\mcommentfont{\color[gray]{.75}\itshape} %comments light gray and italic 210 | \lstset{language=matlabfloz, % use our version of highlighting 211 | keywordstyle=\bfseries, % keywords in bold 212 | commentstyle=\mcommentfont, % comments 213 | stringstyle=\color[gray]{0.5} % strings darker gray 214 | } 215 | \else% notbw => use colors : ) 216 | \def\mcommentfont{\color[rgb]{.133,.545,.133}} %comments in green 217 | \lstset{language=matlabfloz, % use our version of highlighting 218 | keywordstyle=\color[rgb]{0,0,1}, % keywords in blue 219 | commentstyle=\mcommentfont, % comments 220 | stringstyle=\color[rgb]{.627,.126,.941} % strings in purple 221 | } 222 | \fi%bw 223 | 224 | % --------------------------------------------------------------------------------- 225 | % automatic line breaking --- warning, this is buggy and 226 | % doesn't break comments correctly! 227 | \ifmcode@autolinebreaks 228 | \newsavebox{\lbreakdots}\sbox{\lbreakdots}{\lstbasicfont\mcommentfont...} 229 | \lstset{breaklines=true,breakatwhitespace=true,prebreak=\usebox{\lbreakdots}} 230 | \fi 231 | 232 | % --------------------------------------------------------------------------------- 233 | % literate replacements 234 | % the following is for replacing some matlab relations like >= or ~= 235 | % by the corresponding LaTeX symbols, which are much easier to read ... 236 | \ifmcode@useliterate 237 | \lstset{% 238 | literate=% 239 | {~}{{$\neg$}}1 % \neg 240 | {<=}{{\tiny$\leq$}}1 % \leq 241 | {>=}{{\tiny$\geq$}}1 % \geq 242 | {~=}{{\tiny$\neq$}}1 % \neq 243 | {delta}{{\tiny$\Delta$}}1 % \Delta 244 | {(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element 245 | {({ }end)}{\lstbasicfont ({ }end)}{6} 246 | {(end{ })}{\lstbasicfont (end{ })}{6} 247 | {({ }end{ })}{\lstbasicfont ({ }end{ })}{7} 248 | {:end}{\lstbasicfont :end}{4} 249 | {:{ }end}{\lstbasicfont :{ }end}{5} 250 | {end:}{\lstbasicfont end:}{4} 251 | {end{ }:}{\lstbasicfont end{ }:}{5} 252 | {,end}{\lstbasicfont ,end}{4} 253 | {,{ }end}{\lstbasicfont ,{ }end}{5} 254 | } 255 | \else 256 | \lstset{% 257 | literate=% 258 | {(end)}{\lstbasicfont (end)}{5} % black ``end'' when indexing last vector element 259 | {({ }end)}{\lstbasicfont ({ }end)}{6} 260 | {(end{ })}{\lstbasicfont (end{ })}{6} 261 | {({ }end{ })}{\lstbasicfont ({ }end{ })}{7} 262 | {:end}{\lstbasicfont :end}{4} 263 | {:{ }end}{\lstbasicfont :{ }end}{5} 264 | {end:}{\lstbasicfont end:}{4} 265 | {end{ }:}{\lstbasicfont end{ }:}{5} 266 | {,end}{\lstbasicfont ,end}{4} 267 | {,{ }end}{\lstbasicfont ,{ }end}{5} 268 | } 269 | \fi%literates 270 | 271 | % --------------------------------------------------------------------------------- 272 | % line numbering 273 | \ifmcode@numbered% numbered option 274 | \lstset{% 275 | numbersep=3mm, numbers=left, numberstyle=\tiny, % number style 276 | } 277 | \fi 278 | 279 | \ifmcode@framed% framed option 280 | \lstset{% 281 | frame=single, % frame 282 | } 283 | \ifmcode@numbered% 284 | \lstset{% 285 | framexleftmargin=6mm, xleftmargin=6mm % tweak margins 286 | } 287 | \fi 288 | \fi 289 | 290 | \endinput 291 | %% End of file `mcode.sty'. 292 | -------------------------------------------------------------------------------- /lecture_1/swedish.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/swedish.jpg -------------------------------------------------------------------------------- /lecture_1/tricycle.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/tricycle.JPG -------------------------------------------------------------------------------- /lecture_1/unicycle.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1/unicycle.JPG -------------------------------------------------------------------------------- /lecture_10/egbib.bib: -------------------------------------------------------------------------------- 1 | @techreport{lecun2004dave, 2 | title={DAVE: Autonomous off-road vehicle control using end-to-end learning}, 3 | author={LeCun, Y and Cosatto, E and Ben, J and Muller, U and Flepp, B}, 4 | year={2004}, 5 | institution={Technical Report DARPA-IPTO Final Report, Courant Institute/CBLL, http://www. cs. nyu. edu/yann/research/dave/index. html} 6 | } 7 | 8 | @article{bojarski2016end, 9 | title={End to end learning for self-driving cars}, 10 | author={Bojarski, Mariusz and Del Testa, Davide and Dworakowski, Daniel and Firner, Bernhard and Flepp, Beat and Goyal, Prasoon and Jackel, Lawrence D and Monfort, Mathew and Muller, Urs and Zhang, Jiakai and others}, 11 | journal={arXiv preprint arXiv:1604.07316}, 12 | year={2016} 13 | } 14 | 15 | @article{mnih2015human, 16 | title={Human-level control through deep reinforcement learning}, 17 | author={Mnih, Volodymyr and Kavukcuoglu, Koray and Silver, David and Rusu, Andrei A and Veness, Joel and Bellemare, Marc G and Graves, Alex and Riedmiller, Martin and Fidjeland, Andreas K and Ostrovski, Georg and others}, 18 | journal={Nature}, 19 | volume={518}, 20 | number={7540}, 21 | pages={529}, 22 | year={2015}, 23 | publisher={Nature Publishing Group} 24 | } 25 | 26 | @article{silver2016alphago, 27 | title={AlphaGo: Mastering the ancient game of Go with Machine Learning}, 28 | author={Silver, David and Hassabis, Demis}, 29 | journal={Research Blog}, 30 | year={2016} 31 | } 32 | 33 | @misc{Tieleman2012, 34 | title={{Lecture 6.5---RmsProp: Divide the gradient by a running average of its recent magnitude}}, 35 | author={Tieleman, T. and Hinton, G.}, 36 | howpublished={COURSERA: Neural Networks for Machine Learning}, 37 | year={2012} 38 | } 39 | 40 | @article{kingma2014adam, 41 | title={Adam: A method for stochastic optimization}, 42 | author={Kingma, Diederik P and Ba, Jimmy}, 43 | journal={arXiv preprint arXiv:1412.6980}, 44 | year={2014} 45 | } 46 | 47 | @article{sermanet2013overfeat, 48 | title={Overfeat: Integrated recognition, localization and detection using convolutional networks}, 49 | author={Sermanet, Pierre and Eigen, David and Zhang, Xiang and Mathieu, Micha{\"e}l and Fergus, Rob and LeCun, Yann}, 50 | journal={arXiv preprint arXiv:1312.6229}, 51 | year={2013} 52 | } 53 | 54 | @article{howard2017mobilenets, 55 | title={Mobilenets: Efficient convolutional neural networks for mobile vision applications}, 56 | author={Howard, Andrew G and Zhu, Menglong and Chen, Bo and Kalenichenko, Dmitry and Wang, Weijun and Weyand, Tobias and Andreetto, Marco and Adam, Hartwig}, 57 | journal={arXiv preprint arXiv:1704.04861}, 58 | year={2017} 59 | } 60 | 61 | @inproceedings{redmon2016you, 62 | title={You only look once: Unified, real-time object detection}, 63 | author={Redmon, Joseph and Divvala, Santosh and Girshick, Ross and Farhadi, Ali}, 64 | booktitle={Proceedings of the IEEE conference on computer vision and pattern recognition}, 65 | pages={779--788}, 66 | year={2016} 67 | } 68 | 69 | @misc{Clark, 70 | title={{Lecture 9---Markov Localization}}, 71 | author={Clark, C.}, 72 | howpublished={E160:Autonomous Robot Navigation, Harvey Mudd College}, 73 | year={2016} 74 | } -------------------------------------------------------------------------------- /lecture_10/img/Cond_Prob_Example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/Cond_Prob_Example.png -------------------------------------------------------------------------------- /lecture_10/img/DAVE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/DAVE.png -------------------------------------------------------------------------------- /lecture_10/img/DAVE2_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/DAVE2_network.png -------------------------------------------------------------------------------- /lecture_10/img/DAVE2_road.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/DAVE2_road.png -------------------------------------------------------------------------------- /lecture_10/img/DAVE2_system.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/DAVE2_system.png -------------------------------------------------------------------------------- /lecture_10/img/DAVE_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/DAVE_network.png -------------------------------------------------------------------------------- /lecture_10/img/R-CNN.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/R-CNN.png -------------------------------------------------------------------------------- /lecture_10/img/Siegwart_5_6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/Siegwart_5_6.png -------------------------------------------------------------------------------- /lecture_10/img/Siegwart_beliefs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/Siegwart_beliefs.png -------------------------------------------------------------------------------- /lecture_10/img/Siegwart_maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/Siegwart_maps.png -------------------------------------------------------------------------------- /lecture_10/img/YOLO.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/YOLO.png -------------------------------------------------------------------------------- /lecture_10/img/rnn.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/rnn.jpg -------------------------------------------------------------------------------- /lecture_10/img/sliding_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/sliding_window.png -------------------------------------------------------------------------------- /lecture_10/img/two_headed_network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/img/two_headed_network.png -------------------------------------------------------------------------------- /lecture_10/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_10/main.pdf -------------------------------------------------------------------------------- /lecture_10/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \usepackage{graphicx} 6 | \usepackage{caption} 7 | \usepackage{subcaption} 8 | \renewcommand{\sfdefault}{kurier} 9 | 10 | \setlength{\oddsidemargin}{0.25 in} 11 | \setlength{\evensidemargin}{-0.25 in} 12 | \setlength{\topmargin}{-0.6 in} 13 | \setlength{\textwidth}{6.5 in} 14 | \setlength{\textheight}{8.5 in} 15 | \setlength{\headsep}{0.75 in} 16 | \setlength{\parindent}{0 in} 17 | \setlength{\parskip}{0.1 in} 18 | 19 | 20 | \newcounter{lecnum} 21 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 22 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 23 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 24 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 25 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 26 | 27 | 28 | \newcommand{\lecture}[4]{ 29 | \pagestyle{myheadings} 30 | \thispagestyle{plain} 31 | \newpage 32 | \setcounter{lecnum}{#1} 33 | \setcounter{page}{1} 34 | \noindent 35 | \begin{center} 36 | \framebox{ 37 | \vbox{\vspace{2mm} 38 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 39 | \hfill Winter 2019} } 40 | \vspace{4mm} 41 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 42 | \vspace{2mm} 43 | \hbox to 6.28in { {\it \hfill Scribes: #4} } 44 | \vspace{2mm}} 45 | } 46 | \end{center} 47 | \markboth{Lecture #1: #2}{Lecture #1: #2} 48 | 49 | \vspace*{4mm} 50 | } 51 | 52 | 53 | 54 | %%%%%%%%%%%%%%%%%%%%%%%%%% 55 | %document 56 | \begin{document} 57 | %modify this 58 | \lecture{10}{Object Localization and Detection}{}{} 59 | 60 | \section{Introduction} 61 | 62 | 63 | % lecture 10 64 | \section{Localization} 65 | \subsection{Behavioral Approach} 66 | 67 | \begin{figure}[h!] 68 | \centering 69 | \includegraphics[width=0.6\textwidth]{img/Siegwart_5_6.png} 70 | \caption{Siegwart Figure 5.6. An environment with rooms A and B} 71 | \label{fig:siegwart_5_6} 72 | \end{figure} 73 | 74 | Behavioral approach attempts to design a set of behaviors that result in desired robot motion and trajectory. This method avoids mapping the robot's environment for localization. For example, consider Fig.~\ref{fig:siegwart_5_6}, where a robot wants to navigate from room A to room B. Using behavioral approach, a robot may find its way to room B by following the left wall, incorporating other procedures such as collision avoidance and identification of room B. However, compared to map-based approach, this method of navigation has difficulty scaling to different problems or environments. Depending on situations, techniques like following the left wall can also be suboptimal. 75 | 76 | \subsection{Map-based Approach} 77 | 78 | Map-based localization uses information about the robot's surrounding to identify its position \textit{with respect to} the environment. To gain knowledge of its environment, the robot must actively gather and process sensor data of the surrounding. The most popular sensor is LIDAR, which can provide $360^\circ$ coverage of the robot's surrounding. This approach can scale to any kind of environment, because a robot can use same techniques and sensors to map its surrounding. 79 | 80 | \begin{figure}[h!] 81 | \centering 82 | \includegraphics[width=0.8\textwidth]{img/Siegwart_maps.png} 83 | \caption{Siegwart Figure 5.10. (a) Real map. (b) Map where continuous lines represent walls. (c) Same map discretized into 3000 grid cells. (d) Topological map with nodes and edges.} 84 | \label{fig:siegwart_maps} 85 | \end{figure} 86 | 87 | \subsection{Belief representation} 88 | Due to sensor noise, a robot cannot localize itself with absolute certainty. To compensate for the error, we can represent the estimate of robot's location as a probability distribution across the environment. There are different ways of representation. For example, the belief of robot's position can be \emph{continuous}, which can be expressed by continuous variables $(x, y, \theta)$ Fig.~\ref{fig:siegwart_maps}(b). \\ 89 | 90 | On the other hand, the belief can be \emph{discrete}. For instance, the map of the environment may be discretized into $N \times N$ cells as in Fig.~\ref{fig:siegwart_maps}(c), and the belief can assign probabilities of being in different cells. The other possible discrete representation is a topological map in Fig.~\ref{fig:siegwart_maps}(d), which maps the environment using nodes and edges. We can then assign probabilities of robot being in certain nodes. \\ 91 | 92 | \begin{figure}[h!] 93 | \centering 94 | \includegraphics[width=0.8\textwidth]{img/Siegwart_beliefs.png} 95 | \caption{Siegwart Figure 5.9. (a) Continuous single-hypothesis belief. (b) Continuous multiple-hypothesis belief. (c) Discrete probabilities for grid-based map. (d) Discrete probabilities for topological map.} 96 | \label{fig:siegwart_beliefs} 97 | \end{figure} 98 | 99 | The belief representation can also be classified as either \emph{single-hypothesis belief} or \emph{multiple-hypothesis belief}. \emph{Single-hypothesis belief}, as in Fig.~\ref{fig:siegwart_beliefs}(a), is useful when describing a unique estimate of a robot's position. On the other hand, \emph{multiple-hypothesis belief} in Fig.~\ref{fig:siegwart_beliefs}(b, c, d) can be used to describe multiple possible locations of a robot. \\ 100 | 101 | Continuous belief representation typically incorporates single-hypothesis belief (ex. state vector [$x, y, \theta$]) that is compact and easy to compute. However, discrete belief representation typically incorporates multiple-hypothesis belief. Because discrete method assigns the probabilities of robot's presence across different cells or nodes in the map, we see that the accuracy of estimate is limited by the resolution of discretization. It may also involve heavy computation, because a robot must keep track of probabilities associated each cell \cite{Clark}. 102 | 103 | \section{Probability Basics} 104 | 105 | \subsection{Random Variable} 106 | 107 | Quantities such as sensor measurements, states of a robot and its environment are modeled as random variables. A random variable is a variable whose possible values are outcomes of a random phenomenon. In the case of sensor measurements, the source of randomness could be sensor noise. Random variables fall under one of two categories: discrete or continuous. 108 | 109 | \subsubsection{Discrete Random Variable} 110 | 111 | Discrete random variables can take on only a countable number of values. For example, if we flip a coin twice and the random variable $X$ represents the number of coin flips resulting in "heads", $X$ can only take on values of 0, 1 or 2 (and similarly for the case of "tails"). A discrete random variable is characterized by a probability mass function (PMF) $p(X=x)$ (or $p(x)$) where 112 | \begin{center} 113 | $\sum\limits_{x} p(x)=1$. 114 | \end{center} 115 | 116 | \subsubsection{Continuous Random Variable} 117 | 118 | In contrast with a discrete random variable, a continuous random variable can take on an infinite number of values. A continuous random variable is characterized by a probability density function (PDF), $p(x)$, where the probability of a random variable being contained within the interval $[a,b]$ is 119 | \begin{center} 120 | $P(a \leq X \leq b) = \int_{a}^{b}p(x)dx$ 121 | \end{center} 122 | where 123 | \begin{center} 124 | $\int_{-\infty}^{+\infty}p(x)dx=1$. 125 | \end{center} 126 | 127 | \subsection{Joint Distributions, Independence and Conditional Probability} 128 | 129 | \subsubsection{Joint Distributions} 130 | 131 | The joint distribution of two random variables $X$ and $Y$ is denoted as \begin{center} 132 | $p(x,y):=p(X=x\ \textnormal{and}\ Y=y).$ 133 | \end{center} 134 | 135 | \subsubsection{Independence} 136 | 137 | If $X$ and $Y$ are random variables such that, 138 | \begin{center} 139 | $p(x,y)=p(x)p(y)$ 140 | \end{center} 141 | then $X$ and $Y$ are said to be independent. 142 | 143 | \subsubsection{Conditional Probability} 144 | 145 | Conditional probability is the probability of an event happening given that another event has occurred. That is, suppose that we know that the event $Y = y$ occurs with probability $p(y) > 0$. The probability of the event $X=x$ occurring given that $Y=y$ has occurred, or alternatively stated as the conditional probability of $X$ given $Y$, is given by 146 | 147 | \begin{center} 148 | $p(x|y):=\frac{p(x,y)}{p(y)}.$ 149 | \end{center} 150 | 151 | Thus if $X$ and $Y$ are independent, $p(x|y)=p(x)$. Also, note that the above definition of conditional probability is indeed a definition and not theoretically derived. 152 | 153 | In order to better understand the concept of conditional probability, consider Fig. ~\ref{fig:cond_prob_example}\. In this figure, the sample space $\Omega$ contain the set of all possible outcomes for a random variable. Consider the case where there are two possible outcomes, $B1$ and $B2$ which may occur with an equal probability of $0.5$. These events correspond to the orange and blue regions of $\Omega$, respectively. An event $A$ that occurs with probability $0.5$ can also be defined, which corresponds to the centered shaded region in Fig. ~\ref{fig:cond_prob_example}. 154 | 155 | Suppose that we wish to determine the probability of $A$ occurring and that a sample from $\Omega$ is observed to result in the event $B1$. Given that $B1$ has occurred, we restrict our attention to the region $B1$. In this restricted region, the area corresponding to $A$ occurring is the intersection of $A$ and $B1$. Since region $A$ overlaps with half of the region $B1$, we have the result that $p(A|B1) = 0.5.$ A slightly different but equivalent interpretation of this figure, as given during lecture, is that we rescale the probability of event $A$ occurring by the probability of the event that has happened. Mathematically, this is expressed as 156 | 157 | \begin{center} 158 | $p(A|B1)=\frac{p(A \cap B1)}{p(B1)}=\frac{0.25}{0.5}=0.5.$ 159 | \end{center} 160 | 161 | \begin{figure}[h!] 162 | \centering 163 | \includegraphics[width=0.6\textwidth]{img/Cond_Prob_Example.png} 164 | \caption{Sample space representation. Note that region A is centered an overlaps $B1$ and $B2$ equally.} 165 | \label{fig:cond_prob_example} 166 | \end{figure} 167 | 168 | Finally, note that if $X$ and $Y$ are independent $p(x|y):=p(x)$. 169 | \subsubsection{Conditional Independence} 170 | If $X$, $Y$ and $Z$ are random variables such that, 171 | \begin{center} 172 | $p(x,y \mid z)=p(x \mid z)p(y \mid z)$ 173 | \end{center} 174 | then $X$ and $Y$ are said to be conditionally independent given $Z$. \newline 175 | However: 176 | \begin{center} 177 | $p(x,y \mid z)=p(x \mid z)p(y \mid z) \not \Rightarrow p(x,y)=p(x)p(y)$ 178 | \end{center} 179 | Nor: 180 | \begin{center} 181 | $p(x,y)=p(x)p(y) \not \Rightarrow p(x,y \mid z)=p(x \mid z)p(y \mid z)$ 182 | \end{center} 183 | \subsection{Theorem of Total Probability} 184 | 185 | Once again consider Fig. ~\ref{fig:cond_prob_example}. If we wished to find the probability of $A$ without any assumptions regarding conditioning, we can do so by calculating 186 | 187 | \begin{center} 188 | $p(A)=p(A \cap B1) + p(A \cap B2).$ 189 | \end{center} 190 | 191 | This idea can be generalized for discrete random variables into what is known as the theorem (or law) of total probability as 192 | 193 | \begin{center} 194 | $p(x)=\sum\limits_{y}p(x,y)=\sum\limits_{y}p(x|y)p(y)$ 195 | \end{center} 196 | 197 | where the definition of conditional probability was used to obtain the last expression. For continuous random variables, the summations simply turn into integrals: 198 | 199 | \begin{center} 200 | $p(x)=\int p(x,y)dy=\int p(x|y)p(y)dy$ 201 | \end{center} 202 | 203 | \subsection{Bayes' Rule} 204 | 205 | To facilitate the explanation of Bayes' Rule please note: a sample space is a set containing all the possible outcomes of an experiment and an event is a subset of elements in a sample space. Imagine that there is an event $A$ whose set of outcomes is contained in the sets of events $B_i$ where $i = 0, 1, ..., n$ of a sample space. For example in Fig. ~\ref{fig:cond_prob_example}\ event A's set is contained in the sets of events $B_1$ and $B_2$. Then, 206 | 207 | \begin{center} 208 | $p(B_i|A)=\frac{p(B_i \cap A)}{p(A)}$. 209 | \end{center} 210 | 211 | Using the formula for conditional probability $p(B_i \cap A)$ and $p(A)$ can be expressed as: 212 | 213 | \begin{center} 214 | $p(B_i \cap A)= p(A|B_i)p(B_i) $. 215 | 216 | $p(A)= \sum\limits_{i = 0}^{n} p(B_i \cap A) = \sum\limits_{i = 0}^{n} p(A|B_i)p(B_i)$. 217 | \end{center} 218 | 219 | Combining these two expressions to derive Bayes' Rule for discrete sample spaces: 220 | 221 | \begin{center} 222 | $p(B_i|A)= \frac{p(A|B_i)p(B_i)}{\sum\limits_{i = 0}^{n} p(A|B_i)p(B_i)}$. 223 | \end{center} 224 | 225 | For a continuous sample space Bayes' Rule is: 226 | 227 | \begin{center} 228 | $p(B|A)= \frac{p(A|B)p(B)}{\int p(A|B = b')p(B = b')db'}$. 229 | \end{center} 230 | 231 | Note that $p(A)$ is independent of which event $Bi$ is selected. So the denominator of Bayes' formula can be considered a constant for all events $Bi$ with event $A$. Furthermore, by knowing the probabilities $p(A|Bi)$ and $p(Bi)$, we can determine $p(Bi|A)$. As an example, a brewery buys equal amounts of hops from two farmers, $B1$ and $B2$. The brewery has a strict policy of using only one type of hops in each batch of beer it brews. Furthermore, the brewery uses half of all its hops from both sources to produce Pilsner beer. Bayes' Rule can be applied to determine, given that a batch of Pilsner is produced, what is the probability that the batch was brewed using hops from farmer $B1$. Note this example uses the sample space described in Fig. ~\ref{fig:cond_prob_example}\ 232 | 233 | \begin{center} 234 | $p(B_1|A)= \frac{p(A|B_1)p(B_1)}{\sum\limits_{i = 0}^{1} p(A|B_i)p(B_i)} = \frac{p(A|B_1)p(B_1)}{p(A|B_1)p(B_1) + p(A|B_2)p(B_2)} = \frac{0.5*0.5}{(0.5*0.5 + 0.5*0.5)} = \frac{0.25}{0.5} = 0.5$. 235 | \end{center} 236 | 237 | Bayes' Rule can be extended with the use of additional random variables. In the three variable case, given $X=x$, $Y=y$ Bayes' Rule can be conditioned on an additional variable $Z=z$ as follows: 238 | 239 | \begin{center} 240 | $p(x|y, z)= \frac{p(y|x,z)p(x|z)}{p(y|z)}$. 241 | \end{center} 242 | 243 | This is the probability that event $Z=z$, and event $X=x|Y=y$ occur, which describes $Z=z$ influence on joint event $X=x|Y=y$. 244 | 245 | \subsection{Expectation and Covariance} 246 | 247 | The expectation value of a random variable $E(X)$ is the average result of an experiment over an infinite number of trials. It is also known as the first moment of the distribution. For the discrete case: 248 | 249 | \begin{center} 250 | $E(X)= \sum\limits_{i = 0}^{n} x_ip(X=x_i)$. 251 | \end{center} 252 | 253 | For the continuous case: 254 | 255 | \begin{center} 256 | $E(X)= \int\limits_{-\infty}^{\infty} x'p(X=x')dx'$. 257 | \end{center} 258 | 259 | The expectation value of a constant is a constant and its calculation is a linear operation. 260 | 261 | \begin{center} 262 | $E(aX + b)= aE(X) + b$. 263 | \end{center} 264 | 265 | In the case of a vector of random variables. The expectation of the vector is the vector of each variables expectation value. 266 | 267 | Covariance is a calculation used to measure the relationship between random variables. For two random variable vectors $X=x, Y=y$, the covariance is: 268 | 269 | \begin{center} 270 | $cov(X,Y)=E[(X-E(X))(Y-E(Y))] = E(XY^T) - E(X)E(Y^T)$ 271 | \end{center} 272 | 273 | If the covariance is positive this implies that X tends to increase at the same time as Y. If the covariance is negative then this implies that X tends to decrease as Y increases.If changes in X and Y have a random relationship, then the covariance will be close to zero. If two variables have a covariance of zero they are called uncorrelated. If two variables are independent they will be uncorrelated. However, two variables which are uncorrelated are not always independent. 274 | 275 | \bibliographystyle{ieee} 276 | \bibliography{egbib} 277 | 278 | \subsubsection*{Contributors} 279 | Winter 2019: [Your Names Here] 280 | \\ 281 | Winter 2018: Junjie Ke, Ryan Wong, Amine Elhafsi, Samuel Sowell, Peter Zachares 282 | \end{document} 283 | -------------------------------------------------------------------------------- /lecture_11/EKF_bad.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/EKF_bad.JPG -------------------------------------------------------------------------------- /lecture_11/EKF_best.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/EKF_best.JPG -------------------------------------------------------------------------------- /lecture_11/EKF_high_var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/EKF_high_var.png -------------------------------------------------------------------------------- /lecture_11/EKF_low_var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/EKF_low_var.png -------------------------------------------------------------------------------- /lecture_11/EKF_med_var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/EKF_med_var.png -------------------------------------------------------------------------------- /lecture_11/EKF_transform.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/EKF_transform.PNG -------------------------------------------------------------------------------- /lecture_11/HMM_w_map.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/HMM_w_map.png -------------------------------------------------------------------------------- /lecture_11/KF_algorithm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/KF_algorithm.png -------------------------------------------------------------------------------- /lecture_11/KF_linearity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/KF_linearity.png -------------------------------------------------------------------------------- /lecture_11/UKF_high.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/UKF_high.JPG -------------------------------------------------------------------------------- /lecture_11/UKF_high_var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/UKF_high_var.png -------------------------------------------------------------------------------- /lecture_11/UKF_low.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/UKF_low.JPG -------------------------------------------------------------------------------- /lecture_11/UKF_low_var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/UKF_low_var.png -------------------------------------------------------------------------------- /lecture_11/UKF_med_var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/UKF_med_var.png -------------------------------------------------------------------------------- /lecture_11/UKF_transform.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/UKF_transform.PNG -------------------------------------------------------------------------------- /lecture_11/gaussian_multivariate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/gaussian_multivariate.png -------------------------------------------------------------------------------- /lecture_11/gaussian_univariate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/gaussian_univariate.png -------------------------------------------------------------------------------- /lecture_11/histogram_belief.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/histogram_belief.png -------------------------------------------------------------------------------- /lecture_11/lecture_11_biblio_.bib: -------------------------------------------------------------------------------- 1 | @book{thrun2005probabilistic, 2 | title={Probabilistic Robotics}, 3 | author={Thrun, Sebastian and Burgard, Wolfram and Fox, Dieter}, 4 | year={2005}, 5 | publisher={MIT press} 6 | } 7 | 8 | @misc{Xmisc, 9 | author = {Pavone, Marco}, 10 | title = {AA 274 Principles of Robotic AutonomyLocalization II: parametric and non-parametric filters}, 11 | howpublished = {Online}, 12 | year = {2018}, 13 | month = {February}, 14 | note = {Presentation}, 15 | } -------------------------------------------------------------------------------- /lecture_11/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/main.pdf -------------------------------------------------------------------------------- /lecture_11/particle_localization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_11/particle_localization.png -------------------------------------------------------------------------------- /lecture_12/lecture_12_biblio.bib: -------------------------------------------------------------------------------- 1 | @book{thrun2005probabilistic, 2 | title={Probabilistic Robotics}, 3 | author={Thrun, Sebastian and Burgard, Wolfram and Fox, Dieter}, 4 | year={2005}, 5 | publisher={MIT press} 6 | } 7 | 8 | @misc{Xmisc, 9 | author = {Pavone, Marco}, 10 | title = {AA 274 Principles of Robotic AutonomyLocalization II: parametric and non-parametric filters}, 11 | howpublished = {Online}, 12 | year = {2018}, 13 | month = {February}, 14 | note = {Presentation}, 15 | } -------------------------------------------------------------------------------- /lecture_12/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_12/main.pdf -------------------------------------------------------------------------------- /lecture_12/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \renewcommand{\sfdefault}{kurier} 6 | 7 | \usepackage[boxruled]{algorithm2e} 8 | \usepackage[utf8]{inputenc} 9 | \usepackage[backend=biber]{biblatex} 10 | \usepackage[english]{babel} 11 | \usepackage[english]{babel} 12 | \usepackage[autostyle]{csquotes} 13 | \usepackage{placeins} 14 | \usepackage[backend=biber]{biblatex} 15 | \bibliography{./lecture_12_biblio.bib} 16 | 17 | \usepackage{graphics} 18 | \usepackage{graphicx} 19 | \usepackage{subcaption} 20 | \usepackage{amsmath} 21 | \usepackage{float} 22 | \setlength{\oddsidemargin}{0.25 in} 23 | \setlength{\evensidemargin}{-0.25 in} 24 | \setlength{\topmargin}{-0.6 in} 25 | \setlength{\textwidth}{6.5 in} 26 | \setlength{\textheight}{8.5 in} 27 | \setlength{\headsep}{0.75 in} 28 | \setlength{\parindent}{0 in} 29 | \setlength{\parskip}{0.1 in} 30 | 31 | 32 | \newcounter{lecnum} 33 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 34 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 35 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 36 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 37 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 38 | 39 | 40 | \newcommand{\lecture}[3]{ 41 | \pagestyle{myheadings} 42 | \thispagestyle{plain} 43 | \newpage 44 | \setcounter{lecnum}{#1} 45 | \setcounter{page}{1} 46 | \noindent 47 | \begin{center} 48 | \framebox{ 49 | \vbox{\vspace{2mm} 50 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 51 | \hfill Winter 2018} } 52 | \vspace{4mm} 53 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 54 | \vspace{2mm} 55 | % \hbox to 6.28in { {\it \hfill Scribes: #4} } 56 | \vspace{2mm}} 57 | } 58 | \end{center} 59 | \markboth{Lecture #1: #2}{Lecture #1: #2} 60 | 61 | \vspace*{4mm} 62 | } 63 | 64 | 65 | %%%%%%%%%%%%%%%%%%%%%%%%%% 66 | %document 67 | \begin{document} 68 | %modify this 69 | \lecture{12}{Markov localization and EKF-localization}{} 70 | 71 | \section{Introduction} 72 | 73 | 74 | 75 | \printbibliography 76 | 77 | \subsubsection*{Contributors} 78 | Winter 2019: [Your Names Here] \\ 79 | Winter 2018: Eric Chang, Diana Chin, Laura Matloff, Will Roderick, Navjot Singh, Jiahui Wang 80 | 81 | \end{document} 82 | -------------------------------------------------------------------------------- /lecture_12_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_12_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_13/lecture_13_biblio.bib: -------------------------------------------------------------------------------- 1 | @book{thrun2005probabilistic, 2 | title={Probabilistic Robotics}, 3 | author={Thrun, Sebastian and Burgard, Wolfram and Fox, Dieter}, 4 | year={2005}, 5 | publisher={MIT press} 6 | } 7 | 8 | @misc{Xmisc, 9 | author = {Pavone, Marco}, 10 | title = {AA 274 Principles of Robotic AutonomyLocalization II: parametric and non-parametric filters}, 11 | howpublished = {Online}, 12 | year = {2018}, 13 | month = {February}, 14 | note = {Presentation}, 15 | } -------------------------------------------------------------------------------- /lecture_13/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_13/main.pdf -------------------------------------------------------------------------------- /lecture_13/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \renewcommand{\sfdefault}{kurier} 6 | 7 | \usepackage[boxruled]{algorithm2e} 8 | \usepackage[utf8]{inputenc} 9 | \usepackage[backend=biber]{biblatex} 10 | \usepackage[english]{babel} 11 | \usepackage[english]{babel} 12 | \usepackage[autostyle]{csquotes} 13 | \usepackage{placeins} 14 | \usepackage[backend=biber]{biblatex} 15 | \bibliography{./lecture_13_biblio.bib} 16 | 17 | \usepackage{graphics} 18 | \usepackage{graphicx} 19 | \usepackage{subcaption} 20 | \usepackage{amsmath} 21 | \usepackage{float} 22 | \setlength{\oddsidemargin}{0.25 in} 23 | \setlength{\evensidemargin}{-0.25 in} 24 | \setlength{\topmargin}{-0.6 in} 25 | \setlength{\textwidth}{6.5 in} 26 | \setlength{\textheight}{8.5 in} 27 | \setlength{\headsep}{0.75 in} 28 | \setlength{\parindent}{0 in} 29 | \setlength{\parskip}{0.1 in} 30 | 31 | 32 | \newcounter{lecnum} 33 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 34 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 35 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 36 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 37 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 38 | 39 | 40 | \newcommand{\lecture}[3]{ 41 | \pagestyle{myheadings} 42 | \thispagestyle{plain} 43 | \newpage 44 | \setcounter{lecnum}{#1} 45 | \setcounter{page}{1} 46 | \noindent 47 | \begin{center} 48 | \framebox{ 49 | \vbox{\vspace{2mm} 50 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 51 | \hfill Winter 2019} } 52 | \vspace{4mm} 53 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 54 | \vspace{2mm} 55 | % \hbox to 6.28in { {\it \hfill Scribes: #4} } 56 | \vspace{2mm}} 57 | } 58 | \end{center} 59 | \markboth{Lecture #1: #2}{Lecture #1: #2} 60 | 61 | \vspace*{4mm} 62 | } 63 | 64 | 65 | %%%%%%%%%%%%%%%%%%%%%%%%%% 66 | %document 67 | \begin{document} 68 | %modify this 69 | \lecture{13}{SLAM I: Non-parametric Localization and EKF SLAM}{} 70 | 71 | \section{Introduction} 72 | 73 | %% --- 74 | % ADD NOTES HERE 75 | 76 | 77 | 78 | %% --- 79 | 80 | \printbibliography 81 | 82 | \subsubsection*{Contributors} 83 | Winter 2019: [Your Names Here] \\ 84 | Winter 2018: Malavika Bindhi, Charles Preston Hale, Arthur Ji, Jonathan Lacotte, Hongyi Zhao, Jerry Zheng 85 | 86 | \end{document} 87 | -------------------------------------------------------------------------------- /lecture_13_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_13_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_14/Resampling_Figure.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_14/Resampling_Figure.JPG -------------------------------------------------------------------------------- /lecture_14/fastSLAM_fig1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_14/fastSLAM_fig1.PNG -------------------------------------------------------------------------------- /lecture_14/graphSLAM_fig1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_14/graphSLAM_fig1.PNG -------------------------------------------------------------------------------- /lecture_14/graphSLAM_fig2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_14/graphSLAM_fig2.PNG -------------------------------------------------------------------------------- /lecture_14/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_14/main.pdf -------------------------------------------------------------------------------- /lecture_15/lecture_13_biblio.bib: -------------------------------------------------------------------------------- 1 | @book{thrun2005probabilistic, 2 | title={Probabilistic Robotics}, 3 | author={Thrun, Sebastian and Burgard, Wolfram and Fox, Dieter}, 4 | year={2005}, 5 | publisher={MIT press} 6 | } 7 | 8 | @misc{Xmisc, 9 | author = {Pavone, Marco}, 10 | title = {AA 274 Principles of Robotic AutonomyLocalization II: parametric and non-parametric filters}, 11 | howpublished = {Online}, 12 | year = {2018}, 13 | month = {February}, 14 | note = {Presentation}, 15 | } -------------------------------------------------------------------------------- /lecture_15/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_15/main.pdf -------------------------------------------------------------------------------- /lecture_15/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \renewcommand{\sfdefault}{kurier} 6 | 7 | \usepackage[boxruled]{algorithm2e} 8 | \usepackage[utf8]{inputenc} 9 | \usepackage[backend=biber]{biblatex} 10 | \usepackage[english]{babel} 11 | \usepackage[english]{babel} 12 | \usepackage[autostyle]{csquotes} 13 | \usepackage{placeins} 14 | \usepackage[backend=biber]{biblatex} 15 | \bibliography{./lecture_13_biblio.bib} 16 | 17 | \usepackage{graphics} 18 | \usepackage{graphicx} 19 | \usepackage{subcaption} 20 | \usepackage{amsmath} 21 | \usepackage{float} 22 | \setlength{\oddsidemargin}{0.25 in} 23 | \setlength{\evensidemargin}{-0.25 in} 24 | \setlength{\topmargin}{-0.6 in} 25 | \setlength{\textwidth}{6.5 in} 26 | \setlength{\textheight}{8.5 in} 27 | \setlength{\headsep}{0.75 in} 28 | \setlength{\parindent}{0 in} 29 | \setlength{\parskip}{0.1 in} 30 | 31 | 32 | \newcounter{lecnum} 33 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 34 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 35 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 36 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 37 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 38 | 39 | 40 | \newcommand{\lecture}[3]{ 41 | \pagestyle{myheadings} 42 | \thispagestyle{plain} 43 | \newpage 44 | \setcounter{lecnum}{#1} 45 | \setcounter{page}{1} 46 | \noindent 47 | \begin{center} 48 | \framebox{ 49 | \vbox{\vspace{2mm} 50 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 51 | \hfill Winter 2019} } 52 | \vspace{4mm} 53 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 54 | \vspace{2mm} 55 | % \hbox to 6.28in { {\it \hfill Scribes: #4} } 56 | \vspace{2mm}} 57 | } 58 | \end{center} 59 | \markboth{Lecture #1: #2}{Lecture #1: #2} 60 | 61 | \vspace*{4mm} 62 | } 63 | 64 | 65 | %%%%%%%%%%%%%%%%%%%%%%%%%% 66 | %document 67 | \begin{document} 68 | %modify this 69 | \lecture{15}{Combinatorial Motion Planning}{} 70 | 71 | \section{Introduction} 72 | 73 | %% --- 74 | % ADD NOTES HERE 75 | 76 | 77 | 78 | %% --- 79 | 80 | \printbibliography 81 | 82 | \subsubsection*{Contributors} 83 | Winter 2019: [Your Names Here] \\ 84 | Winter 2018: Ryan Richey, Hyoungju Seo, Ola Shorinwa, Josh Sullivan, Danning Sun 85 | 86 | \end{document} 87 | -------------------------------------------------------------------------------- /lecture_15_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_15_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_16/3Dslide1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/3Dslide1.PNG -------------------------------------------------------------------------------- /lecture_16/3Dslide2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/3Dslide2.PNG -------------------------------------------------------------------------------- /lecture_16/3Dslide3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/3Dslide3.PNG -------------------------------------------------------------------------------- /lecture_16/Pseudocode.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/Pseudocode.png -------------------------------------------------------------------------------- /lecture_16/SlideRobot.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/SlideRobot.PNG -------------------------------------------------------------------------------- /lecture_16/SlideRobot2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/SlideRobot2.PNG -------------------------------------------------------------------------------- /lecture_16/drift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/drift.png -------------------------------------------------------------------------------- /lecture_16/driftless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/driftless.png -------------------------------------------------------------------------------- /lecture_16/fmt.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/fmt.png -------------------------------------------------------------------------------- /lecture_16/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/main.pdf -------------------------------------------------------------------------------- /lecture_16/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \usepackage{graphicx} 6 | \usepackage{subcaption} 7 | \usepackage{algorithm} 8 | \usepackage[noend]{algpseudocode} 9 | \renewcommand{\sfdefault}{kurier} 10 | \usepackage{color,soul} 11 | \usepackage{amsmath} 12 | \usepackage{graphics} 13 | \setlength{\oddsidemargin}{0.25 in} 14 | \setlength{\evensidemargin}{-0.25 in} 15 | \setlength{\topmargin}{-0.6 in} 16 | \setlength{\textwidth}{6.5 in} 17 | \setlength{\textheight}{8.5 in} 18 | \setlength{\headsep}{0.75 in} 19 | \setlength{\parindent}{0 in} 20 | \setlength{\parskip}{0.1 in} 21 | 22 | \makeatletter 23 | \def\BState{\State\hskip-\ALG@thistlm} 24 | \makeatother 25 | 26 | 27 | \newcounter{lecnum} 28 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 29 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 30 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 31 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 32 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 33 | 34 | 35 | \newcommand{\lecture}[3]{ 36 | \pagestyle{myheadings} 37 | \thispagestyle{plain} 38 | \newpage 39 | \setcounter{lecnum}{#1} 40 | \setcounter{page}{1} 41 | \noindent 42 | \begin{center} 43 | \framebox{ 44 | \vbox{\vspace{2mm} 45 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 46 | \hfill Winter 2019} } 47 | \vspace{4mm} 48 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 49 | \vspace{2mm} 50 | \vspace{2mm}} 51 | } 52 | \end{center} 53 | \markboth{Lecture #1: #2}{Lecture #1: #2} 54 | 55 | \vspace*{4mm} 56 | } 57 | 58 | 59 | 60 | %%%%%%%%%%%%%%%%%%%%%%%%%% 61 | %document 62 | \begin{document} 63 | %modify this 64 | \lecture{16}{Sampling-based motion planning}{} 65 | 66 | \section{Introduction} % Kaitlin Dennison 67 | This lecture is on sampling-based motion planning. Please see Chapter 5 of \textit{Planning Algorithms} by Steven Lavelle for more information about these class of algorithms. 68 | 69 | The purpose of sampling-based motion planning is to find an action trajectory $\textbf{u}(t)$ yielding a feasible $\textbf{x}(t) \in X_{free}$ and minimizes \[ 70 | J = \int_0^T g(\textbf{x}, \textbf{u}) dt 71 | \] 72 | 73 | This is so say, we want to find a path from start to a goal region that avoids obstacles and possibly optimizes cost such as trading off time with control effort. The reason that motion planning is difficult is that one cannot compute the minimum of $J$ online. We need to develop very fast algorithms that can be computed on-the-fly repeatedly as the robot explores its environment. 74 | 75 | One way to do this is to only consider "snap-shots" of the problem within a short horizon: plan a route, move, re-plan, move again, repeat. In this case, the goal region is essential a waypoint along a longer path and we only plan a portion of the route at a time. This reduces the amount of data to compute and allows the environment to change between steps. 76 | 77 | \subsection{Configuration Space} 78 | % KAITLIN 79 | The configuration space defines what configurations of the robot are and are not possible. If a configuration is possible, we call it \lq\lq free\rq\rq. The main idea behind motion planning algorithms is to shrink the robots body into a representative point. After we shrink the robot, we must enlarge the obstacles so that we are guaranteed our computed motion plan occurs only within the free areas of the configuration space. The way in which we extend the obstacles is very important. One commonly used technique is to slide the robot's shape around each obstacle by one vertex of the robot. Figure \ref{fig:2Dslide} shows an example of this technique in two dimensions where the gray area is the original obstacle region and the pink area is the enlarged obstacle region - the region where the vertex of the robot cannot enter without a collision occurring. With the enlarged obstacles in the configuration space, a two-dimensional path can be found from start to goal just be considering a two-dimensional point instead of an entire object moving about the space. The set of free poses in the configuration space is denoted $C_{free}$ and the set of poses where an obstacle lies in $C_{obs}$. 80 | 81 | \begin{figure}[h!] 82 | \centering 83 | \includegraphics[width=70mm]{SlideRobot.PNG}\includegraphics[width=60mm]{SlideRobot2.PNG} 84 | \caption{(a) Enlarging an obstacle by sliding a triangular-shaped robot around the object by the top-left vertex of the robot. (b) The configuration space with the enlarged obstacles.} 85 | \label{fig:2Dslide} 86 | \end{figure} 87 | 88 | This technique works very well for two-dimensions but starts getting difficult once you add a third and is increasingly harder from there. When considering three dimensions (i.e. heading and two-dimensional position) the configuration space can be built by incrementally fixing the third dimension and enlarging the obstacles in two-dimensions for each increment of the third dimension. This builds layers of the configuration space where each layer is fixed in the third dimension. Figure \ref{fig:3Dslide} shows the steps of building up the configuration space in three-dimensions by incrementally fixing the heading of the robot. 89 | 90 | \begin{figure}[h!] 91 | \centering 92 | \includegraphics[width=50mm]{3Dslide1.PNG}\includegraphics[width=50mm]{3Dslide2.PNG}\includegraphics[width=50mm]{3Dslide3.PNG} 93 | \caption{(a) Fixing $\theta$ and sliding the obstable around in a two-dimensional slice of the configuration space. (b) Stacking multiple fixed slices of the configuration space. (c) Continuous representation of the three-dimensional configuration space.} 94 | \label{fig:3Dslide} 95 | \end{figure} 96 | 97 | \subsection{Approaches to motion planning} 98 | 99 | Taking a look at Figure \ref{fig:3Dslide}, it becomes fairly apparent that building a configuration space in three or more dimensions can be extremely cumbersome. Once you include kinematic constraints and other restrictions, it becomes very difficult to compute the positions of the obstacles in the state space. 100 | 101 | There are two approaches to motion planning: \textit{combinatorial planning} and \textit{sampling based planning}. The former computes the entire state space and takes into account all the obstacles in all possible locations in the configuration space. Once we have this complete characterization of $C_{obs}$, we know where $C_{free}$ is, and we can compute a collision-free path. The latter is a randomized algorithm. Random samples, $x_i$, of the state space are generated. If $x_i$ is in $C_{free}$ (black-box probing a collision checker), we keep the sample; if not, we remove it from the sample space. Once all the non-free samples are removed, all of the samples are connected together and then the shortest path is found. This way the entire configuration space does not have to be built and path-finding is only performed on samples that are known to be free. 102 | 103 | \section{Overview of sampling-based algorithms} % Dikwaka Ganesan 104 | There are two main categories of sampling-based algorithms for motion planning that we will discuss: geometric, and kinodynamic. 105 | 106 | \subsection{Geometric Algorithms} 107 | In the geometric planning case, the system does not have any dynamics, or the dynamics can be solved using a simple integrator. Essentially, in the geometric case, one can directly control the pose of the robot, not just the first or second derivative of the pose. There are two main algorithms we have to attack geometric planning: Probabilistic Roadmap (PRM) algorithms, and Rapidly-exploring Random Trees (RRT) algorithms. Both algorithms have numerous variations that are used in practice. 108 | 109 | \subsubsection{Probabilistic Roadmaps} 110 | The key insight of a probabilistic roadmap is to avoid the issue of creating a well characterized configuration space (which is computationally expensive), and simply randomly pick samples in the state space to analyze. At a high level, the algorithm proceeds as follows: First, throw a bunch of random samples into your state space (usually a thousand samples will suffice). Then write a collision checker: a computationally cheap algorithm that tests whether the transition between any two samples in the state space results in a collision with an object. Now, the challenge is to connect all the random samples you just generated in some meaningful way. There is a relatively intuitive technique to doing so - simply place an arbitrary disk (called the disk connectivity radius) around each sample $x_i$, and add an edge between $x_i$ and all samples that are within the disk. Before adding the edge, use the collision checker to make sure no collisions happen in those edges. Figure \ref{fig:prm_collision} illustrates this process. 111 | 112 | \begin{figure}[h!] 113 | \centering 114 | \includegraphics[width=50mm]{prm_collision.png} 115 | \caption{PRM Collision Checking} 116 | \label{fig:prm_collision} 117 | \end{figure} 118 | 119 | 120 | After you iterate through all the samples and add all the relevant edges, you should have a graph that extends from $x_{init}$ to $x_{goal}$. Then, you can use a shortest-path algorithm like $A^*$ to compute the optimal path from the starting pose to the goal pose. 121 | 122 | There is a caveat to PRM in that it tends to provide a good characterization of the state space, but you need to perform many costly collision checks. The PRM algorithm attempts to connect a new node in the state space with all potential neighbors during each collision check, which can add up. 123 | 124 | \subsubsection{Rapidly-exploring Random Trees} 125 | The Rapidly-exploring Random Trees (RRT) algorithm was developed to respond to the issues with Probabilistic Roadmaps. PRMs produce high quality motion plans, but use a very dense characterization of the state space to do so. RRT is a lightweight approach: rather than attempting to characterize the entire state space, we attempt to build a \lq\lq portfolio\rq\rq of trajectories incrementally as the algorithm progresses. Suppose you have already somehow developed two trajectories as seen in Figure \ref{fig:rrt_portfolio}. 126 | 127 | \begin{figure}[h!] 128 | \centering 129 | \includegraphics[width=50mm]{rrt_portfolio_of_trajectories.png} 130 | \caption{Initial \lq\lq portfolio\rq\rq\ of trajectories} 131 | \label{fig:rrt_portfolio} 132 | \end{figure} 133 | 134 | Notice that this portfolio is incomplete - we are trying to expand it to get to our goal region. At each step of the algorithm, we randomly generate a new sample in the state space, Figure \ref{fig:rrt_new_sample}. 135 | 136 | \begin{figure}[h!] 137 | \centering 138 | \includegraphics[width=50mm]{rrt_new_sample.png} 139 | \caption{RRT New Sample} 140 | \label{fig:rrt_new_sample} 141 | \end{figure} 142 | 143 | Then, we must connect this sample somehow to our tree. There are a variety of strategies we can use, but the simplest is to connect the new node to its closest counterpart already on the graph. We keep repeating this process until we reach the goal region. As you may have noticed, the quality of paths that RRT produces can be quite poor. There is an improved method called RRT* that includes an optimization scheme to improve upon RRT. 144 | 145 | In RRT*, we can first try to optimize the way we connect a random new node $x_i$ to our graph. After we find the node $x_{near}$ in the graph, we can analyze the neighbors of $x_{near}$ to see if there is a cheaper way to connect $x_i$ to the graph. This method at least introduces a notion of local optimality to the algorithm. We can also check to see if it is possible to get to any of the neighbors of $x_near$ faster if we were to go through $x_i$. Again, remember we must be using the collision checker each time we add an edge to the graph. RRT algorithms find a feasible path very quickly, but these paths can often be sub-optimal. If even one bad step is taken along the way, there is nothing in the RRT algorithm that discourages the exploration of long paths. 146 | 147 | % The following part is done by Yiwei Zhao 148 | \subsection{Fast Marching Tree Algorithm (FMT*)} 149 | Ideally, we want to combine the features of both single-query algorithms (chiefly RRT, which is quick but poor) and multiple-query algorithms (chiefly PRM, which requires a large number of costly collision checks). One way is to run a dynamic programming algorithm called the Fast Marching Tree Algorithm (FMT*) on sample nodes in a way that allow us to grow the tree in cost-to-arrive space. This is generally considered a lazy method, which means it will simply minimize the number of collision checks. 150 | 151 | \begin{figure}[h!] 152 | \centering 153 | \includegraphics[width=100mm]{fmt.png} 154 | \caption{Idea of FMT} 155 | \label{fig:plot_Idea} 156 | \end{figure} 157 | 158 | Assuming that we have found a number of trajectories as it shown in Figure \ref{fig:plot_Idea}, we sample a new node, V. In order to connect V to the existing three trajectories we use dynamic programming to look at the optimal cost-to-arrive to each one of the end points of the trajectories. In Figure \ref{fig:plot} these are $u_1$ and $u_2$. We assume this is an incremental algorithm and the proof is done by induction, so we have already computed the optimal cost-to-arrival to $u_1$ and $u_2$. In order to find the candidate connections we consider the optimal cost-to-arrive for $u_i$ plus the cost of going straight from $u_i$ to V. This process is expressed by equation 16.1: 159 | 160 | \begin{equation} 161 | c(v) = \min_{u:\|u - v\| < r_n} \text{Cost}(u, v) + c(v) 162 | \end{equation} 163 | 164 | where $u$ are all the node that within radius of the new sample notes and $\text{Cost}(u, v)$ is the cost to connect the note. 165 | 166 | In computing, there is a connection we are not accounting for: the presence of the obstacle. After accounting for the obstacle, we rank all the neighbors by their cost and then pick the neighbor that gives us the lowest cost-to-arrive of $v$ and check whether or not there is a collision between the neighbor and the node $v$ by calling collision checker. If so, we choose the second lowest node until we find the lowest neighbor that does not have a collision between it and the node $v$. We will not go through all the nodes in the neighbor and this is the reason that it is lazy dynamic programming. 167 | 168 | For each sample point we usually only perform one collision check because we know we will not keep looking for other members. This is not perfect: sometimes we mistakenly choose the neighbor that has a collision. However, sophisticated analysis shows the number of times that getting the neighbor wrong goes asymptotically to zero as the number of points goes to infinity, which means this algorithm is able to recover an optimal solution even though it only performs one collision check. You can show that the solution quality that you get is very close to PRM with a computational complexity that is very close to RRT thanks to the laziness of FMT*. 169 | 170 | The Pseudocode of FMT* can be shown in Figure \ref{fig:plot_Pseudocode}: 171 | 172 | \begin{figure}[h!] 173 | \centering 174 | \includegraphics[width=140mm]{Pseudocode.png} 175 | \caption{Pseudocode for FMT*} 176 | \label{fig:plot_Pseudocode} 177 | \end{figure} 178 | 179 | FMT* is practical because even though the Laziness introduces “suboptimal” connections, such connections are vanishingly rare and FMT* is asymptotically optimal. It's computationally efficient, since the ratio of number of collision-checks for FMT* versus PRM goes to zero. The convergence rate has a bound of order $O(n^{−\frac{1}{d}+\epsilon})$. 180 | 181 | % The following part is done by Jeremy(Jiajie) He 182 | 183 | \subsection{Deterministic Sampling-Based Motion Planning} 184 | Probabilistic sampling-based algorithms, such as the probabilistic roadmap (PRM) and the rapidly exploring random tree (RRT) algorithms, represent one of the most successful approaches to robotic motion planning, due to their strong theoretical properties (in terms of probabilistic completeness or even asymptotic optimality) and remarkable practical performance. Such algorithms are probabilistic in that they compute a path by connecting independently and identically distributed (i.i.d.) random points in the configuration space. Their randomization aspect, however, makes several tasks challenging, including certification for safety-critical applications and use of offline computation to improve real-time execution. Hence, an important open question is whether similar (or better) theoretical guarantees and practical performance could be obtained by considering deterministic, as opposed to random sampling sequences. 185 | 186 | In order to answer this question, we first provide a review of low-dispersion sampling with a focus on $l_2$-dispersion. For a finite set $S$ of points contained in $\chi \in R^d$, $l_2$-dispersion $D(S)$ is defined as: 187 | 188 | \begin{equation} 189 | D(S) := \underset{x\in \chi s \in S}{\text{sup min}} ||s - x||_2 190 | \end{equation} 191 | 192 | Intuitively, $l_2$-dispersion quantifies how well a space is covered by a set of points $S$ in terms of the largest Euclidean ball that touches none of the points. The ball radius being smaller would mean that the points are more uniformly distributed. It should be noted that there exist deterministic sequences with $D(S)$ of order $O(n-1/d)$ ($d$ denotes the number of dimensions), referred to as low-dispersion sequences. However, such a sequence minimizing $l_2$-dispersion is only known for $d = 2$.\\ 193 | 194 | One deterministic sampling-based motion planning algorithm is gPRM (for generic PRM). 195 | 196 | \begin{algorithm} 197 | \caption{gPRM}\label{euclid} 198 | \begin{algorithmic}[1] 199 | \State $\textit{V} \gets \{x_{init}\} \cup \textit{SampleFree(n)}; E \gets \emptyset$ 200 | \For {\text{all} $v \in V$} 201 | \State $X_{near} \gets \textit{Near(V$\backslash$\{v\},v,$r_{n}$)}$ 202 | \For {$x \in X_{near}$} 203 | \If {\textit{CollisionFree(v,x)}} 204 | \State $E \gets E \cup \{(v,x)\} \cup \{(x,v)\}$ 205 | \EndIf 206 | \State \textbf{end if} 207 | \EndFor 208 | \State \textbf{end for} 209 | \EndFor 210 | \State \textbf{end for} 211 | \State \textbf{return} $\textit{ShortestPath($x_{init},V,E$)}$ 212 | \end{algorithmic} 213 | \end{algorithm} 214 | 215 | To discuss the optimality of gPRM, let $c_n$ denote the arc length of the path returned by gPRM with n samples. If 216 | \begin{enumerate} 217 | \item sample set $S$ has dispersion $D(S)<=\gamma n^{-1/d}$ for some $\gamma > 0$ 218 | \item $n^{1/d} r_n \rightarrow \infty$ 219 | \end{enumerate} 220 | then $\lim_{n \to \infty} c_n = c^*$, where $c^*$ is the cost of an optimal path. 221 | 222 | As a derandomized version of PRM, gPRM can achieve asymptotic optimality with a smaller connection radius ($r_n \in \Omega((1/n)^\frac{1}{d})$) than random sampling ($r_n \in \Omega((\log(n)/n)^\frac{1}{d})$) so it requires less computation. Besides, it also has computational and space complexity of $O(n)$ as lower bound, compared with $O(nlog(n))$ for random sampling. Moreover, it has deterministic convergence rate: 223 | 224 | \begin{equation} 225 | c_n <= \left(1+\frac{2D(S)}{r_n-2D(S)}\right)c ^{(\delta)} 226 | \end{equation} 227 | 228 | where $c ^{(\delta)}$ is cost of shortest path with strong $\delta$-clearance and assume that $r_n > 2D(S)$. This deterministic convergence rate is instrumental to certification of sampling-based planners. Thus, deterministic sequences appear to provide superior performance. 229 | 230 | 231 | \section{Kinodynamic Planning} 232 | The basic geometric case, where a robot does not have any constraints on its motion and only an obstacle-free solution is required, is well-understood and solved for a large number of practical scenarios. On the other hand, robots do usually have stringent kinematic/dynamical constraints on their motion, which in most settings need to be properly taken into account. 233 | 234 | \textit{Kinodynamic motion planning} problems are those where feasible paths are subject to differential constraints in addition to obstacle avoidance. There are two versions of kinodynamic planning problems: driftless case and drift case. \textit{Driftless control-affine systems} are those with well understood conditions for small time local controllability and established methods for local steering. Trajectories x in the configuration space must satisfy $\dot{x} = \sum_{i=1}^{m}g_i(x)u_u$. \textit{Control-affine systems} with drift are difficult in general to guarantee local controllability and local steering is known only for special cases. The dynamics can be described as $\dot{x} = Ax + Bu + c$. 235 | 236 | Figure \ref{fig:kino} shows the trajectories planned by DFMT* for Reeds-Shepp car (driftless case) and double integrator system (drift case). Note how the trajectories differ between the two systems. 237 | 238 | \begin{figure}[h!] 239 | \centering 240 | \begin{subfigure}[b]{0.4\linewidth} 241 | \includegraphics[width=\linewidth]{driftless.png} 242 | \caption{Reeds-Shepp car} 243 | \end{subfigure} 244 | \begin{subfigure}[b]{0.4\linewidth} 245 | \includegraphics[width=\linewidth]{drift.png} 246 | \caption{Double integrator system} 247 | \end{subfigure} 248 | \caption{DFMT* Tree in driftless case (left) and drift case (right)} 249 | \label{fig:kino} 250 | \end{figure} 251 | 252 | \subsubsection*{Contributors} 253 | Winter 2019: [Your Names Here] 254 | \\ 255 | Winter 2018: Kaitlin Dennison, Diwaka Ganesan, Jiajie He, Yiwei Zhao 256 | 257 | \end{document} 258 | -------------------------------------------------------------------------------- /lecture_16/prm_collision.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/prm_collision.png -------------------------------------------------------------------------------- /lecture_16/rrt_new_sample.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/rrt_new_sample.png -------------------------------------------------------------------------------- /lecture_16/rrt_portfolio_of_trajectories.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_16/rrt_portfolio_of_trajectories.png -------------------------------------------------------------------------------- /lecture_17/lecture_17_biblio.bib: -------------------------------------------------------------------------------- 1 | @book{thrun2005probabilistic, 2 | title={Probabilistic Robotics}, 3 | author={Thrun, Sebastian and Burgard, Wolfram and Fox, Dieter}, 4 | year={2005}, 5 | publisher={MIT press} 6 | } 7 | 8 | @misc{Xmisc, 9 | author = {Pavone, Marco}, 10 | title = {AA 274 Principles of Robotic AutonomyLocalization II: parametric and non-parametric filters}, 11 | howpublished = {Online}, 12 | year = {2018}, 13 | month = {February}, 14 | note = {Presentation}, 15 | } -------------------------------------------------------------------------------- /lecture_17/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_17/main.pdf -------------------------------------------------------------------------------- /lecture_17/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \renewcommand{\sfdefault}{kurier} 6 | 7 | \usepackage[boxruled]{algorithm2e} 8 | \usepackage[utf8]{inputenc} 9 | \usepackage[backend=biber]{biblatex} 10 | \usepackage[english]{babel} 11 | \usepackage[english]{babel} 12 | \usepackage[autostyle]{csquotes} 13 | \usepackage{placeins} 14 | \usepackage[backend=biber]{biblatex} 15 | \bibliography{./lecture_17_biblio.bib} 16 | 17 | \usepackage{graphics} 18 | \usepackage{graphicx} 19 | \usepackage{subcaption} 20 | \usepackage{amsmath} 21 | \usepackage{float} 22 | \setlength{\oddsidemargin}{0.25 in} 23 | \setlength{\evensidemargin}{-0.25 in} 24 | \setlength{\topmargin}{-0.6 in} 25 | \setlength{\textwidth}{6.5 in} 26 | \setlength{\textheight}{8.5 in} 27 | \setlength{\headsep}{0.75 in} 28 | \setlength{\parindent}{0 in} 29 | \setlength{\parskip}{0.1 in} 30 | 31 | 32 | \newcounter{lecnum} 33 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 34 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 35 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 36 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 37 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 38 | 39 | 40 | \newcommand{\lecture}[3]{ 41 | \pagestyle{myheadings} 42 | \thispagestyle{plain} 43 | \newpage 44 | \setcounter{lecnum}{#1} 45 | \setcounter{page}{1} 46 | \noindent 47 | \begin{center} 48 | \framebox{ 49 | \vbox{\vspace{2mm} 50 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 51 | \hfill Winter 2019} } 52 | \vspace{4mm} 53 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 54 | \vspace{2mm} 55 | % \hbox to 6.28in { {\it \hfill Scribes: #4} } 56 | \vspace{2mm}} 57 | } 58 | \end{center} 59 | \markboth{Lecture #1: #2}{Lecture #1: #2} 60 | 61 | \vspace*{4mm} 62 | } 63 | 64 | 65 | %%%%%%%%%%%%%%%%%%%%%%%%%% 66 | %document 67 | \begin{document} 68 | %modify this 69 | \lecture{17}{Decision Making and Dynamic Programming}{} 70 | 71 | \section{Introduction} 72 | 73 | %% --- 74 | % ADD NOTES HERE 75 | 76 | 77 | 78 | %% --- 79 | 80 | \printbibliography 81 | 82 | \subsubsection*{Contributors} 83 | Winter 2019: [Your Names Here] \\ 84 | Winter 2018: Scott Park, Adrian Piedra, Garrett Scott Taylor, Matthew Wu Tsao and Michal Adamkiewicz 85 | 86 | \end{document} 87 | -------------------------------------------------------------------------------- /lecture_17_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_17_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_1_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_1_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_2/AA274Lecture2.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2/AA274Lecture2.pdf -------------------------------------------------------------------------------- /lecture_2/ChatRoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2/ChatRoom.png -------------------------------------------------------------------------------- /lecture_2/Gazebo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2/Gazebo.PNG -------------------------------------------------------------------------------- /lecture_2/ModularityPhoto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2/ModularityPhoto.png -------------------------------------------------------------------------------- /lecture_2/PR2.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2/PR2.PNG -------------------------------------------------------------------------------- /lecture_2/ROSPackage.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2/ROSPackage.JPG -------------------------------------------------------------------------------- /lecture_2/USBCamera.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2/USBCamera.JPG -------------------------------------------------------------------------------- /lecture_2_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_2_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_3/RhoAlphaDelta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_3/RhoAlphaDelta.png -------------------------------------------------------------------------------- /lecture_3/RhoAlphaDelta2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_3/RhoAlphaDelta2.png -------------------------------------------------------------------------------- /lecture_3/XYTheta.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_3/XYTheta.png -------------------------------------------------------------------------------- /lecture_3/aa274-lecture-3-3.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_3/aa274-lecture-3-3.pdf -------------------------------------------------------------------------------- /lecture_3/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_3/main.pdf -------------------------------------------------------------------------------- /lecture_3_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_3_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_4/AA274_Scribe_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/AA274_Scribe_Notes.pdf -------------------------------------------------------------------------------- /lecture_4/Enc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/Enc.png -------------------------------------------------------------------------------- /lecture_4/gyro.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/gyro.png -------------------------------------------------------------------------------- /lecture_4/imgs/GaussianDistribution.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/GaussianDistribution.PNG -------------------------------------------------------------------------------- /lecture_4/imgs/IMU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/IMU.png -------------------------------------------------------------------------------- /lecture_4/imgs/Lens.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/Lens.PNG -------------------------------------------------------------------------------- /lecture_4/imgs/Lens0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/Lens0.jpg -------------------------------------------------------------------------------- /lecture_4/imgs/LightRays0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/LightRays0.jpg -------------------------------------------------------------------------------- /lecture_4/imgs/PinholeMath0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/PinholeMath0.jpg -------------------------------------------------------------------------------- /lecture_4/imgs/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/light.png -------------------------------------------------------------------------------- /lecture_4/imgs/q1b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/q1b.png -------------------------------------------------------------------------------- /lecture_4/imgs/smd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/smd.png -------------------------------------------------------------------------------- /lecture_4/imgs/ultra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/imgs/ultra.png -------------------------------------------------------------------------------- /lecture_4/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4/main.pdf -------------------------------------------------------------------------------- /lecture_4/reference.bib: -------------------------------------------------------------------------------- 1 | @incollection{dudek2008inertial, 2 | title={Inertial sensors, GPS, and odometry}, 3 | author={Dudek, Gregory and Jenkin, Michael}, 4 | booktitle={Springer Handbook of Robotics}, 5 | year={2008}, 6 | publisher={Springer} 7 | } 8 | 9 | @incollection{SNS, 10 | title={Perception}, 11 | author={R. Siegwart, I. R. Nourbakhsh, D. Scaramuzza}, 12 | booktitle={Introduction to Autonomous Mobile Robots}, 13 | year={2011}, 14 | publisher={MIT Press, 2nd Edition} 15 | } 16 | 17 | @incollection{FP, 18 | title={Geometric Camera Models}, 19 | author={David A. Forsyth, Jean Ponce}, 20 | booktitle={Computer Vision: A Modern Approach}, 21 | year={2011}, 22 | publisher={Prentice Hall, 2nd Edition} 23 | } 24 | 25 | @incollection{HZ, 26 | title={Camera Models}, 27 | author={R. Hartley, A. Zisserman}, 28 | booktitle={Multiple View Geometry in Computer Vision}, 29 | year={2002}, 30 | publisher={Academic Press} 31 | } 32 | -------------------------------------------------------------------------------- /lecture_4_scribe_notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_4_scribe_notes.pdf -------------------------------------------------------------------------------- /lecture_5/Lecture_5_Scribe_Notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/Lecture_5_Scribe_Notes.pdf -------------------------------------------------------------------------------- /lecture_5/imgs/GaussianDistribution.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/GaussianDistribution.PNG -------------------------------------------------------------------------------- /lecture_5/imgs/IMU.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/IMU.png -------------------------------------------------------------------------------- /lecture_5/imgs/Lens.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/Lens.PNG -------------------------------------------------------------------------------- /lecture_5/imgs/Lens0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/Lens0.jpg -------------------------------------------------------------------------------- /lecture_5/imgs/LightRays0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/LightRays0.jpg -------------------------------------------------------------------------------- /lecture_5/imgs/PinholeMath0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/PinholeMath0.jpg -------------------------------------------------------------------------------- /lecture_5/imgs/diagram_1_vik.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/diagram_1_vik.png -------------------------------------------------------------------------------- /lecture_5/imgs/distortion.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/distortion.png -------------------------------------------------------------------------------- /lecture_5/imgs/light.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/light.png -------------------------------------------------------------------------------- /lecture_5/imgs/measuring_depth.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/measuring_depth.png -------------------------------------------------------------------------------- /lecture_5/imgs/q1b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/q1b.png -------------------------------------------------------------------------------- /lecture_5/imgs/smd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/smd.png -------------------------------------------------------------------------------- /lecture_5/imgs/stepping_on_tower.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/stepping_on_tower.png -------------------------------------------------------------------------------- /lecture_5/imgs/traintracks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/traintracks.jpg -------------------------------------------------------------------------------- /lecture_5/imgs/ultra.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/ultra.png -------------------------------------------------------------------------------- /lecture_5/imgs/vik_image_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/vik_image_2.png -------------------------------------------------------------------------------- /lecture_5/imgs/vik_image_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/vik_image_3.png -------------------------------------------------------------------------------- /lecture_5/imgs/vik_image_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/imgs/vik_image_4.png -------------------------------------------------------------------------------- /lecture_5/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_5/main.pdf -------------------------------------------------------------------------------- /lecture_5/reference.bib: -------------------------------------------------------------------------------- 1 | @incollection{dudek2008inertial, 2 | title={Inertial sensors, GPS, and odometry}, 3 | author={Dudek, Gregory and Jenkin, Michael}, 4 | booktitle={Springer Handbook of Robotics}, 5 | year={2008}, 6 | publisher={Springer} 7 | } 8 | 9 | @incollection{SNS, 10 | title={Perception}, 11 | author={R. Siegwart, I. R. Nourbakhsh, D. Scaramuzza}, 12 | booktitle={Introduction to Autonomous Mobile Robots}, 13 | year={2011}, 14 | publisher={MIT Press, 2nd Edition} 15 | } 16 | 17 | @incollection{FP, 18 | title={Geometric Camera Models}, 19 | author={David A. Forsyth, Jean Ponce}, 20 | booktitle={Computer Vision: A Modern Approach}, 21 | year={2011}, 22 | publisher={Prentice Hall, 2nd Edition} 23 | } 24 | 25 | @incollection{HZ, 26 | title={Camera Models}, 27 | author={R. Hartley, A. Zisserman}, 28 | booktitle={Multiple View Geometry in Computer Vision}, 29 | year={2002}, 30 | publisher={Academic Press} 31 | } 32 | -------------------------------------------------------------------------------- /lecture_6/SFM.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/SFM.PNG -------------------------------------------------------------------------------- /lecture_6/SFM_ambiguities.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/SFM_ambiguities.png -------------------------------------------------------------------------------- /lecture_6/SFM_ambiguity.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/SFM_ambiguity.PNG -------------------------------------------------------------------------------- /lecture_6/approximation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/approximation.png -------------------------------------------------------------------------------- /lecture_6/correspondence.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/correspondence.png -------------------------------------------------------------------------------- /lecture_6/correspondence2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/correspondence2.jpg -------------------------------------------------------------------------------- /lecture_6/correspondence3.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/correspondence3.PNG -------------------------------------------------------------------------------- /lecture_6/disparity_map.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/disparity_map.PNG -------------------------------------------------------------------------------- /lecture_6/epipolar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/epipolar.png -------------------------------------------------------------------------------- /lecture_6/lecture_6_scribe.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/lecture_6_scribe.pdf -------------------------------------------------------------------------------- /lecture_6/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/main.pdf -------------------------------------------------------------------------------- /lecture_6/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \usepackage{amsmath} 6 | \usepackage{graphicx} 7 | \renewcommand{\sfdefault}{kurier} 8 | 9 | 10 | \usepackage{graphics} 11 | \setlength{\oddsidemargin}{0.25 in} 12 | \setlength{\evensidemargin}{-0.25 in} 13 | \setlength{\topmargin}{-0.6 in} 14 | \setlength{\textwidth}{6.5 in} 15 | \setlength{\textheight}{8.5 in} 16 | \setlength{\headsep}{0.75 in} 17 | \setlength{\parindent}{0 in} 18 | \setlength{\parskip}{0.1 in} 19 | 20 | 21 | \newcounter{lecnum} 22 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 23 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 24 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 25 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 26 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 27 | 28 | 29 | \newcommand{\lecture}[3]{ 30 | \pagestyle{myheadings} 31 | \thispagestyle{plain} 32 | \newpage 33 | \setcounter{lecnum}{#1} 34 | \setcounter{page}{1} 35 | \noindent 36 | \begin{center} 37 | \framebox{ 38 | \vbox{\vspace{2mm} 39 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 40 | \hfill Winter 2018} } 41 | \vspace{4mm} 42 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 43 | \vspace{2mm} 44 | % \hbox to 6.28in { {\it \hfill Scribes: #4} } 45 | \vspace{2mm}} 46 | } 47 | \end{center} 48 | \markboth{Lecture #1: #2}{Lecture #1: #2} 49 | 50 | \vspace*{4mm} 51 | } 52 | 53 | 54 | 55 | %%%%%%%%%%%%%%%%%%%%%%%%%% 56 | %document 57 | \begin{document} 58 | %modify this 59 | \lecture{6}{Stereo Vision and Structure from Motion}{} 60 | 61 | \section{Introduction} 62 | 63 | This lecture \cite{slides} covers geometric concepts needed for 3D reconstruction. The common methods for reconstructing a 3D scene from 2D images are : 64 | \begin{enumerate} 65 | \item Recognition of landmarks 66 | \item Depth from focus 67 | \item Stereo vision 68 | \item Structure from motion. 69 | \end{enumerate} 70 | 71 | Recognition of landmarks utilizes known characteristics of particular structures such as orthogonal walls. Depth from focus determines distance to a point by taking multiple images with progressively better focus. Stereo vision triangulates the distance of a point in 3D by its coordinates in two distinct images taken at the same time by cameras with known relative pose. Structure from motion processes multiple images taken at different times. A key aspect of stereo vision and structure from motion is finding point correspondences across multiple images. Much of this lecture covers geometric constraints used to narrow the search space for finding point correspondences. Complementary readings \cite{SNS, FP} 72 | 73 | \section{Method \#1 Depth from Focus} 74 | 75 | \begin{figure}[h!] 76 | \begin{center} 77 | \includegraphics[scale=0.2]{thinlens} 78 | \end{center} 79 | \caption{Projection of a point through a thin lens} 80 | \label{lens} 81 | \end{figure} 82 | 83 | An ideal thin lens (Figure \ref{lens}) focuses rays of light emitting from a point $P$ at a depth $Z$ from the center of the lens to a point $p$ at a distance $z$ from the center of the lens. The distance $z$ is called the focal distance. By properties of similar triangles it can be shown that such points must obey the thin lens constraint (Equation \ref{tlc}). 84 | \begin{align} 85 | \label{tlc} 86 | \frac{1}{z} + \frac{1}{Z} = \frac{1}{f} 87 | \end{align} 88 | 89 | Thus if the focus distance $z$ and focal length $f$ are known, the depth, $Z$ of the point $P$ can be obtained. We assume the focal length is known as a property of the lens. The focus distance $z$ is found by trying different values until the projection of the point in question becomes sharp in the image. 90 | 91 | In practice this technique is not often used because different focus distances must be found for every point in the image which is not at the same depth. 92 | 93 | \section{Method \#2 Stereopsis} 94 | 95 | In practice, a more powerful technique used to reconstruct 3D scenes from 2D images is the process of fusing two images into one, known as stereopsis. This is how humans see. And indeed it has been demonstrated to be effective in robotics, this is on what the vision of Mars rovers is based. 96 | 97 | In principle, the depth of $P$ can be obtained from the intersection of two lines of sight (Figure \ref{triangle}). In other words, given $\overline{Op}$ and $\overline{O'p'}$ the point $P$ is determined by the intersection of these lines and this process is called triangulation. To know $\overline{Op}$ and $\overline{O'p'}$ in a world coordinate frame fixed for one of the cameras, the relative pose of the cameras and their intrinsic matrices must be known. 98 | 99 | \begin{figure}[h!] 100 | \begin{center} 101 | \begin{tabular}{cc} 102 | \includegraphics[scale=0.3]{triangulation.png} 103 | \includegraphics[scale=0.3]{approximation.png} 104 | \end{tabular} 105 | \end{center} 106 | \caption{The triangulation principle in 2D (left), the approximation in 3D (right)} 107 | \label{triangle} 108 | \end{figure} 109 | 110 | Due to noise in the measurement and calibration it is essentially impossible for the two lines of sight to precisely intersect in 3D (Figure \ref{triangle}). Since there is no single point that can exactly correspond to the observations, in practice, $P$ is approximated by finding the 3D-point $Q$ that best explains the observations. I.e. the point whose projection in the two image planes is closest to the observed points. This is computed in term of the following metric known as the re-projection error : 111 | \begin{align} 112 | Q = \arg\!\min_Q (d^2(p, q) + d^2(p', q')) 113 | \end{align} 114 | 115 | where $q$ and $q'$ are the projection of $Q$ onto the two camera images planes and $p$ and $p'$ are observed point correspondences in the image planes. 116 | 117 | \subsection{Stereo vision process} 118 | 119 | So far we have seen that given corresponding projected points in two images from a calibrated camera, we can reconstruct the coordinates of the original point in 3D. This is actually the second step of the two-step stereo vision process : 120 | 121 | \begin{enumerate} 122 | \item Correspondence: fusion of features observed by two (or more) cameras 123 | \item Triangulation: reconstruction of three-dimensional pre-images 124 | \end{enumerate} 125 | 126 | The first step is finding corresponding points in the two images. In practice this is the more challenging step of the two. In the general case, finding correspondences requires a search in two dimensions between all points in each image, but several constraints can be leveraged to restrict this search, such as similarity constraints, continuity constraints, and most importantly the \emph{epipolar} constraint. 127 | 128 | The epipolar constraint intrinsically specifies the geometry of stereo vision. Specifically, given a point in one image the epipolar constraint limits the location of the corresponding point in the other image to a line, thus reducing the search space for correspondence from two dimensions to one. 129 | 130 | \subsection{Epipolar geometry} 131 | 132 | Consider the following problem: we know the relative positions and orientations of two calibrated cameras. We have an observation of a point $p$ in our first image plane and we want to find a constraint that helps in finding the corresponding point $p'$ in the second image plane, where $p$ and $p'$ are projections of the same point $P$ in the 3D. 133 | 134 | We start by defining the \emph{epipolar plane} as the plane that passes through $O$, $O'$, and $p$. Since $p$ and $p'$ are on the lines $\overline{OP}$ and $\overline{O'P}$, we know that $P$ and $p'$ also lie on the epipolar plane. Now consider virtual image planes $\Pi$ and $\Pi'$ in front the camera centers. These planes are known since we assumed our cameras are calibrated. Since $p'$ must lie both on the epipolar plane and the virtual plane $\Pi'$, then $p'$ must lie on the intersection of the epipolar plane and the virtual image plane. This intersection line is called the \emph{epipolar line}. Thus, given $O$, $O'$, $p$, and the image plane $\Pi'$ we have constrained the location of the corresponding point $p'$ to a line in $\Pi'$. 135 | 136 | In the figure \ref{epi}, note that $O$, $O'$, and $p$ are known. $P$ is not known precisely, but we must be somewhere along $\overline{Op}$. Then, the line of sight from the second camera to $P$ must pass through $O'$ and the line $\overline{Op}$. These candidate lines are red in figure \ref{epi}. These candidate lines cross the image plane $\Pi'$ at points that form the epipolar line. 137 | 138 | \begin{figure}[h!] 139 | \begin{center} 140 | \includegraphics[scale=0.3]{epipolar.png} 141 | \end{center} 142 | \caption{The epipolar plane} 143 | \label{epi} 144 | \end{figure} 145 | 146 | Summary of terminology: 147 | \begin{itemize} 148 | \item \textbf{Epipolar plane}: The plane containing the points O, O', p, p', and P 149 | \item \textbf{Baseline}: the line connecting the centers, $\overline{OO'}$ 150 | \item \textbf{Epipolar lines}: The intersection of the epipolar plane and the image planes, respectively $l$ and $l'$ 151 | \item \textbf{Epipoles}: the intersection points of the baseline and the virtual image planes, respectively $e$ and $e'$ 152 | \item \textbf{Epipolar constraint}: potential correspondences for $p$ must lie on the epipolar line $l'$ (and vice versa) 153 | \end{itemize} 154 | 155 | Figure \ref{correspondence} shows an example of corresponding points from two images and the epipolar line. 156 | 157 | \begin{figure}[h!] 158 | \begin{center} 159 | \includegraphics[scale=0.3]{correspondence2.jpg} \end{center} 160 | \caption{An example of computed epipolar plane (left) from a initial point (right)} 161 | \label{correspondence} 162 | \end{figure} 163 | 164 | \subsubsection{Epipolar geometry and the Essential Matrix} 165 | 166 | To define the epipolar constraint mathematically, we use the fact that $\overline{Op}$, $\overline{O'p'}$, and $\overline{OO'}$ are coplanar to write: 167 | 168 | \begin{align} 169 | \overline{Op} \cdot [\overline{OO'} \times \overline{O'p'}] = 0. 170 | \end{align} 171 | 172 | To see this is true, note that $\overline{OO'} \times \overline{O'p'}$ is a vector perpendicular to the epipolar plane, and consequently perpendicular to $\overline{Op}$. The dot product of these perpendicular vectors is then defined to be 0. 173 | 174 | Now assume that the world reference system is co-located with camera 1. Define normalized coordinates $\hat{p} = K^{-1}p$ and $\hat{p'} = K'^{-1}p'$. Define the rotation matrix between camera 1 and camera 2 as $R$ so in the camera 1 reference frame $\overline{O\hat{p'}} = R\hat{p'}$. Define the translation from camera 1 to camera 2 as $t$ so $\overline{OO'} = t$. Then our coplanar constrain becomes 175 | 176 | \begin{align} 177 | \hat{p} \cdot [t \times (R\hat{p'})] = 0. 178 | \end{align} 179 | 180 | Note that a cross product can be expressed as the product of skew-symmetric matrix and a vector. 181 | 182 | \begin{align} 183 | a \times b &= [a]_x b \\ 184 | \text{where } [a]_x &= \begin{bmatrix} 185 | 0 & -a_3 & a_2 \\ 186 | a_3 & 0 & -a_1 \\ 187 | -a_2 & a_1 & 0 188 | \end{bmatrix} . 189 | \end{align} 190 | 191 | Then the epipolar constraint can be written as a product of matrices as : 192 | \begin{align} 193 | \hat{p} \cdot [t \times (R\hat{p'})] &= \hat{p} [t]_x R \hat{p'} = \hat{p}E\hat{p'} = 0. \\ 194 | \text{where } E &= [t]_xR. 195 | \end{align} 196 | 197 | We now have a single matrix that defines the epipolar constraint for any normalized point correspondences between two calibrated cameras. If we note that a line in homogeneous coordinates is defined by the points that satisfy $p \cdot l = 0$ then we can see right away that the epipolar lines can be calculated as: 198 | \begin{align} 199 | l &= E\hat{p'} \\ 200 | l' &= E^T\hat{p}. 201 | \end{align} 202 | 203 | For the special case of the epipoles the epipolar line is undefined because $t$ and the epipoles are parallel so $E^Te = Ee' = 0$. This leads to the resul that $E$ is singular (non-invertible). Finally, we make note that $E$ has five degrees of freedom - 3 for $R$ and 2 for $t$ due to scaling ambiguity. 204 | 205 | \subsubsection{Epipolar geometry and the Fundamental Matrix \cite{FP}} 206 | 207 | To generalize the essential coordinates to native coordinate (as opposed to normalized coordinates) we note that $p = K\hat{p}$ and $p' = K'\hat{p'}$. The epipolar constraint then becomes 208 | 209 | \begin{align} 210 | p^TK^{-T}EK'^{-1}p' &= p^T F p' = 0 \\ 211 | \text{where } F &= K^{-T}E K'^{-1} = K^{-T}[t]_x R K'^{-1}. 212 | \end{align} 213 | 214 | Once again we have epipolar lines as 215 | \begin{align} 216 | l &= Fp' \\ 217 | l' &= F^Tp. 218 | \end{align} 219 | 220 | $F$ is also singular because $F^Te = Fe' = 0$. Finally $F$ is defined by 9 elements but is constrained by det(F) = 0 and a common scaling so in the end $F$ has only 7 degrees of freedom. 221 | 222 | \subsubsection{Computing the Fundamental Matrix} 223 | 224 | Given the fundamental matrix $F$, we can compute a specific epipolar line in image 2 that corresponds to a point $P$ in image 1 without any additional information, as shown in Figure \ref{ex2} 225 | 226 | \begin{figure}[h!] 227 | \begin{center} 228 | \includegraphics[scale=0.45]{correspondence3.PNG} \end{center} 229 | \caption{An example of computed epipolar line and point $p'$ that correspond to a point $p$ (left)} 230 | \label{ex2} 231 | \end{figure} 232 | 233 | To compute a fundamental matrix, we use the same approach as we did for projection matrix. We find a number of correspondences, for example by Brute Force search, using clearly distinguishable points such as corners. 234 | 235 | Assume we are given a number of corresponding points $p = [u, v, 1]^T$ and $p'= [u',v',1]^T$ expressed in a homogeneous coordinate. Each pair of points has to satisfy the epipolar constraint $F$. 236 | 237 | \begin{align} 238 | [u, v, 1] \begin{bmatrix} 239 | F_{11} & F_{12} & F_{13} \\ 240 | F_{21} & F_{22} & F_{23} \\ 241 | F_{31} & F_{32} & F_{33} 242 | \end{bmatrix} \begin{bmatrix} 243 | u' \\ v' \\ 1 244 | \end{bmatrix} &= 0 245 | \end{align} 246 | 247 | We can rewrite this into a scalar product of two one-dimensional vectors. The first vector contains the known coefficients from the given points and the second vector contains each element of the fundamental matrix. Now we have a scalar euqation, therefore one constraint, for each pair of given points. 248 | 249 | \begin{align} 250 | [uu', uv', u, vu', vv', v, u', v', 1]\begin{bmatrix} 251 | F_{11} \\F_{12} \\F_{13} \\F_{21} \\F_{22} \\F_{23} \\F_{31} \\F_{32} \\F_{33} 252 | \end{bmatrix} = Wf = 0 253 | \end{align} 254 | 255 | As in the projection matrix, the fundamental matrix can be defined up to scale, e.g. normalized by the last component. Therefore, we need 8 parameters to estimate 9 entries of the fundamental matrix. Given $n>=8$ correspondences, we can solve $\tilde{F}$ 256 | 257 | \begin{align} 258 | \min_{f\in{R^9}}\|Wf\|^2 \\ 259 | \text{subject to } \|f\|^2 = 1 260 | \end{align} 261 | 262 | Here, while $\tilde{F}$ satisfies the epipolar constraints, it is not necessarily singular. we can enforce rank-2 constraint via SVD decomposition to get the proper fundamental matrix from the candidates. 263 | 264 | \begin{align} 265 | \arg\!\min_F \|F-\tilde{F}\|^2 \\ 266 | \text{subject to } det(F) = 0 267 | \end{align} 268 | 269 | \subsubsection{Image Rectification} 270 | 271 | Assume we have two parallel image planes. Now, the epipolar lines are horizontal and $v$ coordinates are equal, both triangulation and correspondence can be done much simpler. We can warp images to simulate a parallel image plane through a process called "Image Rectification" (Figure \ref{rect}). This process exploits some algorithms applying projective transformation, which will not be discussed in this lecture. So let's assume we have rectified image pairs. 272 | 273 | \begin{figure}[h!] 274 | \begin{center} 275 | \includegraphics[scale=0.5]{rectified_image.PNG} \end{center} 276 | \caption{Image Rectification} 277 | \label{rect} 278 | \end{figure} 279 | 280 | Recall that stereo vision consists of two steps: correspondence and triangulation. This lecture will focus on the triangulation problem. A preimage point $P$ is projected on two image planes to be $p_u$ and $p'_u$. $u$ is the horizontal coordinate and $v$ is the vertical coordinate. Because the epipolar line is horizontal, $p_u$ and $p'_u$ have the same vertical coordinate, and we do not consider $v$ coordinates. 281 | 282 | Knowing the horizontal projection of $p$ into two cameras, we can estimate the distance $z$ of the point from the similar triangles (Figure \ref{recttri}). 283 | 284 | \begin{align} 285 | % \label{tlc} 286 | \frac{z}{b} &= \frac{z-f}{b-p_u+p'_u} \\ 287 | \ z &= \frac{bf}{p_u-p'_u} 288 | \end{align} 289 | 290 | \begin{figure}[h!] 291 | \begin{center} 292 | \includegraphics[scale=0.45]{rectified_triangulation_1_.PNG} 293 | \includegraphics[scale=0.4]{rectified_triangulation_2_.PNG} \end{center} 294 | \caption{Triangulation under Rectified Images (horizontal view on the left, top-down view on the right)} 295 | \label{recttri} 296 | \end{figure} 297 | 298 | Here $b$ is the baseline and $f$ is the focal length. If the baseline is very large, we have more resolution to estimate the distance $z$, some points may only be visible from one camera. If the baseline is small, we do not have problems in correspondences, we will have a larger relative error in the estimation of $z$. 299 | 300 | We can measure the distance by knowing the disparity $p_u-p'_u$, ie the pixel displacement between corresponding points. From the 2 images, we can build a disparity map, an image that plots the disparity values for every pixel from two stereo images (See Fig. 6.8.) Brighter color indicates larger disparities, which means the point is closer to the camera. 301 | 302 | \begin{figure}[h!] 303 | \begin{center} 304 | \includegraphics[scale=0.5]{disparity_map.PNG} \end{center} 305 | \caption{Disparity Map from a pair of Stereo Images} 306 | \label{ex} 307 | \end{figure} 308 | 309 | \newpage 310 | \section{Method \#3 Structure From Motion (SFM)} 311 | 312 | The Structure From Motion (SFM) method uses a similar principle than Stereopsis but in a different fashion : we do not take images from two cameras at the same time, but instead we take images from one camera at different points in time as we move the camera around the object. Here, the intrinsics parameters are the same because we are using one camera, but the extrinsic changes as we move the camera. 313 | 314 | \begin{figure}[h!] 315 | \begin{center} 316 | \includegraphics[scale=0.4]{SFM.PNG} \end{center} 317 | \caption{Structure From Motion (SFM)} 318 | \label{ex} 319 | \end{figure} 320 | 321 | Let's consider we have different points $P_j$ on an object and we take the image at time $k$. Given $m$ images of $n$ fixed 3D points, we get $m$ projection matrices $M_k$ (for the $k$th image) : $p_{j,k}^h = M_k P_j^h$. 322 | Where $p_{j,k}$ is the projection of the point $P_j$ on the camera image $k$. 323 | 324 | However, SFM is difficult to use because it has ambiguities. That is, we cannot recover the absolute scale of the observed scene. If we have a bigger object in a longer distance in one situation and a smaller object in a closer distance, the projections will be the same (see Figure \ref{amb}). To address this ambiguity, we can take several approaches such as algebraic approach (by fundamental matrix) and bundle adjustment. 325 | 326 | \begin{figure}[h!] 327 | \begin{center} 328 | \includegraphics[scale=0.8]{SFM_ambiguities.png} 329 | \end{center} 330 | \caption{Ambiguity in the projection of an object using SFM} 331 | \label{amb} 332 | \end{figure} 333 | 334 | The concept of SFM is similar to visual odometry, which estimate the motion of a robot by using visual inputs in series. This is widely used in reality, including on Mars by rovers. SFM can be a very powerful method because it not only allows us to reconstruct the environment but also to recover the motion of the camera. 335 | 336 | \newpage 337 | 338 | \bibliographystyle{unsrt} 339 | \bibliography{references} 340 | 341 | \subsubsection*{Contributors} 342 | Winter 2019: [Your Names Here] 343 | \\ 344 | Winter 2018: Gael Gurvan Colas, Soyeon Jung, Greg Katz 345 | 346 | \end{document} 347 | -------------------------------------------------------------------------------- /lecture_6/rectified_image.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/rectified_image.PNG -------------------------------------------------------------------------------- /lecture_6/rectified_triangulation_1_.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/rectified_triangulation_1_.PNG -------------------------------------------------------------------------------- /lecture_6/rectified_triangulation_2_.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/rectified_triangulation_2_.PNG -------------------------------------------------------------------------------- /lecture_6/references.bib: -------------------------------------------------------------------------------- 1 | @manual{SNS, 2 | author = {Roland Siegwart, Illah R. Nourbakhsh and Davide Scaramuzza}, 3 | title = {Introduction to Autonomous Mobile Robots (2nd Edition)}, 4 | publisher={The MIT Press}, 5 | year={2011}, 6 | note={Sections 4.2.5 - 4.2.7} 7 | } 8 | 9 | @manual{FP, 10 | author = {D. A. Forsyth and J. Ponce}, 11 | title = {Computer Vision: A Modern Approach (2nd 12 | Edition)}, 13 | publisher={Prentice Hall}, 14 | year={2011}, 15 | note={Sections 7.1 and 7.2} 16 | } 17 | 18 | @misc{slides, 19 | author = {Marco Pavone}, 20 | title = {AA273 lecture slides}, 21 | month = {Winter}, 22 | year = {2018}, 23 | note = {Lecture 6} 24 | } -------------------------------------------------------------------------------- /lecture_6/thinlens.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/thinlens.png -------------------------------------------------------------------------------- /lecture_6/triangulation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_6/triangulation.png -------------------------------------------------------------------------------- /lecture_7/2d_equivalent.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/2d_equivalent.PNG -------------------------------------------------------------------------------- /lecture_7/Lecture 7 scribe notes.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/Lecture 7 scribe notes.pdf -------------------------------------------------------------------------------- /lecture_7/application.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/application.PNG -------------------------------------------------------------------------------- /lecture_7/better_kernel.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/better_kernel.PNG -------------------------------------------------------------------------------- /lecture_7/blur.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/blur.png -------------------------------------------------------------------------------- /lecture_7/corner.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/corner.JPG -------------------------------------------------------------------------------- /lecture_7/gaussian.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/gaussian.PNG -------------------------------------------------------------------------------- /lecture_7/harris.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/harris.JPG -------------------------------------------------------------------------------- /lecture_7/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/main.pdf -------------------------------------------------------------------------------- /lecture_7/noisy_uncorrected.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_7/noisy_uncorrected.PNG -------------------------------------------------------------------------------- /lecture_7/ref.bib: -------------------------------------------------------------------------------- 1 | 2 | @ARTICLE{SIFT, 3 | author = {D. G. Lowe}, 4 | journal={International Journal of Computer Vision}, 5 | title = {Distinctive Image Features from Scale-Invariant Keypoints}, 6 | year = {2004}, 7 | volume={60}, 8 | number={2}, 9 | pages={91}, 10 | } 11 | 12 | @INPROCEEDINGS{Moravec, 13 | author = {H. P. Moravec}, 14 | booktitle={5th International Joint Conference on Artificial Intelligence}, 15 | title = {Towards automatic visual obstacle avoidance}, 16 | year = {1977}, 17 | } 18 | 19 | @book{SNS, 20 | author = {R. Siegwart and I.R. Nourbakhsh and D. Scaramuzza}, 21 | title = {Introduction to Autonomous Mobile Robots}, 22 | year = {2011}, 23 | publisher = {The MIT press}, 24 | } 25 | 26 | @INPROCEEDINGS{Harris, 27 | author = {C. Harris and M. Stephens}, 28 | booktitle={the 4th Alvey Vision Conference}, 29 | title = {A combined corner and edge detector}, 30 | year = {1988}, 31 | } -------------------------------------------------------------------------------- /lecture_8/images/ErrorPropagation_1D.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/ErrorPropagation_1D.png -------------------------------------------------------------------------------- /lecture_8/images/PolarCoordinates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/PolarCoordinates.png -------------------------------------------------------------------------------- /lecture_8/images/RANSACEx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/RANSACEx.png -------------------------------------------------------------------------------- /lecture_8/images/RANSACOverview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/RANSACOverview.png -------------------------------------------------------------------------------- /lecture_8/images/bag_of_words.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/bag_of_words.JPG -------------------------------------------------------------------------------- /lecture_8/images/bias_vs_var.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/bias_vs_var.png -------------------------------------------------------------------------------- /lecture_8/images/cat_classifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/cat_classifier.png -------------------------------------------------------------------------------- /lecture_8/images/classification.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/classification.png -------------------------------------------------------------------------------- /lecture_8/images/errorpropagation_general.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/errorpropagation_general.png -------------------------------------------------------------------------------- /lecture_8/images/gradient_descent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/gradient_descent.png -------------------------------------------------------------------------------- /lecture_8/images/hough1.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/hough1.JPG -------------------------------------------------------------------------------- /lecture_8/images/hough2.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/hough2.JPG -------------------------------------------------------------------------------- /lecture_8/images/hough3.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/hough3.JPG -------------------------------------------------------------------------------- /lecture_8/images/hough4.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/hough4.JPG -------------------------------------------------------------------------------- /lecture_8/images/hough5.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/hough5.JPG -------------------------------------------------------------------------------- /lecture_8/images/hough6.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/hough6.JPG -------------------------------------------------------------------------------- /lecture_8/images/hyper_parameters.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/hyper_parameters.png -------------------------------------------------------------------------------- /lecture_8/images/iterativesplit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/iterativesplit.png -------------------------------------------------------------------------------- /lecture_8/images/knn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/knn.png -------------------------------------------------------------------------------- /lecture_8/images/least_squares.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/least_squares.png -------------------------------------------------------------------------------- /lecture_8/images/linear_classifier.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/linear_classifier.png -------------------------------------------------------------------------------- /lecture_8/images/linear_regression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/linear_regression.png -------------------------------------------------------------------------------- /lecture_8/images/regression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/regression.png -------------------------------------------------------------------------------- /lecture_8/images/sgd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/sgd.png -------------------------------------------------------------------------------- /lecture_8/images/spline_fitting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/spline_fitting.png -------------------------------------------------------------------------------- /lecture_8/images/splitandmerge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/images/splitandmerge.png -------------------------------------------------------------------------------- /lecture_8/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_8/main.pdf -------------------------------------------------------------------------------- /lecture_8/sample.bib: -------------------------------------------------------------------------------- 1 | @book{SNS, 2 | title={Introduction to Autonomous Mobile Robots}, 3 | author={Siegwart, R. and Nourbakhsh, I. R.}, 4 | year={2004}, 5 | publisher={The MIT Press} 6 | } 7 | 8 | 9 | @misc{wikipedia_2017, title={Histogram of oriented gradients}, url={https://en.wikipedia.org/wiki/Histogram_of_oriented_gradients#cite_note-3}, journal={Wikipedia}, publisher={Wikimedia Foundation}, year={2017}, month={Dec}} 10 | 11 | @article{10.2307/2344614, 12 | ISSN = {00359238}, 13 | URL = {http://www.jstor.org/stable/2344614}, 14 | abstract = {The technique of iterative weighted linear regression can be used to obtain maximum likelihood estimates of the parameters with observations distributed according to some exponential family and systematic effects that can be made linear by a suitable transformation. A generalization of the analysis of variance is given for these models using log-likelihoods. These generalized linear models are illustrated by examples relating to four distributions; the Normal, Binomial (probit analysis, etc.), Poisson (contingency tables) and gamma (variance components). The implications of the approach in designing statistics courses are discussed.}, 15 | author = {J. A. Nelder and R. W. M. Wedderburn}, 16 | journal = {Journal of the Royal Statistical Society. Series A (General)}, 17 | number = {3}, 18 | pages = {370-384}, 19 | publisher = {[Royal Statistical Society, Wiley]}, 20 | title = {Generalized Linear Models}, 21 | volume = {135}, 22 | year = {1972} 23 | } 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lecture_9/main.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/main.pdf -------------------------------------------------------------------------------- /lecture_9/main.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage{enumitem} % for customizing enumerate tags 4 | \usepackage{amsmath,amsthm,amssymb} 5 | \usepackage{listings} 6 | \usepackage{subcaption} 7 | \usepackage{minted} 8 | \usepackage[math]{kurier} 9 | \usepackage[sc]{mathpazo} 10 | \renewcommand{\sfdefault}{kurier} 11 | 12 | 13 | \usepackage{graphics} 14 | \usepackage{graphicx} 15 | \setlength{\oddsidemargin}{0.25 in} 16 | \setlength{\evensidemargin}{-0.25 in} 17 | \setlength{\topmargin}{-0.6 in} 18 | \setlength{\textwidth}{6.5 in} 19 | \setlength{\textheight}{8.5 in} 20 | \setlength{\headsep}{0.75 in} 21 | \setlength{\parindent}{0 in} 22 | \setlength{\parskip}{0.1 in} 23 | 24 | 25 | \newcounter{lecnum} 26 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 27 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 28 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 29 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 30 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 31 | 32 | 33 | 34 | 35 | \newcommand{\lecture}[3]{ 36 | \pagestyle{myheadings} 37 | \thispagestyle{plain} 38 | \newpage 39 | \setcounter{lecnum}{#1} 40 | \setcounter{page}{1} 41 | \noindent 42 | \begin{center} 43 | \framebox{ 44 | \vbox{\vspace{2mm} 45 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 46 | \hfill Winter 2018} } 47 | \vspace{4mm} 48 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 49 | \vspace{2mm} 50 | % \hbox to 6.28in { {\it \hfill Scribes: #4} } 51 | \vspace{2mm}} 52 | } 53 | \end{center} 54 | \markboth{Lecture #1: #2}{Lecture #1: #2} 55 | 56 | \vspace*{4mm} 57 | } 58 | 59 | 60 | 61 | %%%%%%%%%%%%%%%%%%%%%%%%%% 62 | %document 63 | \begin{document} 64 | %modify this 65 | \lecture{9}{Machine Learning and Modern Visual Recognition Techniques}{} 66 | 67 | \section{Neural Network Basics} 68 | Work on Artificial Neural Networks, generally known as just 'Neural Networks', has been inspired by the fact that the human brain processes information in a completely different way than computers. Due to this, human brains are much more efficient at certain tasks, such as vision, language processing, etc. than computers. Artificial neural networks aim to mimic this biological model by employing a large number of simple interconnected processing units or 'neurons'. We may thus offer the following definition of a neural network viewed as an adaptive machine\cite{haykin}: 69 | 70 | A neural network is a massively parallel distributed processor made up of simple processing units that has a natural propensity for storing experiential knowledge and making it available for use. It resembles the brain in two respects:\\ 71 | 1. Knowledge is acquired by the network from its environment through a learning process.\\ 72 | 2. Inter-neuron connection strengths, known as synaptic weights, are used to store the acquired knowledge. 73 | 74 | \subsection{Perceptron - Analogy to a Biological Neuron} 75 | The figure below shows a simplified diagram of a biological neuron: 76 | 77 | \begin{figure}[!htb] 78 | \centering 79 | \includegraphics[height = 2in]{pics/neuron.png} 80 | \caption{Simplified model of a biological neuron\cite{cs231n-website}} 81 | \label{fig:bio-neuron} 82 | \end{figure} 83 | 84 | There are approximately 86 billion neurons in the human nervous system and they are connected with approximately $10^14$ - $10^15$ synapses\cite{cs231n-website}. 85 | 86 | The figure below shows a commonly used mathematical model of a neuron: 87 | 88 | \begin{figure}[!htb] 89 | \centering 90 | \includegraphics[height = 2in]{pics/neuron_model.jpeg} 91 | \caption{Mathematical model of a neuron\cite{cs231n-website}} 92 | \label{fig:neuron_model} 93 | \end{figure} 94 | 95 | Signals travel along the axons (e.g. x0) and interact multiplicatively (e.g. w0x0) with the dendrites of the other neuron based on the synaptic strength at that synapse (e.g. w0). The idea is that the synaptic strengths (the weights w) are learnable and control the strength of influence (and its direction: excitatory (positive weight) or inhibitory (negative weight)) of one neuron on another. We can model the firing rate of the neuron with an activation function f, which represents the frequency of the spikes along the axon. Historically, a common choice of activation function was the sigmoid function, but the ReLU function is more commonly used nowadays. This is because the gradient of the sigmoid function becomes small as its value increases which reduces the training speed of the model. 96 | 97 | 98 | \subsection{Single Layer Network / Logistic Regression} 99 | Inspired by this model of the neuron, a 1 layer neural net can be built which takes in binary inputs and provides binary output by taking a weighted sum and passing it through an activation function (as seen below). The theory is that if these weights are tuned perfectly, then it should be able to classify the inputs correctly. 100 | 101 | 102 | \begin{figure}[!htb] 103 | \centering 104 | \includegraphics[height = 2in]{pics/Logistic_regression.png} 105 | \caption{Single layer neural net\cite{Lecture slides}} 106 | \label{fig:Single layer neural net} 107 | \end{figure} 108 | 109 | 110 | \subsection{Multi-layer Neural Network / Deep Learning} 111 | 112 | We can get more resolution on our classifications by putting multiple of these layers together. In such regard, each layer can "learn" to classify a different part of the input. Take for an example the problem of classifying handwritten digits, in particular classifying the number 3. The first layer can be responsible for classifying a curved top, the second a curved bottom, etc. 113 | 114 | A sample is shown below (from : http://www.cs.cmu.edu/~aharley/vis/conv/flat.html) 115 | 116 | \begin{figure}[!htb] 117 | \centering 118 | \includegraphics[height = 2in]{pics/deep_neural_net.png} 119 | \caption{Deep Neural Net for Classifying Handwritten Numbers\cite{}} 120 | \label{fig:Single layer neural net} 121 | \end{figure} 122 | 123 | Representing this is simply a bunch of single layer neural networks linked together where the output of 1 layer is the input of the second layer. 124 | 125 | \begin{figure}[!htb] 126 | \centering 127 | \includegraphics[height = 2in]{pics/deep_learning.png} 128 | \caption{Deep Learning\cite{}} 129 | \label{fig:Deep Learning} 130 | \end{figure} 131 | 132 | \subsection{Activation Functions} 133 | 134 | If we didn't use non-linear activation functions, the output of the neural network would just be a linear function of the input. Such a network is basically just a Linear regression Model and and no matter how many layer and nodes we add to such a network, it is equivalent to having a network with a single node.\\ 135 | 136 | Hence, we use Activation functions to make the network more powerful give it the ability to represent non-linear complex functional mappings between inputs and outputs. 137 | 138 | Another important feature of an Activation function is that it should be differentiable. This is because we perform back-propagation to calculate the gradients of the Loss function with respect to the weights and then accordingly optimize weights using gradient descend or any other Optimization technique to decrease the Loss Function. 139 | 140 | The following are the most commonly used activation functions: 141 | 142 | \begin{enumerate} 143 | 144 | \item \textbf{Sigmoid Function:} 145 | The Sigmoid Function takes a real-valued number and maps it to a range between 0 and 1. 146 | \begin{figure}[!htb] 147 | \centering 148 | \includegraphics[height = 1.2in]{pics/sigmoid.jpeg} 149 | \caption{The sigmoid function\cite{cs231n-website}} 150 | \label{fig:sigmoid} 151 | \end{figure} 152 | \begin{equation*} 153 | f(x) = \frac{1}{1+e^{-x}} 154 | \end{equation*} 155 | Sigmoid Activation functions have historically been used extensively but have now fallen out of favor due to the following drawbacks: 156 | \begin{enumerate} 157 | \item They are prone to saturate as the gradients are very small away from the center. When this occurs, almost no signal will flow through the neuron to its weights and recursively to its data. 158 | \item They are not zero-centered. 159 | \end{enumerate} 160 | 161 | \item \textbf{Tanh function:} 162 | The Tanh function looks quite similar to a sigmoid function. It maps a real-valued number to a range between -1 and 1. 163 | \begin{figure}[!htb] 164 | \centering 165 | \includegraphics[height = 1.2in]{pics/tanh.jpeg} 166 | \caption{The tanh function\cite{cs231n-website}} 167 | \label{fig:tanh} 168 | \end{figure} 169 | \begin{equation*} 170 | f(x) = \tanh(x) 171 | \end{equation*} 172 | It saturates in the same way as a sigmoid does but it has the advantage of being zero-centered. Hence, in practice, it is always preferred to a sigmoid function. 173 | 174 | \item \textbf{ReLU Function:} 175 | The Rectified Linear Unit is simply a threshold at zero and has become very popular in the last few years. 176 | \begin{figure}[!htb] 177 | \centering 178 | \includegraphics[height = 1.2in]{pics/tanh.jpeg} 179 | \caption{The ReLU function\cite{cs231n-website}} 180 | \label{fig:ReLU} 181 | \end{figure} 182 | \begin{equation*} 183 | f(x) = max( 0, x ) 184 | \end{equation*} 185 | It has the following advantages: 186 | \begin{enumerate} 187 | \item It greatly accelerates the convergence of stochastic gradient descent compared to tanh/sigmoid. 188 | \item It is computationally cheaper to implement than tanh/sigmoid as it can implemented by simply thresholding a matrix of activations at zero. 189 | \end{enumerate} 190 | The main disadvantage of the ReLU is that ReLU units can irreversibly die during training since they can get knocked off the data manifold. 191 | 192 | \item \textbf{Leaky ReLU Function:} 193 | The Leaky ReLU attempts to fix the problem of dying nuerons by providing a small negative slope in the $x<0$ region. 194 | \begin{figure}[!htb] 195 | \centering 196 | \includegraphics[height = 1.2in]{pics/Leaky.png} 197 | \caption{The Leaky ReLU function\cite{cs231n-website}} 198 | \label{fig:ReLU} 199 | \end{figure} 200 | \begin{equation*} 201 | f(x) = max( 0.1 x, x ) 202 | \end{equation*} 203 | 204 | \end{enumerate} 205 | \subsection{Training Neural Networks} 206 | We now need a way to teach these neural networks weights to make correct predictions. This is done by running the network on known data points and updating the weights of the neurons based on the correctness of the model in classifying the input. \\ 207 | 208 | Running this however on each input one at a time can take a long period of time for training. Instead these models are run on a sample batch of data. In particular the steps are the following.\\ 209 | 210 | \begin{figure}[!htb] 211 | \centering 212 | \includegraphics[height = 2in]{pics/training_net.png} 213 | \caption{Training a neural net\cite{}} 214 | \label{fig:Training a neural net} 215 | \end{figure} 216 | 217 | \textbf{1. Sample a batch of data.} 218 | We can use a smaller batch of data at each iteration to train the model to decrease training time. 219 | 220 | \textbf{2. Run the input it through the graph and compute the loss.} 221 | The loss function provides serves as a quality metric and provides us an idea on the error of our model. That is, how correct it is. 222 | 223 | \textbf{3. Backpropagate} 224 | Activation functions are chosen to be differentiable to make this step easier. Backpropagation is done by taking the gradient with respect to the weights of each neuron in each layer. 225 | 226 | \textbf{4. Update these parameters using SGD (Stochastic Gradient Descent)} 227 | Update each parameter using the gradient calculated in the previous step 228 | 229 | \textbf{5. Repeat many times} 230 | 231 | \subsection{Overfitting} 232 | Creating complex models sometimes have the disadvantage of being extremely accurate only on the test data. That is, the model is able to classify its entire training data with high accuracy however is unable to generalize and fails with test / real data. 233 | 234 | On the other hand too simple models are unable to learn the more subtle trends in the data. 235 | 236 | \begin{figure}[!htb] 237 | \centering 238 | \includegraphics[height = 2in]{pics/overfitting.png} 239 | \caption{Overfitting\cite{}} 240 | \label{fig:Overfitting} 241 | \end{figure} 242 | http://mlwiki.org/index.php/Overfitting 243 | 244 | In the example above the left model was too simple and was unable to classify some of the values correctly. On the other the right model despite perfectly classifying on this training dataset is unlikely to perform as well in real-world situations. The middle offers a good classification. 245 | 246 | To combat overfitting, regularizaiton is usually introduced in models. Regularization is a technique that penalizes complex models or prevents them from being made. Some of these techniques include 247 | 248 | \textbf{Dropout} 249 | Randomly select neurons that will not be activated at each pass during training. 250 | 251 | \textbf{L2 Regularization} 252 | Penalize the square magnitude of all parameters which forces neuron size to be smaller. 253 | 254 | \textbf{Max Norm Constraints} 255 | Limit the maximum weight of a neuron. 256 | 257 | 258 | %%%%%%%%%%%% 259 | % PART III % 260 | %%%%%%%%%%%% 261 | \section{Convolutional Neural Networks} 262 | A simple Convolutional Neural Networks is a sequence of layers, and every layer of a Convolutional Neural Networks transforms one volume of activations to another through a differentiable function. There are four main types of layers to build ConvNet architectures: \textbf{Convolutional Layer}, \textbf{Nonlinearity Layer}, \textbf{Pooling Layer}, and \textbf{Fully-Connected Layer}. These layers are stacked to form a full ConvNet architecture. In this way, Convolutional Neural Networks transform the original image layer by layer from the original pixel values to the final class scores. 263 | 264 | In this section, we mainly discuss the three types of layer in Convolutional Neural Networks, including Convolutional layer, Pooling layer and Fully-connected layer. 265 | 266 | \subsection{Convolutional Layer} 267 | \textbf{Parameter Sharing} 268 | Parameter sharing scheme is used in Convolutional Layers to control the number of parameters. It is hard to make perceptrons scalable when the input image size is large given the fact the number of parameters grow quickly with the input size. However, we can dramatically reduce the number of parameters by making one reasonable assumption. If we know the input is image data, we can assume some spatial symmetries. In other word, if one feature is useful to compute at some spatial position $(x,y)$, then it should also be useful to compute at a different position $(x_2,y_2)$, so same parameters could be used. 269 | 270 | \textbf{Convolution Details} 271 | The convolution operation essentially performs dot products between the filters and local regions of the input. In other words, each element is computed by element-wise multiplying the local regions of the input (blue part in Figure \ref{fig:conv_demo}) with the filter (red part in Figure \ref{fig:conv_demo}), summing it up, and then offsetting the result by the bias. The output is the green part in Figure \ref{fig:conv_demo}. 272 | 273 | Noticing we give the demo in 2D format. In real cases, the input would be a 3D tensor while he depth of the output volume is a hyperparameter. It corresponds to the number of filters we would like to use, each learning to look for something different in the input. Take Figure \ref{fig:conv_demo2} as an example, if we have 6 $5\times5$ filters, we will get 6 separate activation maps as output. 274 | 275 | \textbf{Spatial arrangement} Besides depth, there are two hyperparameters to control the size of the output volume: the stride and zero-padding 276 | \begin{itemize} 277 | \item \textbf{stride} Stride specifies how we slide the filter. When the stride is 1 then we move the filters one pixel at a time. When the stride is 2 (or uncommonly 3 or more, though this is rare in practice) then the filters jump 2 pixels at a time as we slide them around. 278 | \item \textbf{zero-padding} In some cases, the size of filters and stride don’t “fit” neatly and symmetrically across the input. For example, if the input size $H=W=10$ while the filter size is $F=3$ and it takes stride $S=3$, it would be impossible to use stride $S=2$, since 279 | \begin{equation} 280 | \begin{aligned} 281 | (H-F)/S+1&=(10-3)/3+1=3.33~\text{(Not an integer)}\\ 282 | (W-F)/S+1&=(10-3)/3+1=3.33~\text{(Not an integer)}\\ 283 | \end{aligned} 284 | \end{equation} 285 | Therefore, we need to use zero-padding. We add additional zero-paddings in the contour of the image. If we take zero-padding $P=1$, we would have 286 | \begin{equation} 287 | \begin{aligned} 288 | (H-F+2*P)/S+1&=(10-3+2*1)/3+1=4~\text{(An integer)}\\ 289 | (W-F+2*P)/S+1&=(10-3+2*1)/3+1=4~\text{(An integer)}\\ 290 | \end{aligned} 291 | \end{equation} 292 | \end{itemize} 293 | 294 | In general, setting zero padding to be $P=(F−1)/2$ when the stride is $S=1$ ensures that the input volume and output volume will have the same size spatially. It is very common to use zero-padding in this way. 295 | 296 | \begin{figure}[!htb] 297 | \centering 298 | \includegraphics[height = 3in]{pics/cnn.png} 299 | \caption{Convolution Demo\cite{cs231n-website}} 300 | \label{fig:conv_demo} 301 | \end{figure} 302 | 303 | \begin{figure}[!htb] 304 | \centering 305 | \includegraphics[height = 2in]{pics/cnn2.png} 306 | \caption{Number of filter and depth of output\cite{cs231n-website}} 307 | \label{fig:conv_demo2} 308 | \end{figure} 309 | \subsection{Pooling Layer} 310 | In practice, it is common to periodically insert a Pooling Layer in-between successive Conv layers in a ConvNet architecture. It is mainly used to progressively reduce the spatial size of the representation to reduce the amount of parameters and computation load, and hence to also control overfitting. The Pooling Layer operates independently on every depth slice of the input and resizes it spatially, using the MAX operation if max pooling, AVG if average pooling, etc. The most common form is a pooling layer with filters of size $2\times2$ applied with a stride of 2 downsamples every depth slice in the input by 2 along both width and height, discarding 75\% of the activations. In this case, every pooling operation would be taking a max or average over 4 numbers (little $2\times2$ region in some depth slice). The depth dimension remains unchanged. In a nutshell, \textit{pooling layer \textbf{downsamples} the volume spatially, independently in \textbf{each} depth slice of the input volume.} 311 | 312 | \begin{figure}[!htb] 313 | \begin{subfigure}[!htb]{0.45\linewidth} 314 | \includegraphics[scale=0.33]{pics/pool} 315 | \caption{general pooling} 316 | \label{fig:genpool} 317 | \end{subfigure} 318 | \hfill 319 | \begin{subfigure}[!htb]{0.54\linewidth} 320 | \includegraphics[scale=0.33]{pics/maxpool} 321 | \caption{max pooling} 322 | \label{fig:maxpool} 323 | \end{subfigure} 324 | \caption{Pooling Layer\cite{cs231n-website}} 325 | \end{figure} 326 | 327 | The Fig.\ref{fig:genpool} shows how pooling works generally. A $2\times2$ pooling filter with stride 2 is applied on the $224\times224\times64$ input volume, yielding the $112\times112\times64$ output volume. Note that the width and height of the input volume shrinks to half while the depth is preserved. The most common downsampling operation is MAX. The Fig.\ref{fig:maxpool} here shows max pooling with a stride of 2. That is, each max is taken over 4 numbers in a $2\times2$ square. For instance, the top-left red square squashes to a single value, \texttt{\textbf{6}}, which is \texttt{\textbf{max\{1, 1, 5, 6\}}}. 328 | 329 | \subsection{Fully-Connected Layer} 330 | The last few layers of a ConvNet architecture are typically Fully-Connected (FC) Layers. As seen in regular neural networks, FC Layers serve as a linear classifier for classification or regression. Their activations can be computed with a matrix multiplication followed by a bias offset, \textit{i.e.} $f = Wx + b$. See the Neural Network Basics section of the note for more information. 331 | 332 | \subsection{Mainstream Model Architectures} 333 | Empowered with impressive ability of feature extraction and optimization, deep convolutional neural networks has become the cornerstone of data-driven visual recognition techniques nowadays. Since AlexNet's overwhelming success in ILSVRC 2012, a number of milestone model architectures have been proposed. The most common are: 334 | \begin{itemize} 335 | \item \textbf{AlexNet}\cite{alexnet}: Developed by Alex Krizhevsky, Ilya Sutskever and Geoff Hinton. The AlexNet significantly outperformed the second runner-up (top 5 error of 16\% compared to runner-up with 26\% error) ILSVRC challenge in 2012. It is the first work that popularized Convolutional Neural Networks in Computer Vision. 336 | \item \textbf{VGGNet}\cite{vggnet}: Proposed by Karen Simonyan and Andrew Zisserman. The VGGNet was the runner-up in ILSVRC 2014. Its main contribution was in showing that the depth of the network is a critical component for good performance. Researchers and engineers tend to design deeper rather than shallower models ever since. 337 | \item \textbf{GoogLeNet}\cite{googlenet}: As its name shows, it is authored by Szegedy \textit{et al.} from Google. GoogLeNet was the ILSVRC 2014 winner with main contribution in developing Inception Module that dramatically reduced the number of parameters in the network. 338 | \item \textbf{ResNet}\cite{resnet}: Developed by Kaiming He \textit{et al.} ResNet was the winner of ILSVRC 2015. It features special skip connections and a heavy use of batch normalization, which is now known as Residual Module. ResNets are currently by far state of the art Convolutional Neural Network models and are the default choice for using ConvNets in practice (as of January 2018). 339 | \end{itemize} 340 | 341 | There also exist more model architectures proposed for specific tasks, such as YOLO\cite{yolo} and Faster R-CNN\cite{faster_rcnn} in the field of object detection and localization. 342 | 343 | % References 344 | \bibliographystyle{unsrt} 345 | \bibliography{references} 346 | 347 | \subsubsection*{Contributors} 348 | Chi Zhang, Honghao Wei, Matthew Tan, Taylor Howell, Brian Jackson, Saifan Rafiq 349 | 350 | \end{document} 351 | -------------------------------------------------------------------------------- /lecture_9/pics/Leaky.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/Leaky.png -------------------------------------------------------------------------------- /lecture_9/pics/Logistic_regression.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/Logistic_regression.png -------------------------------------------------------------------------------- /lecture_9/pics/cnn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/cnn.png -------------------------------------------------------------------------------- /lecture_9/pics/cnn2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/cnn2.png -------------------------------------------------------------------------------- /lecture_9/pics/deep_learning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/deep_learning.png -------------------------------------------------------------------------------- /lecture_9/pics/deep_neural_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/deep_neural_net.png -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_HOG.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_HOG.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_classification.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_classification.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_dot_prod_-1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_dot_prod_-1.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_dot_prod_0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_dot_prod_0.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_dot_prod_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_dot_prod_1.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_eigenfaces.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_eigenfaces.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_feature_extraction.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_feature_extraction.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_generalized_models.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_generalized_models.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_grad_desc_options.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_grad_desc_options.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_k_nearest.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_k_nearest.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_knn_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_knn_1.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_knn_10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_knn_10.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_knn_100.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_knn_100.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_linear_classifier.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_linear_classifier.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_linear_classifier_example.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_linear_classifier_example.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_linear_classifier_interpretation.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_linear_classifier_interpretation.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_linear_regression.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_linear_regression.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_num_opt1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_num_opt1.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_num_opt2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_num_opt2.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_parameters.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_parameters.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_regression.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_regression.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_regularization_loss.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_regularization_loss.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_spline_fitting.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_spline_fitting.jpg -------------------------------------------------------------------------------- /lecture_9/pics/lecture_8_stochastic_grad_desc.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/lecture_8_stochastic_grad_desc.jpg -------------------------------------------------------------------------------- /lecture_9/pics/maxpool.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/maxpool.jpeg -------------------------------------------------------------------------------- /lecture_9/pics/neuron.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/neuron.png -------------------------------------------------------------------------------- /lecture_9/pics/neuron_model.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/neuron_model.jpeg -------------------------------------------------------------------------------- /lecture_9/pics/overfitting.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/overfitting.png -------------------------------------------------------------------------------- /lecture_9/pics/pool.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/pool.jpeg -------------------------------------------------------------------------------- /lecture_9/pics/relu.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/relu.jpeg -------------------------------------------------------------------------------- /lecture_9/pics/sigmoid.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/sigmoid.jpeg -------------------------------------------------------------------------------- /lecture_9/pics/tanh.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/tanh.jpeg -------------------------------------------------------------------------------- /lecture_9/pics/threshold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/threshold.png -------------------------------------------------------------------------------- /lecture_9/pics/training_net.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/StanfordASL/AA274_lecture_notes/8aff06ba7b5e648616178aff4c19ab4ecbcff9a3/lecture_9/pics/training_net.png -------------------------------------------------------------------------------- /lecture_9/references.bib: -------------------------------------------------------------------------------- 1 | @article{resnet, 2 | author = {Kaiming He and 3 | Xiangyu Zhang and 4 | Shaoqing Ren and 5 | Jian Sun}, 6 | title = {Deep Residual Learning for Image Recognition}, 7 | journal = {CoRR}, 8 | volume = {abs/1512.03385}, 9 | year = {2015}, 10 | url = {http://arxiv.org/abs/1512.03385}, 11 | archivePrefix = {arXiv}, 12 | eprint = {1512.03385}, 13 | timestamp = {Wed, 07 Jun 2017 14:41:17 +0200}, 14 | biburl = {http://dblp.org/rec/bib/journals/corr/HeZRS15}, 15 | bibsource = {dblp computer science bibliography, http://dblp.org} 16 | } 17 | 18 | @inproceedings{googlenet, 19 | title = {Going Deeper with Convolutions}, 20 | author = {Christian Szegedy and Wei Liu and Yangqing Jia and Pierre Sermanet and Scott Reed and Dragomir Anguelov and Dumitru Erhan and Vincent Vanhoucke and Andrew Rabinovich}, 21 | year = {2015}, 22 | URL = {http://arxiv.org/abs/1409.4842}, 23 | booktitle = {Computer Vision and Pattern Recognition (CVPR)} 24 | } 25 | 26 | 27 | @incollection{alexnet, 28 | Author = {Alex Krizhevsky and Sutskever, Ilya and Hinton, Geoffrey E}, 29 | Booktitle = {Advances in Neural Information Processing Systems 25}, 30 | Editor = {F. Pereira and C. J. C. Burges and L. Bottou and K. Q. Weinberger}, 31 | Pages = {1097--1105}, 32 | Publisher = {Curran Associates, Inc.}, 33 | Title = {ImageNet Classification with Deep Convolutional Neural Networks}, 34 | Url = {http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf}, 35 | Year = {2012}, 36 | Bdsk-Url-1 = {http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf}} 37 | 38 | @article{vggnet, 39 | author = {Karen Simonyan and 40 | Andrew Zisserman}, 41 | title = {Very Deep Convolutional Networks for Large-Scale Image Recognition}, 42 | journal = {CoRR}, 43 | volume = {abs/1409.1556}, 44 | year = {2014}, 45 | url = {http://arxiv.org/abs/1409.1556}, 46 | archivePrefix = {arXiv}, 47 | eprint = {1409.1556}, 48 | timestamp = {Wed, 07 Jun 2017 14:41:51 +0200}, 49 | biburl = {http://dblp.org/rec/bib/journals/corr/SimonyanZ14a}, 50 | bibsource = {dblp computer science bibliography, http://dblp.org} 51 | } 52 | 53 | @article{yolo, 54 | author = {Joseph Redmon and 55 | Santosh Kumar Divvala and 56 | Ross B. Girshick and 57 | Ali Farhadi}, 58 | title = {You Only Look Once: Unified, Real-Time Object Detection}, 59 | journal = {CoRR}, 60 | volume = {abs/1506.02640}, 61 | year = {2015}, 62 | url = {http://arxiv.org/abs/1506.02640}, 63 | archivePrefix = {arXiv}, 64 | eprint = {1506.02640}, 65 | timestamp = {Wed, 07 Jun 2017 14:40:10 +0200}, 66 | biburl = {http://dblp.org/rec/bib/journals/corr/RedmonDGF15}, 67 | bibsource = {dblp computer science bibliography, http://dblp.org} 68 | } 69 | 70 | @incollection{faster_rcnn, 71 | title = {Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks}, 72 | author = {Ren, Shaoqing and He, Kaiming and Girshick, Ross and Sun, Jian}, 73 | booktitle = {Advances in Neural Information Processing Systems 28}, 74 | editor = {C. Cortes and N. D. Lawrence and D. D. Lee and M. Sugiyama and R. Garnett}, 75 | pages = {91--99}, 76 | year = {2015}, 77 | publisher = {Curran Associates, Inc.}, 78 | url = {http://papers.nips.cc/paper/5638-faster-r-cnn-towards-real-time-object-detection-with-region-proposal-networks.pdf} 79 | } 80 | 81 | @MISC{cs231n-website, 82 | author = {Andrej Karpathy}, 83 | title = {Stanford University CS231n Course Notes}, 84 | month = May, 85 | year = {2016}, 86 | url = {http://cs231n.github.io/}, 87 | note = {Accessed: 2018-02-07} 88 | } 89 | 90 | @BOOK{haykin, 91 | title = {Neural Networks and Learning Machines}, 92 | author = {Simon S. Haykin}, 93 | year = {2009}, 94 | ublisher = {Prentice Hall} 95 | } 96 | 97 | @misc{ wiki-machinelearning, 98 | author ={}, 99 | title = "Machine Learning --- {W}ikipedia{,} The Free Encyclopedia", 100 | year = "2018", 101 | url = "https://en.wikipedia.org/wiki/Machine_learning", 102 | note = "[Online; accessed 12-February-2018]" 103 | } 104 | 105 | 106 | -------------------------------------------------------------------------------- /scribe_notes_template/template.tex: -------------------------------------------------------------------------------- 1 | \documentclass[twoside]{article} 2 | 3 | \usepackage[math]{kurier} 4 | \usepackage[sc]{mathpazo} 5 | \renewcommand{\sfdefault}{kurier} 6 | 7 | 8 | \usepackage{graphics} 9 | \setlength{\oddsidemargin}{0.25 in} 10 | \setlength{\evensidemargin}{-0.25 in} 11 | \setlength{\topmargin}{-0.6 in} 12 | \setlength{\textwidth}{6.5 in} 13 | \setlength{\textheight}{8.5 in} 14 | \setlength{\headsep}{0.75 in} 15 | \setlength{\parindent}{0 in} 16 | \setlength{\parskip}{0.1 in} 17 | 18 | 19 | \newcounter{lecnum} 20 | \renewcommand{\thepage}{\thelecnum-\arabic{page}} 21 | \renewcommand{\thesection}{\thelecnum.\arabic{section}} 22 | \renewcommand{\theequation}{\thelecnum.\arabic{equation}} 23 | \renewcommand{\thefigure}{\thelecnum.\arabic{figure}} 24 | \renewcommand{\thetable}{\thelecnum.\arabic{table}} 25 | 26 | 27 | \newcommand{\lecture}[4]{ 28 | \pagestyle{myheadings} 29 | \thispagestyle{plain} 30 | \newpage 31 | \setcounter{lecnum}{#1} 32 | \setcounter{page}{1} 33 | \noindent 34 | \begin{center} 35 | \framebox{ 36 | \vbox{\vspace{2mm} 37 | \hbox to 6.28in { {\bf \sffamily AA 274: Principles of Robotic Autonomy 38 | \hfill Winter 2018} } 39 | \vspace{4mm} 40 | \hbox to 6.28in { {\sffamily{\Large \hfill Lecture #1: #2 \hfill}} } 41 | \vspace{2mm} 42 | \hbox to 6.28in { {\it \hfill Scribes: #4} } 43 | \vspace{2mm}} 44 | } 45 | \end{center} 46 | \markboth{Lecture #1: #2}{Lecture #1: #2} 47 | 48 | \vspace*{4mm} 49 | } 50 | 51 | 52 | 53 | %%%%%%%%%%%%%%%%%%%%%%%%%% 54 | %document 55 | \begin{document} 56 | %modify this 57 | \lecture{1}{Open-Loop Motion Control}{}{scribe names} 58 | 59 | \section{Introduction} 60 | 61 | This lecture is on.. 62 | 63 | 64 | 65 | \end{document} --------------------------------------------------------------------------------