CompSci 001 7.1 Today’s topics Robots Myro Loops Notes from the Institute for Personal Robots in Education Upcoming ä More Python Reading Learning Computing.

Slides:



Advertisements
Similar presentations
Do I need a robot today? You only need a robot if your team has not shown me your octagon and/or the octagon in a function.
Advertisements

Computer Science 111 Fundamentals of Programming I More Digital Image Processing.
Indian Institute of Technology Hyderabad ROBOTICS LINE FOLLOWER HARI KISHAN TANDEY – ES12B1008 DILIP KONDAPARTHI – ES12B1010 SAI KARTIK – CE12B1015.
Final Project Web Design. Final Project Your robot will be placed in a room with the red cone. Your robot will need to find the cone in the room and run.
Sensing the World Intro to Robots.
Copyright 2014 Kenneth M. Chipps Ph.D. Network Management Using Sensors to Monitor Network Equipment Rooms Last Update
Computer Programming with Robots. Computer programming consists of writing lines of code in a language that a computer will understand to solve a problem.
Intro to Robots Lab 6: Robot Behaviours. Intro to Robots Further Braitenberg Vehicles: Timid: –Moves forward in a straight line –One threshold light sensor.
Robotics.
CS 1 with Robots Robot Sensors & Actuators Institute for Personal Robots in Education (IPRE)‏
CS 1 with Robots Functions Institute for Personal Robots in Education (IPRE)‏
Color Recognition and Image Processing CSE321 MyRo Project Rene van Ee and Ankit Agarwal.
ENGR 101: Robotics Lecture 1 – Introduction Outline  The Scribbler's Sensors  Demo Modes  Graphical Programming References 
CPSC 452: Lecture 1 Introduction, Homogeneous transformations and Coordinate frames.
CS 1 with Robots IDLE and Myro Institute for Personal Robots in Education (IPRE)‏
CS 1 with Robots Variables, Data Types & Math Institute for Personal Robots in Education (IPRE)‏
March 2006Taner Erig - EMU2-1 Metamorphosis of Information How is information represented and how do computers store information?
CS 1 with Robots Image Manipulation Institute for Personal Robots in Education (IPRE)‏
How to turn on the robot How to start Bluetooth How to connect to robot How to initialize the robot How to not break the robot Sec Getting Started.
Taking Pictures Sec 9-9 Web Design. Objectives The student will: Know how command the scribbler robot to take a picture. Know how to display the picture.
Teaching with Robotics Professor: Jeffrey Forbes
Web Design. How to set up the robot How to link to robot How not to break my robot Sec Getting Started How to make it move How to control speed.
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.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
Image Processing & Perception Sec 9-11 Web Design.
Scribbler Movements Sec 9-3 Web Design. Objectives The student will: Understand the basic movement commands for the Scribbler Know how to create and execute.
CS 101: Introduction to Computing Programming picture manipulations Developed by Mark Guzdial, Georgia Institute of Technology, 2003–2004; modified by.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
CS1315: Introduction to Media Computation Picture encoding and manipulation.
EEL 5666: Intelligent Machine Design Laboratory Final Presentation by Rob Hamersma April 12, 2005.
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.
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
Introduction to Computer Science – Chapter 4 CSc 2010 Spring 2011 Marco Valero.
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
CS1315: Introduction to Media Computation Picture encoding and manipulation.
How to link the robot and the computer (Bluetooth) How to turn on and off How to connect the adaptor Fluke card connection Sec Getting Started How.
Sentry System Multiple Sensors
# Red Green Blue Digital Color RGB to HEX.
CS 1 with Robots Variables, Data Types & Math Institute for Personal Robots in Education (IPRE)‏ Sec 9-7 Web Design.
Minds and Computers 1.1 What is a robot? l Definitions ä Webster: a machine that looks like a human being and performs various acts (as walking and talking)
Robotics NXT-G: variables, file Rotation sensor Lab: Use buttons to hit specific ball. Homework: Postings. Start planning mapping the room.
Introduction to Computer Science – Chapter 5 CSc 2010 Spring 2011 Marco Valero.
Mindstorms 1.1 Today’s topics l AI l History of Robotics l Uses of robots l The RCX l ROBOLAB l Upcoming ä Basic control ä Kinematics ä Robot architectures.
1- How to connect the robot to the pc Sec Getting Started 3- How to move the robot Sec Scribbler movements 4- How to make a turn 11- How to.
HOW SCANNERS WORK A scanner is a device that uses a light source to electronically convert an image into binary data (0s and 1s). This binary data can.
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.
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.
Under the Guidance of Submitted by
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Do I need a robot today? You only need a robot if your team has not shown me your octagon and/or the octagon in a function.
Image Processing Objectives To understand pixel based image processing
Image Manipulation Institute for Personal Robots in Education (IPRE)‏
What you asked me to teach…
Multimedia Summer Camp
Week 2.
Image Processing & Perception
Introducing KIPR Link/Interface and Set-up
Finch Robot Class L4 How do I… ? LED color (Range 0 to 100)
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Fundamentals of Programming I Introduction to Digital Image Processing
Image Manipulation Institute for Personal Robots in Education (IPRE)‏
Functions Institute for Personal Robots in Education (IPRE)‏
Variables, Data Types & Math
Image Manipulation Institute for Personal Robots in Education (IPRE)‏
Functions Institute for Personal Robots in Education (IPRE)‏
Functions Institute for Personal Robots in Education (IPRE)‏
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Intro to Robotics It’s YOUR FUTURE.
Presentation transcript:

CompSci Today’s topics Robots Myro Loops Notes from the Institute for Personal Robots in Education Upcoming ä More Python Reading Learning Computing with Robots, Chapter 1-5,9

CompSci What is a robot? l Definitions ä Webster: a machine that looks like a human being and performs various acts (as walking and talking) of a human being ä Robotics Institute of America: a robot is a reprogrammable multifunctional manipulator designed to move material, parts, tools, or specialized devices through variable programmed motions for the performance of a variety of tasks ä What’s our definition? l Components of a robot system?

CompSci Uses of robots l Where and when to use robots? ä Tasks that are dirty, dull, or dangerous ä Where there is significant academic and industrial interest l Ethical and liability issues l What industries? l What applications?

CompSci Agents and Environments

CompSci IPRE5

CompSci IPRE IR Obstacle Sensors l The Scribbler has two IR obstacle sensors (under the light sensors) that return a binary value of 0 or 1. l The robot actually has 1 IR receiver located in the center, and two emitters located on the left and right side of the emitter.

CompSci IPRE IR Obstacle Sensors l Return value of: 0 – IR light is bouncing back to receiver

CompSci IPRE IR Obstacle Sensors l Return value of: 1 means that infrared light is not bouncing back to the receiver, so nothing is in front of the emitter/detector.

CompSci IPRE IR Obstacle Sensors getIR() returns a list of two items [1,1]. You can also call getIR(“left”) to get just the left sensor, and similarly with getIR(“right”). The function also accepts 0 and 1 as the parameter to select which sensor value to return.

CompSci IPRE Light Sensors (3)‏ l The scribbler has 3 light sensors ä Left, Center, and Right ä On the same side as getIR sensors. [45, 200, 430]  getLight()‏

CompSci IPRE11 Light Sensors (3)‏ l Light sensor values range from 0 to Zero is very bright, 5000 is full dark. getLight() returns a list of all 3 values. getLight(“left” / “center” / “right”) or getLight(0/1/2) selects one value

CompSci IPRE Internal Scribbler Sensors getBattery() - returns battery voltage getStall() - returns stall condition (0 or 1) ‏ ä This value changes to a 1 when the motors are overworked ‏ ä Note that it takes a half second to re-set the stall sensor getName() – returns the robot’s name  can be changed with setName(“newName”)‏

CompSci IPRE13 Fluke Board l The Fluke add-on board has its own IR obstacle sensors and a camera.

CompSci IPRE Fluke Board – IR Obstacle sensors Myro uses the getObstacle() function to differentiate the IR sensors on the Fluke from the IR sensors on the Scribbler. l The fluke sensors are more sensitive than the Scribbler sensors Instead of just returning a zero or one, they return an integer value between zero and 7000.

CompSci IPRE Fluke Board – IR Obstacle sensors l The fluke has 3 IR emitters, one pointing forward...

CompSci IPRE Fluke Board – IR Obstacle sensors l The fluke has 3 IR emitters, one pointing forward... l And two pointing to the left and right.

CompSci IPRE Fluke Board – IR Obstacle sensors l The fluke has 3 IR emitters, one pointing forward... l And two pointing to the left and right. l They all bounce light back to a center mounted receiver.

CompSci IPRE Fluke Board – IR Obstacle sensors l Zero indicates no IR light is bouncing back from an obstacle. l [0,0,0] = getObstacle() ‏

CompSci IPRE Fluke Board – IR Obstacle sensors l Larger numbers indicate that more IR light is bouncing back. l [0, 1842, 0] = getObstacle() ‏

CompSci IPRE Robot Actuators l Beep  beep() - issues a random beep  beep(1) – random beep for 1 second  beep(1,800) – Beep at 800Hz for 1 second  beep(1,440,880) – two tone beep at 440 & 880Hz for 1 second. l Motors l LED Lights

CompSci IPRE21 Motor commands – Synchronous vs Asynchronous l What is the difference between these pieces of code? forward(0.85)‏ wait(1.5)‏ stop()‏ l And... forward(0.85, 1.5)‏

CompSci IPRE22 Motor commands – Synchronous vs Asynchronous l What is the difference between these pieces of code? forward(0.85)‏ beep(1.5,880)‏ stop()‏ l And... forward(0.85, 1.5)‏ beep(1.5,880)‏

CompSci IPRE23 Motor commands – Translate & Rotate l Other functions exist: ä translate(speed) ‏ ä rotate(speed) ä stop() is equivalent to translate(0); rotate(0) ‏

CompSci IPRE24 Fluke Board – Camera l You can take a picture using the camera on the Fluke board. l p = takePicture() l show(p) ‏

CompSci IPRE25 Fluke – Camera as a brightness sensor l Similar to the getLight() function on the Scribbler, the fluke allows you to use the camera as a “brightness” sensor with the getBright() function call. l getBright() returns a list of three values l getBright(0 / 1 / 2) or getBright( “right” / “center” / “left”) return a single value. l The numbers returned represent the sum of the luminance values of the pixels in the right/center/left of the camera, so they are quite large! l The lower the number, the darker that area of the camera is.

CompSci IPRE26 Taking / Saving / Loading a Picture p = takePicture()‏ show(p)‏ savePicture(p, “class.gif”)‏ p2 = loadPicture(“class.gif”)‏ print getWidth(p)‏ print getHeight(p)‏

CompSci IPRE Robot Pictures l Robot pictures are: ä 256 pixels wide by 192 pixels high l Each pixel is made up of 3 colors: ä Red, Green, and Blue ä Colors range in value from 0 – 255 ä Plus an “Alpha” value we won't use (for now). l When you print a picture or a pixel, Python gives you some textual information about the item, but does not give a visual representation. l The show(picture) method will display the picture on the screen.

CompSci IPRE Accessing a specific pixel print p pix = getPixel(p, 50,50)‏ print pix setRed(pix,0)‏ setGreen(pix,0)‏ setBlue(pix,0)‏ print pix show(p)‏

CompSci IPRE Zoomed In View: One Black Pixel

CompSci IPRE Looping through all pixels print p for pix in getPixels(p): setRed(pix,0) setBlue(pix,255)‏ setGreen(pix,255)‏ show(p)‏

CompSci IPRE Looping through all pixels: getPixels( picture )‏ p = loadPicture(“class.gif”)‏ for pix in getPixels(p): setRed(pix,255) But what if you only change the red part of the pixels ?

CompSci IPRE Pixel Functions l Getting a specific pixel: ä getPixel(picture,x,y) ‏ l Getting all pixels: ä getPixels(picture) ‏ l Getting pixel color info ä getRed(pixel) ‏ ä getGreen(pixel) ‏ ä getBlue(pixel) ‏ l Getting pixel location: ä getX(pixel) ‏ ä getY(pixel) ‏ l Setting color info: ä setRed(pixel, value) ‏ ä setGreen(pixel,value) ‏ ä setBlue(pixel,value) ‏