  The term safety in robotics is often understood as a synonym for avoidance.
Although this perspective has led to progress in path planning and reactive
control, a generalization of this perspective is necessary to include task
semantics relevant to contact-rich manipulation tasks, especially during
teleoperation and to ensure the safety of learned policies.
  We introduce the semantics-aware distance function and a corresponding
computational method based on the Kelvin Transformation. The semantics-aware
distance generalizes signed distance functions by allowing the zero level set
to lie inside of the object in regions where contact is allowed, effectively
incorporating task semantics -- such as object affordances and user intent --
in an adaptive implicit representation of safe sets. In validation experiments
we show the capability of our method to adapt to time-varying semantic
information, and to perform queries in sub-microsecond, enabling applications
in reinforcement learning, trajectory optimization, and motion planning.
