How do I determine which direction/angle the robot is facing?
I am building a robot that can play soccer. I have a webcam set up on the top of a canopy. The webcam is used to record the locations of the robot and the ball. I am having difficulty figuring out how to determine which direction the robot is facing by using the webcam. For example, the robot needs to move forward. How does it know which direction is forward?
Probably your robot needs a compass and a gyroscope so you can have an absolute measure of direction.
If you move forward once, and you're tracking with the camera, you now know which way is forward. Track the corners of the robot, and you know which ones are the front and which are the back, so now you know which way it's facing.