KatInterview

Safety Subsystem for a Warehouse Robot Near People

System DesignModel answer
MediumModel answerSystem Designroboticssensor-fusionreal-time-systems

Last updated

Design a real-time perception and decision pipeline that keeps a mobile warehouse robot from hitting workers, covering fusion, a 50 ms latency budget, stop-versus-slow logic, and sensor failures.

Collision-Safety Subsystem for an Autonomous Warehouse Robot

Your team is building the safety and collision-avoidance layer for a mobile robot that moves goods around a busy warehouse. Human workers and other robots share the floor with it, and both move unpredictably.

Hardware available

  • A 360-degree LiDAR (long range, fine angular resolution)
  • A set of ultrasonic proximity sensors (short range, coarse resolution)
  • Wheel encoders

Operating assumptions

  • Top speed is 2 m/s.
  • A map of the warehouse is stored on the robot in advance.
  • A ROS2-style publish/subscribe middleware passes messages between software nodes.

What the subsystem must do

  1. Detect people in or near the robot's path, work out how far the robot needs to stop, and trigger either an emergency stop or a path/speed adjustment when a collision is likely.
  2. Keep the delay from sensor reading to motor command under 50 ms.
  3. Stay dependable despite noisy sensors and people who are temporarily hidden from view (for example behind shelving).

Walk through your design, covering:

  • Fusion: how you combine LiDAR and ultrasonic data to decide that an object is a person.
  • Data flow: the path from raw sensor input to the motor-controller interface, including a latency budget.
  • Decision logic: when the robot should merely slow down and when it should perform an emergency stop, based on its speed and the distance to the obstacle.
  • Failure handling: what happens when the LiDAR reports a contaminated window or goes silent.

Explain the trade-offs you make and use rough numbers where they help.

Hints

Hint 1

Start from physics: compute the stopping distance at 2 m/s from reaction time, braking deceleration and a margin, and note how far the robot travels during your 50 ms latency.

Hint 2

Consider splitting the system into a simple, independent safety layer that can cut motor power and a richer perception/planning layer whose goal is to avoid ever triggering the first one.

Hint 3

Do not make safety depend on correctly identifying humans: treat anything unknown as a person and use classification only to relax behavior. For failures, think watchdogs, heartbeats, and a default of stopping when a safety-critical input is lost.