Line Follow and Obstacle Stop

Advanced AutonomyIntermediate Robotics plus perception pipelines, control loops, coordinate frames, and real-time behavior.

Before you start

  • Complete Camera Module and Robot Module
  • Understand image segmentation, control loops, and physical units
  • Have an instructor present for every motion run

Build a supervised project that estimates the position of a taped floor line and stops when the depth camera reports an obstacle in the forward safety region.

Project Outcome

The robot follows a short taped course at low speed and stops before a person or object enters the configured safety region.

Camera Input

  • Lower image region containing the taped line
  • Forward depth region used only as a stop gate
  • Image center and line-centroid error

Build Stages

  1. Detect the line in saved or live images while the robot stays disabled.
  2. Print line error without sending motor commands.
  3. Define and test the forward depth stop region.
  4. Combine line error and stop state in a mocked control loop.
  5. Review limits, cleanup, and fail-closed behavior with an instructor.
  6. Run the smallest supervised motion test on a clear course.

First Prototype

Display the line mask, line-centroid error, and CLEAR or STOP depth state without enabling the motors.

What To Measure

  • Line-centroid error through turns
  • False line detections
  • Stop distance and invalid-depth behavior
  • Command rate and maximum velocity

Extensions

  • Add proportional steering.
  • Detect when the line is lost and stop immediately.
  • Compare tape colors and lighting conditions.
  • Log line error, depth minimum, and commanded velocity.

Safety Boundary

Obstacle detection supplements the physical E-stop; it does not replace it. Motion requires instructor approval, configured speed limits, guaranteed stop and disable cleanup, and a clear test area.