Facing a Moving Robot

From FIRE Wiki
Jump to: navigation, search

This is the third lab that follows after Lesson 8 of the Lesson Curriculum. The initial positions of both robots are known, and one robot moves in the environment, while the second robot has to continuously adapt and turn to face the first robot.

To do so, the relative position of the first robot from the second has to be computed. After each motion of the first robot, its relative position is updated using odometry. Once the position of the first robot is known, it computes the angle that the second robot has to turn in order to face the first, and communicates that action. The first robot then makes another motion, updates its position, and calculates a new angle for the second robot to turn.

This lab's purpose is both to reinforce Lessons 1-8, and also to reinforce multi-robot concepts. In order for multiple robots to communicate meaningfully, a common reference frame is required, and this lab uses the second robot's initial position as the origin. To update the first robot's position through odometry, concepts such as sine and cosine have to be used, and arc-tangent is also used to compute the angle that the second robot has to turn to face the first.