Safety Bubble Lab
Intermediate RoboticsIntro Python plus classes, NumPy arrays, sensor data, physical units, and supervised robot use.
Before you start
- Complete Camera Module
- Understand depth arrays, masks, minimum values, and meters
- Keep the robot stationary for the initial experiments
Build a depth-camera visualization that labels nearby space as clear, warning, or stop.
Project Outcome
Display two configurable distance zones around the camera and report the closest valid point in each monitored region.
Camera Input
- Depth map in meters
- A region of interest that excludes floor, sky, and robot body
- Validity mask for
NaN, infinity, and out-of-range pixels
Build Stages
- Capture and inspect one depth map.
- Remove invalid measurements.
- Define a forward region of interest.
- Label valid pixels with clear, warning, and stop colors.
- Report the closest robust distance using more than one pixel.
- Test with boxes at measured distances while the robot remains disabled.
First Prototype
Tune two radii and show the current zone plus the closest measured distance.
What To Measure
- Difference between measured and known distance
- Noise on reflective, dark, or angled surfaces
- Effect of region size on false warnings
- Response when depth data becomes invalid
Extensions
- Split the view into left, center, and right zones.
- Plot distance over time.
- Compare minimum and low-percentile distance estimates.
- Add a read-only browser visualization.
Safety Boundary
This visualization is an experiment, not a certified safety system. It must not replace the physical E-stop or the Robot SDK's fail-closed checks.