Learning Roomba: Teacher s Guide Module 5 Localization. Drew Housten

Similar documents
Perceptrons and Backpropagation. Fabio Zachert Cognitive Modelling WiSe 2014/15

AP Computer Science A Summer Assignment

CAMERA CALIBRATION FOR VISUAL ODOMETRY SYSTEM

State-Space Search. Computer Science E-22 Harvard Extension School David G. Sullivan, Ph.D. Solving Problems by Searching

Walking the Grid: Robotics in CS 2

A MAPPING SIMULATOR. Keywords: mapping simulator, path finding, irobot Roomba, OpenGL

A System for Bidirectional Robotic Pathfinding

Chapter 4 The Companion Website A Unique Online Study Resource 4.1 Locating Companion Web sites

Interactive graphic organisers may be created using TuxPaint.

Aeries.net Student Information System Master Schedule User Manual April 18, 2010

Geometry and Spatial Reasoning

Low-Cost Localization for Educational Robotic Platforms via an External Fixed-Position Camera

To complete this database, you will need the following file:

Array Basics: Outline. Creating and Accessing Arrays. Creating and Accessing Arrays. Arrays (Savitch, Chapter 7)

CHAPTER 1 Introduction to Computers and Java

Business Process Document Student Records: Posting Transfer Credit in Batch

Geography. Getting Started Guide

You will need to collect samples of external documentation that is not software related--directions to build; manual for TV, etc.

Homework #2 Posted: February 8 Due: February 15

A square centimeter is 1 centimeter by 1 centimeter. It has an area of 1 square centimeter. Sketch a square centimeter such as the one here.

1001ICT Introduction To Programming Lecture Notes

An Image Based Approach to Compute Object Distance

Contributing Lists in Activity Center

Search and Games. Adi Botea. ANU Summer Schools in Logic and Learning February, 2009

Moodle 2.2 Student User Guide My Private Files

Non-Homogeneous Swarms vs. MDP s A Comparison of Path Finding Under Uncertainty

Kaijen Hsiao. Part A: Topics of Fascination

Public-Service Announcement

Integrating Educational Technology into Teaching (4 th Edition) Microsoft PowerPoint Tutorial for Chapter 9 TIE-into Practice Exercises

Claremont McKenna College Computer Science

MODERN OPERATING SYSTEMS TANENBAUM PDF

Discrete Dynamical Systems: A Pathway for Students to Become Enchanted with Mathematics

Step-by-Step Guide Updated Feb 1, 2017

Course Folder and Files Instructions for download and use

Introduction to National Instruments LabVIEW and Data Acquisition (DAQ)

A.P. Computer Science A Summer Packet

Table of Contents. Introduction to the Math Practice Series...iv Common Mathematics Symbols and Terms...1

AP Computer Science A Sample Syllabus 4

COURSE TITLE. Computer Programming C++ LENGTH. One Semester Grades DEPARTMENT. Computer Department Barbara O Donnell, Supervisor SCHOOL

Remote Access Synchronization DL Parent

Ohio Media Spectrum Fall 2015, Vol. 67, No. 1

Basic guide to Canon EOS C

PowerPoint Presentation to Accompany GO! All In One Chapter 2 Use Windows 7 to Manage Files and Programs and to Browse the Internet

Getting Started in CAMS Enterprise

Extracurricular Activities April 15, 2011

Chapter 1: Introduction to Computers and Java

8/23/2014. Chapter Topics. Introduction. Java History. Why Program? Java Applications and Applets. Chapter 1: Introduction to Computers and Java

Microsoft End to End Business Intelligence Boot Camp

6.088/6.084 Robotics Project Subject Information and Syllabus

Getting help with Edline 2. Edline basics 3. Displaying a class picture and description 6. Using the News box 7. Using the Calendar box 9

Mathematics Success Grade 6

User Guide. : Preparation

Prerequisites: Completed Algebra 1 and Geometry and passed Algebra 2 with a C or better

Introducing Robotics Vision System to a Manufacturing Robotics Course

Intelligent Traffic System: Road Networks with Time-Weighted Graphs

COMPUTER VISION FOR VISUAL EFFECTS

MS-55045: Microsoft End to End Business Intelligence Boot Camp

Fitnessgram 9 Getting Started

Prototype Prolog API for Mindstorms NXT

Introduction to Computational Modeling of Social Systems

Area Perimeter Gcse Questions

Glog One! Glog All! Jan McGee, Technology Coordinator West Monroe High School. Modified by Katherine Powell, Teacher Librarian Poway High School

Parallel or Perpendicular? How Can You Tell? Teacher Notes Page 1 of 6

Searching: Where it all begins...

Transitioning Teacher Websites

Vol. 21 No. 6, pp ,

PRE-ALGEBRA PREP. Textbook: The University of Chicago School Mathematics Project. Transition Mathematics, Second Edition, Prentice-Hall, Inc., 2002.

Revision of Level I. In this lesson you will: Revise the topics learnt in the previous level.

Printing Report Cards

OCCUPANCY GRID MODELING FOR MOBILE ROBOT USING ULTRASONIC RANGE FINDER

Pictures at an Exhibition

3 Problems You Need to Tackle when Developing Robot Software

MISD Elementary/Middle School Standards Based Report Cards Program

The Maze Runner. Alexander Kirillov

ShelbyNext Membership: Transition Prep & Implementation

Microsoft PowerPoint Presentations

TEAL Educator Account Access

RoboCup Rescue Summer School Navigation Tutorial

Web:

Staff Directory & Online Classroom: A Picture Book

Mathematical Reasoning. Lesson 47: Prisms and Cylinders. LESSON 47: Prisms and Cylinders. D. Legault, Minnesota Literacy Council,

The Transparent Classroom - 1

UNIVERSITY OF NORTH CAROLINA AT CHARLOTTE

Unit 1, Lesson 7: From Parallelograms to Triangles

Transformations Reflections, and Rotations

HHH Instructional Computing Fall

Formations in flow fields

Reflection AB5 Concave Mirror. Teacher s Notes

AP Computer Science A Summer Assignment

AV Guide for 2308 McGavran-Greenberg

East Penn School District Secondary Curriculum

Glogster

connected New User Guide

Create a Seating Chart Layout in PowerTeacher

TEAL Educator Account Access

You Can Make a Difference! Due April 11/12 (Implementation plans due in class on 4/9)

2002 Intelligent Ground Vehicle Competition Design Report. Grizzly Oakland University

THANK YOU FOR YOUR PURCHASE!

Online with Janison Toolbox

Digital Pack Tutorial - For Mac

Transcription:

Learning Roomba: Teacher s Guide Module 5 Localization Drew Housten (dhousten@gmail.com) 1

1 Introduction Determining where a robot is in its environment is not an easy task. The problem of localization is one that researchers have been considering for many years. There are many approaches that work reasonably well but have some drawbacks. Rather than trying to have the students solve this problem, the Module will introduce the topic, several of the approaches, and how the approaches can be used to support the robot programs. A relatively simple and inexpensive approach using a fixed-position camera is provided as a way for the students to write programs that need to know where the Roomba is located. The Module describes how to set up the camera and localization service and how to write programs using that positional information. 2 Educational Merit This Module is used as a sneak-peek of one of the problems robotics researchers are currently trying to solve. To that end, this Module is more valuable as a way to get students excited or aware of some of the real tasks that a career in robotics, engineering, or computer science would involve. It also introduces the ability to use available services to make programs more capable. There are plenty of resources available on this topic for the especially excited or interested students. The principles of the fixed-camera localization section is intended for an older audience. It includes discussions of graphs, algorithms, and image tracking. This would be a good opportunity to tie in geometry and trigonometry principles and the reason that they are useful in real-world situations. For middle-school students, this section can simply be skipped. 3 Topics Covered The following topics are covered by this Module: What is localization? Why is localization important? Why is localization hard? Some approaches Using the Fixed-Camera Localization Exercises 2

4 Running the Camera Localization Service This Module uses the Camera Localization Service, which is provided as part of the Roomba Network toolkit. On the services starter GUI (where you start a Roomba service - See Figure 1), there are two services that now need to be started: the Color Finder Service and the Camera Localization Service. Figure 1: Services Starter GUI 4.1 Color Finder Service The Color Finder Service finds an object in an image after the service is calibrated. To start the service, click the Start button next to the Color Finder label. The configuration window will appear (See Figure 2). Give the service a name, select a camera to use, and click the Start button. Figure 2: Color Finder Service Configuration GUI The Color Finder calibration GUI will appear (See Figure 3). The service needs to know what to track. To tell it this information, click on the Add Track button and then click on the object in the image. A track information window will appear (See Figure 4) where you can enter the name of the track. Once you click the Ok button, the track snippet will appear on the right side of the 3

window and a small square will show on the image where the object currently is (See Figure 5). Figure 3: Color Finder Service Calibration GUI Figure 4: Color Finder Track Configuration GUI Figure 5: Color Finder Service Calibration GUI after a track has been added 4.2 Camera Localization Service The Camera Localization Service localizes the Roomba given the Roomba s odometry readings and the tracked position of the Roomba in the camera images. To start the service, click the Start button next to the Camera Localization label. The configuration window will appear (See Figure 6). Enter the 4

name of the Roomba used when creating the Roomba Service and the name of the Image Track specified when calibrating the Color Finder GUI. Once those fields have been entered, click the Start button and the Camera Localization will be enabled. Figure 6: Camera Localization Service Configuration GUI 5 Exercise Solutions Exercise 1 Program: This program will have the Roomba drive forward until a virtual wall is detected. Once the wall is detected, the Roomba will stop and the program will print the localized position. import roomba. roombanetwork. s e r v i c e s. u s e r s e r v i c e. ; public c l a s s MyRoombaProgram{ public static void main ( S t r i n g [ ] args ){ U s e r S e r v i c e. s etserveraddress ( l o c a l h o s t ) ; U s e r S e r v i c e. setname ( Your Name ) ; Roomba roomba = new Roomba ( ) ; roomba. forwardspeed (. 3 ) ; roomba. waitforvirtualwall ( ) ; roomba. forwardspeed ( 0 ) ; try{ Thread. s l e e p ( 1 0 0 0 ) ; catch ( Exception e ){ System. out. p r i n t l n ( X P o s i t i o n : + roomba. getlocalizedx ( ) ) ; System. out. p r i n t l n ( Y P o s i t i o n : + roomba. getlocalizedy ( ) ) ; 5

Exercise 2 Program: This program will have the Roomba drive in a 1 meter square 10 times. It will print the odometry position and the localized position continuously every 1 second. import roomba. roombanetwork. s e r v i c e s. u s e r s e r v i c e. ; public c l a s s MyRoombaProgram{ public static void main ( S t r i n g [ ] args ){ U s e r S e r v i c e. s etserveraddress ( l o c a l h o s t ) ; U s e r S e r v i c e. setname ( Your Name ) ; Roomba roomba = new Roomba ( ) ; for ( int i =0; i <40; i ++){ roomba. d r i v e ( 1 ) ; roomba. turn ( 9 0 ) ; while ( true ){ System. out. p r i n t l n ( X Odometry P o s i t i o n : + roomba. getodometryx ( ) ) ; System. out. p r i n t l n ( Y Odometry P o s i t i o n : + roomba. getodometryy ( ) ) ; System. out. p r i n t l n ( X L o c a l i z e d P o s i t i o n : + roomba. getlocalizedx ( ) ) ; System. out. p r i n t l n ( Y L o c a l i z e d P o s i t i o n : + roomba. getlocalizedy ( ) ) ; try{ Thread. s l e e p ( 1 0 0 0 ) ; catch ( Exception e ){ 6 Homework Solutions The homework for this Module is split into two parts. In the first part, the students are asked to describe a way that the robot could get back to the start position given that it knows where it currently is. The student is further asked 6

if additional information would be helpful to solve this problem. In the second part, the student is asked to describe a way to map the location of virtual wall units given that they can detect the wall unit and the robot knows where it is. For the first part, you can get the robot s current position. Then, move forward a small amount and get the current position again. From those two positions, you can determine the robot s current heading. With the heading information, you can calculate how much you need to turn to face the initial position. Then, drive forward until you reach the initial position (assuming that there are no obstacles in the environment). If you had the heading information, the first step forward would not be necessary and you could head to the initial position directly. If there are obstacles, the problem becomes more difficult, because the robot would need to navigate around the obstacles whenever it encounters them. For the second part, build a blank grid representing the environment. Whenever the Roomba detects a virtual wall unit, record the current position and mark that grid coordinate as occupied by a wall unit. Over time, the grid will be a detailed map of all virtual wall unit locations that had been discovered. 7 Related Resources D. Housten and W. Regli. Low-Cost Localization for Educational Robotic Platforms via an External Fixed-Position Camera. AAAI AI Education Colloquium, 2008. A paper written by the same author as these Modules discussing the fixed camera localization method in much more detail. M. Matarić. Robotics Primer. MIT Press, 2007. Chapter 19 of Robotics Primer briefly discusses localization and mapping techniques. S.J. Russell and P. Norvig. Artificial intelligence: a modern approach. Prentice-Hall, Inc. Upper Saddle River, NJ, USA, 1995. Artificial intelligence: a modern approach provides additional background on search techniques used in the fixed camera localization algorithm. R.R. Murphy. Introduction to Ai Robotics. MIT Press, 2000. 7

Introduction to Ai Robotics provides some additional background material on localization approaches. 8