Google Classroom
GeoGebraGeoGebra Classroom

A prototype of the self-driving bus

Based on the LEGO Mindstorms EV3 robot.
[left][size=100]Photo by: Janika Leoste[/size][/left]

Photo by: Janika Leoste

Abstract: This activity gives an overview of using the distance sensor of the LEGO Mindstorms EV3 robot. The aim of the activity is to build a self-driving bus prototype by using the LEGO Mindstorms EV3 robot, and to help understand the underlying principles (on the very primitive level) that guide the behavior of self-driving buses.  Keywords: Self-driving bus, LEGO Mindstorms EV3, prototype, robot. Resource list: one LEGO Mindstorms EV3 robot for each team (2-4 members) of students; one controlling device (iPad, Android tablet, Windows 10 PC or Macintosh computer) for each student team, with the LEGO EV3 Classroom app installed.

The background and importance of the topic

Self-driving buses are a specialized form of self-driving cars. The first experiments with self-driving cars date back to the 1920s, but the very first semi-automatic car was developed in 1977, in Japan. This car was able to drive up to 30 km/h, and used two cameras, an analog computer and an elevated rail to drive on specially marked streets. With the help of advanced digital technologies, including powerful CPUs, cameras, big data and AI, the modern self-driving cars are able to drive independently thousands of kilometers. At the moment, as the technology still isn’t mature enough, the topic of self-driving buses is less studied although they offer various positive aspects. For example, self-driving buses have the potential of decreasing operational costs, reducing road congestion, and reducing transport emissions (Mouratidis & Cobena Serrano, 2021). In addition, self-driving buses could bring down the number of bus-related crashes (Gibson, 2022). In its essence, a self-driving bus is a robot. It has a robotic body, including various advanced sensors for establishing its position on the road, detecting possible hazards and following surrounding traffic, including pedestrians. This robotic body is driven by a combination of advanced software, including computer vision, machine learning, big data, and artificial intelligence. In a primitive way, a self-driving bus can be imitated in the classroom settings by using simple educational robots (depending on the skills, knowledge and abilities of the students). The purpose of such imitation would be introducing the concept of self-driving buses to students and to encourage them to learn some of the related principles of programming and robot building. 

The activity description

In this activity we are using the LEGO Mindstorms EV3 robot to imitate a self-driving last-mile bus that drives from one destination to another and back (for example, from the school to the railway station and back). Also, our example program detects if a pedestrian steps on the road and then, to avoid collision, stops the bus for letting the pedestrian pass and then continues to drive. The LEGO Mindstorms EV3 is a popular and good quality robot set that allows building several types of robots (walking, crawling, driving, etc.). In our example we are using the “Driving base” robot (see the instructions here) that has two driving motors (allowing turning) and several sensors (allowing basic interaction with the surrounding environment). The behavior of the robot is determined by its program – and in our example we are using the LEGO EV3 Classroom app to program it. The programming is easy, as the app is based on the popular Scratch programming language with a target audience of ages 8 to 16.  The given example can be realized with other educational robots, even with the kindergarten-level BeeBot robot. In these cases, the programs should be simplified and customized to the requirements of the relevant programming languages (or, in the case of the BeeBot robot, it needs to be programmed with its buttons).

The activity solution

The program is formed of three logical blocks that are started simultaneously when the program is run. When you build the program, follow the example and place all three blocks to the same program page. When executing the example program, the robot (1) drives 4 wheel rotations (with standard 56 mm diameter wheel this is roughly 70 cm); (2) turns around; (3) drives back 70 cm; (4) turns around; and (5) stops in its initial position. The robot tracks the area in front of it while driving. When a pedestrian is detected then the robot stops and beeps until the road is clear again – it will continue its initial mission then.

Demonstration video

[size=100]Photo by: Janika Leoste[/size]
Photo by: Janika Leoste

Enhancing the activity

Try modifying the program to make it more interesting or meaningful to your purposes. Make use of other sensors and robot features (e.g., try line following, change the color of the robot’s LED lights, let the robot show an image or make different sounds). You could also allow human operators to somewhat control the robot by using the touch sensor (e.g., the “self-driving bus” stops when the user presses the stop button – and continues either automatically or when the button is pressed again).

Knowledge test

Choose the right answers!

When was the idea of self-driving cars first introduced?

Select all that apply
  • A
  • B
  • C
Check my answer (3)

What technologies are important for modern self-driving buses?

Select all that apply
  • A
  • B
  • C
  • D
Check my answer (3)

LEGO Mindstorms EV3 is …

Select all that apply
  • A
  • B
  • C
Check my answer (3)

Conducting a workshop

This STEAM learning activity workshop is addressed to familiarize pre- and in-service secondary school teachers with Educational Robots (ER) as didactic tools. In particular, this activity introduces hardware and software ER related concepts to teachers without any previous robotics experience, providing them with some examples and discussions about actual classroom activities.  The participants will construct and program a LEGO Mindstorms EV3 robot based prototype of a self-driving bus in this workshop. Consequently, the task for the participants is to make their robot travel from one destination to another while detecting pedestrians on its path. As commented above, we don’t expect participants to have any previous knowledge about programming or working with robots. But within the workshop, participants will become familiarized with the concepts of robots and robot programming, applying simple math measurements and calculations in order to create code for the different robots. Collaborative teamwork, problem solving skills, digital skills, self-paced learning and peer tutoring are employed. The robot to be used in this workshop is the LEGO Mindstorms EV3 robot.

Workshop

At the beginning of the workshop we supply participants with the vocabulary, terms and concepts needed for using ERs. We explain afterwards the role of ERs as engaging learning tools and how the usage of them could be connected to different subjects. Then we cover the topic of age-appropriateness of robots. We also describe the principles of block-based programming by drawing analogies with language learning and forming sentences. We discuss afterwards for some minutes the concepts of inputs and outputs of the robots used in the workshop and describe in detail how to put all these robots to move and what the loop (repetition) block stands for. Last but not least, for the theoretical part we share our research-based understanding of why robots and other STEAM sets are still not widely used by teachers. Next we form three robot-centered teams (one team per type of robot) and we continue with solving the challenge. The teams have to negotiate about the path their robot should move on and sensors their robot is going to use for detecting its surrounding environment. Next they have to familiarize themselves with the robot their team selected, and program the robot so that it acts as a self-driving bus. When doing so, math calculations, together with logic and research mindset will help participants to achieve the best possible solution. The teams will present their solutions to other teams. Finally, a group discussion will take place, where team members first will discuss among each other and then share to everybody their thoughts about the workshop activity and its pedagogical benefits on interdisciplinary teaching, emphasis on math, arts, robotics and coding. The learning outcomes for the participants are listed below. Each participant is able to:

  • see the possibilities of using ERs as motivating tools in math and art classes;
  • program simple movements of the LEGO Mindstorms EV3 robot with the help of step-by-step instructions;
  • use digital interactive learning resources created in GeoGebra;
  • critically evaluate the quality and applicability of the digital learning resource.

The 90 minutes workshop will give teachers hands-on experience and emotion about how they could benefit from robots as learning tools during their regular math lessons. We hope to have a fruitful discussion with the workshop participants about the effectiveness of such short workshops. The focus of the discussion is to find out whether these workshops can be used for creating awareness about the benefits of STEAM kits, especially robots, and reducing the anxiety towards using STEAM in teaching practices.

For learners with special needs

Students who are sensitive to sounds could use headphones to turn down the sound of the robot. Students who are sensitive to colors could use LEGO bricks of their favorite color and/or LED lights. Students who are sensitive to flashing lights (epilepsy) should be able to use constant light. To support students with vision problems, it should be ensured that the room is adequately lit. Sometimes it is difficult for students with ASD to make choices and/or solve creative tasks - they should be gently directed to solve a specific task. Students with learning difficulties and/or low cognitive abilities should get to know the robot individually before performing activities with a group - this will help them better understand the task and be successful in joint activities.

The alternative activity

If you do not have access to real robots, there are plenty of virtual robotic programming environments on the Internet. In this video https://youtu.be/xrcPw_Mspu0 we will introduce the GearsBot environment where you can design, program and test your robots: https://gears.aposteriori.com.sg/ . The files are available at this link:

  • link_to_gearsbot_website.url is a link to the gearsbot website.
  • gearsbot-robot.json is the description of the virtual robot. Open it with the “Load world” command.

  • program.xml is the program for the virtual robot. Open the program with the “Load program” command.

  • self-driving-bus-program.PNG is the screenshot of the program. This is how your program should look like.

References

Created by

Janika Leoste, Maire Tuul, Sirly Väät and Tiiu Tammemäe - Tallinn University