Project Number One Flow charting and sensor multiplexing
Project Number One Flow charting and sensor multiplexing project
PROJECT ONE: MAIN OBJECTIVE 1. The specific objective of this contest is to build a computer controlled Robot that can 1. move through a model floor plan structure of a house, 2. find a red Light Emitting Diode (LED) "Candle", that represents a small house fire, 3. and extinguish it by covering the LED "candle". 2. This must be done in the shortest time possible, subject to a few operating factors.
SUBJECTIVES, CONSTRAINTS, PARAMETERS 1. THE START OF THE GAME 2. Contestants will be permitted one minute to bring Robot to track immediately followed by a hands off warning. 3. An audible starting signal 1500 Hz will sound anytime within a 30 second period after hands off. 4. The Robot should begin movement, and at this point the three (3) minutes period will begin (at the audible sound, NOT when the robot moves). 5. A random selection of numbers will be used to determine the order in which each robot will run.
1. ROBOT OPERATION 2. The Robot must be autonomous, that is, once the Robot is turned on it must perform the task of locating and extinguishing the candle by itself. No human intervention is allowed after starting. 3. The Robot is considered to have entered the room when all its parts have crossed the white line at the doorway. 4. The Robot must enter via the doorway of the room in which the candle exists, in order to extinguish the candle. 5. Once the candle extinguisher has been placed over a suspect candle, it must be released. That is, a design cannot visit all three locations and deploy the fire extinguisher. The penalty for trying this approach will be -20 points for each deployment.
1. Any Robot that damages the playing surface intentionally or unintentionally will be disqualified. 2. Touching or following the walls of the house will be permitted but discouraged by a possible penalty of 5 points. 3. The Robot must be able to fit within the 21 cm x 20 cm (W x L ) Home Area (a 21 x 20 box will be used to determine if the robot qualifies to enter the contest). The robot does not have to hold the cup in this test but additional marks will be given for qualifying when the robot is holding the cup. 4. The Robot can extend to any size or shape it desires, as long as it is within the room with the expected candle.
1. TIME LIMIT 2. The maximum time given for the Robot to locate and extinguish the fire is three (3) minutes. 3. If the Robot locates, extinguishes the candle, and returns to the Home Area before three (3) minutes elapse (without committing an offense), then an additional point will be awarded, i. e. , one point for returning to the Home Area. 4. If a Robot does not move or perform any function for a period exceeding one (1) minute, it will lose that trial. 5. At the end of the three (3) minute period the Robot should stop moving.
SUBJECTIVES, CONSTRAINTS, PARAMETERS
CONCAVE LENS • The lens is used to couple scattered light into one focused point
RCX MICROCOMPUTER • Brains of the LEGO Mindstorm • Central programming block(s) • Includes 3 input and 3 output ports, LCD Display, AC adapter connector, infrared transmitter, six AA batteries, AC adapter.
HOW DO WE PROGRAM THE RCX BLOCK? 1. Through direct or infrared connection with the PC 2. LEGO Mindstorm exclusive drag and drop programming software 3. Not Quite C, interactive C and leg. OS are all acceptable programming languages.
Using Sensor Multiplexers in ROBOT CONSTRUCTION IR PROXIMITY SENSORS (3) ·COLOR ·LINE ·SOUND MUX (SPEED) SENSORS(2) BEAM SENSOR Left Wheel RCX MOTOR 2 Right Wheel MOTOR 3 ·ROTATION ·BREAK MOTOR 1 MUX Robot Arm MUX
PROXIMITY SENSORS Proximity sensors IR transmitter Light sensor FRONT Wheels Extinguisher cup Robot arm RCX LED sensor Robot wheels IR receiver
ROBOT BEHAVIOR START NO REACTING TO AUDIBLE SIGNAL REACH DISTANCE FOR DOOR MEASURING DISTANCE TRAVELED WHILE FOLLOW DOTTED WHITE LINE YES STOPPING AND ROTATING TO CORRECT POSITION NO REACH END OF LINE NO SENSE LED YES NAVIGATING TO DOORWAY ROTATING TO CORRECT POSITION EXTINGUISHING LED CANDLE RETURNING TO HOME AREA
ROBOT BEHAVIOR MEASURING DISTANCE TRAVELED WHILE SENSING SPEED CALC. DISTANCE TRAVELED FROM SPEED AND TIME ELAPSED FROM HOME POSITION NO GO TO NEXT POINT AND STOP MISSION COMPLETE YES SENSING ELAPSED TIME FOLLOW INSTRUCTIONS BASED ON CURRENTPOSITION TAKE FASTEST ROUTE TO HOME AREA BASED ON POSITION RECOGNIZED
ROBOT BEHAVIOR G H F 2 H 2 E F B C D 2 D A C 2 I
ROBOT BEHAVIOR WHILE EXTINGUISH LED CANDLE SENSE/ DETECT LED LIGHT ENTER ROOM W H I L E RELEASE CUP AVOIDING WALLS/ CORNERS ROTATE TO POSITION OF STRONGEST LIGHT INTENSITY RETRACT ARM ENABLE “DETECTION BEAM” RETRACE STEPS BACK TO COURSE TRACING STEPS FROM DOORWAY MOVE FORWARD UNTIL BEAM IS BROKEN AND STOP TAKE FASTEST ROUTE HOME
ISSUES HARDWARE: • Robot Drift • Differential • Testing and refinement in a simulated contest setting • Prototyping • Calibration of sensors SOFTWARE: • Making sensors interact with one another • Overall programming • The abundance of sensors to include in programming
BILL OF MATERIALS
RESOURCES Baum, Dave. Definitive Guide to Lego Mindstorms. Emeryville, CA: Apress, 2000. URL: http: //www. plazaearth. com/usr/gasperi/light. htm URL: http: //www. hitechnic. com URL: http: //www. philohome. free. fr/sensors/colorsensor. htm URL: http: //www. kabai. com/lego. htm URL: http: //www. stormyprods. com/lego/ Various other Internet sites were used with information on Lego Mindstorms.
Project two Subsumption architecture
Control Non-real time Real-time Tasks are not time critical Hang-up is handled by manual reset No one process can run forever System stability depends on regular: Inputs, Processing and Outputs WDM will reset a hung processor
Real time Control always flows straight through, without variable delays.
Non-real time Control may flow straight through, but variable delays may occur. Variable delays may cause the system to go unstable
Subsumption Architecture Developed by Prof. Rodney Brooks and the Mobile Robot Group at MIT AI Lab Distributed real-time control with sensor-triggered behaviors All levels of control systems execute in parallel Behavior fusion rather than sensor fusion A prioritized arbitrator decides dominant behavior for each output time.
Subsumption Architecture – cont. Behaviors do not control or call each other However data can be passed out of one process and into another. If higher-level process does not need to send a new control effort, then lower-level process can send a new value. Lowest-level process must have a default control effort (I. e. “Go forwards”)
Subsumption Architecture – cont. Benefits: Cheaper microcontroller Easy addition of more processes (simple mod. to arbitrator)
Subsumption Architecture diagram Functional block diagram Also called Behavior Control Good link: http: //www. restena. lu/convict/Jeunes/Subsumption. htm
Outputs of Subsumption Architecture 1. When the this robot’s battery gets low, the Dock process takes over 2. (Currently no battery monitor on Lego’s robot) 3. Pictures taken from “Mobile Robots”
Game playing projects Project objectives : Two or three RCX is playing with each other Games : n n n Number guessing Battleship Tic-tac-toe Challenges : Game playing logic Inter RCX communication „Client” Player 2 „Client” Player 1 „on turn” „Server” Visualisation
Educational benefits of the „game playing” projects Students learned and practiced : Communication protocols n Broadcast, peer-to-peer Client-server architecture, game master election Game logic algorithms
Experiments with “discovering robots” Web camera Target object 1. Capturing the camera image 2. Image processing : Identification of the robot and the target 3. Constructing an internal representation of the environment, searching for a path Mobil robot IR comm. port 4. Sending control information to the robot
The robot must find, turn and go to the target object Robot rear Target object Robot front
Gearing the motors
Other classroom possibilities Operating systems n Inspect, document, and modify firmware Programming languages n n n Develop interpreters/compilers NBC an excellent target language LISP Supplementary labs for CS 1/CS 2
Another Larger Project Take a child's toy and adapt it through computer programming and ingenuity to become more than what was it originally intended: n n Communicate to PC and other robots using Bluetooth. Analyze environment to collect data that could be used for machine learning training. Compare the capabilities of various programming environments and the abilities of Lego NXT Mindstorm robots by running complex programs of our own design. Create the first real environment simulator for NXT n n Decreases development time Can take accurate measurements
- Slides: 36