Quote:
Originally Posted by Arhowk
You clearly calculate angle_offset right in that code...
Are you asking how to make a PID loop to turn the robot?
|
No. That function isn't what I need because it doesn't return an angle that can be plugged into the turntable. The program I'm supposed to write should be able to look at an image and figure out "Alright, turntable. You need to turn 45 degrees if you want to be on-target."
If we look at
this drawing from an earlier post, both lines (which represent pixel offsets) are 100px long. With the function from before, both would return the same angle offset since the function doesn't account for distance away from the target.