The Turtle Laboratory Sequence LMICSE Workshop June 14 - 17, 2005 Alma College.

Slides:



Advertisements
Similar presentations
Robofest 2005 Introduction to Programming RIS 2.0 RCX Code.
Advertisements

Chung for Robofest 05 1 Introduction to RoboLab CJ Chung Lawrence Technological University.
4. Object-Oriented Programming Procedural programming Structs and objects Object-oriented programming Concepts and terminology Related keywords.
Sonar and Localization LMICSE Workshop June , 2005 Alma College.
The Bioloid Robot Project Presenters: Michael Gouzenfeld Alexey Serafimov Supervisor: Ido Cohen Winter Department of Electrical Engineering.
Chapter 6: Arrays Java Software Solutions for AP* Computer Science
Programming II - Part 1 – Object Oriented Programming with Java Sebastian Uchitel
Nawwaf Kharma.  Programming as Problem Solving with Applied Algorithms  Algorithm Design as Instruction selection, configuration and sequencing  The.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
The Turtle Laboratory Sequence Myles McNally LMICSE Workshop November , 2004 University of Mississippi.
Introduction to Lego Mindstorms LMICSE Workshop June , 2005 Alma College.
The Turtle Laboratory Sequence LMICSE Workshop August , 2006 Villanova University.
Not Quite C: A CS 0 Option LMICSE Workshop June , 2005 Alma College.
Walking the Grid: Robotics in CS 2
Recursion.
Using LeJOS LMICSE Workshop June , 2005 Alma College.
1 Flash Programming Introduction Script Assist. 2 Course Description This course concentrates on the teaching of Actionscript, the programming language.
Java for Robots How to program an NXT robot with a Java Brain Bert G. Wachsmuth Seton Hall University.
LEGO NXT Robot Programming Introduction to Programming a Lego NXT robot in Java.
Week 4-5 Java Programming. Loops What is a loop? Loop is code that repeats itself a certain number of times There are two types of loops: For loop Used.
Teach.NET Workshop Series Track 4: AP Computer Science with.NET and J#
N ORTH D AKOTA S TATE U NIVERSITY D EPARTMENT OF C OMPUTER S CIENCE © NDSU S OFTWARE T ESTING R ESEARCH G ROUP Integrating Testing into the CS1 Syllabus.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Department of Computing and Information Sciences Kansas State University Design Methodology for State based Embedded Systems Case Study: Robot Controller.
GIRLS Robotic Camp. Let’s Begin Meet and Greet – Camp leaders introduce themselves – Students introduce themselves.
Robotics NXT sensors Back to Light sensor: red vs blue ball.
Karel J Robot An introduction to BlueJ and Object- Oriented Programming.
Programing Concept Ken Youssefi/Ping HsuIntroduction to Engineering – E10 1 ENGR 10 Introduction to Engineering (Part A)
Chapters 7, 8, & 9 Quiz 3 Review 1. 2 Algorithms Algorithm A set of unambiguous instructions for solving a problem or subproblem in a finite amount of.
Course: Object Oriented Programming - Abstract Data Types Unit1: IntroductionSlide Number 1 Introduction Course: Object Oriented Programming Abstract Data.
Robotics Overview of NXT-G Actuators in Mindstorms. Touch sensor Labwork: Right turn. Touch/bump. [Explore move versus Motor Move mini & motor mini. Motor*.]
Sound, Touch Sensor, and Motors. Wheeled Vehicles Using the Pilot class: –Constructor Pilot(float wheelDiameter, float trackWidth,Motor leftMotor, Motor.
Spring 2008 Mark Fontenot CSE 1341 Principles of Computer Science I Note Set 3.
A tiny turtle robot DEI The University of Padova.
CS 206 Introduction to Computer Science II 09 / 10 / 2009 Instructor: Michael Eckmann.
Overview of Project 3 Slides are available at : Updated 1/28 Due Date for project has been extended to next Friday 2/6.
Digital Electronics and Computer Interfacing Tim Mewes 4. LabVIEW - Advanced.
1 Linked-list, stack and queue. 2 Outline Abstract Data Type (ADT)‏ Linked list Stack Queue.
BEGINNING PROGRAMMING.  Literally – giving instructions to a computer so that it does what you want  Practically – using a programming language (such.
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.
Algorithms Java Methods A & AB Object-Oriented Programming and Data Structures Maria Litvin ● Gary Litvin Copyright © 2006 by Maria Litvin, Gary Litvin,
Java Software Solutions Lewis and Loftus Chapter 15 Copyright 1997 by John Lewis and William Loftus. All rights reserved. 1 Software Development Process.
Robot Programming. Programming Behaviors Behaviors describe the actions and decisions of your robot.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 4: Events Programming with Alice and Java First Edition by John Lewis.
Program Flow LabVIEW Robotics Fundamentals. Unintuition You know what this program does… So what does this one do? Inserted code.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4/Lab3.
EV3 Software EV3 Robot Workshop
ROBOTC Software EV3 Robot Workshop
Using the BlueJ IDE with Mindstorms LMICSE Workshop June , 2005 Alma College.
Mid-Year Review. Coding Problems In general, solve the coding problems by doing it piece by piece. Makes it easier to think about Break parts of code.
Vex Robotics program three: using motors and sensors together.
Introduction to Robots and the Mind - Programming with Sensors - Bert Wachsmuth & Michael Vigorito Seton Hall University.
Learning Plan 6 Java Programming Intro to Object Oriented Programming.
Web Design. How to link the robot How to turn on the robot Sec Getting Started What is python Programming in python How to move the robot How to.
Presentation Outline I. Background Information II. Design Project
Introduction to Programming in RobotC
Introduction to Robots and the Mind - Path Integration -
Programming Part 2 Mod Kit
Computational Thinking
Chapter 8: Recursion Java Software Solutions
IMDL Summer 2007: RoBeDeS by David Ladolcetta.
CS139 – Fall 2010 How far we have come
Introduction to Robots and the Mind - Methods -
Girl Scout Lego Robotics Workshop
Chapter 8: Recursion Java Software Solutions
Chapter 8: Recursion Java Software Solutions
Week 4 Lecture-2 Chapter 6 (Methods).
Presentation transcript:

The Turtle Laboratory Sequence LMICSE Workshop June , 2005 Alma College

The Turtle Laboratory Sequence Designed to teaching programming fundamentals Based around the “Turtle,” a LOGO-like abstraction from the details of motors and sensors A Turtle

The Turtle Laboratory Sequence Original work was done by Scott Anderson (Wellesley) with support from Frank Klassner (Villanova) Coded the Turtle software Created drafts of seven CS 1 oriented labs Current work by Myles McNally (Alma) Simplified somewhat the Turtle software Twelve labs oriented towards CS 1 Each lab was used in a fall, 2004 CS 1 course Each lab has now been refined based on that experience and videos added

The Turtle’s Basic Abilities Motion Move forward or backward (timed or continuous) Turn left or right (timed or based on degrees) Can calibrate turning time required to turn n degrees Stop Events Can respond to events Simple event queue model NONE (queue is empty), RIGHT, LEFT, BOTH, VIEW, PGM, RUN Singing Can play a tone for a duration

The Physical Turtle (1) Many designs could be used Requirements are Differential drive Left motor in motor port A Right motor in motor port C Left and right front mounted bump sensors Left touch sensor in sensor port 1 Right touch sensor in sensor port 3

The Physical Turtle (2) The design we recommend is based on designs from the Constructopedia The Roverbot Driving Base (p. 12) The Wheel Sets (p. 17) The Double Bumper (p. 30) The Standard Roverbot

The Physical Turtle (3) Then make the following modifications Remove the front (smaller) set of wheels Add a slider to the bottom of the bot between where the front wheels had been Move the RCX itself further back on the base, so that its weight is more centered over the remaining wheels These changes improve the exactness of turns The Turtle “top and bottom”

The Current Turtle Laboratories Java-based (in particular LejOS) Covers topics found in a modern, object oriented CS 1 course Basic types and expressions Flow of control Classes and methods Arrays, stacks and lists Interfaces Inheritance and abstract classes Polymorphism Loosely follows the topic order in the Lewis and Loftus text, but could be used with almost any object oriented text.

Turtle Laboratory Topics (1) Sequential Control: Use straight-line code and a "Turtle" robot to move in a few geometric figures. Sequential Control Variables and Expressions: Use more advanced code and variables to create more interesting shapes. Variables and Expressions Methods: Use methods to separate code into parts and also use the Random class. Methods Methods with Parameters / Scope: Use methods with parameters and returns, instance variables, and the Math class. Methods with Parameters / Scope Classes: Define a class that allows musical notes and rests to be represented and played back by the RCX. Classes

Lab 4, Task 5 Right Angle Random Patrol

Turtle Laboratory Topics (2) Event Driven Programming: Work with the basics of event driven programming and focusing on using decision structures to respond to events. Event Driven Programming Loop Control Structures: Work with each of the loop control structures in Java in the context of event processing. Loop Control Structures Using Interfaces: Define interfaces then implement them to run races and to draw figures with the robots. Using Interfaces Array Structures: Use arrays to record inputs from the user and then traverse a course using the recorded values to know when to move and when to turn. Array Structures

Lab 6, Task 3 Use Events to Drive the Turtle

Turtle Laboratory Topics (3) Navigation: Implement a navigation interface which allow the Turtle to go to positions in its world, then input a series of positions and have the Turtle visit them. Navigation Inheritance: Define several classes that handle notes and rests, and an abstract class that each is an extension of. Inheritance Sorting and Polymorphism: Use polymorphism with various sorting algorithms. Sorting and Polymorphism

Lab 12, Task 2 Travel to Points Sorted by Horizontal Position

Turtle Program Examples (1) public class Task1 { public static void main(String args[]) { Turtle.forward(2000); // travel out and back Turtle.turn(1000); Turtle.forward(2000); Turtle.stop(); // stop all motors } Travel forward, turn around, and travel back (see Lab 1)

Turtle Program Examples (2) public class Task2 { public static void main(String args[]) { Turtle.calibrateTurn(360,3000);// calibrate Turtle.forward(2000); // travel out and back Turtle.left(180); Turtle.forward(2000); Turtle.stop(); // stop all motors } Travel forward, turn around, and travel back using calibration (see Lab 2)

Turtle Program Examples (3) public class Task3 { public static void main(String args[]) { Turtle.forward(); // move forward int event = Turtle.nextEvent(); while (event != Turtle.RUN){ // until RUN button event = Turtle.nextEvent(); // is pressed } Turtle.stop(); // stop all motors } Move forward until the RUN button is pressed (see Lab 6)

Hands-on Time! Exercise 1: Craft a program that will have the Turtle move in a square shape using a loop which contains one forward command and one turn command. Exercise 2: Improve your solution to include calibration, replacing the turn command with a left command Exercise 3: Craft a program that uses the Turtle’s event queue to have the Turtle move forward, turning away from obstacles when necessary. That is, when the left bump sensor is pressed, back up and turn right, and likewise for the left bump sensor. Exercise 4: Craft a program in which you enter a number by pressing the right bumper that many times, and then have the Turtle travel around in a square shape that many times. Signal the end of your input by pressing the left bumper. The Turtle should then begin to move.