Loading…
Loading…
Explore the world of autonomous robots through a hands-on experience with the FTC simulator in this lesson.

Level: Beginner
Explore the world of autonomous driving with a hands-on experience using the FTC simulator in this lesson. Students will engage in practical learning to delve deeper into the fascinating subject of robotics and autonomous driving. Through coding and simulation exercises, they will gain an in-depth understanding of the algorithms and techniques that underpin autonomous robots, preparing them to confidently take on authentic challenges in the field of robotics.
This lesson plan is structured according to the 5E pedagogical framework, a widely recognised instructional model that includes five phases: engage, explore, explain, elaborate, and evaluate. The 5E pedagogical framework systematically engages students in inquiry-based learning, encouraging active exploration and understanding of complex topics.
During the lesson, students will:
develop coding and programming skills for self-driving robots in the FTC simulator, focusing on essential elements such as robot movement and navigation;
explore the principles of autonomous decision-making and algorithm development, enabling them to design effective and reliable behaviours for self-driving robots;
apply the knowledge and skills acquired to practical scenarios, simulating authentic challenges to test and refine their self-driving robot designs in the virtual environment.
removable sticky notes or a collaborative brainstorming app such as Microsoft Whiteboard, Google Jamboard, or Apple Freeform.
devices for your students (Windows computers, Mac computers, ChromeBooks)
Google Chrome or Microsoft Edge (Chromium version) web browser
access to the FTC simulator website (https://ftcsim.org)
a "student" account created for each of your students
projector or interactive whiteboard
To spark your students' curiosity and capture their attention on self-driving robots, use your projector or interactive whiteboard to share an interesting video about the Nuro self-driving vehicle, which you can find by clicking on this link: https://youtu.be/MzsSO1RVPME?si=OiTKTIvoPNaZ2fV1. Nuro illustrates the most recent advances in autonomous vehicle technology and provides a concrete example that can inspire meaningful discussions and learning experiences in your classroom.
After the video presentation, hand out sticky notes to your students and encourage them to take part in a brainstorming session on future potential applications of autonomous self-driving robots. Ask them to write a single idea per sticky note. Assign them a designated area on the classroom wall where they can post their ideas. Once they have come up with several ideas, ask them to gather in the sharing space to post their sticky notes. If an idea has already been posted on the wall, they can place theirs on top of the existing one, whereas if the concept has not yet been posted, they should find an available spot to display it.
Here are some ideas they might come up with:
home delivery of food and packages
self-guided taxis and ridesharing services
automation of farming and crop management
autonomous security patrols in public spaces
mobile food and beverage vending machines
robot-assisted rescue missions in disaster situations
autonomous waste collection and recycling
self-guided courier services for documents and packages
robot-guided tours in museums and historical sites
automated inventory management in warehouses
self-guided public transit systems
autonomous street sweeping and maintenance
self-guided school buses for safer student transportation
delivery of essential supplies to disaster-affected areas.
autonomous robots for planetary exploration, such as Mars rovers.
Facilitate a discussion by asking thought-provoking questions:
What advantages can you identify in the context of autonomous robots? (e.g., they can make tasks such as deliveries easier and faster, and help reduce errors, saving time and money).
What potential disadvantages do you associate with autonomous robots? (e.g., they may eliminate certain jobs, make mistakes, or infringe on privacy).
What impact could the implementation of autonomous self-driving robots have on different industries and daily life? (e.g., they could make transportation and deliveries more convenient, and we might see more and more robots helping in hospitals or even in our homes).
Can you foresee any ethical or safety issues related to the use of autonomous robots? (e.g., robots may sometimes be required to make difficult decisions, and if they break down or are hacked, this can prove dangerous).
In which fields or applications do you think autonomous robots could be most useful? (e.g., they could be ideal for jobs that are dangerous for humans, such as handling hazardous chemicals, exploring space, or assisting people with disabilities).
What societal and economic implications could arise from integrating autonomous robots into our communities? (e.g., some jobs might disappear, but new jobs could emerge in fields such as robotics and computer programming).
Can you think of innovative or surprising uses for autonomous robots beyond those we have discussed? (e.g., they could help protect the environment by monitoring wildlife and flora or cleaning up waste in the oceans).
Please encourage students to begin their hands-on learning experience with the FTC Sim platform by navigating to the following link: https://ftcsim.org/. Ask them to log in using their username and password. Once logged in, direct them to the "Courses" section and guide them to select the course titled "FTC-Movement". Explain to students that in this course, they will learn how to control their robot's movement on a flat surface, using the two motors or wheels installed on the left and right sides of the robot.



In the "FTC-Movement" section, guide students to access the first puzzle titled "1— Line". After opening this puzzle, encourage them to engage with the story involving Lisa and her dog, Dozer. Encourage students to explore the interface and follow the orientation, which allows them to become familiar with the layout and features of the platform.


To access the coding panel, click on the green computer icon on the left side of the screen. You will notice that a sample code is already present. It is essential to inform your students that this code is divided into three main sections, each marked by blue comment blocks:
• Initialization Blocks: This section contains the information the robot needs before beginning its tasks.
• Run Blocks: Most of the code you write will be placed in this section, where the robot's main actions are defined.
• Loop Blocks: These blocks are used for tasks that need to be repeated multiple times. However, for this lesson, we will only work with the initialization and run blocks. The loop section can be deleted to maintain a cleaner code structure.



Zoom in on the robot to highlight the two wheels responsible for controlling its movement. Begin a discussion with students by asking the following question: "How can we ensure that the robot moves in a straight line?" Invite students to share their ideas, with the expected answer being that the robot moves in a straight line when both wheels turn at the same speed.
In the context of robotics, explain the term actuator: an actuator is a component or device that converts electrical energy or other types of energy into physical movement. Actuators play an essential role in enabling robots to perform various tasks by facilitating controlled movements, such as rotating the robot's joints, manipulating robotic arms, or propelling wheels or legs based on given commands or inputs.

Demonstrate how to place a block in the code to control the left motor and the right motor by going to Actuators DC Motor Dual and taking the first block. It should be dragged into the run blocks section.
When the student clicks "run", they may be surprised by the result. Although both wheels turn at the same speed (1 representing maximum speed), the robot does not move in a straight line but instead spins in place. To understand this phenomenon, students need to visualize the location of the motor on the robot. By observing a real robot or referring to the image below, they will notice that the motors are actually oriented in opposite directions. This means that even if we set both motors to the same speed, one of them will move forward while the other moves backward.

Explain that one way to solve the problem would be to remember to always set the first motor in reverse using a negative number.

Add that this could be more efficient because students would always need to remember to do so. It is more efficient to declare that the left motor is reversed in the initialization section.

At this point, students should know where the initialization section and the run blocks are. They can therefore delete the two empty comment blocks.

This command should guide the robot onto the mat and signal to students that the challenge is now complete. Nevertheless, it is essential to clarify that a truly autonomous robot would not continue pushing against the wall once it has reached its target; rather, it would stop before making contact with the wall. To achieve this behaviour, the robot will need to move for a predetermined amount of time and then stop. Ask students to click "Keep working" to improve their solution.
Demonstrate how to add a pause in the instruction with the sleep block available from the LinearOpMode and how to stop with a dual motor block set to a speed of 0 on both wheels. The following code should provide a very clean solution for the first challenge, with the robot finishing right in the middle of the target zone.

Motivate students to determine the duration they prefer for the sleep block. As shown in the previous example, a duration of 700 milliseconds is needed to achieve precise positioning. However, it is recommended to discover the optimal value through experimentation and trial and error. Explain that time is expressed in milliseconds, meaning that 500 is equivalent to half a second.
Once students have achieved perfect positioning, encourage them to retry the first challenge at different speeds. Explain to them that the number was either 1 (maximum speed) or 0 (stop), but that they can choose any number between zero and 1. For example, 0.5 corresponds to 50% of the speed.

Here is an example of code running at half speed (0.5) with a wait time of 1.5 seconds or 1500 milliseconds

Once they have successfully reached the middle of the target at different speeds by adjusting the time, they are ready to move on to the second challenge.

Ask students what the differences and similarities are between the first and second challenges. Students should understand that the robot moves in a straight line in both cases. However, the path is much narrower in the second challenge, and the robot is facing the wrong direction. Ask students to brainstorm some ideas on how this puzzle could be solved. Students will generally have two main ideas:
The first is to move the robot backward by using negative values on both motors. The following solution should work for the second challenge

In this code, the robot moves backward at 50% speed for 1.5 seconds.
The other solution that students may suggest is to turn around and then move in a straight line. In this case, the robot will need to spin its wheels in opposite directions for a certain amount of time, then spin them in the same direction at the same speed to go straight. Here is an example of a solution that works:

Invite students to add comments to their code to explain the different coding blocks they used. Comment blocks are blue and available in the "Miscellaneous" section. Explain that computer engineers work in teams and must document their code with comments to ensure that their colleagues can understand the meaning of their code. Here is an example of the second version of the code for the second challenge with comments added.

Have students communicate the solutions they found to the first two challenges by asking them reflection questions, for example:
Can you explain the problem you tried to solve in these challenges?
What were the main challenges or obstacles you encountered in each challenge?
How did you begin to approach solving the first challenge? And the second?
Did you use any specific strategies or steps to guide you in solving the challenge?
Were there any differences in the way you approached each challenge?
Can you walk me through your code? How does each part of your code contribute to solving the challenge?
How did you choose the values or commands you used in your code?
Did you modify your initial plan during the coding process? If so, what motivated those changes?
How many attempts were needed to solve the challenges? What did you learn from the attempts that did not work?
What mistake did you make and how did you correct it?
How did solving the first challenge help you solve the second?
How could you apply what you learned from these challenges to a real-world problem?
How did understanding motor control and speed influence your approach to solving these challenges?
Encourage students to put the skills they have just acquired into practice to tackle challenges #3 and #4. In these challenges, they will need to deepen their understanding of how the motor works, moving from straight-line movement to mastering turns. While puzzle #2 introduced the concept of pivoting before moving forward, puzzles #3 and #4 require the robot to execute a curved movement without pivoting on itself. This curved movement requires differential speed control, with one wheel moving more slowly and the other more quickly. Encourage students to explain their strategy for adjusting both motors to achieve a curve to the left or to the right. Highlight the real-world analogy that cars do not pivot on the spot; they turn, emphasising that pivoting is generally achieved with a two-wheel design and a pivot wheel for support, or through the use of omnidirectional wheels.

Assessment of the lesson should be carried out through observations and conversations with students while they are coding. Evaluating the effectiveness of the lesson should include observing students as they code and engaging in constructive dialogue with them about their thought process, challenges, and strategies. This approach provides a better understanding of their comprehension and application of the concepts taught, including how they solve problems and refine their code to achieve the desired movements and navigation with the virtual robot. Through these interactions, educators can assess each student's understanding of the concepts, provide targeted feedback, and adjust instruction as needed to support learning outcomes. Here is a list of "checkpoints" to guide your observations and assessment:
Engagement and participation: Observe whether students are actively engaging with the task, experimenting with the code, participating in discussions, or asking questions.
Problem-solving skills: Note students' ability to identify problems in their code, debug errors, and apply logical reasoning to overcome difficulties.
Application of instructions: Check whether students are correctly applying the instructions and guidelines provided for the lesson, such as using the correct blocks or code syntax for movement and navigation.
Creativity and innovation: Look for creative approaches or innovative solutions that students may apply in their coding strategies, beyond the basic requirements of the lesson.
Understanding of motor commands: Observe students' understanding of how motor commands affect the robot's movement, including speed, direction, and the execution of specific turns or manoeuvres.
Response to failure: Pay attention to how students respond to failure or unexpected results, looking for resilience, persistence, and a willingness to experiment and learn from mistakes.