1 / 88

Robot Lab

Robot Lab. William Regli Department of Computer Science (and Departments of ECE and MEM) Drexel University. 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.”

Download Presentation

Robot Lab

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Robot Lab William RegliDepartment of Computer Science(and Departments of ECE and MEM)Drexel University Slide 1

  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 Slide 2

  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 Slide 3

  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 Slide 4

  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 Slide 5

  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 Slide 6

  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 Slide 7

  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 GrantsSCI-0537370, SCI-0537125, OCI-0636273, OCI-0636235 Slide 8

  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 Slide 9

  10. 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 About the Team Slide 10

  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 Slide 11

  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 athttp://face.cs.drexel.edu/mailman/listinfo/spring2007-roomba-lab • Other web resources • Accessible from the Roomba Wiki Slide 12

  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 Slide 13

  14. 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 remotecontrolled boat SRI’s Shakey NASA Voyager Pathfinder Spirit/Opportunity Sony Aibo Honda ASIMO DARPA Grand Challenge http://robotics.megagiant.com/history.html http://en.wikipedia.org/wiki/Robotics Highlights from the History of Robotics Slide 14

  15. 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 The Future for Robotics Slide 15

  16. Sprawl robot: SprawlitaMulti-University Research InitiativePI: Mark R. Cutkosky (Stanford University) JPL Serpentine Robot Tuna robot: VCUUVDraper Laboratory, Cambridge, MA Slide 16

  17. Tour of the Roomba Slide 17

  18. Tour of the Roomba Slide 18

  19. Tour of the Roomba: The Vitals • Roomba Serial Port • MiniDIN male-male cable • USB adapter Slide 19

  20. Tour of the Roomba: The Vitals • IR Wall Sensors • You may want to use these to implement wall following behavior Slide 20

  21. The Roomba Challenges • The Chutes • The Maze • The Great Escape • Name that Tune NIST Rescue Robot LeagueMaze (2004) Slide 21

  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 Slide 22

  23. Roomba Challenge #1:The Chutes Example Slide 23

  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 Slide 24

  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 Slide 25

  26. Roomba Challenge #2:The Maze Example How to find the shortcut? Slide 26

  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 Slide 27

  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 Slide 28

  29. Roomba Challenge #3:Escape Example Slide 29

  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 Slide 30

  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… Slide 31

  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! Slide 32

  33. Implementation Tools Slide 33

  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… Slide 34

  35. Everything is on the Wiki!http://gicl.cs.drexel.edu/wiki/Category:Roomba_Design_Lab_%28Winter_2007%29 Slide 35

  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 Slide 36

  37. Summary of Module Instructions DO BEFORE YOU COME TO 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 Slide 37

  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 Slide 38

  39. Processing: Example Commands • spinRight(float "degrees") • spinLeft() • goForward() • goBackward() • updateSensors() • playNote() • bump() • bumpLeft() • bumpRight() • wall() Slide 39

  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(); } Slide 40

  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); } Slide 41

  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! Slide 42

  43. To Do Before Recitation DO BEFORE YOU COME TO 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 Slide 43

  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. Slide 44

  45. Suggested Ways to Handle Pitfalls • Use the mailing list and post questions • At least one member per-team should subscribe http://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 Slide 45

  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 Slide 46

  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 Slide 47

  48. Questions? Unsuccessful Project Successful Project Slide 48

  49. OK, Great, so we get to program robots to exit mazes… where is the Science and Engineering? Slide 49

  50. Roomba Challenges #3 & #4:General Maze Solving Algorithmshttp://en.wikipedia.org/wiki/Maze#Solving_mazes • Wall Follower • Pledge algorithm • Random mouse • Tremaux's algorithm Slide 50

More Related