Instruction Guide: Turning
This lesson covers using the Move block to control robot turning. Have students work through the "Turning" lesson in NVT2 and complete the Turning Task Assignment Sheet.
Students should be able to use both point and swing turns and understand the differences between them
Students should also understand the U-turn, although there is no challenge which prescribes its use.
Before tackling the Maze challenge, students should review:
- Video Trainer 2: Basics: Programming Primers: Thinking About Programming
-
Video Trainer 2: Basics: Programming Primers: Planning and Behavior
- These videos cover breaking down a large task into smaller behaviors, and then breaking down those behaviors until one can describe the behaviors in terms of the instructions available in the programming language.
- The videos also introduce the idea of pseudocode.
- Alternatively, a Flow Chart may be used as a tool for arranging these identified behaviors in a graphical/visual format. It allows students to design their program at a higher level (the behavioral level) without getting caught up in programming details. This separation between program design and program detail becomes increasingly important as students take on more complex programming tasks. The upcoming introductory lesson on Flow Charts may be previewed to help with this approach.
-
In the Maze Challenge, have students describe how they tackled the problem:
- How did they break down the challenge?
- How did they approach each piece?
-
What techniques did they use:
- Guess and check only?
- View mode to determine the number of rotations for a given maneuver?
- Reuse program pieces that were repeated?
- Use proportions to scale turns and distances?
- Have students share their different approaches so everyone can see how one problem can have many solutions and how other techniques can be used to reduce the tedious guess-and-check method.
Turning Challenges (Task Assingment Sheet)
Beyond the Maze Challenge built into the NVT2 Turning lesson, the following challenges allow students to hone their turning skills and integrate the use of a sensor with turns.
The Captain's Buried Treasure, Part I (pdf file)
Students are required to use precision swing turns to end up where "X" marks the stop. The combination of two obtuse angle turns and three straight stretches provides a good lesson on dead-reckoning navigation (using time or rotations to control movement - no sensors). Some key learning to watch for:
-
Have students begin to break large tasks into smaller individual behaviors to make them more manageable
- Lay the ground work for the future Flow Chart lesson
- Reinforce the importance of adding comments to their programs as an organization tool
- Ensure students are using the prescribed swing turn and understand is implementation details
-
Repeatability is a struggle with plastic robots. Factors which effect repeatability include:
- Initial alignment of the castering wheel
- Initial orientation of tribot - x,y position and rotation
- Slack in drive train (motors, gears wheels)
- Wheel alignment
- Wheel balance (wobble)
- Structural rigidity
- Uneven friction
- Mismatched motors
- Battery level
- Motor control (Move & Motor Blocks)
-
Probe how students developed the parameters for their Move Blocks
- Guess-and-check
- Proportions (figure out distance of one rotation and scale for others, etc.)
- Rotation sensor feedback (use view mode or Move Block feedback panel while physically move the tribot the desired distance - without wheels slipping - and recording the reading for use as the Move Block Duration parameter)
- Discuss why this challenge was so difficult (tedious) and introduce the idea dead-reckoning for navigation versus using sensors to help determine position during navigation. With dead-reckoning, you only know your position at the very beginning and each error or variation compounds on the previous errors or variations.
Dizzy Drills (pdf file)
Students are required to use precision point turns to execute this challenge within the tolerance and time limits. The compactness and speed of a point turn should prove decisive in the choice between turn types. In addition to the above items, some key learning to watch for is:
- Have students explain their reasoning behind turn-type choice
- Repeatability issues will surface again, but should be less pronounced than in the previous challenge
-
Probe how students developed the parameters for their Move Blocks
- Guess-and-check
- Proportions (figure out distance of one rotation and scale for others, etc.)
- Rotation sensor feedback (use view mode or Move Block feedback panel while physically move the tribot the desired distance - without wheels slipping - and recording the reading for use as the Move Block Duration parameter)
Flashlight Follower
This is a more open-ended challenge that combines the new turning skills with prior learning about the light sensor. Students need to create a robot that will follow a flashlight beam through a lengthy course involving turns in both directions. (Note: the robot must follow the flashlight beam, not just respond (e.g. turn) when the light is shined on it or it hears a sound, etc.)
In addition to the above items, some key learning to watch for is:
- Writing a program that repeats the same behavior over and over creates a very long program when done with cut-and-paste - students may discover (or you may want to introduce) the infinite loop to repeat a set of commands
- Reliability and precision of the follower will improve by following the beam on the ground rather than in the air
- This is an application where the light sensor may work better with the LED turned off (ambient light mode) - this creates a larger contrast between beam and no-beam
- There will be a trade-off between speed of the robot and ease of control - students will need to find the optimal balance for the minimum time through the course