  With the increasing prevalence of complex vision-based sensing methods for
use in obstacle identification and state estimation, characterizing
environment-dependent measurement errors has become a difficult and essential
part of modern robotics. This paper presents a self-supervised learning
approach to safety-critical control. In particular, the uncertainty associated
with stereo vision is estimated, and adapted online to new visual environments,
wherein this estimate is leveraged in a safety-critical controller in a robust
fashion. To this end, we propose an algorithm that exploits the structure of
stereo-vision to learn an uncertainty estimate without the need for
ground-truth data. We then robustify existing Control Barrier Function-based
controllers to provide safety in the presence of this uncertainty estimate. We
demonstrate the efficacy of our method on a quadrupedal robot in a variety of
environments. When not using our method safety is violated. With offline
training alone we observe the robot is safe, but overly-conservative. With our
online method the quadruped remains safe and conservatism is reduced.
