CS 1 with Robots Robot Sensors & Actuators Institute for Personal Robots in Education (IPRE)‏

Slides:



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

Getting started with LEGO NXT Mindstorms software This is intended to be a short introduction to the LEGO Mindstorms software and programming the LEGO.
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.
LabView Basics.
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.
Computer Programming with Robots. Computer programming consists of writing lines of code in a language that a computer will understand to solve a problem.
Using the “Clicker” If you have a clicker now, and did not do this last time, please enter your ID in your clicker. First, turn on your clicker by sliding.
EIGHTH GRADE ROBOTICS KITTATINNY REGIONAL HIGH SCHOOL MR. SHEA Introduction to Programming
Intro to Robots Lab 6: Robot Behaviours. Intro to Robots Further Braitenberg Vehicles: Timid: –Moves forward in a straight line –One threshold light sensor.
Motor control drive in circles Pragmas configure motors Turning right in function of time Turning left in function of time Main program starts from here.
CS 1 with Robots Functions Institute for Personal Robots in Education (IPRE)‏
©2006 CSUC Institute for Research in Intelligent Systems Introduction to Coding June 15, 2006.
CS 1 with Robots IDLE and Myro Institute for Personal Robots in Education (IPRE)‏
CompSci Today’s topics Robots Myro Loops Notes from the Institute for Personal Robots in Education Upcoming ä More Python Reading Learning Computing.
Testbed: Exercises.
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.
iRobot Create Introduction Assembled from various online resources
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.
Programming 101 The Common Palette Content provided by Connor Statham (6 th Grade Student) Formatting by Shannon Sieber.
The George Washington University Electrical & Computer Engineering Department ECE 002 Dr. S. Ahmadi Class 2.
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.
Programming Concepts (Part B) ENGR 10 Introduction to Engineering 1 Hsu/Youssefi.
Controlling the Outside World
EEL 5666: Intelligent Machine Design Laboratory Final Presentation by Rob Hamersma April 12, 2005.
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.
Sound, Touch Sensor, and Motors. Wheeled Vehicles Using the Pilot class: –Constructor Pilot(float wheelDiameter, float trackWidth,Motor leftMotor, Motor.
The George Washington University Department of ECE ECE 1010 Intro: Electrical & Computer Engineering –Introducing KIPR Link/Interface and Set-up –Continuation.
More LEGO Mark Green School of Creative Media. Introduction  Now that we know the basics its time to look at putting some robots (or toys) together 
CS 1 with Robots Behavior Based Control Institute for Personal Robots in Education (IPRE)‏
Motors and Sound Troubleshooting Tips. © H-CCS Problem 1 Why can’t I download my program to the RCX?
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.
Technical Writing for Robotic Coding!.  du/products/teaching_robotc_cort ex/fundamentals/introtoprogramm ing/thinking/videos/fundamentals.
Sentry System Multiple Sensors
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
ENGR 101: Robotics Lecture 3 – Robot Motion Outline  Robot Motion  FOR Loops  Making Music References 
Photos and Sensor Instructions
Introduction to Computer Science – Chapter 5 CSc 2010 Spring 2011 Marco Valero.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4/Lab3.
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.
Lesson 1: Motors and Sound Programming Solutions.
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.
Obstacle Detection. In the previous program the robot moves forward and then checks for something in the way. As we observed it only checks for things.
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.
Bullfighting Autonomous Robot “BULL” IMDL Spring 2010 Aminatu Oyebanjo April 8, 2010.
Basic Programming: Until Commands. The Problem with Wait States Motor Speed is affected by battery power. –If the battery is fully charged, the motors.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 4.
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.
Robotics Training For The Riverside Robotics Society
Deriving Consistency from LEGOs
What you asked me to teach…
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
IMDL Summer 2007: RoBeDeS by David Ladolcetta.
Learning Outcomes Understand While Loop
Sasha Popov November 16, 2018 iRobot Create.
The George Washington University Department of ECE ECE Intro: Electrical & Computer Engineering Dr. S. Ahmadi Class 5.
Lesson 3: Sensor Wait-for’s Programming Solutions
Functions Institute for Personal Robots in Education (IPRE)‏
Photos and Sensor Instructions
Functions Institute for Personal Robots in Education (IPRE)‏
Functions Institute for Personal Robots in Education (IPRE)‏
Compiled from various Internet sources Presented by Mr. Hatfield
Programming Concepts (Part B) ENGR 10 Introduction to Engineering
Intro to Robotics It’s YOUR FUTURE.
Getting started with LEGO EV3 Mindstorms software
Presentation transcript:

CS 1 with Robots Robot Sensors & Actuators Institute for Personal Robots in Education (IPRE)‏

Aug

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

Aug IR Obstacle Sensors Return value of: 0 – IR light is bouncing back to the receiver (off of an obstacle)‏

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

Aug 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.

Aug Light Sensors (3)‏ The scribbler has 3 light sensors pointing Left, Center and Right on the same side as the getIR sensors. [45, 200, 430] = getLight()‏

Aug Light Sensors (3)‏ 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

Aug Internal Scribbler Sensors getBattery() - returns battery voltage getStall() - returns stall condition (0 or 1)‏ This value changes to a 1 when the motors are working extra hard (possibly due to the robot hitting something and being unable to turn the wheels)‏ Note that it takes a half second to re-set the stall sensor once the motors are turned off, so wait a bit before sampling it agian. getName() - returns the robot's name (can be changed with setName(“newName”)‏

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

Aug 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. 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.

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

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

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

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

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

Aug Fluke Board – IR Obstacle sensors As with the Scribbler, you can select individual sensors to use (I recommend using the “center” sensor). getObstacle(0 / 1 / 2)‏ getObstacle(“left” / “center” / “right”)‏

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

Aug Fluke – Camera as a brightness sensor 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. getBright() returns a list of three values getBright(0 / 1 / 2) or getBright( “right” / “center” / “left”) return a single value. 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! The lower the number, the darker that area of the camera is.

Aug Robot Actuators Beep Motors LED Lights

Aug Speaker command – 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.

Aug Robot Actuators - Motors Two motors (left,right) that can be set to a power level between -1 and is full reverse 0 is stopped 1 is full speed forward. Controlled directly with the motors(left,right) function.

Aug Robot Actuators – Motors – Utility Functions These functions make it easier to use the motors to do simple things: forward(speed, seconds) – Moves the robot forward at the specified speed for the specified seconds, and then stops. turnLeft(speed,seconds) – Turns the robot left at the specified speed and for the specified seconds, then stops. turnRight() and backward() are similar.

Aug Robot Actuators – Motors – Utility Functions The previous functions would all start the robot, go for a certain amount of time, and then stop the robot automatically. You an also start the robot moving without specifying how long it should do so: forward(speed), turnLeft(speed), backward(speed), turnRight(speed), stop()‏ Very important to call the stop() function when you want the robot to stop! The wait(seconds) function can be used to specify how long the robot should travel: forward(0.85)‏ wait(1.5)‏ stop()‏

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

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

Aug Motor commands – Translate & Rotate Other functions exist: translate(speed)‏ rotate(speed)‏ These functions allow you to add together different types of motion, allowing the robot to move forward -- translate(1) while also turning—rotate(0.5). stop() is equivalent to translate(0); rotate(0)‏

Aug LED commands – setLED()‏ The Scribbler robot has 3 green LED lights. You can control these three lights with setLED(position, value). Position is a number: 0, 1, or 2 or a string “left”, “center”, or “right” Value is either 0 (“off”) or 1 (“on”)‏ The center light blinks continuously, so unless you keep setting it's value, it will just start blinking again.

Aug LED commands – setLEDFront() and setLEDBack()‏ The Fluke board has 2 user controlled red LED lights. One on the front (small, near the camera) and one on the back (large, near the white GPIO connector)‏ You can control these three lights with setLEDFront(value) and setLEDBack(value) functions. Value is either 0 (“off”) or 1 (“on”)‏ The back LED is VERY bright! And you can set it to half power with a 0.5 value, or quarter power with 0.25.

Aug Go play with your robot! Go play with your robot's sensors and actuators!