Design Human Avoidance for Warehouse Robots
AmazonSoftware Engineer · Technical ScreenLast updated
This problem evaluates your ability to design a real-time sensor-to-actuator pipeline for an autonomous robot, focusing on latency, sensor fusion, and safety-critical path adjustments.
Problem: Autonomous Robot Obstacle Avoidance
You are tasked with designing the 'Safety & Avoidance' subsystem for a warehouse robot that operates in a dynamic environment with moving human workers and other robots. The robot is equipped with a 360-degree LiDAR, ultrasonic proximity sensors, and wheel encoders.
Requirements:
- Functional Requirements: The system must detect humans in the path, calculate a safe stopping distance, and trigger an emergency stop (E-stop) or trajectory adjustment if a collision risk is detected.
- Latency: The round trip from sensor input to motor controller output must be under 50ms.
- Reliability: The system must account for sensor noise and potential occlusion of human subjects.
Your Design Should Cover:
- Sensor Fusion Strategy: How do you reconcile data from LiDAR (high resolution, long range) and ultrasonic sensors (short range, low resolution) to confirm an object is a human?
- Data Flow: Describe the pipeline from raw sensor data acquisition to the motor command interface.
- Safety Protocol: Define the 'Decision Logic' for when to slow down versus when to execute an emergency stop based on robot velocity and obstacle proximity.
- Failure Modes: How does the system behave if the primary LiDAR sensor reports a 'dirty lens' or stops sending data?
Assumptions:
- Robot max speed: 2 m/s.
- The robot has a pre-loaded map of the warehouse.
- You have access to a middleware layer (e.g., ROS2-like) that handles message passing between nodes.
Hints
Hint 1
Consider implementing a 'Safety Envelope' around the robot that expands dynamically based on the current velocity vector.
Hint 2
Use a Kalman Filter or similar estimation technique to track moving obstacles and predict their trajectory over the next 500ms.
Hint 3
Prioritize a 'Fail-Safe' state where the system defaults to a controlled stop if the heartbeats of critical sensor processes are not detected.
Follow-up questions
- How would you optimize the perception pipeline if the robot encounters a 'crowded' area with 20+ detected objects simultaneously?
- How would you integrate a machine learning model for human pose estimation without violating the 50ms latency constraint?
- If the robot detects an obstacle but the floor is wet, how should the braking logic change?
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.