Obstacle Detecting Behavior
Check Your Understanding:
1. Why doesn't this program work for Obstacle Detection?
The Forward command should not be set to 50% power
The forward command block has control, and prevents the program from checking sensors or running other blocks until the forward command finishes counting 4 rotations.
The program should use the Gyro sensor instead of the Distance sensor
The Forward command should be set to 6 rotations instead of 4
True or False
: The repeatUntil block simultaneously, and continuously checks the left motor rotations while blocks inside holds the program flow.
3. Why doesn’t this program work for Obstacle Detection?
repeatUntil Loop block does not check the correct sensor.
You cannot have two waitUntil commands in sequence that way
The first waitUntil block should be 'Distance Value greater than 100' and the second waitUntil block should be 'Distance Value less than 100'
The waitUntil blocks prevent program flow from reaching the end of the Loop to check the Motor Encoder.
4. Instead of using a Waiting approach or long movements, the solution you will learn in the next lesson will involve:
Continuous checking of sensors
Sensor recombination forks
A new multiple-sensor Wait Block
A new type of Loop Block
Copyright(c)2012 Carnegie Mellon Robotics Academy. All rights reserved.