How do I determine which direction/angle the robot is facing?

asked 2017-04-05 02:40:13 -0600

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?

edit retag flag offensive close merge delete

Comments

1

Probably your robot needs a compass and a gyroscope so you can have an absolute measure of direction.

Pedro Batista gravatar imagePedro Batista ( 2017-04-05 04:30:20 -0600 )edit
1

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.

Tetragramm gravatar imageTetragramm ( 2017-04-05 21:07:49 -0600 )edit