Your basket

Subtotal
{{ctrl.basketService.subtotal}}
{{ctrl.basketService.lastErrorMessage}}
You have no items in your basket

Explore more at LEGOeducation.com

LEGO, the LEGO logo, DUPLO, MINDSTORMS and the Minifigure are trademarks of the LEGO Group, Ⓒ2017 The LEGO Group.
LEGO Education
View all lessons

Autonomous Parking

Design cars that can park themselves safely without driver intervention.

Coding STEM Engineering Computer Science

LESSON PLAN

CONNECT (5 MINUTES)

Ignite a classroom discussion around the following questions:

  • How do autonomous cars work?
  • What would it take to ensure that autonomous cars are safe?
  • What types of movements do autonomous cars need to perform?

Allow the students to select the tool(s) they find most appropriate for capturing and sharing their ideas. Encourage them document their thoughts using text, videos, images, sketchnotes, or another creative medium.

CONSTRUCT (15 TO 30 MINUTES)

Set up
Before assigning the next task, make sure that you have marked the path the robots must follow and that there is enough space to complete the task. It is a good idea to have students work on a big table or on the floor.

Build
Students will construct the Robot Educator base model, which is a basic wheeled robot.

Have the students perform the following building check before they program their robots:

  • Are the wires correctly connected from the motors to ports B and C?
  • Are the wheels correctly installed?
  • Are the wheels rotating freely?

Program
Have the students begin a new project in the EV3 programming environment.
Have them practice by creating a program that will make the robot turn three times.
Encourage the students to explore different ways of making the wheeled robot move. Have them describe the effect(s) of altering the parameters of each of the blocks that they use.

POSSIBLE SOLUTION: THREE POINT TURN

  1. Start the Program
  2. Turn the driving base and stop after 1.5 seconds.
  3. Turn the driving base left and stop after 1 second.
  4. Move the driving base forward for 3 seconds.
DOWNLOAD SAMPLE PROGRAM
(7 KB, Requires EV3 Desktop Software)

Note
Refer students to the Robot Educator Tutorials for further assistance.

In the EV3 Software :
Robot Educator > Basics > Straight Move
Robot Educator > Basics > Curved Move
Robot Educator > Basics > Tank Move

In the EV3 Programming App :
Robot Educator > Curved Move

CONTEMPLATE (35 MINUTES)

Have the students choose one or all of these autonomous driving scenarios to program:

  • Parallel parking
  • Angle parking
  • Perpendicular parking

They should use a different Programming Canvas for each solution.

Allow the students to select the tool(s) they find most appropriate for capturing and sharing their pseudocode. Encourage them to use text, videos, images, sketchnotes, or another creative medium.

POSSIBLE SOLUTION: PARALLEL PARKING IN AUTONOMOUS MODE

  1. Start the Program.
  2. Drive forward in a straight line at the desired speed.
  3. Wait for 1 second.
  4. Reverse motor rotation while turning for 1,5 rotation.
  5. Reverse motor rotation while turning the other way for 1,5 rotation.
  6. Drive backward in a straight line for 0,5 rotation.
  7. Drive forward in a straight line for 1 rotation.
DOWNLOAD SAMPLE CODE
(7 KB, Requires EV3 Desktop Software)

Differentiation Option
Have the students create a program that simulates appropriate warning lights while parking (e.g., use the EV3 Brick Status Light to display reverse warning lights).

POSSIBLE SOLUTION: SIMULATING REVERSE GEAR AND REVERSE WARNING LIGHTS

  1. Start the Program.
  2. Drive forward in a straight line at the desired speed.
  3. Wait for 1 second.
  4. Turn light on (reverse light).
  5. Reverse motor rotation while turning for 1.5 rotation.
  6. Reverse motor rotation while turning the other way for 1.5 rotation.
  7. Drive backward in a straight line for 0.5 rotation.
  8. Drive forward in a straight line for 1 rotation.
DOWNLOAD SAMPLE CODE
(7 KB, Requires EV3 Desktop Software)

Share
Allow the students to select the tool(s) they find most appropriate for capturing and sharing their creations, unique thinking, and learning process. Encourage them to use text, videos, images, sketchnotes, or another creative medium.
Ask one or two groups to demonstrate their programs. Discuss what works well and what could be improved.

Assessment Opportunity
Specific rubrics for assessing computational thinking skills can be found under 'Assessment'.

CONTINUE (45 MINUTES)

Using Text-Based Programming
Have the students explore text-based programming solutions so they can compare different programming languages.

MakeCode - POSSIBLE SOLUTION

Program with Blocks or JavaScript in your web browser using Microsoft MakeCode editor for LEGO® MINDSTORMS® Education EV3.
You can find the Autonomous Parking Activity Here

Swift Playground - POSSIBLE SOLUTION

ev3.move(forSeconds: 1.5, leftPort: .b, rightPort: .c, leftPower: 50, rightPower: 17)
ev3.move(forSeconds: 1, leftPort: .b, rightPort: .c, leftPower: -17, rightPower: -50)
ev3.move(forSeconds: 3, leftPort: .b, rightPort: .c, leftPower: 50, rightPower: 50)

ROBOT C - POSSIBLE SOLUTION

#pragma config(StandardModel, "EV3_REMBOT")
//*!!Code automatically generated by 'ROBOTC' configuration wizard!!*//

/*
Create a three point turn using timing and steering.
*/

task main()
{
	//Turn to the right and stop after 1.5 seconds.
	setMotorSpeed(motorB, 50);
	setMotorSpeed(motorC, 17);
	sleep(1500);

	//Reverse to the left and stop after 1 second.
	setMotorSpeed(motorB, -17);
	setMotorSpeed(motorC, -50);
	sleep(1000);

	//You should now be straight and facing the other way. Drive off.
	setMotorSpeed(motorB, 50);
	setMotorSpeed(motorC, 50);
	sleep(3000);
}


DOWNLOAD SAMPLE CODE
(1 KB, Requires ROBOTC Software)

IMPORTANT

LEGO Education has no ownership of the ROBOTC platform and does not provide any support or guarantee of the quality of the user experience and technology used. All required set up information is provided by ROBOTC at robotc.net. We recommend always to reinstall the official LEGO MINDSTORMS EV3 Brick firmware when you finish using other programming languages.

Guide to reinstalling EV3 Brick

Other Program solutions

Swift Playground - POSSIBLE SOLUTION

ev3.move (forSeconds: 1, left Port: .b, rightPort: .c, leftPower: 50, rightPower: 50)
ev3.move (for Rotations: 1.5, left Port: .b, rightPort: .c, leftPower: -70, rightPower: -30)
ev3.move (for Rotations: 1.5, left Port: .b, rightPort: .c, leftPower: -30, rightPower: -70)
ev3.move (for Rotations: 0.5, left Port: .b, rightPort: .c, leftPower: -50, rightPower: -50)
ev3.move (for Rotations: 1, left Port: .b, rightPort: .c, leftPower: 50, rightPower: 50)

ROBOT C - POSSIBLE SOLUTION

DOWNLOAD SAMPLE CODE
(1 KB, Requires ROBOTC Software)

Swift Playground - POSSIBLE SOLUTION

ev3.move (forSeconds : 1, left Port: . b, rightPort: . c, leftPower: 50, rightPower: 50)
ev3.brickLightOn (With Color: .orange, inMode: .on)
ev3.move (for Rotations: 1.5, leftPort: .b, rightPort: .c, leftPower: -70, rightPower: -30)
ev3.move (for Rotations: 1.5, leftPort: .b, rightPort: .c, leftPower: -30, rightPower : -70)
ev3.move (for Rotations: 0.5, leftPort: .b, rightPort: .c, leftPower: -50, rightPower: -50)
ev3.move (for Rotations: 1, leftPort: .b, rightPort: .c, leftPower: 50, rightPower: 50)

ROBOT C - POSSIBLE SOLUTION

DOWNLOAD SAMPLE CODE
(1 KB, Requires ROBOTC Software)

TEACHER SUPPORT

KEY OBJECTIVES

Students will:
Understand that algorithms are capable of carrying out a series of instructions in order.
Explore the concept of Outputs by compare different ways in which a wheeled robot can move.

THINGS YOU’LL NEED

ADDITIONAL RESOURCES

COMPATIBILITY

This lesson works on the following operating systems:

EDUCATIONAL STANDARDS

NGSS
MS-ETS1-1. / MS-ETS1-2. / MS-ETS1-3. / MS-ETS1-4.

CSTA
2-A-2-1 / 2-A-7-1 / 2-A-7-3 / 2-A-7-4 / 2-A-5-5 / 2-A-3-9 / 2-A-6-10 / 2-C-4-12 / 2-D-5-16 / 2-I-1-20

STUDENT MATERIAL

STUDENT WORKSHEET

Download, view or share the student worksheet, either as a an online HTML page or a printable PDF

The maximum quantity of an item that can purchased in each transaction is 99.

To inquire about purchasing more than 99 of one item, please call 800-362-4308.

To inquire about purchasing more than 99 of one item, please call 800-362-4738.