Seeing Eye Robot

From FIRE Wiki
Jump to: navigation, search

Project Description

This multi-robot project demonstrates communication and coordination between 2 NXT robots to accomplish a task. The NXT leader robot with a sonar sensor navigates an obstacle course, and then the leader transmits a sequence of movement commands to a second NXT follower robot with no sensors. The follower robot then successfully navigates the obstacle course. This multi-robot project demonstrates how one robot can share sensor data with another robot to accomplish navigation.


Topics covered in this project:

  • Use of sonar sensor interfacing and calibration.
  • Use of motor encoders and understanding mathematical and mechanical relationship between encoder counts and robot motion.
  • Construction and building techniques (ball gripper).
  • Transmitting and Receiving Data from an RS-485 Device (NXTBee)
  • Using External Libraries
  • Formatting strings and converting strings to integers

User Notes

Note: The concepts outlined in this lesson are geared towards an intermediate user of ROBOTC and C Programming languages. Students should be comfortable with all material covered in the Teaching ROBOTC for MINDSTORMS curriculum before jumping into any Multi-Robot communication lessons.

  • Remember when using Multi-Robot communications to always start the robot that is the receiver first. Otherwise, the receiving robot will not be listening when the sending robot broadcasts it's message.

Hardware and Software Required



  • The leader NXT robot (Robot A) should be equipped with a single, front-facing sonar sensor.
  • The follower NXT robot (Robot B) does not possess any sensors.
  • Both robots should have the same drive system and wheels.
  • An NXTBee radio should be connected to sensor port 4 of each robot. The radios on each robot should be paired so that there is communication.
  • A simple obstacle course should be setup which requires forward motion, and 90 degree right turn and left turns. In this lab, a single corner piece was setup (see figures.) The follow-up challenges require more advanced obstacles courses.
  • The leader robot should be positioned 1 foot in front of the follower robot.
  • The forward distances to the walls of the obstacle course are unknown and must be determined by the leader robot using the sonar sensor.


  • The goal of the leader robot is to navigate through the 1-corner obstacle course (maze). The required motion consists of a forward path determined by sonar, then a 90 degree right turn, then forward. During the navigation, the leader robot is creating and storing navigation commands, in the form of string messages, which will be sent to the follower robot. When the leader robot completes the navigation of the obstacle course (maze), the leader robot stops, and then transmits a sequence of motion command strings to the follower robot. After each command is transmitted to the follower, the leader waits for a reply from the follower that the motion was completed before transmitting the next command.
  • The leader robot code must take into account the fact that the follower robot was initially positioned 1 foot behind the leader robot. Also, the follower robot should end up approximately 1 foot behind the leader robot at the end of the task.
  • The goal of the follower robot is to establish a loop to receive a sequence of string messages from the leader robot using the NXTBee. Each string command will be parsed and numerical data will be converted into an integer. The possible motions include move forward (based on the encoder count received) or turn right or left. After each command is executed, the follower robot will send a message to the leader that the command has been successfully executed. Based on these received commands, the follower robot will navigate through the obstacle course (maze).


Robot A (Leader) Source Code

Robot B (Follower) Source Code

Follow-up Project: 2-corner Challenge

Goal: Expand the results of the 1-corner challenge to a 2-corner obstacle course (see pictures and video below.) Robot A (leader) should move forward (an unknown distance) to a wall of the first corner, turn right, move forward (an unknown distance) to wall of second corner, then turn left, then move forward to exit the obstacle course. Motion commands should then be sent from Robot A to Robot B so that Robot B can successfully navigate through the obstacles without using any sensors. Robot B should start approximately 1 foot behind Robot A at the start, and Robot B should stop approximately 1 foot behind Robot A after exiting obstacle course. (See video below.)

More Follow-up Projects and Discussion Questions

  1. Modify and expand the obstacle course (maze). For example, add additional turns and complexity.
  2. Add functionality to the follower robot such as carrying payload, etc.
  3. Add functionality to the leader robot software so that if the follower robot fails at some point to execute one the commands, the leader robot will display an error message and the name of the command that failed (Hint: use timer).
  4. Replace wheels/tires with wheels of a different diameter on the leader or follower robot. How does this impact the encoder readings? How would the code need to change?
  5. In this example, the turns were fixed at 90 degrees. Modify this example so that different turning angles can be used.
  6. Modify the leader robot to use another sensor instead of the sonar sensor to determine distances.
  7. Add additional follower robots that will move successfully through the maze based on commands from the leader.
  8. Modify the algorithm so that the follower robot begins to execute commands and moves to follow Robot A before Robot A exits the obstacle course. Be careful of collisions. What are the advantages and disadvantages of this approach?
  9. Create, test, demonstrate and share your own challenge or application based on this technology.
  10. What are some real-world applications of this technology?