Vous êtes sur la page 1sur 4

Worksheet: Follow the Guidelines

Introduction to Mobile Robotics > Follow the Guidelines


Follow the steps in the online directions, and answer the questions at the appropriate times.

Construct: What is Line Tracking?


Check your understanding:

1. What is the robot looking for? The robot is looking for the light and dark. 2. Which way should it go when it sees light? Why? If the robot sees light it will go right because it veers left if it sees black and if it sees light it knows that it has gone too far left so therefore turns right. 3. Which way should it go when it sees dark? Why? It should go left when it sees dark because it has been programmed to travel on the left side of the line.

Construct: Find the Threshold


Record and check:

4. Record the threshold value you calculated. The threshold we calculated was 46. 5. Classify each of the following light sensor values as light or dark, using the threshold value you calculated for your light sensor. I. 34=dark II. 78=light III. 51=light IV. 40=dark Construct: Create your Program

Check your understanding:

6. Sketch either a filled sun (light) or an empty sun (dark) to show which half of the switch block the program will run for each of the following values (if the Switch Block threshold is 45). I. 91 II. 36 III. 5

91

36,5 and 20

IV.

20

Construct: Control the Motors


Check your understanding:

7. Using your own calculated threshold, describe the motion that the robot will make when the light sensor reads: I. 27: The motor will go forward and veer slightly left because it is a dark reading. II. 38: Like I, the robot will go a bit to the lift and at the same time go forward. III. 91: 91 is a light reading so it will go forward and slightly to the right. IV. 45: The robot will go forward and slightly to the left because according to our threshold this is a dark reading. Contemplate 8. The line tracking behaviour is built by organizing several smaller behaviours to run at certain times. Identify two of these smaller behaviours, and explain what they do in the program and when they are used. The two small behaviours that the robot uses to track the line are that when it sees dark it goes forward and turns to the left and when it sees light it turns to the right when going forward. These two smaller behaviours help the robot to travel along the line because then it sees both light and dark and where to travel.

9. Mele writes this program one afternoon, tests it, and finds that it tracks a line well. However, when she comes back the next morning, it doesnt work! She places her robot on the line and runs the program, but to her surprise, the robot only swing turns to the right in a circle the whole time. Explain what the cause of this problem is, your reasoning for why this is the case, and what needs to be done to fix it. If you dont have any idea what could be wrong, explain instead what steps you would take to help Mele find and fix the issue. For each step, explain how and why you would take that step. The cause of the problem is that the amount of light changes in the room between days. The amount of light all depends on the position of the sun in the sky, the cloud cover and anything shading over the line. These can all affect the robots light reading so it just turns in a circle until it finds the threshold you set the other day. To fix this you just have to measure the threshold again.
10. Imagine that instead of dark tape on a light surface, your classroom has dark

surfaces with light tape on them. i. Would the robot be able to follow the line using your same program? No, the robot wouldnt be able to follow the line using the same program because the light threshold would be different. However, if

the dark classroom was the same darkness as the dark tape and the light tape was the same lightness as the light classroom then it would work. ii. Would it behave exactly the same, or slightly differently? Explain. Yes, it would behave exactly the same if the threshold was correct.

11. Now think about the physical placement of your light sensor on the robot. i. Is the placement of the light sensor important? Yes, the placement of the light sensor is very important because if it was closer or nearer to the ground the threshold would be different. Also if the light sensor wasnt facing downwards it wouldnt be able to see the line and follow it. ii. What happens if you raise or lower the light sensor? If you raise or lower the sensor, the light sensor will pick up less and more light so the threshold will change. What happens if you place it in the rear of the robot instead of the front, but dont change your program? If you place the sensor in the rear end of the robot instead of the front, the robot will still work with the same program and go forward but it will be taking information from behind it so it wont follow the line correctly.

iii.

Continue: The Flip Side


Answer the following:

12. Why does this behaviour track the right side of the line instead of the left? This behaviour tracks the right side of the line instead of the left because it will to go right when it picks up dark and go left when it picks up light. 13. When might this behaviour be useful? This behaviour might be useful when there is an obstacle on the left of the line so you need it to follow to the right side.

Vous aimerez peut-être aussi