• No results found

2.3 Collision Computation and Force Rendering

2.3.1 Object Representations

Figure2.5illustrates the most common object representations used for collision and force computation. A proper description of these data structures is fundamental, since they strongly influence the methods used in realtime queries. It is worth to mention that efficient data structures often encode (offline) necessary pre-computations that are used in online calculations, relieving the computation effort in critical situations. Furthermore, one must be aware of the accuracy achieved with the used representation, compared to the original object; this is especially true for representations that break down and simplify the object into sets of discrete primitive features.

Object modeling or Computer-Aided Design (CAD) tools such as Blender∗ or Creo† export generally polygon soups. These lists of unordered polygons represent polyhedra, and can be structured as triangle meshes, which usually describe connected neighborhood maps: in them, each geometric primitive feature in the structure (i. e., vertices, edges, and faces) is aware of and can access its neighbor features∗. This attribute is fundamental for many collision detection approaches explained in Section2.3.2(e. g., [LC91]). Several requirements or additional properties can be applied to general polyhedra, such as normal vectors for all features, or convexity of the shape†, which would change the topology of a general polyhedron. Convex meshes have been extensively used in many works (e. g.,

[GJK88]), because in contrast to non-convex or concave meshes, discarding overlaps

between them requires easier and computationally less expensive methods. Along these lines, convex decompositions of general or non-convex geometries are also common (e. g., [EL00]); with them, the original polyhedron is divided in a set of convex patches.

Polyhedra are often enclosed in part or entirely by basic shapes or Bounding Vol- umes (BV). Thanks to them, conservative but much faster overlap or proximity queries can be performed; if two BVs do not intersect, their contained geometries will not either. Typical BVs include: spheres [Qui94], [Hub96], swept spheres or capsules [LGLM99], Axis Aligned Bounding Boxes (AABB) [CLMP95], [vdB97], Object Oriented Boxes (OBB) [GLM96], Discrete Oriented Polytopes (k-DOP) [KHM+98], [Zac98], and Convex Hulls (CH) [GME+00]. Note that all of them are convex.

At least three factors need to be taken into account when it comes to choosing the appropriate BV: (i) the complexity of the BV geometry, (ii) the fitting efficiency of the enclosing volume, and (iii) the ease of update after motion. Usually, the simpler the BV (i. e., less bounding faces or constituting vertices), the easier and faster will be the collision queries – but also the more conservative; hence, a trade-off must be often met. Common measurements of the enclosing efficiency of a BV are the volume ratio between the BV and the enclosed polyhedron, as well as the Hausdorff distance, which is the maximum Euclidean distance between the contained and the enclosing surfaces. The third factor is mostly related to rotations, which have a bigger impact on BVs defined by fixed planes or directions (e. g., world frame directions, as in the case of AABBs). In those situations, every plane must be rotated each cycle by affine transformations, or, if that is not desired due to other algorithmic constraints, BVs need to be recomputed so as to comply with the allowed directions.

https://www.blender.org/

https://www.ptc.com/en/products/cad/creo

For instance, a triangular face is composed of three neighbor edges and three vertices, has at least six edges converging to its vertices, and at least six contiguous faces.

The shortest Euclidean segment (straight line) between any two points inside a convex shape is contained in the convex shape. If that is not possible, the object is non-convex or concave.

In particular, spheres are the simplest and easiest to update BVs‡, leading to faster overlap checks and updates, but worse fittings. On the other hand, CHs are the most general and usually better fitting BVs, but they also require the most expensive overlap checks. Ideally, a CH is the convex polytope which optimally (with the lowest volume) encapsulates a geometry. Many works have focused on the computation of accurate and approximate CHs for in several fields related to computer graphics or robotics (e. g.,

[BDH96], [MG09]). Aforementioned k-DOPs are closely related to CHs, which encapsu-

late objects with k intersecting half-spaces or oriented planes, approximating the CH. Less common BVs include sphere sectors [FUF06] and cones that enclose face normal vectors instead of the faces themselves [JWC05]. In addition, Inner Sphere Trees (IST) consisting of spheres that bound the object in its interior by greedily filling it have also been proposed [WZ09a], as well as BVs that result from combining several BVs, such as the Intersections of Spheres or k-IOS [ZK12], built of k intersecting spheres that ap- proximate minimally bounding ellipsoids, or CHs dilated with spheres and tori [EMK07]. The last two BVs have the property of being strictly convex, which implies in practice that the distance between BVs is always continuous and derivable; that property is very interesting for path planing and optimization algorithms.

Finally, it is worth noting that most data structures based on BVs are organized in Bounding Volume Hierarchies (BVH), which consist in trees of nodes with differ- ent sizes that enclose all the parts of the object (e. g., Sphere BVHs [Qui94] or OBB BVHs [GLM96], among others). Section 2.3.2.5further deals with BVHs and their asso- ciated methods.

Beyond polytopes and BVs, Point Clouds have become a usual representation for objects in recent years; this is probably due to public domain libraries that have appeared and enable processing them, such as the Point Cloud Library [RC11b], or also due to the emergence of low cost 3D scanners like the Kinect∗ that make possible registering them inexpensively. Point clouds are basically point sets placed on the object surface, optimally with a uniform distribution and surface normals. These sets can be unconnected and unordered point soups (e. g., as in [MPT99]) or, more commonly, they can be embedded in more complex data structures that allow for fast access of neighbor elements for each point in the set. Among others, these structures can be sphere hierarchies [KZ04], k-d trees [LCS12], or similar. It is common to locally create implicit planes or surfaces from a point or point subset at runtime, as well as local implicit distance functions [KZ04],

[LCS12].

Two particular and strongly related types of point clouds are depth maps (aka. depth

Only four real values are necessary to describe a sphere in 3D space; additionally, spheres are

rotationally invariant due to their symmetry, which reduces queries only to the translational space.

images or Z-buffers) and streamed point clouds. The first are pixelmaps of proximity val- ues that account for the distances of the surfaces in the scene from a viewpoint. These can be obtained from 3D scanners or virtual images, and can be efficiently used for colli- sion computation [KLR15]. The second type are continuously (usually at 30 Hz) updated depth images of real environments (obviously, registered and delivered through 3D scan- ners). Several collision and force rendering algorithms have been recently proposed, e. g., against single interaction points [LCS12], [RC13a], distance fields [RC13b], or sphere trees [KWZ17]. With streamed point clouds, sensor noise filtering and downsampling are important issues to consider. Methods with streamed point clouds have led to a quali- tative improvement of model-mediated telepresence applications [XCANS14], since they allow for the interactive registration of unstructured remote environments, as explained in Section2.2.6.

Spatial Partitioningor subdivision techniques have also been applied for managing and representing object geometries. With them, object space is segmented or embedded in 3D grids consisting of smaller space cells; these grids are usually uniform (same cell size in all three directions) and often encoded as hashed look up tables. Each cell in the grid can point to an object or object part, which can be represented in various forms: OBB [GLGT05] or AABB trees [PSCM13], bounding planes [AMF16], vertices or points [SC12], spheres [RMB+08], occupancy values (solid or free space) [MPT99], distance-to-surface values [XB14], or density values (typical in medical scans)[CCBS11].

A special non-uniform spatial partition often used for point clouds is the k-d tree [LCS12],

[KLR15], which is basically a binary search tree with k depth levels or dimensions. On the

other hand, uniform grids are often arranged in octrees, hierarchical structures in which each node is divided in eight children of finer resolution. Some collision computation methods using octrees are: [MPT99], [PSCM13], [HDB+14], and [AMF16]. Moreover, uniform grids that contain occupancy and distance values are occasionally referred to as voxelmaps [MPT99].

Implicit Representationsconsist in scalar fields in which each point x in space is associated with a scalar or field value, following a locally or globally known relationship f (x) = 0. In other words, and focusing on the 3D Euclidean space, they are mappings with the form f : R3 → R. Typical field values comprise density values, occupancy

values, and distance values.

The last type of value corresponds to distance fields, with which for any given point x its distance to the surface of the represented object can be obtained. Additionally, iso-surfaces can be implicitly defined with them by fixing the field value. If interior and exterior spaces can be distinguished in a distance field, it is considered to be a signed distance field. Furthermore, implicit representations can be discretized using spatial par- titioning, giving rise to the aforementioned voxelmaps. Although field values in voxelmap

cells are discrete, continuous and smooth responses can be computed for every point x with local (trilinear) interpolation; usually, this requires processing the scalars in the neighboring voxels of the queried point.

Several relevant works have been presented on distance fields with applications in many areas [S+03], [JBS06]. Some of them have focused on data structures for collision computation [FSG03], [XB14]. Indeed, efficiently implemented distance fields are very attractive for such time-critical applications, since they provide fast and straightforward proximity responses, being able to achieve O(1) independently of the complexity of the represented object.

Parametric Representationscan be used to describe complex but highly smooth surfaces. NURBS (Non-Uniform Rotational B-Splines) are a particular and well known example of them. These are one of the most used surface data structures in CAD (Com- puter Aided Design) environments, because of their compact representation, high conti- nuity, and exact derivation of surface normals [TJC97]. In a parametric representation, the object is framed in a control mesh constituted by strategic vertices or control points; for each control mesh patch, well-known basis functions are evaluated and weighted as a function of mesh surface parameters, and they piecewise define the object surface. Hence, following the notation of implicit representations, 3D parametric surfaces are mappings of the form f : R2 → R3, i. e., from 2D parameter space on a control mesh to 3D points

on a surface.

Constructive Solid Geometriesor CSGs are formed combining mixed basic shapes (e. g., boxes, spheres, cylinders, cones, or even Platonic polyhedra) in binary trees using Boolean operators (e. g., union, intersection, difference); note that those basic shapes are often defined with closed-form analytical expressions. Additionally, they can be used as analytically defined BVs without any binary trees [vdB99].

CSGs are common in CAD or solid modeling environments designed for manufac- turing applications. Not surprisingly, typical modeling actions in those programs (e. g., extrusions, protrusions, etc.) are conceived to resemble common operations in traditional additive and subtractive machining, which in turn, resemble the Boolean operations with basic volumes that form CSGs. Usually, CSGs lack of explicit features common and use- ful in polyhedra (i. e., faces, edges, or vertices), but have the advantage of containing design history is embedded in the tree. Although not usual for collision detection and haptic rendering anymore, several works have been published using CSGs, e. g., [Zei93]

or [SLY99]. Determining whether a point is inside a CSG is broken down to checking

this point against the underlying primitives and deducing then the answer by following the correct boolean operations.

Although it is not inherently an object representation, it is necessary bearing the Configuration Space when describing data structures. This is the space of all three

translation and three rotation values, i. e., the 6D space defined in R3× SO(3). For all

feasible relative configurations between the pair of queried objects, all the points leading to collision or overlap are detected, forming a manifold of 6D points in the configuration space known as contact space. This structure simplifies the problem of handling two geometries to handling only one point against the new computed 6D geometry (the contact space itself), but at the cost of increasing the dimensionality of the operation space or the complexity of the processed geometry (e. g., number of vertices).

In addition to collisions, generalized penetrations (with translational and rotational components) can be computed in the configuration space [ZKM07], even artificially forc- ing continuous penetration values [ZKM14]. The construction and refinement of the contact space has also been accelerated with support vector machines [PZM13], usual in machine learning.

The contact space is strongly related to the Minkowski sums, or more precisely, the Minkowski subtractions[GJK88]. These are computed by adding to each point contained in one geometry all the mirrored points (i. e., negative) of the other geometry. This struc- ture has interesting applications in collision detection and path planing, and therefore, it has been widely exploited, as further explained in Section2.3.2.2.

Typical structures used for computing deformations are particle or mass-spring systems [CKB03] and tetrahedron meshes [SSB13]. It is worth to mention that these data structures used for computing deformation are usually not employed in collision checks. Instead, they are commonly embedded in other representations introduced so far, such as BVs, which need to be quickly updated during the interaction. Efficient methods have been proposed for updating them, such as predicting for each vertex the trespassing of its enclosing BVs according to their velocity, and modifying in each time step the BVs of which violation is most imminent [ZW06].

Similarly, rather than using the structures employed for deformation computation, intermediate representations are processed for force computation. These are basically abstractions of the complex environment (e. g., as tangential planes) located closely to the operator’s hand or tool pose [AKO95]. These local simplifications can be force transfer model linearizations [GO09] or compliant spring-damper mechanisms [PND+11]. Whereas slower loops take care of simulating deformations, update and processing of collision structures and intermediate representations needs to happen at 1 kHz if haptic interaction is to be guaranteed.