Simple Maze- Solving Robots solving search in real time.

Slides:



Advertisements
Similar presentations
Mobile Robot ApplicationsMobile Robot Applications Textbook: –T. Bräunl Embedded Robotics, Springer 2003 Recommended Reading: 1. J. Jones, A. Flynn: Mobile.
Advertisements

BELLWORK SINGLE POINT PERSPECTIVE
BackTracking Algorithms
How Do You Make a Program Wait?. 1. What is an algorithm? 2. Can you think of a reason why it might be inconvenient to program your robot to always go.
Sonar and Localization LMICSE Workshop June , 2005 Alma College.
The Driving Task The driving task is everything it takes to operate a motor vehicle. The three skills of the driving task are: A. Physical-coordination.
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Programming in Jessica By Joaquin Vila Prepared by Shirley White Illinois State University Applied Computer Science Department.
Navigating the BOE-BOT
But fines vary depending upon location. WHY ARE THOSE CHAIRS THERE?
Nawwaf Kharma.  Programming as Problem Solving with Applied Algorithms  Algorithm Design as Instruction selection, configuration and sequencing  The.
Autonomy using Encoders Intro to Robotics. Goal Our new task is to navigate a labyrinth. But this time we will NOT use motor commands in conjunction with.
Graphs.
24-Jun-15 Pruning. 2 Exponential growth How many leaves are there in a complete binary tree of depth N? This is easy to demonstrate: Count “going left”
Efficient Path Determining Robot RIT Computer Engineering Senior Design Project Jamie Greenberg Jason Torre October 26, 2004 A motorized robot will navigate.
STC Robot Optimally Covering an Unknown Indoor Environment Majd Srour, Anis Abboud Under the supervision of: Yotam Elor and Prof. Alfred Bruckstein.
Maze-Solving Mindstorms NXT Robot. Our Mission Investigate the capabilities of the NXT robot Explore development options Build something interesting!
Mobile Robot ApplicationsMobile Robot Applications Textbook: –T. Bräunl Embedded Robotics, Springer 2003 Recommended Reading: 1. J. Jones, A. Flynn: Mobile.
10-1 Programming Remember: –programming language –how to program (conceptually) –intro to programming the “ROBOT” computer In this lecture: –programming.
The NXT is the brain of a MINDSTORMS® robot. It’s an intelligent, computer-controlled LEGO® brick that lets a MINDSTORMS robot come alive and perform.
Depth-First Search Idea: Keep going forward as long as there are unseen nodes to be visited. Backtrack when stuck. v G G G G is completely traversed.
Loops and Switches. 1. What kind of blocks are these? 2. Name two kinds of controls that can be specified to determine how long a loop repeats. 3. Give.
Copyright © Cengage Learning. All rights reserved.
FASEP Presents Is FASEP a 6-sensors or an 8-sensors type Measuring Device?
Lab 3 How’d it go?.
© 2006 Carnegie Mellon Robotics Academy Designed for use with the LEGO MINDSTORMS ® Education NXT Software and Base Set #9797 Mine Mapping Scanning and.
ORTOP WORKSHOP 3 ROBOT NAVIGATION & MISSIONS ORTOP WORKSHOP 3 ROBOT NAVIGATION & MISSIONS.
Coding for the FIRST Tech Challenge: RobotC Presented by: Audrey Yeoh Acknowledgements: Team Unlimited FTC 0001.
Artificial Intelligence Lecture 9. Outline Search in State Space State Space Graphs Decision Trees Backtracking in Decision Trees.
Coding for the FIRST Tech Challenge: RobotC
10.4 How to Find a Perfect Matching We have a condition for the existence of a perfect matching in a graph that is necessary and sufficient. Does this.
Maze Challenge Maze Challenge activity > TeachEngineering.org
WAES 3308 Numerical Methods for AI
Measured Turns Introductory Presentation. Opening Activity In the Right Face Activity, we made our robot turn right using the program below.
Final Presentation.  Software / hardware combination  Implement Microsoft Robotics Studio  Lego NXT Platform  Flexible Platform.
Moving Around in Scratch The Basics… -You do want to have Scratch open as you will be creating a program. -Follow the instructions and if you have questions.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
Autonomy using Encoders Intro to Robotics. Autonomy/Encoders Forward for Distance In this unit, you will learn to use the encoders to control the distance.
Wandering Standpoint Algorithm. Wandering Standpoint Algorithm for local path planning Description: –Local path planning algorithm. Required: –Local distance.
Barclays Robot Challenge Learn how to Program Robots.
Recursion – means to recur or to repeat – A different way to get a robot to repeat an action A programming language that allows recursive definitions (and.
Sentry System Multiple Sensors
Backtracking and Games Eric Roberts CS 106B January 28, 2013.
15-100: Introduction to Programming w/ Java * Ananda Gunawardena -- Lecture – School of Computer Science – Phone : (x81559) – Office: Wean Hall.
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Robotics Club: 5:30 this evening
BEGINNER EV3 PROGRAMMING LESSON By: Droids Robotics Using Sensor Data and Port View.
Higher Dimensions. x Let's say we use a pencil to mark a point on paper. x is this point. We pick a direction and move the pencil along this direction.
Artificial Intelligence in Game Design Lecture 8: Complex Steering Behaviors and Combining Behaviors.
ROBOTC Software EV3 Robot Workshop
CSE 143 Lecture 13 Recursive Backtracking slides created by Ethan Apter
An Autonomous Self-Parking Vehicle William Whitney (Mentor: Dr. Jeff Gray) Background: NXT and Robot C The vehicle was constructed using the Lego Mindstorms.
BEGINNER FLL PROGRAMMING WORKSHOP BY DROIDS ROBOTICS & EV3LESSONS.
Casne.ncl.ac.uk Taking care of the CrumbleBot Please do NOT stress the robot's motors 1.Do NOT push the robot 2.Do NOT hold the.
Autonomous Mobile Robots Autonomous Systems Lab Zürich Probabilistic Map Based Localization "Position" Global Map PerceptionMotion Control Cognition Real.
Advanced issues in Robotics and Programming Dr. Katerina G. Hadjifotinou Experimental Junior High School of the University of Macedonia.
Room Mapping with the IntelliBrain2 Chris Miller.
How Do You Make a Program Wait?
Stringing your car to determine wheel alignment is decidedly old school, but it's also effective, efficient and cheap. Begin by placing your car in a level.
Recursive Exploration II
Understanding Communication with a Robot? Activity (60 minutes)
Schedule for next 2 weeks
Loops and Switches Pre-Quiz
An Introduction to VEX IQ Programming with Modkit
adapted from Recursive Backtracking by Mike Scott, UT Austin
Maze Challenge Maze Challenge activity > TeachEngineering.org
The programming page of the Brick
Maze-Solving Mindstorms NXT Robot
Loops and Switches How Do You Make Loops and Switches? lesson > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
Getting started with LEGO EV3 Mindstorms software
Presentation transcript:

Simple Maze- Solving Robots solving search in real time

On line and off line search search Off line Robot knows start and goal locations Robot does not know the start and goal locations Robot knows coordinates Robot knows description, can recognize when seen On line Robot knows start and goal locations Robot does not know the start and goal locations Robot knows coordinates Robot knows description, can recognize when seen Robot Has a map Creates a map

Goals of this lecture Illustrate real-time search in maze by a simple mobile robot Investigate the capabilities of the NXT robot. Can we use Mindstorms NXT for serious research in Search? Explore development options

Problem Outline Robot is placed in a “grid” of same-sized squares – (Due to obscure and annoying technical limitations, the robot always starts at the “southwest” corner of the maze, facing “north”) Each square can be blocked on 0-4 sides (we just used note cards!) Maze is rectangularly bounded One square is a “goal” square (we indicate this by covering the floor of the goal square in white note cards ) The robot has to get to the goal square

Using NXT you can build quickly all kind of robot prototypes Uses basic “driving base” from NXT building guide, plus two light sensors (pointed downwards) and one ultrasonic distance sensor (pointed forwards) The light sensors are used to detect the goal square, and the distance sensor is used to detect walls

Robot Design, cont’d Light Sensors Ultrasonic Sensor

Robot Design, cont’d

Search Algorithm Robot does not know the map. Simple Depth-First Search Robot scans each cell for walls and constructs a DFS tree rooted at the START cell As the DFS tree is constructed, it indicates which cells have been explored and provides paths for backtracking The DFS halts when the GOAL cell is found

Maze Structure GOAL START

DFS Tree Example GOAL START

DFS Tree Data Structure Two-Dimensional Array Cell maze[MAX_HEIGHT][MAX_WIDTH] typedef struct { bool isExplored; (= false) Direction parentDirection; (= NO_DIRECTION) WallStatus[4] wallStatus; (= {UNKNOWN}) } Cell; Actually implemented as parallel arrays due to RobotC limitations

DFS Algorithm while (true) { if robot is at GOAL cell victoryDance(); if there is an unexplored, unobstructed neighbor Mark parent of neighbor as current cell; Proceed to the neighbor; else if robot is not in START cell Backtrack; else return; //No GOAL cell exists, so we exit }

Simple example of robot traversing unknown labyrinth to get to the goal

Simple example Example 3x3 maze GOAL

We start out at (0,0) – the “southwest” corner of the maze Location of goal is unknown

Check for a wall – the way forward is blocked

So we turn right

Check for a wall – no wall in front of us

So we go forward; the red arrow indicates that (0,0) is (1,0)’s predecessor.

We sense a wall

Turn right

We sense a wall here too, so we’re gonna have to look north.

Turn left…

Turn left again; now we’re facing north

The way forward is clear…

…so we go forward. – “When you come to a fork in the road, take it.” –Yogi Berra on depth-first search

We sense a wall – can’t go forward…

…so we’ll turn right.

This way is clear…

…so we go forward.

Blocked.

How about this way?

Clear!

Whoops, wall here.

We already know that the wall on the right is blocked, so we try turning left instead.

Wall here too! Now there are no unexplored neighboring squares that we can get to. So, we backtrack! (Retrace the red arrow)

We turn to face the red arrow…

…and go forward. Now we’ve backtracked to a square that might have an unexplored neighbor. Let’s check!

Ah-ha!

Onward!

Drat!

There’s gotta be a way out of here…

Not this way!

Two 90-degree turns to face west…

No wall here!

So we move forward and…

What luck! Here’s the goal. Final step: Execute victory dance.

Movement and Sensing The search algorithm above requires five basic movement/sensing operations: – “Move forward” to the square we’re facing – “Turn left” 90 degrees – “Turn right” 90 degrees – “Sense wall” in front of us – “Sense goal” in the current square

Movement and Sensing, cont’d Sensing turns out not to be such a big problem – If the ultrasonic sensor returns less than a certain distance, there’s a wall in front of us; otherwise there’s not – Goal sensing is similar (if the floor is “bright enough”, we’re at the goal)

Movement and Sensing, cont’d The motion operations are a major challenge, however Imagine trying to drive a car, straight ahead, exactly ten feet, with your eyes closed. That’s more or less what “move forward” is supposed to do – at least ideally. In the current implementation, we just make our best estimate by turning the wheels a certain fixed number of degrees, and make no attempt to correct for error. – We’ll talk about other options later

Language Options There are several languages and programming environments available for the NXT system: – NXT-G – Microsoft Robotics Studio – RobotC – etc…

NXT-G Lego provides graphical “NXT-G” software based on LabVIEW which we’ve seen before

NXT-G, cont’d NXT-G is designed to be easy for beginning programmers to use We found it rather limiting – Placing blocks/wires on the diagram takes longer than typing Furthermore, NXT-G lacks support for arrays, which is problematic for our application

RobotC Simple “C-like” language for programming NXT (and other platforms) developed at CMU Compiles to bytecode that is executed on a VM More-or-less complete support for NXT sensors, motors

RobotC, cont’d Limited subset of C – All variables allocated statically (so no recursion) – Somewhat limited type system For example, arrays are limited to two dimensions, and you can’t have arrays of structs as far as we can figure – Maximum of eight procedures and 256 variables

Error Correction So as you may have noticed, it doesn’t work perfectly. Ideally, the robot should always turn exactly 90 degrees and should always be exactly centered inside the square. As we said, the “movement primitives” – go forward, turn left, turn right – are not perfectly precise. – Any “slips” or problems with traction will throw everything off. Error tends to compound

Error Correction, cont’d To some extent, error is inevitable; the robot doesn’t really have “vision” per se. However, if we fudged the environment a little bit, it would probably be possible to correct for much of the error.

Error Correction, cont’d One possibility: Mark the floor of each tile with lines that can be picked up by the light sensors. If placed correctly, the “alignment markers” could help the robot both to center itself along the X/Y axes, and to make sure it turns exactly 90 degrees.

Error Correction, cont’d Another possibility: Use the ultrasonic sensor to make sure the robot doesn’t run into walls, even if it “thinks” it should still be moving forwards.

Sources Peter Dempsey Pericles Kariotis Adam Procter