Robot Lab
-
Upload
gillian-castillo -
Category
Documents
-
view
19 -
download
6
description
Transcript of Robot Lab
![Page 1: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/1.jpg)
Slide 1
Robot Lab
William RegliDepartment of Computer Science
(and Departments of ECE and MEM)Drexel University
![Page 2: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/2.jpg)
Slide 2
Robot Lab “Curiosity, earnest research to learn the hidden laws of nature, gladness akin to rapture,
as they were unfolded to me, are among the earliest sensations I can remember.”– Frankenstein, Mary Shelly
• General objectives for this class…– To explore the interaction between software & information and the physical world
by animating, via software, a robotic “creature”…– To use cyber-infrastructure to obtain and share the information needed to execute
the class
You
YourRoomba
![Page 3: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/3.jpg)
Slide 3
Course Goals and Objectives
• Play with Roombas• Introduction to basic problems in robotics
– Experience them 1st hand with Roombas
• Document experiences in GICL Wiki for– Use by future generations of students– Development of outreach materials (I.e. K-12)– Development of demonstration materials
![Page 4: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/4.jpg)
Slide 4
Topics to be covered in lectures
• Intro to Roomba
• Intro to Robotcs– Basics of robotics systems, sensor, etc– Basics of kinematics/dynamics– Robot Motion Planning & Path Planning
• Intro to multi-agent (multi-robot) coordination– Teamwork, distributed constraints, etc
![Page 5: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/5.jpg)
Slide 5
Assignments
• This is a lab-intensive course, you’ll need to budget time to work on the Roombas
• Roomba assignments– Intro Roomba (what 600 freshman did)– Map making– Roomba coordination– Hunt the Wumpus (tentative)
• (possibly) Non-Roomba assignments– Path planning
![Page 6: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/6.jpg)
Slide 6
Class Structure
• Supervisory Professor: WC Regli
• Recitation Lecturers:– Mr. Michael Grauer– Mr. David Wilkie– Mr. Evan Sultanik
• Teaching Assistant and Hardware Tsar– Ms. Megan Thurber
![Page 7: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/7.jpg)
Slide 7
Grading
• If you finish all of the assignments, you get an “A”– If not, the proportion of finished
assignments will be determined by the class instructor team
![Page 8: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/8.jpg)
Slide 8
What is Cyber-Infrastructure?
• Cyber-Infrastructure: – organized aggregate of technologies that enable us to
access and integrate today’s information technology resources to facilitate science and engineering goals.
• data and storage, computation, communication, visualization, modeling, simulation, networking, scientific instruments, expertise and people
• Analogy to other kinds of “infrastructure”, typically created for the general public good– Interstate Highway System, Power Grid, Panama Canal, etc
• Drexel University is the national leader in CI– Only institution w/ 4 active NSF Cyber-Infrastructure Grants
SCI-0537370, SCI-0537125, OCI-0636273, OCI-0636235
![Page 9: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/9.jpg)
Slide 9
Drexel’s CI-TEAM
• Lead Institution: Drexel University– PI William Regli, co-PI Michael Piasecki
• University of Maryland @ College Park– SK Gupta
• University of North Carolina @ Chapel Hill– Ming Lin and Dinesh Manocha
• University of Wisconsin @ Madison– Nicola Ferrier, Vadim Shapiro, Krishnan Suresh
![Page 10: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/10.jpg)
Slide 10
About the Team
• W. Regli– CS, ECE and Mech E– 1997 NSF CAREER
• M. Piasecki– Civil
• SK Gupta– Mech E– PECASE, CAREER,
and ONR YIP
• M. Lin– CS– CAREER
• D. Manocha– CS– PYI, ONR YIP, Sloan
Fellow
• N. Ferrier– Mech E– NSF CAREER
• V. Shapiro– Mech E, Math & CS– NSF CAREER
• K. Suresh– Mech E
![Page 11: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/11.jpg)
Slide 11
Examples of Cyber-Infrastructure
• Networks– Internet, DragonFly
• Data & Knowledge– IMDB to MedLine
• Software Tools– Firefox, MediaWiki,
Skype, Apache, etc.• Communities/People
– SourceForge, Flickr, discussion boards, email lists, …
• Resources & Repositories– SourceForge, GNU, etc
![Page 12: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/12.jpg)
Slide 12
Role of Cyber-Infrastructure(in this class)
• Class Wiki– http://gicl.cs.drexel.edu/wiki/Robot_Lab_%28Spring_2007%29
• Project materials and “How-To” Wiki– http://gicl.cs.drexel.edu/wiki/Category:Roomba_Design_Lab_%28Winter_2007%29
• “Roomba Questions” email list– Subscribe at
http://face.cs.drexel.edu/mailman/listinfo/spring2007-roomba-lab
• Other web resources– Accessible from the Roomba Wiki
![Page 13: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/13.jpg)
Slide 13
Introducing the Roomba
• Introduced in 2002 by iRobot– Company founded by MIT AI legend
Rodney Brooks
• Roombas manufactured after October 2005 contain an electronic and software interface that allows you to control or modify Roomba's behavior and remotely monitor its sensors– The iRobot Roomba Open Interface is
intended for software programmers and roboticists to create their own enhancements to Roomba.
– “Roombatics”: the general science of modifying or programming your Roomba
![Page 14: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/14.jpg)
Slide 14
Highlights from the History of Robotics
Fiction:– Jewish folklore, a golem ( גולם ) is
an animated being created from inanimate matter.
– “Robot”, from the Czech/Slovak word robota, labor or work.
– The word robot first appeared in Karel Čapek's science fiction play R.U.R. (Rossum's Universal Robots) in 1921.
– Fritz Lang’s Metropolis (1926)– Word was brought into use by Isaac
Asimov.– Patron Saint: the HAL 9000
Non-Fiction– Tesla’s remote
controlled boat– SRI’s Shakey– NASA
• Voyager• Pathfinder• Spirit/Opportunity
– Sony Aibo– Honda ASIMO– DARPA Grand Challenge
http://robotics.megagiant.com/history.htmlhttp://en.wikipedia.org/wiki/Robotics
![Page 15: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/15.jpg)
Slide 15
The Future for Robotics
• Existing Applications– Exploration
• Space, undersea
– Haz-Mat Duties• Disaster recovery, inspection
• Nuclear waste management
– Manufacturing• Mining, assembly, welding
– Military• Unmanned Ground, Aerial,
Sea, Undersea Vehicles
• Emerging Applications– Aging Societies
• Over the last century, the age distribution of the U.S. population changed from relatively young to relatively old.
– Medical• Surgical robotics• Tele-medicine• Prosthetics
– Consumer• Electronics, automotive,
entertainment, toys, games
![Page 16: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/16.jpg)
Slide 16
Sprawl robot: SprawlitaMulti-University Research InitiativePI: Mark R. Cutkosky (Stanford University)
JPL Serpentine Robot
Tuna robot: VCUUVDraper Laboratory, Cambridge, MA
![Page 17: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/17.jpg)
Slide 17
Tour of the Roomba
![Page 18: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/18.jpg)
Slide 18
Tour of the Roomba
![Page 19: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/19.jpg)
Slide 19
Tour of the Roomba: The Vitals
• Roomba Serial Port• MiniDIN male-male
cable• USB adapter
![Page 20: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/20.jpg)
Slide 20
Tour of the Roomba: The Vitals
• IR Wall Sensors
– You may want to use these to implement wall following behavior
![Page 21: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/21.jpg)
Slide 21
The Roomba Challenges
1. The Chutes
2. The Maze
3. The Great Escape
4. Name that Tune
NIST Rescue Robot LeagueMaze (2004)
![Page 22: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/22.jpg)
Slide 22
Roomba Challenge #1:The Chutes
“The legal and philosophic aspects of obedience are of enormous importance.”
--- "The Perils of Obedience”, Stanley Milgram
• Problem: Given a detailed and exact layout of the world, with single exit path and no possible wrong turns or shortcuts, implement a set of instructions (i.e. a path) for the Roomba so it can navigate the start to the finish
• Objective: minimize time, minimize distance to finish line
![Page 23: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/23.jpg)
Slide 23
Roomba Challenge #1:The Chutes Example
ST
AR
T
FIN
ISH
10m.
3m.
1m
.
3m
6.0508m1m
.
3m
3m
.
3m.
1m.
1.5
m
![Page 24: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/24.jpg)
Slide 24
Roomba Challenge #1:Implementation Challenges
• Getting Roomba/computer set up working• The path/world is explicit; you are doing manual path
planning with complete information---how will you get the robot to follow the path you select?
• Could solve this without the use of sensors by– Dead reckoning– Hard coding (bump-turn-bump-turn etc)
• Error will be introduced by the movement of the vehicle, friction, uncertainty in orientation and initial set up
![Page 25: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/25.jpg)
Slide 25
Roomba Challenge #2:The Maze
"You are in a maze of twisty little passages, all alike“--Colossal Cave Adventure Game, 1976
• Problem: – The night before the competition, we will release the
dimensions/configuration for a different maze of chutes– The Roomba is placed in a maze in a pre-determined starting
location; there will be only one path out, but there may be dead-ends and detours
– Your job: implement an algorithm to find a path out of the maze• Modify existing code for pre-set maze that night OR• Write code for general maze solving
• Objective: minimize time and minimize distance within the maze to the finish line
![Page 26: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/26.jpg)
Slide 26
Roomba Challenge #2:The Maze Example
ST
AR
T
FIN
ISH
How to find the
shortcut?
![Page 27: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/27.jpg)
Slide 27
Roomba Challenge #2:Implementation Challenges
• You need to use the Roomba sensors– Develop a different strategy because robots may
encounter dead-ends, non-right-angled walls, etc– There may be short cuts that are hard to ‘sense’
• Might not be able to get out without some additional info from sensors or a combination of sensing and hard-coding
• Should be able to get most of the way with hard-coding and dead reckoning
![Page 28: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/28.jpg)
Slide 28
Roomba Challenge #3:The Great Escape
"I'm making this up as I go.“--Indiana Jones, 1936.
• Problem: – The Roomba is placed in an arbitrary maze in an arbitrary
starting location; there will be only one path out, but there may be dead-ends and detours; the maze may be reconfigured between trials
– Your job: implement an algorithm to find a path out of the arbitrary maze
• You will not have time to modify existing code, you’ll need to write code for general maze solving and test it
• Objective: simply exit the maze
![Page 29: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/29.jpg)
Slide 29
Roomba Challenge #3:Escape Example
ST
AR
T
FIN
ISH
x
![Page 30: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/30.jpg)
Slide 30
Roomba Challenge #3:Implementation Challenges
• This is a tricky assignment– We will not give you the maze; maze config may
change between trials; starting point may change
• You need to implement some kind of maze exit strategy– This will take some work…
• You will not be able to hard-code• Mazes will change
– Hence, cannot change code during the day
![Page 31: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/31.jpg)
Slide 31
Roomba Challenge #4:Name That Tune
“I sing the Body electric;”--Walt Whitman (1819–1892), Leaves of Grass.
• Problem: Program the Roomba to play one or more of the following tunes– The Drexel Ode– Fanfare for the Common Man, A. Copeland– Thus Spake Zarathustra, R. Strauss– The Imperial March (Darth Vader's Theme), John Williams
• Objective: Play the tune– Bonus!!: a chorus of many Roomba doing the Drexel Ode together!! Get your lab-mates together…
![Page 32: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/32.jpg)
Slide 32
Roomba Challenge #4:Implementation Challenges
• Find the sequence of notes/keys– The set of notes can be shared, posted to the
discussion board, etc.– MIDI files, sheet music are available on the web
• Setting up the Roomba-Midi encoder– http://todbot.com/blog/2006/05/03/roombamidi-
roomba-as-midi-instrument/
• This one shouldn’t be that hard and should be a lot of fun– Feel free to get carried away!
![Page 33: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/33.jpg)
Slide 33
Implementation Tools
![Page 34: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/34.jpg)
Slide 34
• Hacking Roomba: ExtremeTech – by Tod E. Kurt
• Published Dec 2006!• Exercises are derivative of
those in this book• A mere $17! • All code, examples, etc are
available at http://hackingroomba.com/NOTE: you don’t really need the
book, all info is available via the cyber-infrastructure…
![Page 35: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/35.jpg)
Slide 35
Everything is on the Wiki!http://gicl.cs.drexel.edu/wiki/Category:Roomba_Design_Lab_%28Winter_2007%29
![Page 36: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/36.jpg)
Slide 36
Summary of Module Instructions
• Subscribe to mailing list• Connect the Roomba to Your Computer
– Cable, bluetooth, etc• Set up Processing
– An open source programming language and environment for people who want to program images, animation, and sound. Simple programming, no compiling; cut-and-paste examples.
• Install RoombaComm– RoombaComm is a Java library created by Tod E. Kurt that
allows users to communicate with Roomba through a high-level language (Java); Processing uses it.
• Roomba Program 1– A “Hello Roomba” program
![Page 37: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/37.jpg)
Slide 37
Summary of Module Instructions
• Subscribe to mailing list• Connect the Roomba to Your Computer
– Cable, bluetooth, etc• Set up Processing
– An open source programming language and environment for people who want to program images, animation, and sound. Simple programming, no compiling; cut-and-paste examples.
• Install RoombaComm– RoombaComm is a Java library created by Tod E. Kurt that
allows users to communicate with Roomba through a high-level language (Java); Processing uses it.
• Roomba Program 1– A “Hello Roomba” program
DO
BE
FO
RE
YO
U C
OM
E T
O
RE
CIT
AT
ION
![Page 38: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/38.jpg)
Slide 38
Processing• What it is
– A simple, interactive, programming language, with full access to Java & Java classes and class libraries
– Simple IDE (Integrated Development Environment), with source code editor, compiler, debugger
– It’s free and open source (if you don’t like it you can modify it)
• Why use it– Quick implementation and testing, perfect for trying out ideas– Lightweight programming environment, just edit source and run– Look ma, No Compiling!– Cross Platform Capability
• Assures same version Java VM– Produces applications for OSX, Windows, Linux
• Note: you are welcome not to use it in favor of C/C++/Java/C#/Perl/Python... etc… but you are on your own.– Tools do exist for roomba hacking in these other languages
![Page 39: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/39.jpg)
Slide 39
Processing: Example Commands
• spinRight(float "degrees") • spinLeft() • goForward() • goBackward() • updateSensors() • playNote() • bump() • bumpLeft() • bumpRight() • wall()
![Page 40: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/40.jpg)
Slide 40
Processing: Example Program
// **WALL FINDING** // - Simple loop that reiterates until it sees a wall // - When it hits left bump sensor, it turn 45 degrees right, and// - vice versa; When it finds a wall, it exits loop, and code can// - be implemented afterwards for another behavior while( ! roombacomm.wall()) // while its not seen a wall { roombacomm.goForward(); // keep going forward until… if (roombacomm.bumpLeft()) { roombacomm.spinRight(45); } else if (roombacomm.bumpRight()) { roombacomm.spinLeft(45); } roombacomm.updateSensors(); }
![Page 41: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/41.jpg)
Slide 41
Processing: Example Program
// **WAGGLE** // - This is a behavior used by the roomba when it is search for// - something. It is seen when roomba is wall-following in// - cleaning mode. roombacomm.drive(velocity, radius) -->// - measurements in millimeters done = false; while ( ! done ) {
roombacomm.drive(200,600); roombacomm.pause(250); roombacomm.drive(200,-600); roombacomm.pause(250);
}
![Page 42: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/42.jpg)
Slide 42
Suggested Approach
• Read the Wiki before you come to recitation• Review the Hacking Roomba website
– Many useful things there• Have software set up on your laptops and ready to go• Familiarize yourself with editing the program elements
– Some basic ‘bump-then-turn’ code may be useful• Be prepared to debug issues such as
– Port conflicts, I/O issues, can’t talk to USB devices, etc.– These will all be situation dependent, and specific to your individual laptop– Suggestion: bring more than one laptop
• You may want to build a test-rig for work outside of class• TAs and Co-ops will be available to help set up
and configure BUT … getting skills in downloadand configuring hardware-software systems is one of the goals of this module!
![Page 43: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/43.jpg)
Slide 43
To Do Before Recitation
• Subscribe to mailing list • Connect the Roomba to Your Computer
– Cable, bluetooth, etc• Set up Processing
– An open source programming language and environment for people who want to program images, animation, and sound. Simple programming, no compiling; cut-and-paste examples.
• Install RoombaComm– RoombaComm is a Java library created by Tod E. Kurt that
allows users to communicate with Roomba through a high-level language (Java); Processing uses it.
• Roomba Program 1– A “Hello Roomba” program
DO
BE
FO
RE
YO
U C
OM
E T
O
RE
CIT
AT
ION
![Page 44: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/44.jpg)
Slide 44
Expected Module Pitfalls
• Computer-Roomba configuration– Getting software installed, talking to the Roomba, getting “hello world” to work– This is very environment centric, part of the assignment is for teams to work
this out for at least one machine in your group• Program construction
– Format or syntax problems, unexplained errors, understanding commands– Give yourself time to learn, explore, test & debug. You will not succeed if
you try everything the night before!• Roomba anomalies
– Roomba doesn’t go exactly straight, commands not exact, etc– Welcome to the real world! Dealing with these problems is part of the
assignment.• Software/Algorithm Design
– Don’t make matters too complex. Most of the credit can be gotten via brute force hard coding. However, to fully solve the challenges will require some more sophistication and use of the sensors on the robot.
![Page 45: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/45.jpg)
Slide 45
Suggested Ways to Handle Pitfalls
• Use the mailing list and post questions– At least one member per-team should subscribehttp://face.cs.drexel.edu/mailman/listinfo/roomba-07-questions
• Share insights and information with others– You are scored based on the competition, not based on
configuration of your laptop
• Post hacks, tricks, suggestions and ideas to the list and message board– Major issues will be addressed by the faculty, most
problems are going to be configuration-related
• Use the web and the wiki
![Page 46: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/46.jpg)
Slide 46
The First Assignments
• The Chutes– Fixed maze, in the recitation room
• The Maze– Fixed maze, availability TBD
• The Great Escape– Not a fixed maze, but a family of reconfigurable
ones, set up on the day of the contest and periodically changed during the day
• i.e. you’ll need to implement a maze solver (wall follower or similar) to get out of this
![Page 47: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/47.jpg)
Slide 47
Contest Scoring
• All about time to completion• You must complete the event
– Partial completions will not count (unlike for grading)
• Roomba’s will be timed• No remote control allowed• Objective:
– Complete all the events – Have the lowest cumulative time
![Page 48: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/48.jpg)
Slide 48
Questions?
Unsuccessful Project Successful Project
![Page 49: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/49.jpg)
Slide 49
OK, Great, so we get to program robots to exit mazes… where is the Science and Engineering?
![Page 50: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/50.jpg)
Slide 50
Roomba Challenges #3 & #4:General Maze Solving Algorithms
http://en.wikipedia.org/wiki/Maze#Solving_mazes• Wall Follower• Pledge algorithm• Random mouse• Tremaux's algorithm
![Page 51: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/51.jpg)
Slide 51
Roomba Challenges #3 & #4:General Maze Solving Algorithms
http://en.wikipedia.org/wiki/Maze#Solving_mazes• Wall Follower (a.k.a. Depth First Search)• Pledge algorithm• Random mouse• Tremaux's algorithm
![Page 52: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/52.jpg)
Slide 52
Graph Theory
• History– Leonhard Euler and the
Seven Bridges of Königsberg (1736)
• Problem areas– Subgraphs– Graph Coloring– Network Routing– Network Flow– Visibility– Covering, Embedding
The Bridges of Königsberg
![Page 53: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/53.jpg)
Slide 53
Graph Theory Today
• Graphs are everywhere!• Examples:
– Google’s PageRank algorithm was developed by Page and Brin in an undergrad CS class
– Network communications is about least-cost paths
– Logistics plans for WalMart, FedEx, UPS rely on route planning and map data
– Recommender systems, social networks, etc … all graphs!
– Molecular modeling, computational pharmacology, protein folding all use graphs as their basic data structure
![Page 54: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/54.jpg)
Slide 54
An example
![Page 55: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/55.jpg)
Slide 55
Graph Theory and Mazes: A Change of the Representation
• The physical topology of the maze can mapped into a Graph
• A Graph G can be represented as an ordered pair of setsG = <V, E> where V is the set of vertices and E is the set of edges
• Note that each edge is really a pair as well– i.e. ei = <vk, vj > means that there is an edge
between vertices vk and vj
![Page 56: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/56.jpg)
Slide 56
![Page 57: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/57.jpg)
Slide 57
![Page 58: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/58.jpg)
Slide 58
![Page 59: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/59.jpg)
Slide 59
The Basic DFS Algorithm
dfs( v ) process( v ) /* do what needs to get done*/mark v as visitedfor all vertices i adjacent to v not visited
dfs( i )
• Typical application questions– How to traverse the successor vertices?– How to order/process vertices in your output
• Pre-order (Polish notation) … the above is pre-order.• Post-order (reverse Polish notation)
![Page 60: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/60.jpg)
Slide 60
Depth First Search
![Page 61: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/61.jpg)
Slide 61
Depth First Search
![Page 62: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/62.jpg)
Slide 62
Depth First Search
![Page 63: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/63.jpg)
Slide 63
Depth First Search
![Page 64: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/64.jpg)
Slide 64
Depth First Search
![Page 65: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/65.jpg)
Slide 65
Depth First Search
![Page 66: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/66.jpg)
Slide 66
Depth First Search
![Page 67: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/67.jpg)
Slide 67
Depth First Search
![Page 68: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/68.jpg)
Slide 68
Depth First Search
![Page 69: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/69.jpg)
Slide 69
Depth First Search
![Page 70: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/70.jpg)
Slide 70
Depth First Search
Recurse back up the tree…
![Page 71: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/71.jpg)
Slide 71
Depth First Search
![Page 72: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/72.jpg)
Slide 72
Depth First Search
![Page 73: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/73.jpg)
Slide 73
Depth First Search
![Page 74: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/74.jpg)
Slide 74
Depth First Search
![Page 75: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/75.jpg)
Slide 75
Depth First Search
![Page 76: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/76.jpg)
Slide 76
![Page 77: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/77.jpg)
Slide 77
Properties of DFS: Time
• DO NOT measure time with a clock!
• Doing DFS on a graph G with vertices v1, v2, … vn and edges e1, e2, … em
– What is the Time Complexity? (i.e. # of discrete computational steps)
• Best Case?• Worst Case?• Average Case?
![Page 78: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/78.jpg)
Slide 78
Properties of DFS: Time
• Doing DFS on a graph G with vertices v1, v2, … vn and edges e1, e2, … em
– What is the Time Complexity? (i.e. # of computational steps)
• Best Case: you go right to the solution, no backtracking, and the solution is close by
– d steps, where d is the length (i.e. depth) of the shortest path to the soln from the start state
• Worst Case?• Average Case?
![Page 79: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/79.jpg)
Slide 79
Properties of DFS: Time
• Doing DFS on a graph G with vertices v1, v2, … vn and edges e1, e2, … em
– What is the Time Complexity? (i.e. # of computational steps)
• Best Case: d• Worst Case: check every node in the tree
– n steps
• Average Case?
![Page 80: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/80.jpg)
Slide 80
Properties of DFS: Time
• Doing DFS on a graph G with vertices v1, v2, … vn and edges e1, e2, … em
– What is the Time Complexity? (i.e. # of computational steps)
• Best Case: d• Worst Case: n• Average Case: … depends on the structure of the
“tree”…. Not answerable without more info.– Theoretically very difficult problem involving graph theory,
combinatorics and statistics
![Page 81: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/81.jpg)
Slide 81
Properties of DFS: Space
• How much computer memory is needed?• Doing DFS on a graph G with vertices
v1, v2, … vn and edges e1, e2, … em
– What is the Space Complexity? (i.e. how many nodes in memory?)
• Need to store – All nodes on the longest path
– All nodes that “branch” from that path
• This is path-independent– Best Case Scenario and Worst Case Scenario are the same!
![Page 82: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/82.jpg)
Slide 82
Properties of DFS: Space
• One needs Best Case Scenario and Worst Case Scenario are the same– Storage needs,
where d is the longest path and b is the “branching factor” (i.e. the maximum # of edges or degree for a vertex), are d·b
….
“width” of the tree is named b, for “branching factor” b
d
![Page 83: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/83.jpg)
Slide 83
Other Applications/Assignments
• Mapping
• Navigation
• Hunt the Wumpus
![Page 84: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/84.jpg)
Slide 84
Example: MappingThe CMU Millibots
• Modular DesignPlanning & Control
Computation
Motor control
Localization
IR obstacle detection
Communication
Payload:• sonar• camera
• Plug & Play interface
Common Bus:• communications• power12x7x14 cm
Communication
Localization
Motor control
IR
Interface
Interface
Interface
Interface
Interface
...
![Page 85: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/85.jpg)
Slide 85
• Occupancy certainty grids with Bayesian integration:
• Integration of multiple sensor readings
• Integration of multiple local maps
T
T SSFS2
1 ).(Prob),.(Prob).(Prob
0% (Free)
50% (Unknown)
100% (Occupied)
Application: Collaborative Mapping
OccupancyProbability
new sensorreading
Integration of multiple readings
![Page 86: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/86.jpg)
Slide 86
Accumulating Knowledge
• ‘bots communicate to commander agents to create view of the world
• View is propagated back to ‘bots
• ‘bots coordinate their activities to refine world view
![Page 87: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/87.jpg)
Slide 87
Collaborative Exploration
• Robot Agents store global map and determines exploration frontiers
• Robots Agents explore nearest frontier that is not yet being explored by other robots
• Exploration finishes when no more unexplored frontiers exist
Explorationfrontier
Currentgoal
![Page 88: Robot Lab](https://reader036.fdocuments.in/reader036/viewer/2022062516/56812a98550346895d8e4cc7/html5/thumbnails/88.jpg)
Slide 88
Questions?
Unsuccessful Project Successful Project