Abstract This project explores algorithmic and heuristic techniques of pathfinding by programming a Lego Mindstorms NXT Robot using the Not Exactly C(NXC)

Slides:



Advertisements
Similar presentations
Unit 4 - I Said Stop!. Introduction New Topics Timing Parallelism Sequence of Operations New Features NXT terminals New Functions Wait For.
Advertisements

Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Proportional, Integral, Derivative Line Following October 5, 2013.
EV3 Workshop Curriculum Developed by Joe DeRose, Ph.D.
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming
RobotC Programming for LEGO Mindstorms NXT Carnegie Mellon Dacta Lego Timothy Friez Miha Štajdohar SOURCES:
Not Quite C: A CS 0 Option LMICSE Workshop June , 2005 Alma College.
©2006 CSUC Institute for Research in Intelligent Systems Introduction to Coding June 15, 2006.
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.
LEGO Mindstorms NXT Programming We will be using the Common Palette for our Robots This is how you download your program onto the brick Drag and drop a.
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.
Flowol subroutines Subroutines are used to:  Simplify your code to make it easier to read (or for someone.
Programming Concepts Part B Ping Hsu. Functions A function is a way to organize the program so that: – frequently used sets of instructions or – a set.
GIRLS Robotic Camp. Let’s Begin Meet and Greet – Camp leaders introduce themselves – Students introduce themselves.
Programming 101 The Common Palette Content provided by Connor Statham (6 th Grade Student) Formatting by Shannon Sieber.
Capacitor Connection in to LED socket Connection to 5v and ground Connection to light sensor pin.
ORTOP WORKSHOP 3 ROBOT NAVIGATION & MISSIONS ORTOP WORKSHOP 3 ROBOT NAVIGATION & MISSIONS.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Members (from left to right): Rachel Bevill, Brae Bower, Samantha Cherbonneau, Professor Ahmadi, Anthony Contreras.
Getting Started! Lego Mindstorms Program NXT 2.0.
Maze Challenge Maze Challenge activity > TeachEngineering.org
Wait Program! WAIT please!. 1. Why is it often better to use conditional commands rather than program a robot to move exact distances? 2. What is the.
Autonomous Robot Project Lauren Mitchell Ashley Francis.
Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]
Today’s Agenda 1.Scribbler Program Assignment 1.Project idea due next class 2.Program demonstration due Wednesday, June 3 2.Attendance & lab pair groupings.
EV3 Workshop Oct 3, 2015 Instructor: Chris Cartwright
This presentation is intended to offer a set of activity cards, which are ideal for introducing the Robolab. The cards cover a range of basic skills, that.
SIPHER Students: Javier Lara, Darren Lamison-White Graduate Student Advisors: Ethan Jackson, Ryan Thibodeaux Controlling Robots: Long distance, straight-line.
Technical Writing for Robotic Coding!.  du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals.
A note on oral presentations These are the progress report presentations. Please note that the individual presentations should be ~8 min long. Since the.
2008 SBPLI/FIRST Programming Workshop Tom Boehm Patchogue Medford High School, Team 329 Motorola Inc. Mark McLeod Hauppauge High School Team 358 Northrop.
Sentry System Multiple Sensors
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
Castor Bot. Now, we will begin creating a robot Log onto your computer On your screen, click on the website labeled “castor bot” Your building instructions.
Find the Mindstorms Icon on the computer.. To start a new program click go.
LEGO® MINDSTORMS® NXT Move Block.
Lesson 4: Conditional Statements Programming Solutions.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class3/Lab 2.
Programming 101 The Common Palette Content provided by Connor Statham (9 th Grade Student) Formatting by Shannon Sieber.
Rescue Robot Day 2 Exploring Computer Science Lesson 6-11.
ROBOTC Software EV3 Robot Workshop
An Autonomous Self-Parking Vehicle William Whitney (Mentor: Dr. Jeff Gray) Background: NXT and Robot C The vehicle was constructed using the Lego Mindstorms.
The George Washington University Electrical & Computer Engineering Department Dr. S. Ahmadi Class 3.
Mindstorm NXT-G Introduction Towson University Robotics.
ROBOTC Software EV3 Robot Workshop Lawrence Technological University.
Deriving Consistency from LEGOs What we have learned in 6 years of FLL by Austin and Travis Schuh © 2005 Austin and Travis Schuh, all rights reserved.
Automation and Robotics.  First you select the platform type so that you can use Natural Language PLTW.
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.
MEH108 - Intro. To Engineering Applications KOU Electronics and Communications Engineering.
John Rappel. Description  Demonstrate advanced control of the iRobot Create  Use light sensors to guide the robot to a light source  Read bump sensors.
Robotics Programming Wall Follow Line tracking for a set amount of time Line tracking for a distance.
Python Programming Module 4 Sensors and Loops Python Programming, 2/e1.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
How Do You Make a Program Wait?
Robotics Training For The Riverside Robotics Society
SEI Robotics Lego Mindstorm Competition
Deriving Consistency from LEGOs
Understanding Communication with a Robot? Activity (60 minutes)
Introduction to Gobbit Programming
Programming.
Beginner Programming Lesson
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Storing Values as Variables
Sumo: Stay in Ring Algorithm
RobotC Programming for LEGO Mindstorms NXT
Loops and Switches How Do You Make Loops and Switches? lesson > TeachEngineering.org Center for Computational Neurobiology, University of Missouri.
Preprocessor Directives
Lego MINDSTORMS EV3.
Exploring Computer Science Lesson 6-11
LEGO MINDSTORMS NXT PROGRAMMING
Presentation transcript:

Abstract This project explores algorithmic and heuristic techniques of pathfinding by programming a Lego Mindstorms NXT Robot using the Not Exactly C(NXC) programming language. The robot itself is a three-wheeled (two powered, one support wheel) vehicle with a light and color sensor adjacent to each other attached to the front of the robot. By using a black tape track on a white background, the robot is programmed it interpret the input of its sensors to detect the track and follow it. A variety of different tracks were used to test the capabilities of the robot. Each track was designed to be more difficult to navigate than the previous track. Topics within the scope of this project include: different algorithmic and heuristic search, pathfinding, and path-following techniques; multitasking and concurrent programming; and advanced levels of complexity, such as obstruction avoidance. Excerpt from Line Following Function: sub FollowLine() {... while (true) //Follow the line forever {... // set speed for motor 2 if (SensorLight < ThresholdLight && SensorColor == ThresholdColor) //if the light sensor is off the line and the color sensor is on the line // Bob has gone off the line on the right side OnFwd(OUT_B, SpeedFast); //make his right motor go fast so he can get back on line else OnFwd(OUT_B, SpeedSlow); //otherwise keep the right motor on the slow speed if (SensorLight < ThresholdLight && SensorColor != ThresholdColor){ //if the light sensor and the color sensor are off the line in either direction Off(OUT_BC); FindLine(); //go to FindLine() so that he can get back on the line } // set speed for motor 1 if (SensorColor != ThresholdColor && SensorLight > ThresholdLight) //if the color sensor is off the line and the light sensor is on the line //Bob has gone off the line on the left side OnFwd(OUT_C, SpeedFast); //make his left motor go fast so he can get back on line else OnFwd(OUT_C, SpeedSlow); //otherwise keep the left motor at the slow speed Excerpt from Line Finding Function: sub FindLine(){ while(SensorLight < ThresholdLight && SensorColor != ThresholdColor){ //while both the light and color sensors are off the line int degrees = 25; //the set number of degrees to turn to search for the line int i = 1; // i is the counter and the number that the degrees are multiplied // to in order to increase the number of degrees he is turning while(i <= 10){ //while the counter is less that or equal to 10 if(SensorLight < ThresholdLight && SensorColor != ThresholdColor){ //check to see that both sensors are off the line RotateMotor(OUT_B, 40, degrees*i); //if they are, rotate the motor at speed 40 for 'degrees' * i degrees SensorLight = SensorRaw(IN_1); //update sensor values SensorColor = SensorUS(S2); print(SensorLight, SensorColor); //print sensor values if(SensorLight < ThresholdLight && SensorColor != ThresholdColor){ //check to see that both sensors are off the line RotateMotor(OUT_C, -40, degrees*i); //if they are, rotate the motor at speed 40 for 'degrees' * i degrees } //Once these two if statements are complete, Bob has turned back to center //He has gone for a certain number of degrees in one direction, then //went the same number of degrees back in the other direction i = i + 1; //increase the counter so Bob can double the number of degrees he is turning //this allows us to have Bob search in a wide range in case he gets off the line by a lot } //end while } } // end FindLine() Sources: Benedettelli, Daniele. Programming LEGO NXT Robots using NXC Hansen, John. Not eXactly C (NXC) Programmer’s Guide Sourceforge.net. Next Byte Codes & Not eXactly C Diagram: From Conception to Execution Function NameDescription OnFwd(motor, speed);Given a specified motor and speed, this function turns the given motor at a given speed, forward. OnRev(motor, speed);Given a specified motor and speed, this function turns the given motor at a given speed, in reverse. RotateMotor(motor, speed and direction, degrees); Given a specified motor, speed and direction, and number of degrees, this function turns the motor at a given speed and direction for a certain number of degrees Off(motor);Given a specified motor, this function uses the brakes of the motor and stops the motor; Float(motor);Given a specified motor, this function stops the motor without using the brakes. Allison Avrich and James Padgett Advisor: Ed Harcourt