Control Some Material taken from RobotSubsumption.pdf.
-
date post
19-Dec-2015 -
Category
Documents
-
view
216 -
download
0
Transcript of Control Some Material taken from RobotSubsumption.pdf.
![Page 1: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/1.jpg)
Control
Some Material taken from RobotSubsumption.pdf
![Page 2: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/2.jpg)
Remember Where Are We Going?
Sumo-Bot competitions
![Page 3: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/3.jpg)
QTI Sensors
Used to “see” the white boundary ring
![Page 4: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/4.jpg)
QTI Sensors
P7
P6
Right Side
P3
P2
Left Side
Code
More Info: Chapter 3 of Applied Robotics with the SumoBot
![Page 5: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/5.jpg)
Finite State Machine (FSM) Representation
![Page 6: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/6.jpg)
Sonar Range Finder
Used to “see” the your opponent
![Page 7: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/7.jpg)
Sonar Range Finder
Documentation
Code
![Page 8: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/8.jpg)
Finite State Machine (FSM) Representation
![Page 9: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/9.jpg)
IR Detectors
Often used to “see” to the side (short-range)
![Page 10: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/10.jpg)
IR Detectors
More Info: Chapter 3 of Applied Robotics with the SumoBot
Code
![Page 11: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/11.jpg)
Finite State Machine (FSM) Representation
Read IR go forward turn left turn right go backward
Obj forwardObj right
Obj leftNo Obj
![Page 12: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/12.jpg)
How to Put It Together?
Read IR& sonar
Go forward turn left turn right go forward
Obj forwardObj right
Obj leftNo Obj
Read QTI backup turn right turn left go forward
both lowright low
left lowboth high
![Page 13: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/13.jpg)
Possible Problems
Jerky or halting movement Chase object over boundary Never detect opponent More?
![Page 14: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/14.jpg)
Possible Solution
o Subsumption ArchitectureA 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
![Page 15: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/15.jpg)
FSM
read IR & sonarand set nextStatevariable
Read QTI andset nextStatevariable
check nextStatevariable and branch
Go forward
Go backwards
turn teft
turn right
![Page 16: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/16.jpg)
Alternative FSM
read Photoresistorsand set nextStatevariable
check nextStatevariable and branch
Read IR Go forward turn left turn right go forward
backup turn right turn left go forward
![Page 17: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/17.jpg)
Program High-Level Outline1. Declare pin assignments,
constants and variables2. Initialize thresholds 3. Wait the required start delay4. Read boundary line sensors and
move accordingly5. If the boundary line is not
detected, read proximity sensors and move accordingly
6. Repeat steps 4 and 5 until completion
![Page 18: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/18.jpg)
Main LoopDo 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 ENDIFLoop
Code
![Page 19: Control Some Material taken from RobotSubsumption.pdf.](https://reader030.fdocuments.us/reader030/viewer/2022032800/56649d3f5503460f94a1803d/html5/thumbnails/19.jpg)
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 stragegy