WorksComputer Science
h-NESDF: An Infinitely Differentiable Signed Distance Between Two Sets with Robotic Applications
Abstract
Computing distances between sets is important in many robotic applications, such as motion planning and control. In many applications, derivatives of the distance are needed as well. It is well known that the Euclidean distance is not always differentiable, which create issues to algorithms that need a derivative. In this paper, we introduce NESDF, the Normal Euclidean Signed Distance Function between two general (with mild regularity assumptions but possibly non-convex) sets. This metric is still not differentiable, but it allows us to introduce a generalization, -NESDF, which has a smoothing parameter such that the metric is infinitely differentiable for all and that reduces to the NESDF when goes to . The metric is amenable to GPU parallelization, and thus can be computed efficiently. We show extensive simulation results to evaluate its viability in motion planning.
Introduction
Distance computations are central to robot motion planning, collision detection, and control. Their integration into gradient-based planners and feedback controllers often requires more than accurate distance values: the underlying functions must also provide sufficiently regular derivatives. Control Barrier Functions (CBFs), for example, rely on gradients, and some formulations require higher-order derivatives of distance-like functions to enforce safety constraints [1, 2, 3, 4, 5, 6, 7]. Insufficient regularity can lead to excessively large control inputs [8] or noisy control signals [9]. Motion planners such as CHOMP [10] similarly use distance gradients to update trajectories and resolve collisions during optimization. In this setting, signed distance-like functions are particularly useful because their negative values encode overlap and provide information about infeasible configurations.
However, Euclidean distance functions are generally not differentiable at every configuration [11]. A common source of nonsmoothness is a change in the geometric features that determine the closest points. Such transitions often involve nonunique witness points, namely, pairs of points, one on each object, that attain the minimum distance. This can produce abrupt changes in the distance gradient as the relative pose of the objects varies.
Several works have investigated differentiable alternatives to Euclidean distance functions for robotic applications. The approach in [8] introduced an infinitely differentiable, unsigned distance-like function between convex sets and applied it to second-order kinematic control. The method generalized von Neumann’s alternating projection algorithm into an iterative distance computation, but remained cumbersome to evaluate and did not guarantee a zero value when the sets overlapped. Subsequently, [9] introduced a substantially simpler formulation that correctly vanishes upon overlap, while retaining the convexity assumption and unsigned nature of the function. The work in [12] developed a differentiable distance-like function between a point and an object represented as a set of discrete points, and used it to construct safe and smooth guiding vector fields that avoid collision with obstacles represented as point clouds. Signed differentiable distance metric between convex sets were also developed in [6, 13], using different smoothing techniques and demonstrating applications to CBF-based control. Related constructions also arise outside robotics, particularly in surface reconstruction. For example, [14] reconstructs a smooth approximation of a point-to-set signed distance field from sampled surface data. Similarly, [15] proposes an explicit differentiable level-set formulation that approximates the signed distance to a geometry. The methods discussed above either assume convexity for both extended objects or address point-to-set distances. More recently, [16] introduced a smooth signed distance metric for nonconvex objects aiming to use it within a contact simulation framework. Table I shows comparisons between different differentiable distance approaches.
| Work | Type of Set | Signed | Detect Collision | Time Complexity |
| Liu et al. [14] [14] | A point and a possibly nonconvex set in , represented as a point cloud | Yes | No | per query for the full formula, in which is the number of points. Local evaluation uses nearby points, plus neighbor-search cost |
| Hicken et al. [15] [15] | A point and a possibly nonconvex set in or , represented as a point cloud | Yes | No | per query for the full formula, in which is the number of points. The implementation uses nearest points, plus neighbor-search cost |
| Gonçalves et al. [8] [8] | Two convex sets in . Only give practical approximate formulae for balls, boxes and cylinders. | No | No, with arbitrarily small error as | Iterative, no fixed number of steps |
| Beker et al. [16] [16] | Almost arbitrary sets in , represented as point clouds | Yes | No, with arbitrarily small error as | , where and are the numbers of points in the respective objects |
| Wu et al. (2025) [6] | Two convex polyhedral sets in | Yes | No; conservative for finite smoothing, with arbitrarily small error as | , where and are the numbers of vertices |
| Gonçalves et al. [9] [9] | Two convex sets in . Only gives practical formulae for polyhedra. | No | Yes | Iterative, no fixed number of steps. If the two objects are polyhedral and have faces, respectively, each step is |
| Nunes et al. [12] [12] | Point cloud and a point in | No | Yes | , where is the number of points |
| Bartelt et al. [13] [13] | Two convex polyhedral sets in | Yes | Not exactly, but collision detection can become arbitrarily accurate by increasing the number of normals | , where and are the numbers of vertices and is the number of normals used. The paper proposes, by default, . |
| Ours | Almost arbitrary sets in , one of them at least represented as a point cloud | Yes | No, with arbitrarily small error as | If is represented by a point cloud with points, the complexity is calls of a function related to . If is also a point cloud, each call is , resulting in . |
Table I. Comparison of differentiable distances proposed in the literature. Here, “Detect Collision” means that the differentiable distance is positive if and only if there is no overlap between the objects, and is a smoothing parameter.
In this work, we propose a signed, infinitely differentiable distance-like function between two possibly nonconvex objects. We first introduce the Normal Euclidean Signed Distance Function (NESDF), a potentially nonsmooth function whose sign characterizes separation, contact, and interior overlap. We then apply a smoothing procedure to obtain the -NESDF, which is infinitely differentiable with respect to
smoothly parameterized rigid motions. Its sampled approximation is amenable to GPU parallelization. Figure 1 shows an example of the -NESDF computed for two shapes as one of them rotates, with three different values of , one of them being as , that is, the non-differentiable case.

Figure 1. The proposed NESDF and -NESDF distance metrics between two objects and when one of them is rotating. Note that the NESDF has some sharp corners (non-differentiabilities), whereas the -NESDF is infinitely differentiable.
Our construction differs from the proposed metric in [16] in several respects, bringing some benefits. One distinction concerns the use of the gradient of the metric in a gradient-ascent procedure for resolving overlap between two objects, useful, for example, in motion planning. In some deeply overlapping configurations, the metric in [16] produces an ascent direction that increases geometric overlap, whereas ours produces the correct behavior. These distinctions are examined in detail throughout the paper.
The contributions of this paper are then:
NESDF, the Normal Euclidean Signed Distance Function, a novel signed distance metric between two general, possibly non-convex sets in . We establish that this metric has the expected behavior of being positive when the two objects do not overlap and negative when they overlap. This metric is also amenable for a smoothification procedure.
-NESDF, a smoothed version of NESDF that is infinitely differentiable, with smoothing parameter that controls the smoothing. We show that when , NESDF is recovered. This metric can be implemented in an approximated manner using sampled point clouds and normal vectors, and parallelized on a GPU. This metric brings benefits when compared to other comparable approaches, as [16].
We present extensive computational experiments assessing -NESDF efficiency and usefulness in motion planning.
For readability, all proofs and auxiliary lemmas are deferred to the Appendix.
Basic Notation
Any vector is a column vector unless stated otherwise. represents the transpose of a matrix. For , , the gradient, is a column vector. For a set , represents its boundary, its interior, and its closure. represents the set of -dimensional normalized vectors. represents the set subtraction (all points in not in ). Uniform convergence of to as in a set means that for any , there exists such that
Methodology
The Normal Euclidean Signed Distance Function (NESDF)
In this Subsection, we will propose NESDF, the Normal Euclidean Signed Distance Function, a novel signed metric between two nonconvex shapes. It will be used as a starting point for the true goal of this work, which is to define an infinitely differentiable metric between two objects. We start with the following definition.
Definition 1: (Euclidean Signed Distance Function (ESDF) between a point and a set) Let and let be a compact subset of . The ESDF between and is defined as follows [17]:
There is no single standard definition of the ESDF between two sets and . One definition uses penetration depth [18]; alternatively, one can minimize the point-to-set ESDF over the other set and define , as done for point-cloud clearance in [19]. Neither is readily amenable to smoothing. We therefore will introduce NESDF, that is easier to smooth. First, we need some auxiliary definitions.
Definition 2: (Regular Set) In this paper, a set is called regular if:
It is compact (i.e., closed and bounded);
Its interior is nonempty and ;
Its boundary is orientable;
The normal vector at the boundary exists almost everywhere (i.e., the set of points at which it does not exist has zero measure in ).
Its interior is path connected: any two points and in the interior of can be connected by a continuous path in its interior.
Definition 3: (Normal Function) Let be a regular set. For any point such that the normal vector at the boundary is defined, let as the outward-pointing normal.
Definition 4: (Half-Squared ESDF) Let be a regular set. Let which is finite if is compact. Define .
The function generalizes the half-squared Euclidean distance function used in the unsigned case, where (e.g., [8], [9]) to account for signed distances.
We can now define, under some circumstances, the Normal Euclidean Signed Distance Function (NESDF).
Definition 5: (Non-Degenerate Pair and NESDF) We say that a pair of sets is a nondegenerate pair if
and are regular sets;
The optimizer
is unique;
is differentiable in a neighborhood of ;
The normal vector is continuous in a neighborhood of
Then, for a nondegenerate pair, define the NESDF as
The name reflects the role of the normal vector . At this stage, the definition of the NESDF is incomplete, since it is not defined for pairs that are not nondegenerate. This is not a problem: the NESDF was only created to motivate its smoothed version, in which this nondegeneracy hypothesis will no longer be necessary.
We will now show some properties of the NESDF, starting with the most important one.
Proposition 1: Let be a nondegenerate pair. Then:
Case 1: When and , ;
Case 2: When and , ;
Case 3: When , .
Thus, the NESDF has the expected sign behavior of a signed distance between two objects. In addition, in one particular case, the NESDF is exactly the ESDF.
Proposition 2. If the formula for is extended to a singleton , then, if is a non-degenerate pair, .
The h-NESDF
In this subsection, we will show how to use the NESDF to obtain a smoothed, infinitely differentiable version of this metric. First, we assume a smoothed version of the ESDF:
Definition 6: (h-ESDF) Let be a regular set. Consider a family , parameterized by , and define
We call this family an -ESDF if:
is infinitely differentiable for any .
when ;
when uniformly in every compact set;
as , uniformly on every compact set contained in an open set on which is continuously differentiable;
For any , when uniformly on every compact set.
The last four properties just guarantee that with sufficient regularity for the convergence result below. See Subsection III-B for examples on how to compute the -ESDF. Nevertheless, using , we can define the smoothed version of our NESDF:
Definition 7: (h-NESDF) Consider two regular sets , and a -ESDF . Define a random variable , parametrized by the set and , with values in and density
(in which was defined in (6) for , where is the surface element on . We can then define the -NESDF as

Figure 2. Contour curves of the -NESDF ( m) for a nonconvex U-shaped object and a rounded square object as the center of moves. The black thick contour represents the boundary of , whereas the outer brown contour indicates where the -NESDF is zero
Or, more explicitly:
■
Note that, as opposed to the definition of NESDF, the -NESDF does not require that is a nondegenerate pair. In addition, note that, since is assumed regular, the set of points in which is undefined has zero measure in , and thus their choice of values is irrelevant for the value of the integral that defines .
Figure 2 shows, in the 2D case, the -NESDF between two objects, a rounded square and a U-shaped object . More precisely, it shows the contour curves of the function defined by , in which represents the rounded square depicted in Figure 2 with center .
As , under some conditions, .
Proposition 3: Let be a nondegenerate pair. Then:
■
Note that the -NESDF does not have exactly the same sign properties as the NESDF shown in Proposition 1. Thus, it is not guaranteed to be positive when the objects do not touch or negative when their interiors overlap. However, the -NESDF implements an approximate version of this result, approximating the original result as at the expense of potentially larger derivative magnitudes and sharper transitions. Even though the exact sign property in Proposition 1 does not hold, it is still useful in robotic control and motion planning with the appropriate care, as will be shown.
We will now state results about the differentiability. We will assume that the objects and move as rigid bodies. Thus, there exists and along with static sets such that and . Given the -ESDF , we use:
This choice guarantees that
is constant, avoiding a possible source of nondifferentiability due to the fact that minimum is not a differentiable operator. Then:
Proposition 4: If and are -times differentiable in , so is .
Thus, when the motions are infinitely differentiable, so is the distance function.
Implementation
Implementing the h-NESDF in practice
Assuming that we have the -ESDF function (see the next subsection), we sample points on with respective normals , obtaining pairs . Since the formula for is a weighted average, we replace the integrals by sums, assuming that the points are distributed approximately uniformly over the surface:
For numerical stability reasons, one should subtract from each the value . This does not modify the result theoretically, but in practice help avoiding underflow with the exponentials.
Computing h-ESDF for arbitrary
To obtain an -ESDF for a regular set , we can use the construction in Subsection III-A with and . In this case, we can take for every , since is infinitely differentiable. We therefore obtain
This formula can be applied to different representations of . For example, when its boundary is represented by sampled point–normal pairs, we can use the approximation discussed in Subsection III-A. See Figure 3 for an example of the -ESDF implemented with this technique. In this case, given a set of points and normals sampled approximately uniformly on , the formula reduces to

Figure 3. The Utah-Teapot, sampled as points and normals, and the ESDF (computed using the mesh) and -ESDF (computed using sampled points and normals) signed distance fields. The thick black outline shows the zero level sets. This was computed with the approach described in Subsection III-B.
which is essentially a result that appeared in other papers, as in [14, 16].
Now suppose that is a possibly non-convex polyhedron. Partition its boundary into -dimensional polyhedral pieces . Each piece lies in a plane , where is a unit outward normal. Define

Figure 4. An A-shaped solid and slices of the ESDF and -ESDF. The thick black outline shows the zero level sets. This was computed with the approach described in Subsection III-B for polyhedra.
(14) then becomes
All weights in (17) can underflow when is far from the boundary. To alleviate this, we can multiply every weight by the same factor , for any function , similarly as it was done in Subsection III-A. We then obtain
Since , the common factor cancels:
The ideal is , but it can be relatively expensive to compute. We can use a relatively inexpensive proxy. Let contain the vertices of all the pieces . Let
In three dimensions, we can take the pieces to be triangles. Let be a canonical 2D triangle with vertices , , and , where . Let , be the rigid transformation that maps the 2D canonical triangle, after lifting it to 3D by adding a 0 coordinate, to .
For and , define
Then:
This function can be approximated using Gauss-Legendre quadrature in 2D after using Duffy Transformation [20] to map the triangular region to a square. The nodes and weights should be selected independent of , so the resulting approximation continues infinitely differentiable in . Figure 4 shows the result when this polyhedral procedure is implemented for an “A” shaped polyhedra.
Experimental Evaluation and Comparisons
Qualitative Comparison with beker2025smooth
As mentioned in the introduction, [16] also proposes a differentiable distance metric between two general sets. Just like in our proposed approach, they start from a non-differentiable counterpart and then apply a smoothing procedure.
In their case, they start from:
and then smooth it with a parameter , obtaining a metric . Their procedure to smooth this formula is similar to what is proposed here, and includes a smoothfication of into that is essentially a slight generalization of (15) (just with a general function instead of ). Nevertheless, following the implementation in [16], we will consider, if and has and points respectively, we will define as
which is comparable with the point-cloud based formula that we propose in (13).
Since both approaches start with a non-differentiable metric and smooth it out, obtaining approximations of their original counterparts, it is fair to begin by comparing their unsmoothed counterparts: and .
Let be a sphere with center and radius , and a sphere with center and radius . One can clearly see that , and also that:
and thus .
Now, . In this case, , and . Thus .
The difference now is clear, and . If one uses the gradient of these metrics on to move to make the sphere no longer overlap, gives the proper direction , whereas . Thus, if , then , making the two spheres overlap even more.
Comparison with beker2025smooth: Escape from Overlapping Configurations
The example in the previous subsection shows that the gradient of a signed distance-like function may not always provide a suitable direction for resolving interpenetration. We therefore compare the -NESDF with the smooth metric of [16], named hereafter “Beker” in a large-scale rigid-body separation task. Two initially overlapping objects, and , are considered: remains fixed, while can translate and rotate freely in . For each method, the objective is its corresponding smoothed metric, or , we maximize the corresponding smoothed function, evaluated at the current relative pose.
Let denote either the proposed -NESDF or the smooth metric of [16], expressed as a function of the rigid-body poses. We consider the row vector , defined such that
where is a column vector given by
| Parameter | -NESDF | Beker |
| Smoothing | 0.1 | 0.06 |
| Gain | 2.0 | 0.5 |
| Momentum | 0.3 | 0.3 |
| Step (s) | 0.2 | 0.1 |
| Time limit (s) | 20 | 20 |
Table 2. Parameters used in the separation experiments.
Here, and denote, respectively, the angular velocity and the linear velocity vectors of each body, both expressed in world coordinates.
The operator plays the role of the gradient if its arguments were Euclidean vectors. The row vector can be partitioned as , corresponding to the two bodies, respectively.
In the separation experiments, remains fixed, while is free to move in . Consequently, and
Therefore, at a given configuration of both objects, provides the local ascent direction of the selected metric with respect to the six degrees of freedom of .
To perform the separation task, we employ a gradient-ascent, with playing the role of the gradient, controlled with Nesterov acceleration [21]. Let be the linear operator such that, for any , :
If is the pose of object at step , given parameters , then the Nesterov update can be written as:
in which starts with the initial pose and as the zero vector. This updates run up until there is a separation (validated through Euclidean distance computation) or .
The parameters selected for each algorithm are shown in Table II, together with the selected smoothing factor . The parameters were selected empirically through trial and error, with the aim of maximizing the success rate of each method in achieving geometrically certified separation. Once selected, these parameters were kept unchanged across all configurations. The results can be seen in Table III, in which 40,000 pairs of objects with random initial poses were sampled. The objects were taken from the TetWild dataset [22] and had their surfaces sampled to obtain discrete points that were used in each algorithm. Both algorithms were evaluated on every object pair and initial configuration. The results indicate that -NESDF can perform separations more often than the algorithm in “[16]”.
| Metric | -NESDF | Beker |
| Successful separations | 36,410 | 28,124 |
| Unsuccessful separations | 3,590 | 11,876 |
| Rate (%) | 91.03 | 70.31 |
Table III. Geometrically certified separation results over 40,000 shared initial configurations.
Computational Efficiency
We evaluate the computational efficiency of the -NESDF algorithm, approximated as discussed in Subsection III-A, when the -ESDF for is computed using a point cloud, as described in Subsection III-B. In this case, assuming and have and points, respectively, the computational complexity of the algorithm is of order , since the -NESDF makes calls to the -ESDF of , which in turn has a complexity of . In comparison, as mentioned in Subsection IV-A, [16] uses a similar implementation whose computational complexity, when applied to point clouds, is also .
The -NESDF code was implemented in PyTorch using FP32 precision on an NVIDIA T4 GPU. The shapes were chosen randomly: because the algorithm is explicit rather than iterative, the computational time depends primarily on the number of points in each shape, apart from minor random fluctuations.
We tested 6,000 pairs with ranging from 100 to 2,000. For each pair, we computed as well as its gradient with respect to the poses of both objects. More precisely, let denote the -NESDF as a function of the object poses and . We compute the SE(3) gradient-like quantity as in (26). This gradient was computed using PyTorch’s automatic differentiation. We then aggregated the execution times based on the product . Figure 5 presents the results in milliseconds per distance computation, showing the median (second quartile) alongside the third quartile.

Figure 5. Computational time for the -NESDF and the additional time required to compute its pose gradient.
The GPU implementation also supports batching to compute distances for multiple pairs in parallel. To avoid out-of-memory errors, the batch size was determined empirically as .
Motion Planning Application
To evaluate the applicability of the -NESDF to motion planning, we constructed a synthetic underwater environment represented by an oriented point cloud, as shown in Figure 7. We consider a fully actuated underwater vehicle with independent control of its three translational and three rotational degrees of freedom, such as the BlueROV2 in its Heavy configuration (Figure 6) [23]. For geometric planning, the vehicle is modeled as a rigid body with a box-shaped approximation of its geometry.

Figure 6. The BlueROV2 in its Heavy configuration. Its eight-thruster arrangement provides actuation in all six degrees of freedom [23].
Given initial and goal poses , the motion-planning problem is to find a continuous path connecting these poses while avoiding collisions with the environment. We use a CHOMP-inspired trajectory optimization scheme [10]. The path is discretized into segments, with poses . The endpoints are fixed at and , and the intermediate poses are optimized by maximizing , defined by
Here, denotes the -NESDF between the box representing the vehicle at pose and the environment , represented by its oriented point cloud. The second term rewards a log-sum-exp approximation of the minimum clearance along the discretized path, with smoothing parameter and weight .
The first term penalizes excessive separation between consecutive poses. For poses and , define the weighted pose distance
where , , and balances the translational and rotational contributions. We use the barrier penalty , defined, with , by
Thus, consecutive poses must satisfy the strict spacing bound .
The smooth box field is constructed from the exact signed Euclidean distance to a box. Let represent the current pose of the box . Let be its half-length vector and define and .

Figure 7. Synthetic underwater environment containing rocks, boxes, and vertical pipes, represented by an oriented point cloud with 54,570 points.
| Parameter | Value |
| 0.1 | |
| 30 | |
| 25 | |
| 1 | |
| 0.6 | |
| Momentum | 0.95 |
| Step size | 0.2 |
| 0.5 |
Table 4. Parameters used in the motion-planning experiments.
The exact distance is
where the absolute value and are applied componentwise. We replace maxima and minima by their log-sum-exp approximations with smoothing parameter , expressing as . We also regularize the outer norm as , with . These substitutions yield a -ESDF for the query point and box pose for every .
Optimization proceeds by gradient ascent on , using the Lie-group differential introduced in Subsection IV-B, evaluated with respect to each free pose . The poses are updated using the Nesterov scheme in (30), while the endpoints remain fixed and updates are restricted to the feasible domain of the spacing barrier.
We performed 200 motion-planning trials with randomly sampled pairs of initial and goal poses. Both endpoints were required to be collision-free and sufficiently far apart. In addition, the interpolated initial path was required to intersect the environment, ensuring that each trial required a modification of the initial path to achieve collision avoidance, and thus was not trivial. The initial path was generated by linear interpolation of the translation and shortest-arc quaternion spherical linear interpolation (SLERP) of the rotation [24]. Table IV lists the parameters used in these experiments.
The algorithm was implemented in a NVIDIA T4 GPU using batch calculation for the distance between the object at the poses and the point cloud environment. Figure 8 shows an example of result obtaind from this algorithm, in four different views. The yellow box is the starting pose, the magenta box the final pose, and the red trail the optimized trajectory.

Figure 8. Example of a motion planning performed by the CHOMP-like algorithm.
In the final result, 34% of the 200 tests returned success, with an average computational time of 0.7s.
Conclusion
In this paper, we introduced the -NESDF, a signed and infinitely differentiable distance function between two sets satisfying the stated geometric assumptions. We established theoretical properties, provided guidelines for its approximate implementation, and evaluated its computational efficiency and applicability in robotic, especially motion planning, through numerical experiments. Future work will focus on the following directions:
The -NESDF does not guarantee positivity if and only if the two objects are disjoint, although this property is desirable in many applications. Reference [13] introduced an almost everywhere smooth approximation of the minimum operator, denoted by , that preserves the sign of the exact minimum, that is, . Such an operator may provide a useful ingredient for developing a formulation with exact collision-detection guarantees or, at least, like in [13], one that can be controlled independently of the smoothing parameter at the
expense of computational time. Its potential integration into the -NESDF framework will be investigated in future work.
Direct evaluation of the point-cloud approximation has computational complexity . This cost can become prohibitive for dense point clouds and applications requiring low-latency distance queries, even when GPUs and batching are used. However, the exponential weighting suggests opportunities for acceleration. Indeed, if are the points sampled from object and , if is sufficiently large, this point influence very little in the final calculation. A similar observation applies to the evaluation of itself. These observations motivate investigating spatial data structures, such as k-d trees, to identify and omit negligible contributions without evaluating every point pair. Developing an efficient GPU implementation requires careful management of memory access and thread divergence, together with control of the accumulated approximation error and preservation of smoothness.
Appendix
Lemma 1: Let be a nondegenerate pair. Then there is a scalar such that
Furthermore, .
Proof: Consider the Karush–Kuhn–Tucker (KKT) conditions for the optimization problem defining :
Since when , the KKT stationarity condition tells us that there is a such that .
Now, note that . Since is a signed distance, whenever exists, (the Eikonal equation [17]). Thus, if exists,
where we used the fact that for all . Finally, taking norms on both sides of and using gives the desired result. ■
Lemma 2: Let be a nondegenerate pair. Then:
Case 1: If , then .
Case 2: If , then .
Proof: In Case 1, we claim that we can replace the constraint by without changing the minimizer. Suppose, for a contradiction, that a minimizer of the relaxed problem satisfies , that is, . Since the constraint is inactive, must also be a local minimum of the objective function . But , so . This is impossible: for a regular set, neither the signed distance nor has a local minimum outside its interior. Hence, the relaxed minimizer lies on and coincides with the original by uniqueness. Dual feasibility in the KKT conditions then implies that the Lagrange multiplier is nonpositive. Together with Lemma 1, this gives . Substituting this into the definition of gives the desired result.
Case 2 is similar, but now we replace the constraint by . Suppose, for a contradiction, that a minimizer of the relaxed problem satisfies , that is, . Since the constraint is inactive, must be a local minimum of . This is impossible: implies that , whereas has no local minimum outside . Hence, the relaxed minimizer lies on and coincides with the original by uniqueness. Dual feasibility in the KKT conditions then implies that is nonnegative. Together with Lemma 1, this gives . Substituting this into the definition of gives the desired result. ■
Proof of Proposition 1: For Cases 1 and 2, apply Case 1 of Lemma 2 to obtain . If , then ; if , then .
Case 3 requires two subcases. In addition to , either Case 3.1 or Case 3.2 holds.
In Case 3.1, note that . But
and so . It remains to establish Case 3.2, where . Since is path connected and , the conditions and imply . We can therefore apply Case 2 of Lemma 2: . This is negative because and for all . ■
Proof of Proposition 2: In this case, , , and thus
For a smooth boundary and a unique closest point, this is the ESDF between the point and the set [25]. ■
Lemma 3: On any compact set , define the measure:
in which is the density defined in (7). If is a non-degenerate pair, for any open set that contains (as defined in (3)), there exist positive constants and such that, for sufficiently small:
Proof: Define, for any open set :
Note that if then necessarily . This comes from the fact that minimizes over and it is the unique minimizer (this comes from the fact that the pair is nondegenerate).
Define . Now, still considering an open such that , pick the set with maximum such that and that it is small enough so:
the existence of which comes from the continuity of in a neighborhood of (the ESDF is always continuous everywhere), that and that minimizes in . Thus, due to (42):
Now, choose sufficiently small so that
which is possible because and the third property in Definition 6. Now, note that:
And note that:
Let . Note that since . Thus, note that since . Using the two inequalities for and we obtain the desired result with .
■
Proof of Proposition 3:
Let and . Let be an open subset containing in which is continuous (guaranteed to exist by the non-degeneracy conditions). Set .
Note that, using the triangle inequality and the fact that is a density and thus integrates to one:
We will analyze the integral first. Let . In , we can provide the bound .
In , we can use the fourth property in Definition 6 (uniform convergence of the gradient of ) and assure that for every that we choose, there exists a small enough such that:
Pick small enough so Lemma 3 and (49) holds for the chosen set . Thus, using the triangle inequality and the definition of in (40):
The upper bound of the error can go to 0 when . This is because can be made arbitrarily small, , and the fifth property in Definition 6 guarantees that . Finally, the second property in Definition 6 guarantees that as . And the proof is complete.
■
Proof of Proposition 4: Note the can be written as , in which for all . Thus, differentiability follows if the differentiability of and are established.
We will prove for . The proof for the other follows similarly. The major step is to rewrite the integral using the formulas for the rigid motion.
Now, define , and . Let be defined as
Using (11) and the change of variable , we can write
This is times differentiable as long as is times differentiable in . Since is infinitely differentiable, the limit of differentiability is on , , and .
References
- [1]A. Singletary, K. Klingiebiel, J. Bourne, A. Browning, P. Tokumaru, and A. Ames, “Comparative Analysis of Control Barrier Functions and Artificial Potential Fields for Obstacle Avoidance,” IEEE International Conference on Intelligent Robots and Systems, pp. 8129–8136, 2021.arxiv.org/abs/2010.09819
- [2]A. Singletary, W. Guffey, T. G. Molnar, R. Sinnet, and A. D. Ames, “Safety-Critical Manipulation for Collision-Free Food Preparation,” IEEE Robotics and Automation Letters, vol. 7, no. 4, pp. 10954–10961, 2022.arxiv.org/abs/2205.01026
- [3]A. Thirugnaman, J. Zeng, and K. Sreenath, “Safety-Critical Control and Planning for Obstacle Avoidance between Polytopes with Control Barrier Functions,” Proceedings - IEEE International Conference on Robotics and Automation, vol. 2022-January, pp. 286–292, 2022.
- [4]A. Thirugnaman, J. Zeng, and K. Sreenath, “Quality-based Convex Optimization for Real-time Obstacle Avoidance between Polytopes with Control Barrier Functions,” Proceedings of the American Control Conference, vol. 2022-June, pp. 2239–2246, 2022.
- [5]A. Thirugnaman, J. Zeng, and K. Sreenath, “Control Barrier Functions for Collision Avoidance Between Strongly Convex Regions,” arXiv preprint arXiv:2306.13259, 2023.
- [6]S. Wu, Y. Fang, N. Sun, B. Lu, X. Liang, and Y. Zhao, “Optimization-free smooth control barrier function for polygonal collision avoidance,” IEEE Transactions on Cybernetics, vol. 55, no. 9, pp. 4257–4269, 2025.arxiv.org/abs/2502.16293
- [7]B. G. Ferreira, V. M. Gonçalves, M. A. Santos, and G. V. Raffo, “Point-to-Cloud NMPC with Smooth Avoidance Constraints,” arXiv preprint arXiv:2605.01431, 2026.arxiv.org/abs/2605.01431
- [8]V. M. Gonçalves, A. Tzes, F. Khorrami, and P. Fraisse, “Smooth Distances for Second-Order Kinematic Robot Control,” IEEE Transactions on Robotics, vol. 40, pp. 2950–2966, 2024.DOI
- [9]V. M. Gonçalves, S. Wei, E. Malacarne, S. De Souza, K. Prashanth, A. Tzes, F. Khorrami, E. M. S. de Souza, P. Krishnamurthy, A. Tzes, and F. Khorrami, “A Differentiable Distance Metric for Robotics Through Generalized Alternating Projection,” IEEE Robotics and Automation Letters, pp. 1–8, 2026.arxiv.org/abs/2507.01181
- [10]N. Ratliff, M. Zucker, J. Andrew Bagnell, and S. Srinivasa, “CHOMP: Gradient optimization techniques for efficient motion planning,” Proceedings - IEEE International Conference on Robotics and Automation, pp. 489–494, 2009.DOI
- [11]A. Escande, S. Miossec, M. Benallegue, and A. Kheddar, “A strictly convex hull for computing proximity distances with continuous gradients,” IEEE Transactions on Robotics, vol. 30, no. 3, pp. 666–678, 2014.DOI
- [12]A. H. D. Nunes, V. M. Gonçalves, and L. C. A. Pimenta, “Safe Vector Field for Robot Navigation in n-Dimensions,” IEEE Robotics and Automation Letters, vol. 11, no. 3, pp. 3071–3078, 2026.DOI
- [13]F. Bartelt, A. U. Kaypak, A. Tzes, F. Khorrami, L. C. Pimenta, and V. M. Gonçalves, “H” older signed distance: A differentiable, signed, parallelizable metric for robotics,” arXiv preprint arXiv:2608.07707, 2026.arxiv.org/abs/2608.07707
- [14]S.-L. Liu, H.-X. Guo, H. Pan, P.-S. Wang, X. Tong, and Y. Liu, “Deep implicit moving least-squares functions for 3d reconstruction,” in 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 1788–1797, 2021.arxiv.org/abs/2103.12266
- [15]J. E. Hicken and S. Kaur, “An explicit level-set formula to approximate geometries,” in AIAA SCITECH 2022 Forum, 2022.DOI
- [16]O. Beker, N. Gürtler, J. Shi, A. R. Geist, A. Razmijo, G. Martius, and S. Calinon, “A smooth analytical formulation of collision detection and rigid body dynamics with contact,” in 2025 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 18558–18565, 2025.
- [17]S. Osher and R. Fedkiw, Level Set Methods and Dynamic Implicit Surfaces, vol. 153 of Applied Mathematical Sciences. Springer, 2003.
- [18]J. Schulman, Y. Duan, J. Ho, A. Lee, I. Awwal, H. Bradlow, J. Pan, S. Patil, K. Goldberg, and P. Abbeel, “Motion planning with sequential convex optimization and convex collision checking,” The International Journal of Robotics Research, vol. 33, no. 9, pp. 1251–1270, 2014.DOI
- [19]A. Kuntz, M. Fu, and R. Alterovitz, “Planning high-quality motions for concentric tube robots in point clouds via parallel sampling and optimization,” in Proceedings of the IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pp. 2205–2212, 2019.DOI
- [20]S. Badia, A. F. Martín, and J. Principe, “FEMPAR: An object-oriented parallel finite element framework,” Archives of Computational Methods in Engineering, vol. 25, pp. 195–271, 2018.arxiv.org/abs/1708.01773
- [21]Y. E. Nesterov, “A method of solving a convex programming problem with convergence rate o(1/k²),” Soviet Mathematics Doklady, vol. 27, no. 2, pp. 372–376, 1983.
- [22]Y. Hu, Q. Zhou, X. Gao, A. Jacobson, D. Zorin, and D. Panozzo, “Tetrahedral meshing in the wild,” ACM Transactions on Graphics, vol. 37, no. 4, pp. 60:1–60:14, 2018.DOI
- [23]Blue Robotics, “BlueROV2: Affordable and capable underwater ROV.” https://bluerobotics.com/store/rov/bluerov2/. Accessed: 2026-10-31.
- [24]K. Shoemake, “Animating rotation with quaternion curves,” ACM SIGGRAPH Computer Graphics, vol. 19, no. 3, pp. 245–254, 1985.
- [25]J. A. Baerentzen and H. Aanæs, “Signed distance computation using the angle weighted pseudonormal,” IEEE Transactions on Visualization and Computer Graphics, vol. 11, no. 3, pp. 243–253, 2005.