**E28: Mobile Robotics** **ENGR 028/CPSC 082** **Fall 2018** **[Matt Zucker](http://swarthmore.edu/NatSci/mzucker1)** | Lecture: | Tue/Thu 2:40-3:55PM, Hicks 211 | |---------------|-------------------------------------------| | Office Hours: | Wed 10:30AM-12:00PM, Hicks 202 | | Lab hours: | Tue 4:00-5:00PM, Thu 1:00-2:00, Hicks 301 | This course addresses the problems of guiding robots to act intelligently in dynamic, unpredictable environments. Major topics will include robot design, perception, kinematics, navigation and control, optimization and learning, and robot simulation techniques. To demonstrate these concepts, we will examine mobile robots, manipulators and positioning devices, and virtual agents. Projects will focus on programming both real and simulated robots to execute tasks and to explore and interact with their environment. # Requirements **Prerequisites:** ENGR 019 or CPSC 035. MATH 027 or 028(S) is strongly recommended. **Skills:** In practice, I expect you to understand elementary programming concepts, including basic loops, functions, and array processing. You should also be familiar with the process of converting a set of mathematical equations into a working computer program. Familiarity with Python is useful but not necessary. I also expect you to be comfortable with [linear algebra concepts](http://www.swarthmore.edu/NatSci/mzucker1/linalg-reintroduction.pdf) such as matrices, linear transformations, transposes, and inverses. We will also be using related geometric concepts such as the dot product and vector norms. **Time:** I expect students to spend approximately 8 hours per week on this class (4 classes × 8 hours per class + [8 hours for paid student work](https://www.swarthmore.edu/student-employment/employment-faqs) = 40 hours). Although this figure will vary from individual to individual and week to week, you should plan to commit several hours outside of class to homework, reading, and projects each week. # Resources There is no textbook for the course; however, there will be assigned readings, and notes and pointers to external resources will be provided by student scribes and researchers ([see below](#toc4)). This course webpage at http://swarthmore.edu/NatSci/mzucker1/e28_f2018/ will be regularly updated with assignments, scribe notes, and reading, so please keep aware of the materials posted here. We will use the Piazza group at https://piazza.com/swarthmore/fall2018/engr028cpsc082 throughout the semester to communicate course announcements and answer questions. Please use Piazza for all course-related communications -- this allows students to see common problems and to engage in discussions about course material. # Assignments Homework consisting of math, short answer questions, and small programming exercises will be assigned roughly weekly. Less frequently, we will have in-class quizzes, which will be announced in advance. There will be four regularly scheduled projects involving hands-on programming of real and simulated robots, as well as an open-ended, self-directed final project. Projects will be conducted in small groups, typically pairs of students. Due to frequent scheduling conflicts with other courses, there is no regular lab time; however, during the first week, we will form groups and arrange times to meet for short (15-30 minute) "kickoff" tutorials at the start of each new project. Other than those tutorials, project work will be self-scheduled. Grading will follow approximately the divisions shown below: * Homework/quizzes: 45% * Regular projects: 35% * Final project: 15% * Class participation: 5% Your participation grade encompasses involvement in class discussions, preparing thorough and readable scribe notes/researcher links, and posting constructively on Piazza. ## Collaboration and attribution * Feel free to collaborate with your classmates on homework; however, you must submit your own work. Duplicating others’ assignments verbatim (especially code!) is prohibited. * If you do discuss homework with your classmates, I expect you to disclose any such collaboration clearly in your submitted work. Err on the side of caution – it’s the best way to avoid awkward conversations about suspicious similarities between assignments. * Cite any external sources used, including the textbook, internet, discussions with other professors, etc. * Aside from raising technical and procedural questions on the course Piazza, do not collaborate on projects with others outside your group. * Do not post homework or project solutions on Piazza. Questions or answers that discuss solutions too closely will be deleted. Aside from the course-specific policies above, you are expected to understand and abide by the college's [policy on academic misconduct](https://www.swarthmore.edu/student-handbook/academic-policies#academic_misconduct). ## Late policy Homework will generally be assigned on Thursday, and due at the start of class the following Thursday. Homework assignments may be turned in up to a week late for half credit. Students get one free late homework turn-in without penalty. Late projects or absences from quizzes which have not been excused in advance may be strongly penalized. I will try to accommodate you in extraordinary circumstances, *especially if you contact me ahead of time*. # Scribes/researchers Student scribe notes should capture all of the material from the lecture, ideally including questions and answers. We will aim to have two independent sets of notes per week. These may be either typeset or *neatly* handwritten and scanned (*not photographed*). Alternatively, two scribes may collaborate to produce a single set of notes for the class, which is expected to be both typeset and more comprehensive than an individual's notes. A third student each week will serve as a researcher whose job it is to find outside links to material related to the week's lecture topics. This material could be slides from a course at a different institution, YouTube videos, or another type of online learning resource. Please avoid Wikipedia. Researchers will produce approx. 5 links each week, along with 1 or 2 complete sentences for each item explaining why it was selected. Scribes should email me PDFs or high-resolution scan images to post on the course webpage by 9AM every Monday; researchers can include links and descriptions in an email to me (no attachment needed). You can find links to sign up for scribe and researcher slots on our [Piazza page](https://piazza.com/swarthmore/fall2018/engr028cpsc082). # Accommodations If you believe you need accommodations for a disability or a chronic medical condition, please email Student Disability Services at studentdisabilityservices@swarthmore.edu to arrange an appointment to discuss your needs. As appropriate, the office will issue students with documented disabilities or medical conditions a formal Accommodations Letter. Since accommodations require early planning and are not retroactive, please contact Student Disability Services as soon as possible. For details about the accommodations process, [visit the Student Disability Services website](http://www.swarthmore.edu/academic-advising-support/welcome-to-student-disability-service). You are also welcome to contact me privately to discuss your academic needs. However, all disability-related accommodations must be arranged, in advance, through Student Disability Services. # Schedule September 4, 2018: Introduction; Math review Topics: * Syllabus, labs, Piazza * Math review * Orthogonal & rigid transformations Resources/assignments: * [A practical (re-)introduction to linear algeba](http://www.swarthmore.edu/NatSci/mzucker1/linalg-reintroduction.pdf) * [Robotics key points timeline](../robotics-history.html) * [Homework 1](homework1.pdf) * Notes: * [Hoang](notes/notes_week1_hoang.pdf) * [Ridder](notes/notes_week1_ridder.pdf) * Researcher links (Studier): * [This Khan Academy video](https://www.khanacademy.org/math/linear-algebra/alternate-bases/orthonormal-basis/v/lin-alg-orthogonal-matrices-preserve-angles-and-lengths) explains conceptually what an orthonormal transformation does, and how it preserves length and angle. Other videos in this chain may be helpful as well. * [Wolfram Mathworld](http://mathworld.wolfram.com/BlockMatrix.html) gives a simple example of block matrix multiplication. * [Mathbitsnotebook.com](https://mathbitsnotebook.com/Geometry/Transformations/TRRigidTransformations.html) gives an overview of Rigid Transformations (although don’t pay attention to reflections for our class!) September 11, 2018: Robot motion basics; Control strategies Topics: * Relating coordinate frames * Differential drive * Integrating equations of motion * State machines Resources/assignments: * [Project 1](project1.pdf) * [Homework 2](homework2.pdf) * Notes: * [Emmons](notes/notes_week2_emmons.pdf) * [Xie](notes/notes_week2_xie.pdf) * Researcher links (Candey): * **Coordinate Frames** -- [Robotics blog of Paul Furgale](http://paulfurgale.info/news/2014/6/9/representing-robot-pose-the-good-the-bad-and-the-ugly). A discussion of standardized coordinate frame explanation in robotics for a library called Kindr, includes a conversion of Kindr to ROS calls. Probably not needed for lab, but the article has good advice on how to do write ups involving different frames. * **Differential Drive** -- [RobotPlatform](http://www.robotplatform.com/knowledge/Classification_of_Robots/wheel_control_theory.html). Differential drive is one of many drive designs for robots, which are described on RobotPlatform. There are pros and cons for differential drives compared to the other designs, not that we have a choice in our drive design. * **Journal article** -- [Int'l. J. Science, Engineering and Technology Research](http://ijsetr.org/wp-content/uploads/2016/09/IJSETR-VOL-5-ISSUE-9-2849-2855.pdf). This is an extensive engineering analysis of our specific two wheeled case focused on finding position error from the International Journal of Science, Engineering and Technology Research. The kinematics equations we saw in class appear, along with familiar and unfamiliar matrices. * **Integrating Equations of Motion** -- [Professor Cheever’s Linear Physical Systems](http://lpsa.swarthmore.edu/NumInt/NumIntIntro.html). Euler’s method and Runge-Kutta approximate the solutions of differential equations in the style of the in-class pseudo code. There is extensive MATLAB pseudo code at the bottom of each page for Euler’s and first, second and fourth order Runge-Kutta solutions. This is specifically for differential equations found in engineering, but the general explanation is very good. * **State Machines** -- [Professor Kafura from Virginia Tech](http://people.cs.vt.edu/~kafura/ComputationalThinking/Class-Notes/FSM.pdf). Explanation of candy dispenser state machine by Professor Dennis Kafura at Virginia Tech, including a nice diagram of the machine from inserting coins to dispensing candy. There are also definitions of state and behavior with regards to this example. September 18, 2018: Sensors & actuators Topics: * Passive vs. active sensors * Cameras, Kinect, and other 3D sensors * Types of actuators * Brushed DC motor analysis Resources/Assignments: * [Mobile Robotics: Motors (Jones et al.)](mobilerobotics-ch7.pdf) * [Homework 3](homework3.pdf) * Notes: * [Padilla](notes/notes_week3_padilla.pdf) * [Nguyen](notes/notes_week3_nguyen.pdf) * Researcher links (Yang): * **[Flow rate of a Stream](https://www.youtube.com/watch?v=4uS9oOTa4PI)**: This is a video about how real researchers estimate the flow rate of a stream. It is quite similar to how we did it. * **[Colored Blob Detection](https://www.learnopencv.com/blob-detection-using-opencv-python-c/)**: This tutorial talks about how to implement colored blob detection function in Open CV, including different parameters you can tweak to find the size, shape, and other characteristics of the blob you want. * **[PID Controller](https://www.youtube.com/watch?v=UR0hOmjaHp0)**: The control we used in class for line following is called a proportional controller. This short lecture gave good explanations and examples of the proportional controller, as well as two other common controllers—integral controller and derivative controller. They are together called PID controllers. * **[Sensors](http://www.robotplatform.com/knowledge/sensors/types_of_robot_sensors.html)**: This website gives a list of sensors commonly used in robotics. And this [shopping website](http://www.robotplatform.com/knowledge/sensors/types_of_robot_sensors.html) gives us an idea of their market prices. * **[Analog to Digital Converter](http://hyperphysics.phy-astr.gsu.edu/hbase/Electronic/adc.html#c2)**: This short article illustrates a few other kinds of ADC that is different from the Flash ADC we talked about in class. * **[DC motors](https://www.youtube.com/watch?v=Gzca2CbZ6EM)**: This video shows the working of a brushed DC motor. A more popular design of DC motors (in electric vehicles and drones) are called brushless DC motors(BLDC). How they work is illustrated in [this video](https://www.youtube.com/watch?v=bCEiOnuODac). September 20, 2018: In-class quiz: ROS Tutorials September 25, 2018: Kinematics & dynamics Topics: * Configuration space * Kinematics of wheeled systems * Integrating equations of motion October 2, 2018: Control Topics: * Feedback controllers * PD and PID control October 9, 2018: Navigation Topics: * Map representations * Navigation via graph search * Dijkstra's algorithm & A* (October 16, 2018): Fall break October 23, 2018: Introduction to probabilistic robotics Topics: * Probability basics & Bayes' rule * Localization, mapping, and SLAM * Bayes filter October 30, 2018: Probability cont'd; Particle filter Topics: * Continuous random variables * Sampling from distributions * Introduction to particule filter November 6, 2018: Real-world localization examples Topics: * Range sensor models November 13, 2018: Kalman filter & EKF Topics: * Expected value * Variance & covariance * KF and EKF November 20, 2018: Autonomous driving Topics: * Final project ideas (November 22, 2018): Thanksgiving November 27, 2018: TBA December 4, 2018: TBA December 11, 2018: Wrapping up (December 11, 2018): Last day of classes