Presentation is loading. Please wait.

Presentation is loading. Please wait.

Control Some Material taken from RobotSubsumption.pdf.

Similar presentations


Presentation on theme: "Control Some Material taken from RobotSubsumption.pdf."— Presentation transcript:

1 Control Some Material taken from RobotSubsumption.pdf

2 Remember Where Are We Going? Sumo-Bot competitions

3 QTI Sensors Used to “see” the white boundary ring

4 QTI Sensors P7 P6 Right Side P3 P2 Left Side Code More Info: Chapter 3 of Applied Robotics with the SumoBot

5 Finite State Machine (FSM) Representation

6 Sonar Range Finder Used to “see” the your opponent

7 Sonar Range Finder Documentation Code

8 Finite State Machine (FSM) Representation

9 IR Detectors Often used to “see” to the side (short-range)

10 IR Detectors More Info: Chapter 3 of Applied Robotics with the SumoBot Code

11 Finite State Machine (FSM) Representation Read IRgo forward turn left turn right go backward Obj forward Obj right Obj left No Obj

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

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

14 Possible Solution o 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. o FSM with exit conditions

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

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

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

18 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 Code

19 Changes that you should make  Change all I/O Definitions to match your configuration  Change motion control subroutines to suit your wheel base  Use debug statements to make sure that all sensors are working  Modify the code to incorporate your winning stragegywinning stragegy


Download ppt "Control Some Material taken from RobotSubsumption.pdf."

Similar presentations


Ads by Google