TCSS 437 - Robot Challenge 2

Robot #2 can use essentially the same body form as #1. You may need to make some modifications to the front end to accomplish the goals of this challenge. You will need to do a fair amount of researh on the Web regarding sonar range-finding and using light sensors to follow lines on the floor.

Behavior Requirements

Robot #2 will be required to be able to wander in the same fashion as #1. Therefore if you were successful in getting your wander behavior implemented, then you can transfer that code to this robot. In addition to the wander behavior you will need to implement two new behaviors. You will not be using the touch sensors for this robot. The robot will wander in an essentially open arena (no walls). When it detects an object in its vicinity it will approach the object and attempt to come within a very close distance (say within an inch or less). It will act like it is "examining" the object for a few seconds and then resume its wandering. This behavior is based on sensory readings from a sonar range-finder array to be mounted on the front of the robot (actual mechanics of this are up to you and part of the challenge.) You will get the sensors from me when you are ready to start building. Note in the figure below the sensors are shown as being out in front of the robot. You may want to mount them higher on the chasis so that they do not protrude. Do your research on these sensors and how they work!!!

The second behavior uses the light sensors (you will need two of them). Both sensors are pointed downward, and you will need to design a support for them that provides sufficient separation, say two to three inches. The objective here is that as the robot is wandering, if it happens upon a black line on the floor (a trail) it will abandon its wandering and follow the trail. The purpose of having two light sensors is that it can quickly detect when it has lost the line and in which direction it needs to turn to reaquire it. The objective is to minimize the oscillatory motion that would occur if you use only one light sensor.

Performance Requirements

The robot should be able to mediate between the three behaviors in the following fashion:
  1. At all times when not stimulated by either an object in front or a trail, the robot should wander.
  2. If it detects a line it should follow the line and abandon the wander.
  3. If it detects an object in front of it, it should abandon wander or trail following and approach the object.

So, the default behavior is wander. The next priority behavior is follow a trail if it finds one. And the highest priority behavior is to examine an object up close if it detects one.

Fig. 1. Robot wandering but detecting an object in its path.

In Fig. 1, the front of the robot shows the new sensor arrays. The two block-shaped objects in front are the sonar sensors (sonar array) for doing range-finding. The two circles on either side represent the downward looking light sensors. These two sensor arrays take up all three sensor input blocks. You should probably plug the two lights into inputs 1 and 3 and the sonar into input 2.

See me to obtain the extra light sensor and the sonar array.

Fig. 2. Robot approaching an object in a straight line as quickly as possible.

Fig. 3. Robot wandering toward a trail.

Fig. 4. Robot following the trail. Direction does not matter in this exercise.

When following the trail the robot should stay as much on top of the line as possible. It should not lose the line, that is go off so that both light sensors are on the same side of the line.

When approaching an object the robot should get to the object as quickly as it possibly can without colliding with it. It should stop no more than an inch away from the object, but get as close as possible without actually touching it.

Lab Log (journal)

Keep your journal log as before. In this challenge, however, I want you to start by writing down some important considerations/questions that you feel need to be taken into account or answered before starting work. This should be in the form of an outline with major considerations/questions followed by a series of sub-considerations/questions. For example:
  1. How are these behaviors going to interact with one another?
    1. What would happen if the robot detects an object but runs across a line before reaching the object?
    2. What happens if the robot detects an object right after starting to follow a trail?
    3. ???
  2. How will the distance (range) measure change if the robot is at an angle with the front of the object?
    1. Will the objects always be flat?
    2. What should I know about sonar range finding to do this task?
    3. ????
  3. ?????? and more
As you answer these questions or determine the need for the consideration, record your findings in the log.

Turn-in and Demonstration

When you are ready to demonstrate your robot, notify me during class and we will schedule a run. You will get three tries, if needed, to meet the performance requirement(s). Note, however, that to get three tries you will need to submit early enough to allow time for these. Other teams will take priority for their first try if you need additional attempts. These runs should not need ten minutes, but the conditions are highly variable and may require more time in some cases.

Turn in your log file and source code in hardcopy in class.

Grading will be based on the following: