1. A robot comprising: a motion unit; an infrared sensor including an infrared light source to produce pulses of infrared light, optics to focus reflections from the infrared light pulses from different portions of the environment of the robot to different detectors in a 2D array of detectors, the detectors producing indications of distances to the closest object in an associated portion of the environment; and a processor to receive the indications from the infrared sensor, determine a feature in the environment and control the motion unit to avoid the feature.