Some Material taken from RobotSubsumption.pdf

Slides:



Advertisements
Similar presentations
Introduction to LEGO RCX robotics and Robot Sumo
Advertisements

RCX Workshop Day 2 Programming with Touch Sensor Light Sensor Repeat CJ Chung Associate Professor of Computer Science Lawrence Technological University.
NXTG Workshop Day 2 Programming with Touch Sensor Light Sensor Ultrasonic Sensor Repeat CJ Chung Associate Professor of Computer Science Lawrence Technological.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
4/22/ MAKING YOUR ROBOTS SEE Building and Testing Photosensitive eyes.
Boe-bots and STEM Boe-bots and STEM – This sectional will introduce participants to a programmable robot that is useful for engaging students in building.
Wireless Group Critical Design Review. Movement BS command -> PULSOUT pin, period –BS2P units for period = 1.18  s 1.0ms pulse = CW, 2.0ms pulse = CCW.
IR Control Materials taken from IR Remote for the Boe-Bot by Andy Lindsay.
Parallax, Inc. Presentation based on: “Robotics: with the Boe-Bot"
1 Lecture 1: Your Boe-Bot's Servo Motors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed by: Martin.
Navigating the BOE-BOT
Control Some Material taken from RobotSubsumption.pdf.
Basic Stamp II is kinda cool Bytes of EEPROM(non-volatile) - Clock speed of 20 MHz. - Holds 600 lines of code in EEPROM - executes an average of.
Omni Directional Vision Tracking Denise Fancher Kyle Hoelscher Michael Layton Eric Miller.
Simple Logic Elevator Group 10: Zhen Yu Wu Wai Seng Ho Tat Chi Chio.
ENGR 101: Robotics Lecture 5 – Subprograms Outline  Subprograms  The Infrared Sensor System References 
Integration of Representation Into Goal- Driven Behavior-Based Robots By Dr. Maja J. Mataric` Presented by Andy Klempau.
Control Some Material taken from RobotSubsumption.pdf.
Sensors Material taken from Robotics with the Boe-Bot.
Capacitor Connection in to LED socket Connection to 5v and ground Connection to light sensor pin.
Control Some Material taken from RobotSubsumption.pdf.
Last week’s project demos Servo control with potentiometer and enable/disable buttons Demo in class tonight – don’t start on the next project until I’ve.
The Basic Stamp Instruction Set Architecture. The Microprocessor A microprocessor is a computer that typically has an architecture that is well suited.
1 A Modification of Chapters 5 & 7 Slides Presentation based on: "What's a Microcontroller ?" By Andy Lindsay Parallax, Inc Presentation developed by:
10/10/ Controlling YOUR ROBOT. 10/10/2015 Basic Stamp  Basic Stamp Input - output pins Interpreter Chip Power supply: 5 Volts voltage Memory: EEPROM.
Basic Stamp OEM module By Wilmer Arellano. 2  The BASIC Stamp 2 OEM is a discreet component version of the BS2 which may be purchased in kit form. 
Sensors Material taken from Robotics with the Boe-Bot.
Microcontroller I Seth Price Department of Chemical Engineering New Mexico Tech Rev. 9/22/14.
Multi-Vehicles Formation Control Exploring a Scalar Field Polytechnic University Department of Mechanical, Aerospace, and Manufacturing Engineering Polytechnic.
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
1 Lecture 1: Your Boe-Bot's Servo Motors Presentation based on: "Robotics with the Boe-Bot" By Andy Lindsay Parallax, Inc Presentation developed by: Martin.
IR Communication October 27, Sources  Lindsay, Andy. IR Remote for the Boe- Bot. v
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
ENGR 101: Robotics Lecture 3 – Robot Motion Outline  Robot Motion  FOR Loops  Making Music References 
ENGR 101: Robotics Lecture 4 – Making Decisions Outline  The Stall Sensor  Making Decisions  Random Number Generation References 
Control Material taken from RobotSubsumption.pdf and SumoBot : Mini-Sumo Robotics.
Slide Menlo Drive Suite 100 Rocklin, CA
Slide 1 Chapter #7: Measuring Light Light Sensor Circuit Parts (1) (1)Resistor – 220 Ω (red-red-brown) (1) Capacitor – 0.1  F (1) Capacitor – 0.01  F.
Electronics and Robotics Merit Badges Class 5 – Programming Robot Controllers for Sumo Competition 12/23/2015 Electronics and Robotics Merit Badges - Class.
Autonomous Vehicles Derek Smith EKU Dept. of Technology Computer Electronic Networking.
PROMGRAMING YOUR ROBOT How Servos Work: How to control your robot.
TechKnowTone Contents: Sensor Features Sensor Connections Sample Sketch Questions …Sensor Features… Arduino Coding – Distance Sensors.
Control Some Material taken from RobotSubsumption.pdf.
1 BOE-BOT Lecture #2 DE - Digital Electronics Servos and the BOE-BOT.
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.
Limited rotation servo basics David Hall output shaft servo horn red wire = 5V + black wire = Gnd - white wire = control signal standard servo.
Forward Until Near Stop when near a wall.
Advanced issues in Robotics and Programming Dr. Katerina G. Hadjifotinou Experimental Junior High School of the University of Macedonia.
The “Board of Education” 1 Three-position switch 0 = OFF 1 = ON / wheels OFF 2 = ON / wheels ON breadboard (for building circuits) electrical power (V.
Introduction to LEGO RCX robotics and Robot Sumo Douglas G. Czinder IEEE SEM R&A Chairperson Ms. Susan Latos Robofest Assistant Coordinator.
What is Arduino? It's an open source electronics prototyping platform: Open source: resources that can be used, redistributed or rewritten free of charge,
Introduction to Servos
Servo Positioning Pulse Width Direction of Rotation PULSOUT Period
IR Communication Materials taken from a variety of sources including IR Remote for the Boe-Bot by Andy Lindsay.
OEM BASIC Stamp 2sx 220 Ohm.
BASIC Stamp II Programming for Descartes Robots
Materials taken from IR Remote for the Boe-Bot by Andy Lindsay
PROMGRAMING YOUR ROBOT
Material taken from Robotics with the Boe-Bot
Obliterator Jose Noriega.
Chapter 5: Tactile Navigation With Whiskers
Controlling YOUR ROBOT
Some Material taken from RobotSubsumption.pdf
Materials taken from IR Remote for the Boe-Bot by Andy Lindsay
Karl Jean-Francois-James Madison H.S. & Eldiquen Mangubat-IS 232
Intro to Programming CURIE 2011.
Materials taken from IR Remote for the Boe-Bot by Andy Lindsay
Fevzi Ozaydin & Violet Mwaffo
Working with Photorestistors
CTY SAR FCPS Alexander Velikanov
Presentation transcript:

Some Material taken from RobotSubsumption.pdf Control Some Material taken from RobotSubsumption.pdf

Remember Where Are We Going? Sumo-Bot competitions

Controlling Robot Movement Based on Photo-Resistor Readings ' -----[ Constants ]--------------------------------------- LeftDark CON 108 RightDark CON 114 LeftWhite CON 20 RightWhite CON 22 ' Average light sensor value LeftThreshold CON LeftWhite + LeftDark / 2 RightThreshold CON RightWhite + RightDark / 2 ' -----[ Variables ]---------------------------------------- timeLeft VAR Word timeRight VAR Word ' -----[ Main Routine ]------------------------------------ DO GOSUB Test_Photoresistors GOSUB Navigate LOOP

Code ' -----[ Subroutine - Test_Photoresistors ]-------------- HIGH 6 ' Left RC time measurement. PAUSE 5 RCTIME 6, 1, timeLeft HIGH 3 ' Right RC time measurement. RCTIME 3, 1, timeRight RETURN

Code ' -----[ Subroutine - Navigate to avoid light ]------------- IF (timeLeft < LeftThreshold) AND (timeRight < RightThreshold) THEN PULSOUT 13, 650 ‘ go backwards PULSOUT 12, 850 ELSEIF (timeLeft < LeftThreshold) THEN PULSOUT 13, 800 ‘ go right PULSOUT 12, 600 ELSEIF (timeRight < RightThreshold) THEN PULSOUT 13, 600 ‘ go left PULSOUT 12, 800 ELSE PULSOUT 13, 850 ‘ go forwards PULSOUT 12, 650 ENDIF PAUSE 20 RETURN

Finite State Machine (FSM) Representation both high left low right low both low Read photo- resistors backup turn right turn left go forward

Controlling Robot Movement Based on Proximity Measurement ' {$STAMP BS2} ' {$PBASIC 2.5} ' -----[ Pins ]----------------------------------- Trigger PIN 0 Echo PIN 1 ' -----[ Variables ]----------------------------- samples VAR Nib ' loop counter pWidth VAR Word ' pulse width sonic sensor rawDist VAR Word ' filtered distance cm VAR Word inches VAR Word irDetectLeft VAR Bit irDetectRight VAR Bit pulseCount VAR Byte ' -----[ Constants ]----------------------------------- Trig10 CON 5 ' trigger pulse = 10 uS ToCm CON 30 ' conversion factor to cm

Code ' -----[ Main Routine ]----------------------------------- DO GOSUB Read_IR GOSUB Read_Sonar IF (sonarForward = 0) THEN GOSUB Forward_Pulse ELSEIF (irDetectLeft = 0) THEN GOSUB Turn_Left ELSEIF (irDetectRight = 0) THEN GOSUB Turn_Right ELSE ENDIF LOOP

Code ' -----[ Subroutines ]------------------------------------- Read_IR: FREQOUT 8, 1, 38500 irDetectLeft = IN9 FREQOUT 2, 1, 38500 irDetectRight = IN3 RETURN Read_Sonar: rawDist = 0 FOR samples = 1 TO 5 ' take five samples PULSOUT Trigger, Trig10 ' 10 uS trigger pulse PULSIN Echo, 1, pWidth ' measure pulse rawDist = rawDist + (pWidth / 5) PAUSE 10 NEXT IF ( ((rawDist / ToCm) */ $03EF) ) < 36 THEN sonarForward = 0 ELSE sonarForward = 1 ENDIF

Code ' -----[ Subroutines ]-------------------------------------- Forward_Pulse: PULSOUT 13, 850 PULSOUT 12, 650 RETURN Turn_Left: PULSOUT 13, 650

Code ' -----[ Subroutines ]-------------------------------------- Turn_Right: PULSOUT 13, 850 PULSOUT 12, 850 RETURN Back_Up: PULSOUT 13, 650

Finite State Machine (FSM) Representation Read IR & Sonar Go forward turn left turn right go forward Obj forward Obj right Obj left No Obj

How to Put It Together? Read IR & sonar Go forward turn right No Obj Obj left Obj right Obj forward Read IR & sonar Go forward turn right turn left go forward both high left low right low both low Read photo- resistors backup turn right turn left go forward

Possible Problems Jerky or halting movement Chase object over boundary Never detect opponent More?

Possible Solution Subsumption Architecture A programming process by which one behavior subsumes, or over-rides another based on an explicit priority that we have defined. First described by Dr. Rodney Brooks in "A robust layered control system for a mobile robot,” IEEE Journal of Robotics and Automation., RA-2, April, 14-23, 1986. FSM with exit conditions

FSM Go forward Go backwards read IR & sonar and set nextState variable Photoresistors and set nextState variable check nextState variable and branch turn teft turn right

Alternative FSM read Photoresistors and set nextState variable backup turn left turn right go forward check nextState variable and branch Read IR Go forward turn right turn left go forward

Program High-Level Outline Declare pin assignments, constants and variables Initialize thresholds Wait the required start delay Read boundary line sensors and move accordingly If the boundary line is not detected, read proximity sensors and move accordingly Repeat steps 4 and 5 until completion

Main Loop Do GOSUB Read_Line_Sensors IF (lightLeft < leftThresh) AND (lightRight < rightThresh) THEN GOSUB About_Face ' boundary ahead ELSEIF (lightLeft < leftThresh) THEN GOSUB Spin_Right ' boundary to left ELSEIF (lightRight < rightThresh) THEN GOSUB Spin_Left ' boundary to right ELSE PULSOUT LMotor, LFwdFast PULSOUT RMotor, RFwdFast GOSUB Search_For_Opponent ENDIF Loop

Possible Enhancements Optimize the position of the sensors Optimize your mechanical design for fighting Consider using lego components including motors Design against being pushed out of the ring Optimize the code to maximize bot performance Evaluate tradeoffs in movement choices and sensor reading Optimize the programming constructs that you use to increase processing speed BRANCH value, (Case_0, Case_1, Case_2) LOOKUP Index, (Value0, Value1, ...ValueN), Variable LOOKDOWN Target, {ComparisonOp} [Value0, Value1, ...ValueN], Variable