Efficient Probabilistic Collision Detection for Non-Gaussian Noise Distributions
Jae Sung Park Dinesh Manocha


Mass- and energy-conserved numerical schemes for nonlinear Schrödinger equations
    
Xiaobing FengDepartment of Mathematics, The University of
Tennessee, Knoxville, TN 37996, U.S.A.  (xfeng@math.utk.edu)



Hailiang LiuDepartment of Mathematics, Iowa State University, Ames, IA 50011, U.S.A.
(hliu@iastate.edu).
Shu MaDepartment of Applied Mathematics, Northwestern Polytechnical University, 
Xian, Shaanxi, 710065, P. R. China.
(mashu@mail.nwpu.edu.cn). 

    December 30, 2023
========================================================================================================================================================================================================================================================================================================================================================================================

empty
empty


We present an efficient algorithm to compute tight upper bounds of collision probability between two objects with positional uncertainties, whose error distributions are represented with  non-Gaussian forms. Our approach can handle noisy datasets from depth sensors, whose distributions may correspond  to  Truncated Gaussian, Weighted Samples, or Truncated Gaussian Mixture Model.  We derive tight probability bounds for convex shapes and extend them to   non-convex shapes using hierarchical representations. We highlight the benefits of our approach over prior  probabilistic collision detection algorithms in terms of tighter bounds (10x) and improved running time (3x). Moreover, we use our tight bounds to design an efficient and accurate motion planning algorithm for a 7-DOF robot arm operating in tight scenarios with sensor and motion uncertainties.




§ INTRODUCTION


Efficient collision detection is an important problem in robot motion planning, physics-based simulation, and geometric applications.
Earlier work in collision detection focused on fast algorithms for rigid convex polytopes and non-convex shapes and later extended to non-rigid models <cit.>.
Most of these methods assume that an exact geometric representation of the objects is known in terms of triangles or continuous surfaces <cit.> and the output of collision query is a simple binary outcome.

As robots navigate and interact with real-world objects, we need algorithms for motion planning and collision detection that can handle environmental uncertainty. 
In particular, robots operate with sensor data, and it is hard to obtain an exact shape or pose of an object.
For example, depth cameras are widely used in robotics applications and the captured representations may have errors that correspond to lighting, calibration, or object surfaces <cit.>.
This gives rise to probabilistic collision detection, where the goal is to compute the probability of in-collision state by modeling the uncertainty using some probabilistic distribution.

Many collision detection algorithms have been proposed to account for such uncertainties <cit.>.
In practice, it is hard to analytically compute the collision probability for all probabilistic representations of uncertainties.
Most prior work on probabilistic collision detection is limited to Gaussian distributions <cit.>.
However, these formulations may not work well when objects are captured by a depth sensor.
Even the process of capturing static objects can result in depth images, where the depth values can vary between consecutive frames due to different noise sources.
The dynamic objects in the scene can pose additional problems due to sensor noise and the uncertainties introduced by the objects' motions.
Moreover, Gaussian process dynamical models used to represent human motion <cit.> have an inherited uncertainty in the Gaussian variances as the central motion is represented using  Gaussian means.



In many applications, it is necessary to use non-Gaussian models for uncertainties <cit.>.
These include Truncated Gaussian with bounded domains for sensory noises <cit.> to represent the position uncertainties for a point robot position <cit.>.
Other techniques model the uncertainty as a Partially Observable Markov Decision Process (POMDP) <cit.>.

Main Results:
We present efficient algorithms to compute the collision probability for error distributions corresponding to a variety of non-Gaussian models, including weighted samples and Truncated Gaussian (TG).
Our approach is based on modeling the TG error distribution and represent the collision probability using a volume integral (Section 4).
We present efficient techniques to evaluate the integral and highlight the benefits over prior methods for probabilistic collision detection.
We evaluate their performance on synthetic as well as real-world datasets captured using depth cameras (Section 5). Furthermore, we show that our efficient probabilistic collision detection algorithm can be used for real-time robot motion planning of a 7-DOF manipulator in tight scenarios with depth sensors. Some novel components of our work include:



  * A novel method to perform probabilistic collision detection for TG Mixture Models based on appropriately formulating of the vector field, and computing an upper bound using divergence theorem on the resulting integral.
Moreover, we present an efficient method to evaluate this bound for convex and non-convex shapes.

  * We show that TG outperforms normal Gaussian, and Truncated Gaussian Mixture Model (TGMM) outperforms Gaussian Mixture Model (GMM). In practice, probabilistic formulation is less conservative than prior methods and results in 5-9× accuracy in terms of collision probability computation (Table 1).

  * We have combined our probabilistic collision formulation with an optimization-based realtime robot motion planner that accounts for positional uncertainty from depth sensors.
Our modified planner is less conservative in terms of computing paths in tight scenarios.



§ RELATED WORK


We give a brief overview of prior work on probabilistic collision detection.



 §.§ Probabilistic Collision Detection for Gaussian Errors


Many approaches to compute the collision probability in uncertain robotic environments approximate the noises using a single Gaussian or a mixture of Gaussian distributions to simplify the computations.
Such approaches are widely used in 2D environments for autonomous driving cars to avoid collisions with cars or pedestrians.
Xu et al. <cit.> use Linear-Quadratic Gaussian to model the stochastic states of car positions on the road. Collision detection under uncertainty is performed by computing the Minkowski sum of Gaussian ellipse boundary and the rectangular car model and checking for overlap with other rectangular car model.
Park et al. <cit.> present An efficient algorithm to compute upper bound of collision probability with Gaussian error distributions  <cit.>. 
This approach can be extended to Truncated Gaussian because the probability density function (PDF) of a Truncated Gaussian inside its ellipsoidal domain has the same value  as that of the PDF of a Gaussian. Therefore, the  upper bound computed using  <cit.>  also holds for Truncated Gaussian error distributions, but the bound is not tight.
Moreover, a Truncated Gaussian distribution has a bounded ellipsoidal domain and the integral computations outside the domain can be omitted. As compared to this approach, our new algorithm improves the tightness of the upper bound and the running time, as shown in Section 5.



 §.§ Probabilistic Collision Detection for Non-Gaussian Errors


The collision probability for non-Gaussian error distributions can be computed with Monte Carlo sampling <cit.>. However, these methods are much slower  (10-1000 times), as compared to probabilistic algorithms that use  Gaussian forms of error distributions <cit.>.
Althoff et al. <cit.> use a non-Gaussian probability distribution model on the future states of other cars on the road, based on their positions, speeds, and road geometry. They use a 2D grid discretization of the state space and  Markov chain to compute the probability that a car belongs to a cell. This method assumes that the environment sensors has no noise.
Lambert et al. <cit.> use a Monte Carlo approach, taking advantage of the probability density function represented as a Gaussian. Other methods have been proposed for point clouds using classification <cit.> or Monte-Carlo integration <cit.>.
Approaches based on Partially Observable Markov Decision Processes (POMDPs) make efficient decisions about the robot actions in a partially observable state in an uncertain environment <cit.>.
Some applications using POMDPs <cit.> have been developed to avoid collisions in an uncertain environment, where the uncertainty is represented with a non-Gaussian probability distribution. Our approach for non-Gaussian distributions is different and complementary with respect to these methods.



 §.§ Probabilistic Collision Detection: Applications


Many approaches have been proposed for collision checking for general applications.
Aoude et al. <cit.> represent the uncertainty model for point obstacles as a Gaussian Process and positional error is represented by a Gaussian distribution that propagates over a discretized time domain. The upper bound on collision probability is computed on the Gaussian positional error with an erf(·) function for a point obstacle.
Fisac et al. <cit.> compute the collision probability between the dynamic human motion and a robot, and use that value for robot motion planning in the 3D workspace. This algorithm models the human motion based on human dynamics, discretizes the 3D workspace into smaller grids, and integrates the cell probabilities over the volume occupied by the robot.
Probabilistic collision detection for a Gaussian error distribution <cit.> has been used for optimization-based robot motion planning.
The collision constraint used in the optimization formulation is that the collision probability should be less than 5% at any robot configuration in the resulting trajectory.
However, with Gaussian error distributions, the upper bound of collision probability is rather conservative. As a result, these approaches do not work well in tight spaces or narrow passages.



§ OVERVIEW


In this section, we introduce the terminology used in the paper and give an overview of our approach. Our algorithm is designed for environments, where the 
 scene data is captured using sensors and only partial observations are  available.
In this case, the goal is to compute the collision probability between two objects, when one or both objects are represented with uncertainties and some of the input information such as positions or orientations of polygons or point clouds are given as probability distributions



 §.§ Probabilistic Collision Detection


The input of the probabilistic collision detection is two 3D shapes A and B, and  two 3D positional error distributions P_A and P_B that are probabilistically independent of each other.
The positional error distributions P_A and P_B denote the probability density function over 3D space of translations from the origins of objects A and B, respectively.
The output of the algorithm is p_col, the probability of in-collision state between A and B, where the objects can be translated with the error distributions.

The collision probability p_col, given two input shapes A and B and the error distributions p_A and p_B, can be formulated as

    p_col = ∭_ϵ_A∭_ϵ_B    I ( (A + ϵ_A) ∩ (B + ϵ_B) ≠∅) 
        p(ϵ_A) p(ϵ_B) dϵ_A dϵ_B,


    ϵ_A ∼ P_A,   ϵ_B ∼ P_B,

where I(·) is an indicator function which yields 1 if the condition is true and 0 otherwise, ϵ_A and ϵ_B are the displacement vectors for A and B with the probability distribution P_A and P_B, and ⊕ denotes the Minkowski sum operator between two shapes.

To generalize, we shift only one object A by ϵ = ϵ_A - ϵ_B which follows a probabilistic distribution P_AB, instead of shifting the two objects separately by ϵ_A and ϵ_B.
Because of the independence of probabilistic distributions P_A and P_B, the convolution P_AB of P_A and P_B can be expressed as:

    f_AB(𝐱) = ∭_𝐲 f_A(𝐲) f_B(𝐱-𝐲) d𝐲,

where f_AB, f_A, f_B are the probability density functions of P_AB, P_A, P_B, respectively.




 §.§ Probabilistic Collision Detection for Gaussian Error


The general probabilistic collision detection problem is hard to solve, when the error distributions P_A and P_B have any arbitrary form.   
The convolution operator in (Equation (<ref>)) can be hard to formulate in the general case. 
However, it is known that the convolution of two Gaussians is also Gaussian.
This generalizes the use of two error distributions into one, yielding the following:

    p_col   = ∭_ϵ I ( (A + ϵ) ⊕ B) ≠∅) p(ϵ) dϵ
       = ∭_ϵ I ( ϵ∈ (-A) ⊕ B ) p(ϵ) dϵ,   ϵ∼ P_AB.

Probabilistic collision detection with the Gaussian distribution condition can be solved efficiently <cit.>, where P_A and P_B also correspond to Gaussian distributions. This algorithm computes a good upper bound on collision probability for convex and non-convex shapes by efficiently linearizing the Gaussian along the minimum displacement vector direction. In practice, the resulting bounds are conservative.


§ TRUNCATED GAUSSIAN MIXTURE MODEL ERROR DISTRIBUTION


In this section, we present an efficient algorithm for
Truncated Gaussian Mixture Model (TGMM) error distributions, which is a more general type of noise model for robotics applications.
To compute the collision probability for TGMM, we first introduce the solutions for simpler error distributions corresponding to Truncated Gaussian (TG) and Weighted Samples (WS). We combine these two algorithms to design an algorithm for a multiple Truncated Gaussian error distribution model.



 §.§ Truncated Gaussian Mixture Models


A TGMM consists of multiple Truncated Gaussian (TG) distributions, each distribution with a truncated domain.
The probability density function of a TG, f_TG, can be formulated as:

    f_TG(𝐱; μ, Σ, r)    =
        1/η g(𝐱 ; μ, Σ)     (𝐱 - μ)^T Σ^-1 (𝐱 - μ) ≤ r 
    
            0    otherwise,

where g is the probability density function of a Gaussian, μ is the mean, Σ is the variance, r is the radius of bound in the coordinates of the principal axes, and η is the truncation rate used to compensate the loss of truncated volume of probability outside the bound.
A TGMM consists of n TGs with multiple weights w_i.
The probability density function of the TGMM, f_TGMM, can be formulated using the definition of f_TG in Equation (<ref>), as:

    f_TGMM(𝐱) = ∑_i=1^n w_i f_TG(𝐱; μ_i, Σ_i, r_i),   ∑_i=1^n w_i = 1.

As the radii of TGs decrease and converge to zero, the probability model behaves like a discrete probability distribution, which we call Weighted Samples (WS).
The WS is a discrete probability distribution, formulated as:

    P(𝐗 = 𝐱_i) = w_i,   ∑_i=1^n w_i = 1

where 𝐱_i is a sample in IR^d, and w_i is a weight of the sample, for i=1,⋯,n.




 §.§ Collision Probability for Truncated Gaussian


The TG is a Gaussian with a specific form of bounded domain. The bounded domain for 3D Truncated Gaussian is an ellipsoid, centered at the Gaussian mean and having the same principal axes as those of Gaussian variances.
The TG is formulated with a collision probability function as

    p_col   = ∭_V_AB f_TG(𝐱; μ, Σ, r) d𝐱,

where V_AB = -A ⊕ B, f_TG is the probability density function for TG, μ is the mean, Σ is the variance, r is the radius of bound in the coordinates of the principal axes, and η is the normalization constant used to compensate the loss of truncated volume of probability outside the bound.
Because f_TG has the value of a Gaussian multiplied by η inside the boundary, the integral volume becomes -A ⊕ B ∩ V_TG, where V_TG is the valid volume of Truncated Gaussian.
The collision probability corresponds to

    p_col = 1/η∭_V_AB∩ V_TG f_TG(𝐱; μ, Σ, r) d𝐱.

The TG has its center at μ and principal axes with different lengths determined by Σ.
To normalize the function, a transformation T = Σ^-1/2 - μ I is applied to the coordinate system, which changes Equation (<ref>) to

    p_col = 1/ηΣ∭_V'_AB∩ V'_TG f_TG(𝐱; 0, I, r) d𝐱, 
    
        V'_AB = T(V_AB),    V'_TG = T(V_TG).

In the transformed coordinate system, V'_TG is a sphere of radius r.

Unfortunately, there is no explicit or analytic form of solution for the integral of a Gaussian distribution over the intersection of a non-convex volume V'_AB and a ball V'_TG. In order to simplify the problem, we initially assume that A and B are convex, and so are V_AB and V'_AB.
Instead of computing the exact integral, we compute an upper bound on the collision probability.
The computation of collision probability reduces to the computation of the integral

    ∭_V' g(𝐱; 0, I) d𝐱,

where V' = V'_AB∩ V'_TG, and g(·) is the Gaussian probability density function.

From the convexity of V'_AB, the minimum distance vector 𝐝' between the origin and V'_AB can be computed by using the GJK algorithm <cit.> between A' and B', which are transformed from A and B by T.
Let 𝐧_d' be the unit directional vector of 𝐝'.
Then, by the Cauchy-Schwarz inequality (𝐱·𝐧_d')^2 ≤𝐱^2, the integral is bounded by

    p_col≤∭_V'1/√(8 π^3)exp( -1/2 (𝐱·𝐧_d')^2 ) d 𝐱 .

The integrand of the upper bound term behaves as a 1D Gaussian function instead of being the 3D function. We use the divergence theorem to compute the upper bound on collision probability (<ref>).

    ∭_V'div (𝐅) dV = _S' (𝐅·𝐧_S) dS ,

where 𝐅 is a vector field, S' is the surface of V', dS is an infinitesimal area for integration, and 𝐧_S is the normal vector of dS.
This converts the volume integral to a surface integral.
Let's define 𝐅 as

    𝐅(𝐱) = 1/2 π( 1 + erf( 𝐱·𝐧'_d/√(2)) ) 𝐧'_d ,

where erf(·) is the 1D Gaussian error function.
Note that F is a vector field with a single direction 𝐧'_d.
The directional derivative of 𝐅(𝐱) along any directional vector orthogonal to 𝐧_d' is zero because 𝐅 varies only along 𝐧_d'.
The divergence of 𝐅 thus becomes (∂𝐅 / ∂𝐧_d'), and this is equal to the function in Equation (<ref>).

We apply the divergence theorem in Eqation (<ref>) to the volume integral on V' in Equation (<ref>).
Note that V' is a 3D volume intersection between a non-convex polytope V'_AB and a ball V'_TG.
The surface integral on the intersection between a non-convex polytope and a ball can be decomposed into two parts and bounded by the sum of two components as

    ∑_i_ S'_i (𝐅·𝐧'_i) dS + _S'_TG (𝐅·𝐧_S) dS,

where S'_i is the i-th triangle of V'_AB inside V'_TG, 𝐧'_i is the normal vector of S'_i, and S'_TG is the spherical boundary of V'_TG outside of a plane defined by 𝐝'.
The second term corresponds to the spherical domain of the normalized Truncated Gaussian with the truncation rate η.
The magnitude of F on the spherical boundary V'_TG is upperly bounded by (1 - η), because it is the cumulative distribution function on the boundary.
The surface area of S'_TG is less than π ||𝐝'||^2.
This can be used to express a bound based on the following lemma.

The collision probability represented in a volume integral is upperly bounded by a surface integral as follows:

    p_col   = ∭_V' g(𝐱; 0, I) d𝐱
       ≤∑_i_ S_i (𝐅·𝐧_i) dS + π (1 - η) ||𝐝'||^2,

where F is a vector field in 3D space whose maximum magnitude is 1/π, and S_i is the i-th triangle of V'_AB that is inside V'_TG.


Because the error function integral over a triangle domain is hard to compute, the upper bound on the integral is evaluated as

    ∑_i_ S_i (𝐅·𝐧_i) dS 
    ≤   ∑_i ( max_j=1,2,3𝐅(S_ij) ·𝐧_i ) Area( S_i),

where S_ij is the j-th vertex of the triangle S_i for j ∈{1,2,3}.
The upper bound on the collision probability corresponds to the sum of the maximum of F at the points of each triangle, multiplied by the area of the triangle, over the surface of V'_AB∩ V'_TG.








 §.§ Efficient Evaluation of the Integral

In order to reduce the running time of computing the surface integral, we take advantage of the bound of TG.
The domain of surface integral is V' = V'_AB∩ V'_TG, where V'_AB consists of many triangles and V'_TG is a sphere of radius r.
This sphere is tightly bounded by a cube, with one normal parallel to the direction of shortest displacement vector 𝐝'.
Therefore, the triangles of V'_AB that are outside the cube do not count towards the surface integral.
So, we accumulate the upper bound function value in Equation (<ref>) only for the triangles that lie inside the cube boundary, and ignore the triangles outside the boundary.
For the triangles that intersect the cube boundary, the upper bound function value is computed for the intersecting primitives.
Because the approximated integral for collision probability is bounded by the cube, primitives outside the cube can be ignored in terms of calculating the upper bound of collision probability.
Limiting the computation to the truncated primitives can accelerate the running time. 

In order to perform this computation for non-convex primitives, we construct bounding volume hierarchies (BVHs) for A and B, with each bounding volume being an oriented bounding box.
During the traversal of the BVHs, the oriented bounding boxes are first transformed by T.
The transformed bounding volumes are still convex primitives, the surface integral can be obtained using Equation (<ref>).




 §.§ Error Distribution as Weighted Samples


For the weighted samples, the probability distributions are given by multiple points p_i with weights w_i, yielding a discrete probability distribution, as described in Equation (<ref>).
The collision probability of Equation (<ref>-<ref>) for the weighted samples is given as:

    p_col = ∑_i=1^n w_i I ( 𝐱_i ∈ (-A) ⊕ B ),   ∑_i=1^n w_i = 1,

where w_i is weight and I(·) is the indicator function which yields 1 if the statement inside is true or 0 otherwise.
The formulation is the weighted average of n collision detection results.
A simple solution to this problem is to run exact collision detection algorithms n times and sum up the weights of in-collision cases. However, this results in an O(n) and we use BVHs to accelerate that computation.

We have the bounding volumes for the weighted samples and the two polyhedra.
When there is no overlap between the bounding boxes, it implies that there is no collisions between two shapes for all weighted samples in the corresponding bounding volume.
If the bounding volumes overlap, there may be a collision for each weighted samples, and the bounding volumes of the children are checked recursively for collisions. Each of these bounding volume checks can be performed in O(1) time.

If we want to compute an upper bound of collision probability, the running time can be further reduced by replacing detailed computation of collision probability with a simple upper bound.
We introduce a user-defined parameter δ which we call the “confidence level”.
During the traversal of bounding volume traversal tree, the upper bound of collision is the sum of weights of samples that belong to the bounding volume.
If the upper bound is less than the confidence level 1 - δ, the traversal stops and the sub-routine returns the sum of weights as an upper bound of collision probability.

In order to reduce the time complexity for more complex forms of error distributions, we construct a Bounding Volume Hierarchy (BVH) <cit.> over the error distributions of mixture models with Oriented Bounding Boxes (OBBs) <cit.> and apply the collision probability algorithm on its nodes, which are convex primitives.
We construct a BVH for the weighted samples and for Truncated Guassian Mixture Models in O(n) time complexity.
The BVH is generated from the root node that contains every Truncated Gaussians, and the bounding volume for the root node is computed by minimizing the volume of the oriented bounding box.
Next, the bounding volume is split at the center along the longest edge and two child BVH nodes are generated, each containing appropriate samples. This process is repeated till the leaf nodes.



 §.§ Error Distribution as Truncated Gaussian Mixture Models

For TGMM the probability distribution is given as:

    p_col = ∑_i=1^n w_i ∭_V_ABη_i f_TGMM(𝐱 ; μ_i, Σ_i, r_i) d𝐱,

where n is the number of Truncated Gaussians (TGs), w_i is the weight of each TG, and μ_i, Σ_i and r_i are the mean, variance and radius of TGs, respectively. The overall algorithm for  TGMM is obtained by combining the two previous algorithms.
A change from the algorithm for weighted samples is that the BVH is constructed for n TGs with their ellipsoid bounds instead of the point samples.
The details of algorithms and pseudo-codes are given in the appendix <cit.>.


§ PERFORMANCE AND ANALYSIS


In this section, we describe our implementation and  highlight the performance of our probabilistic collision detection algorithms on synthetic and real-world benchmarks.
Furthermore, we measure the upper bound of collision probabilities and speedups for algorithms with different noise distributions, compared to the exact collision probability computed by Monte Carlo method.


 §.§ Probabilistic Collision Detection: Performance









For the translational error distribution, we first generate a ground truth distribution by randomizing the parameters of TGMM.
Next, we sample 100,000 points from the distribution.
We run expectation-maximization from these samples to find parameters of single Gaussian, single TG, WS, and TGMMl.
The resultant distributions are different from the ground truth and count toward collision probability over-estimation.

Figure <ref> shows the collision probabilities of noise models approximated with Gaussian, TGMM of 10 TG distributions, and 100 WS.
We observe that the  approximation with a single Gaussian yields rather high and conservative value  of collision probability, compared to the ground truth collision probability.
Figure <ref> (a) shows the speedup of probabilistic collision detection with WS (Algorithm 2 in the Appendix) over the Monte Carlo method.
The collision probability computation with Monte Carlo counts the sum of sample weights for every Weighted Sample that is in collision,  and is similar to an exact collision detection algorithm.
Thus, the running time of Monte Carlo increases linearly as the number of Weighted Samples increases.
Figure <ref> (b) shows the speedup of probabilistic collision detection with a TG model (Algorithm 1 in the Appendix) compared to probabilistic collision detection with a Gaussian error distribution.
In case of TGs, BVH traversal is not performed when the truncation boundary of TGs does not overlap with the Minkowski sum of bounding volumes for the two objects. 
On the other hand, for Gaussian distribution there are no truncation boundaries and the BVH traversal continues. Thereore, we observe speedup with TGs over Gaussian, as shown in Figure 1 and Table 1.
Overall, the speedup depends on the range of truncation. A smaller truncation boundary results in faster  performance of our probabilistic collision detection algorithm.



 §.§ Sensor Noise Models for Static Obstacles





In a real-world setting, we add a noise model to the point cloud data.
The variance is chosen based on the Kinect sensor uncertainty.
The input depth images have noise in each pixel and, according to <cit.>, the noise of each pixel can be approximated with a 1D Gaussian.
Thus, noise in the pixels of an object are combined with a Gaussian Mixture noise model for the object.
Depth images of the wooden blocks and the table have noise in each pixel.
We capture sequences of the depth images.
In the experiments, the approximate poses of tables and wooden blocks are known a priori.
On the boundary of the wooden blocks, some pixels are always classified as a wooden block, some other pixels are classified as a wooden block or as background in different frames, and other pixels are always classified as background.
From these boundary pixels, the variance in x- and y-axis noise on the Kinect sensor coordinate frame can be set to the thickness of the boundary.
The variance in z-axis motion is computed from the always-wooden-block pixels.
The depth values on those pixels differ from frame to frame.
After the variance of noise Gaussian is calculated, the mean and variance of a Truncated Gaussian are the same.
The truncation rate η with which the integral in the ellipsoidal boundary is set to 90% in our benchmarks.
With the fixed truncation rate, the positional error is bounded around the wooden blocks, unlike the positional error represented by Gaussians with an unbound domain.
The confidence level δ is related to the robot motion planner, constraining that the collision probability between the robot and the objects should be less than 1 - δ at any robot trajectory point.
In our benchmarks, δ is set to 95%.

Figure <ref> shows a captured depth image, a noise distribution modeled using Truncated Gaussian Mixture Model, and a reconstructed 3D environment with noises.
The pixels on the boundary of the object have higher variance in terms of noise.
So, the Truncated Gaussian Mixture noise model may have some Gaussians with higher variance.
A principal axis for those boundary pixels is perpendicular to the boundary direction.




Figure <ref> shows a human motion prediction model with a Truncated Gaussian noise model.
We use a human motion prediction algorithm <cit.>.
The human motion is classified with a discretized set of action labels and a continuous human motion is stochastically modeled with Gaussian Processes, generating a Gaussian Mixture Model of human motion prediction.
By adding the Kinect sensor error and the truncation boundaries, we finally obtain a Truncated Gaussian Mixture Model for the predicted future human motion.




 §.§ Robot Motion Planning




The probabilistic collision detection algorithm is used in optimization-based motion planning <cit.>.
We use a 7-DOF Fetch robot arm in the motion planning. 
We highlight its performance in terms of improved accuracy and faster running time in Figure <ref>.
In the robot environment, there is a table in front of the robot and the wood blocks on the table are the static obstacles of the environment.
The wood blocks are placed in a manner that pairs of them result in a narrow passage for the robot's end-effector.
The environment is captured using two depth sensors.
One sensor is Primesense Carmine 1.09 sensor, the robot head camera.
Another is Microsoft Kinect 2.0 sensor installed in the opposite direction with respect to the robot.
The point clouds of the table and the wood blocks captured by the two sensors are used to reconstruct the environment. In this case, the reconstructed table surface and wood block obstacles have errors due to the noise in the depth sensors.
Figure <ref> (c) shows the reconstructed environment from depths sensors and the error distributions around the obstacles.
The robot arm's task is to move a wood block, drawing a zig-zag pattern that passes through the narrow passages between the wood blocks.
The objective is to compute a robot trajectory that minimizes the distance between the robot's end-effector and the table, and not resulting in any collisions.
The following metrics are used to evaluate the performance:

    
  * Collision Probability Over-estimation: Because we compute the upper bounds of collision probability in our algorithm, we measure the extent of collision probability over-estimation, the gap between the upper bound of collision probability and the actual collision probability.
    
  * Running Time: The running time of collision detection algorithm. This excludes the running time of motion planning algorithm.
    
  * # Passages: The successful number of passes the robot makes between wood blocks.
    
  * Success Rate: The number of collision-free trajectories, out of the total number of trajectory executions. For each execution, the wood block's positions are set following the error distribution.
    
  * Distance: The distance between the robot's end-effector and the table. 
    A lower value is better, as it implies that the robot can interact with the environment in close proximity.

The collision probability over-estimation, running time, distance values are measured for robot poses of every 1/30 seconds over the robot trajectories.

We compare the performances of 5 different collision detection algorithms: exact collision detection with static obstacles without environment uncertainties (CD-Obstacles), exact collision detection with point clouds (CD-Points), probabilistic collision detection with Gaussian errors (PCD-Gaussian) <cit.>, PCD with Truncated Gaussian (PCD-TG), PCD with weighted samples (PCD-WS), and PCD with Truncated Gaussian Mixture Model (PCD-TGMM).
The weighted samples are drawn from the TGMMs. For each TG distribution, one sample is drawn from its center.
Other samples are drawn from three icosahedrons with the same centers and different radii by uniformly dividing the truncation radius.

Benefits of Truncated Gaussian: Table <ref> shows the results of robot motion planning in the various scenarios with different algorithms.
The robot motion planning without uncertainties (CD-Obstacles) operates perfectly.
However, under sensor uncertainties, the exact collision detection with the point clouds (CD-Points) works poorly. Due to the sensor uncertainties, a high error at a pixel affects the collision detection query accuracy and the performance in narrow passages and success rate. 
Our  probabilistic collision detection algorithms results in better performances than  exact collision detection algorithm under the environment with sensor uncertainties. 
Compared to PCD-Gaussian and PCD-GMM, our algorithms for  non-Gaussian distributions (PCD-WS, PCD-TGMM) demonstrate   better performances w.r.t. different metrics.  Figure <ref> (appendix) highlights the results: using probabilistic collision detection with Gaussian error distribution (Figure <ref> (a));  with TGMM error distribution (Figure <ref> (b)).  CD-Obstacles and CD-Points correspond to the exact case, where the poses are known and there is no uncertainty (i.e. the ground truth). The robot's trajectory is shown in the video.

Human Motion Prediction: 
We also evaluate our algorithm on scenarios with humans operating close to the robot, as shown in Fig. 1 and the video.
In order to handle the uncertainty of future human motion, we use probabilistic collision detection between the robot and the predicted future human pose. Improvement in the accuracy of motion prediction results in better trajectories in terms of being collision-free, smoother and being  able to handle tight scenarios <cit.>.  We highlight the benefits of our PCD-TGMM algorithm on the resulting trajectory computation in the video.



§ CONCLUSION AND LIMITATIONS


We present efficient probabilistic collision detection algorithms for the following forms of non-Gaussian error distributions: Truncated Gaussian, Weighted Samples, and Truncated Gaussian Mixture Model.
Compared to the exact collision detection algorithm and prior probabilistic collision detection algorithms for Gaussian error distribution, our new method can compute a tighter upper bound of collision probability and improves the running time. We have integrated this algorithm with a motion planner and highlights its benefits in narrow passage scenarios with a 7-DOF robot arm. Our algorithm can be used to 
 model non-Gaussian error distributions from noisy depth sensors and predicted human motion models. 

Our approach has some limitations. The truncation on the Truncated Gaussians has a form of ellipsoid with the center and principal axes that is the same as the original Gaussian distribution.
The ellipsoidal shape of truncation boundary may not be sufficient for representing general error distributions. Another realistic possibility would be to truncate using planar boundaries.
In our future work, we would like to develop an algorithm for more generic non-Gaussian positional errors.
 We only consider the positional errors on obstacles and omit the rotational errors.
The rotational error cannot be approximated by Truncated Gaussian Mixture Model.
As part of future work, we would like to represent a rotational error distribution in the quaternion space, or in the affine space.
Furthermore, we assume that the noises of two objects A and B are independent, even though they may arise from the same source.


IEEEtran




§ APPENDIX


We present some background on truncated Gaussian distributions as well as more details about our probabilistic collision detection algorithm  and its applications to motion planning. 



 §.§ Probabilistic Collision Detection


We present the detailed pseudo-code of our novel probabilistic collision detection algorithms for Truncated Gaussian and weighted samples. 


Algorithm <ref> describes the overall process of computing the upper bound of collision probability for TG error distribution.
Line <ref> computes the Minkowski sum of two bounding volumes and transforms that sum using T.
Because the bounding volumes are oriented bounding boxes, the time complexity is O(1)
Line <ref> computes the minimum distance vector in nearly constant time and is used to define the function F for Equation (<ref>). The approximated cube boundary V'_TG of TG is computed at Line <ref>, whose center is at the origin and one of the normal directions is parallel to 𝐝', and whose half-length is r.
In Line <ref>-<ref>, the upper bound of collision probability is computed.
If the computed collision probability bound is less than the confidence level, as shown in Line <ref>, the algorithm returns the bound and stops the traverse.
Otherwise, the algorithm recursively traverses to child nodes of the BVHs.




Algorithm <ref> summarizes the probabilistic collision detection for weighted samples as error distributions.
The algorithm is given with three precomputed bounding volume hierarchies.
Lines <ref>-<ref> check for collisions between the bounding volumes and returns 0 when there is no overlap.
Lines <ref>-<ref> check whether the upper bound of collision is less than the confidence level δ.
If the condition is satisfied, it returns the sum of weights instead of further traversing the tree.




Algorithm <ref> corresponds to the combined algorithm of Algorithm <ref> and <ref>, when the input error distribution is a TGMM.
The first collision check is performed on Line <ref>, similar to the case for the  Weighted Samples, returning 0 in Line <ref> if there is no overlap.
Because the maximum possible value of collision probability for a single TG is its weight, the confidence level check in Line <ref> is also performed similarly, comparing the sum of weights of the TGs with the confidence level δ.
In Line <ref>, when the traversal reaches a leaf node of the BVH for TGMMs, it returns the collision probability obtained from  (Algorithm <ref>).
Otherwise, the BVH traversal continues until it reaches the leaf nodes of BVHs.








 §.§ Motion Planning

Our probabilistic collision detection algorithm has been integrated with optimization-based motion planning and integrated with the 7-DOF Fetch arm (see Figure 1).  The tighter bounds on the collision probability enable us to find collision-free paths in tight spaces or narrow passages.


Tabel <ref> shows the results of robot motion planning in the narrow passage scenario.
Exact collision detection between known shapes without uncertainties (CD-Obstacles) always gives a correct collision state, thus 0 %p in collision probability over-estimation measurements. The robot motion planning without uncertainties operates perfectly, passing all narrow passages, generating non-collision trajectories, and keeping the closest distance between the end-effector and the table.
However, under sensor uncertainties, motion planning with the exact collision detection between the robot and the point clouds (CD-Points) works poorly. Due to the sensor uncertainties, a high error at a pixel may affect the collision detection query, reporting in-collision though the robot is not in collision, and vice versa. Due to this reason, the average and the standard deviation of collision probability over-estimation is the highest among other algorithms. This also impacts on the worst performance on the number of passages, success rate, and the distance measurements.
Motion planning algorithms with probabilistic collision detection algorithms show better performances than the exact collision detection algorithm under the environment with sensor uncertainties.
Compared to PCD-Gaussian, the probabilistic collision detection algorithms with non-Gaussian generally show better performances in the metrics in the table.
PCD-WS and PCD-TGMM run slower because of the complex shape of error distributions, but compute collision probability more accurately.
PCD-TGMM shows the best performance on collision probability estimation, the number of successful passages, successful avoiding obstacles, and the distance between the table surface and the end-effector.

Figure <ref>  shows the results computed using our motion planner with different combination of  probabilistic collision detection algorithms on a benchmark that consists of wooden blocks. This wooden block has four narrow passages and have varying sizes.  If the collision probability computation results in a higher probability bound, the resulting planner concludes that there is no collision-free trajectory.
As a result, the planner is not able to compute a collision-free trajectory for all four cases, which is shown in terms of number of passes (i.e. # Passages) and  the success rate in Table. 1.
We use this benchmark to evaluate the benefits of computing tighter probabilistic collision detection bounds.
We use an optimization-based planner, ITOMP <cit.>, which repeatedly refines the trajectory while interleaving the execution and motion planning for dynamic scenes. We handle three types of constraints: smoothness constraint, static obstacle collision-avoidance, and dynamic obstacle collision avoidance. 
In Figure <ref> (a), the robot motion is planned with the probabilistic collision algorithm used for Gaussian error distribution.
However, this planner fails in the configurations corresponding to the narrow passage, even though there is sufficient space for the robot to pass through.
Because of the infinite domain of a Gaussian distributions, the non-zero collision probability prevents the robot to pass through, as it conveys a possible collision.
In Figure <ref> (b), the probabilistic collision detection algorithm with TGMM is used in the motion planner.
Different from the Gaussian distribution case, the planner can compute a path through the narrow passages.
This is because the error distributions have truncation boundaries and the collision detection algorithm yields collision probability of under 5%. Overall, our probabilistic collision detection algorithm provides better bounds than prior methods.


