Object Detection

Connect

Make sure that you can answer the following questions:

– In what driving situations can a car hit an obstacle?
– What factors are crucial to be aware of in order to avoid collisions with obstacles?
– What causes traffic jams in high density areas?

Think about what you have learned, then document it. Describe the problem in your own words. Creatively record your ideas and findings.

road-deer

Construct

Build
Start by constructing this model.

ev3-robot-driving-base

Program
Program your robot to detect any obstacles that might appear while the robot is moving forward (or backward).
Make the robot stop when it detects an object that is less than 20 cm away.
Think about what you have learned, then document it. Describe your pseudocode for this task. Creatively record your ideas and findings.

Consider using these blocks in your solution:

layout-ex-cbs-06

Contemplate

On the road, when a driver sees an object, they slow their car down before coming to a full stop.
Program your wheeled robot to do the same.
If the Ultrasonic Sensor:

– Detects an object less than 10 cm away, make the robot stop
– Detect an object between 10 and 20 cm away, make the robot slow down
– Does not detect any object, continue to move at full speed

Consider using this block in your solution.

Think about what you have learned, then document it. Describe your pseudocode for this task. Creatively record your ideas and findings.

switch-ultra-sonic-sensor-compare-distance-cm-20

Differentiation Option
Get together with the other teams.
Place all of the robots in a vertical line with varying amounts of space between them (just like cars in a traffic jam).
Have everyone start their programs at the same time and see what happens.
Refine your program so that all of the robots continue driving at the same speed with equal distances between them (like well-flowing traffic on a road).

Share
Consider the following questions:
What does “efficiency in programming” mean?
How many variations did the class as a whole come up with? Compare the many possible solutions to the given problem.
Think about what you have learned, then document it. Creatively record and present your ideas, creations, and findings.

Continue

Explore text-based programming solutions for this activity and compare these solutions using different programming languages.