A Differentiable Distance Metric for Robotics Through Generalized Alternating Projection
Vinicius Mariano Gonçalves, Shiqing Wei, Eduardo Malacarne S. de Souza, Prashanth Krishnamurthy, Anthony Tzes, Farshad Khorrami
Abstract
In many robotics applications, it is necessary to compute not only the distance between the robot and the environment, but also its derivative - for example, when using control barrier functions. However, since the traditional Euclidean distance is not differentiable, meaning it is not guaranteed to be differentiable everywhere, there is a need for alternative distance metrics that possess this property. Recently, a metric with guaranteed differentiability was proposed GoncalvesSmoothDistances. This approach has some important drawbacks, which we address in this paper. We provide much simpler and practical expressions for the smooth projection for general convex polytopes. Additionally, as opposed to GoncalvesSmoothDistances, we ensure that the distance vanishes as the objects overlap. We show the efficacy of the approach in experimental results. Our proposed distance metric is publicly available through the Python-based simulation package UAIBot.
BibTeX
@inproceedings{ral2026_adifferentiabled,
title = {A Differentiable Distance Metric for Robotics Through Generalized Alternating Projection},
author = {Vinicius Mariano Gonçalves and Shiqing Wei and Eduardo Malacarne S. de Souza and Prashanth Krishnamurthy and Anthony Tzes and Farshad Khorrami},
booktitle = {RA-L 2026},
year = {2026}
}