Storm Compass - Software
Simar Kareer, Gregory Hazen
This presentation: http://tinyurl.com/n4f3om4
Why vision?
Our Overview
Prereqs
How to GRIP(firmly grasp it)
Ima show you
HSL>>Erode>>Dilate>>Find Contour>>Filter
tools>>export
Python
Recognizing targets
<show them runcv.py>
Finding angles (easy way)
Angles cont...
Once you know how many angles just do a linear calculation to translate pixels to degrees
Let’s say FOV = 50 degrees and your x resolution is 320.
Then each pixel is 50/320 degrees
Turn to a specific target - ez way
if(target > centerPixel){
*turnRight*
}else{
*turnLeft*
}
The hard, but *kewl* way
PID!!! But your own values. (I stole this from the cheesy poofs pres(it’s not plagiarism if you credit them))
error = centerPixel - target pixel;
Output = kp*error + ki*Sumerror + kd*Derivativeerror;
Quick PID (just forget about the F now)
Proportional
Increases *proportionally* based on the error(fixes stuff faster when it’s more wrong)
Any problems with this???
Derivative Control
Welp how do we dun do a fix??
Consider rate of change of error(Calc Trigger Warning)
Problems??
Integral Control
Fixes Steady State Error
Often caused by friction etc
Tuning it(it’s like an instrument)
He goes step by step to easily tune your motors
LEDz(pretty colors)
Leds run off an arduino that gets serial data(preset bytes) from the RIO
Depending on which alliance we’re on and whether were lined up with the vision target or not different colors and different sections of the robot will light up
<<LED code>>