Você está na página 1de 4

Worksheet: Full Speed Ahead

Introduction to Mobile Robotics > Full Speed Ahead


This worksheet is provided for reference only. Be sure that you follow the steps in the online directions, and answer the questions at the appropriate times. Fill out all your answers on a separate sheet of paper. Construct

Observations:

What happened when you ran the program? The robot spun in a circle Which motor spun? Motor C spun and motor B didnt, this is why it turned in a circle. 2 What direction did the motor spin? The motor spun to the left-clockwise 3 Did the motor stop spinning on its own? Yes, the motor did stop spinning on its own. 4 Is this the desired behaviour yet? No, the desired behaviour was to go in a straight line. Construct: Run Second Motor

6. Why is the second motor command needed? The second motor is needed to balance the robot out. It also means that the left motor is not just running which is the cause for the robot turning in a circle rather than going in a straight line.

Construct: Stop the Robot

7. Why did the robot not stop at the right place before? The robot did not stop at the right place because instead of stopping at the point we specified it only starts to slow down to a gradual stop.

8. Which of the following determines the order in which blocks are run in the program? Highlight one.

a. The order the blocks are placed on the workspace, regardless of where they are placed. The one you drop first runs first, etc.

b. The order of blocks on the white Sequence beam. The program starts at the small NXT symbol, and follows the blocks in the order they are reached along the white beam. c. There is an order of operations of blocks. The software will always make Motor command blocks run first, and then wait for blocks, then Motor stop blocks. 9. Write a brief one or two sentence explanation of what each block does in the program you wrote (also shown below).

First block: The first block in the sequence tells motor C to go forward 720 degrees. Second block: The second motor block is the same as the first block except tells motor B to rotate forward 720 degrees Third block: This block is a wait for block and it tells the robot to wait 720 degrees before proceeding to the next action. Fourth block: This block tells motor C to stop after it has turned 720 degrees. Fifth block: Like the fourth block, it tells motor B, after 720 degrees, to stop.

10. Look at your program. I. Which icon or icons in the program controlled how far the robot went before stopping? The first, second and third blocks, as they tell motor C and B to turn 720 degrees.

II.

Explain how you could change the program to make the robot go a longer or shorter distance. To make the robot go a shorter or longer distance you would just simply change the degrees the motors turn.

11. Describe the robots new movement pattern if you moved the motor plug from Port B to Port A, but did not change the program. How would you then need to change the program to make the robot go forward again? It made a quarter turn clockwise when we changed the motor plug from Port B to Port A because we didnt

program the motor to run with port A. To make the robot go forward again you would need to change the port setting in motor B to go to Port A

12. How far will the program shown below make the robot run? Look carefully, this is trickier than it seems! The program shown below will make the robot run 720 degrees because the it is set to wait for 720 degrees.

Continue: Full Speed Reverse

Answer the following:

13. What program blocks are different between the moving forward and moving backward behaviours? The program blocks are the same except the setting are different, we changed the direction of the robot to go the other way.

Continue: There and Back (part 1)

Observations:

14. Did your robot perform both actions as expected? If not, what did it do instead? It didnt do as we expected. Instead of moving forwards 720 degrees and backwards 720 degrees it moved forward 720 degrees and backwards 1440 degrees.

Continue: There and Back (part 2)

Answer the following:

15. Why did the rotation sensor need to be reset? The rotation sensor needed to be reset because the robot was going forward the 720 degrees, as we specified, but then reversing to original spot and going

back a further 720. By using the rotation sensor it resets after it has gone forward 720 degrees and then goes back to original spot. 16. When do you need to do this in future programs? You will need to use this when you ask the robot to do two or more actions in a row without it disturbing the action that comes after, so that the robot does what you ask.

Você também pode gostar