Skip to main content
logo
Forgotten your username or password?
Home
  • English ‎(en)‎
    • English ‎(en)‎
    • Español - Internacional ‎(es)‎
    • Français ‎(fr)‎
    • Türkçe ‎(tr)‎
    • Ελληνικά ‎(el)‎
    • Module 24

      Edge Detection and Safe Robot Navigation

      Programming / Robotics / Engineering

      Module Identity

      Title
      Edge detection and safe robot navigation
      Subject Areas
      Information Technology Natural Sciences Engineering Robotics
      Format
      Experiential learning; Small group work (3-5 students); Observation of robot behavior; Modification of safety parameters.
      Preparation Requirements
      Setup FOSSBot or CoppeliaSim; Load the "sens6_edge_detection" stage; Ensure floor sensors are calibrated.
      Estimated Duration
      45 minutes
      Age Range
      14-15 years old (Upper levels of lower secondary)
      Keywords
      Edge Detection, Floor Sensors, Safety Systems, Logical Operators (AND), If-Else Structures, Risk Avoidance.
      Summary

      Safety is a critical component in the design of autonomous systems. This scenario explores how a robot can utilize floor sensors to detect edges (such as a table's limit) and automatically adjust its behavior to prevent falls. Students work experientially to predict, observe, and program risk avoidance behaviors. By employing logical operators (AND) and selection structures (If-Else If), learners develop algorithms that allow the FOSSBot to recognize dangerous voids and execute safety maneuvers like backing up and turning.

      Introduction

      How does a robot know when it is about to fall? This lesson delves into the mechanics of edge detection using floor sensors. Students engage in a series of activities designed to help them "think like a robot," defining what constitutes an edge and how to react to it.

      Starting with discussions and predictions, students progress to running and modifying complex code. They analyze different hazard scenarios—detecting an edge on the left, right, or both sides—and program appropriate countermeasures. This not only builds programming skills but also highlights the relationship between sensors and real-world safety systems.

      Prerequisite Knowledge

      • • Familiarity with basic selection structures (if – else)
      • • Familiarity with using sensors
      • • Experience with basic robot movement commands
      • • Ability to work effectively in small groups (3–5 people)

      Learning Outcomes

      By the end of this module, students will be able to:

      Conceptual Understanding

      • ✓ Understand how robots make safety decisions based on environmental data
      • ✓ Describe how the robot reacts to different hazard scenarios
      • ✓ Explain why backing up and turning actions increase safety

      Programming & Implementation

      • ✓ Use FOSSBot floor sensors to read surface values
      • ✓ Combine multiple conditions using if – else if structures
      • ✓ Combine conditions using the logical AND operator

      Engineering & Problem-Solving

      • ✓ Program risk avoidance behavior to prevent equipment damage
      • ✓ Modify parameters (backward distance, turning angle) to optimize safety
      • ✓ Relate sensors to real-world safety systems in engineering

      📐 Key Logic & Safety Concepts

      Safe Ground Logic (Logical AND):

      IF (Left != 0 AND Right != 0)
      THEN [Move Forward]

      The robot moves forward only if both sensors detect the floor (ground value is not 0).

      Hazard Detection (If-Else If):

      ELSE IF (Left != 0 AND Right == 0) THEN [Back + Turn Left]
      ELSE IF (Left == 0 AND Right != 0) THEN [Back + Turn Right]

      If the ground disappears under one sensor (value becomes 0), the robot performs a safety maneuver.

      Students observe that moving backwards before turning is crucial to prevent the wheels from slipping off the edge during rotation.

  • Download Lesson Plan
  • Evaluation
Close shade box
Previous section
Next section
  • Download Lesson Plan

    • Download Lesson Plan (EN) File
    • Download Lesson Plan (GR) File
    • Download Lesson Plan (ES) File
    • Download Lesson Plan (TR) File
    • Download Lesson Plan (FR) File
  • Evaluation

    • d

 
Back

The European Commission support for the production of this website does not constitute an endorsement of the contents which reflects the views only of the authors, and the Commission cannot be held responsi­ble for any use which may be made of the information contained therein.

You are currently using guest access (Log in)