Lab #2
Introduction to the Robolab environment.
© D. Weinberger and
D. Thiébaut
Follow these steps:
Next:
Obersving the influence of the connectors:
EXERCISE: Think of a way to use the Pilot 1 program and make both motors turn. Think carefully, this is a tricky problem! |
EXERCISE: Figure out a way to make the robot go straight. |
Last experiments with the Pilot 1 program:
Go back to the window that shows the menu of the Pilot programs, and double-click on Pilot 2.
EXERCISE: Modify the program so that your pathfinder robot goes around the floor following a square path. |
EXERCISE: Modify your solution program for the last exercise so that your robot goes in a square path in the opposite direction. |
OPTIONAL EXERCISE: Move to the hallway. Using masking tape, mark the borders of a square on the floor containing 4 tiles (2 tiles by 2 tiles). Using additional masking tape, mark a larger square containing the smaller one, and such that the larger square contains 9 tiles (3 tiles by 3 tiles). Tune your program so that your Pathfinder robot will go around the small masking-taped square and inside the large masking-taped square without ever going over the tape. |
EXERCISE: Make your Pathfinder start in the middle of the black oval, go straight until it finds the black line, stop at the black line, and reverse direction while turning. Make this last phase of going backward last a second or two only. |
EXERCISE: Modify your previous program so that the Pathfinder keeps on going around, going straight until it finds the black line, backing up while turning every time it encounters the black line, and then resuming going straight. |
Here is a way to start it:
% cp webpageskel.htm lab2.htm % chmod a+r lab2.htm % emacs lab2.htm
Make sure the page contains the following information:
Start Motor A, forward, power 3 Motor C, stop Light sensor 1, go if less than 55 Wait 4 seconds Stop.