• No results found

2.3 Collision Computation and Force Rendering

2.3.3 Collision Response: Force Rendering

2.3.3.2 Three Force Rendering Paradigms

Rigid body simulation and force rendering methods are often classified into three paradigms depending on the used contact model∗:

See, for instance, the argumentation given by [CSC05], [WZZX11], [WZZX13], or [YWZX15] to this respect. However, it is noteworthy that hybrid approaches appear commonly, thus, that classification into those three categories should not be taken strictly. Interestingly, the seminal work in [Bar89] classifies contact simulation methods as penalty-based and analytical (analogous to constraint-based ). Along these lines, the more recent survey in [OGL13] distinguishes also only soft constraint (i. e., penalty-based ) and hard constraint (i. e., constraint-based ) methods in haptic rendering, providing an elegant formal description of each paradigm.

• Impulse-based methods modify or correct the velocity of the colliding object by applying small impulses (distributed along several cycles) to prevent object overlap. They follow the principles of energy and momentum conservation and can be often modeled with the equation of the coefficient of restitution e, which evaluates the elasticity of the collision in terms of the velocities ( ˙x) of the colliding objects (A, B) before and after the collision:

k ˙xA− ˙xBk2,after

k ˙xA− ˙xBk2,before

= e ∈ [0, 1]. (2.8)

• Penalty-based methods approximate constraints or contact forces by penalizing constraint violations in their normal directions (n) with spring forces that increase with the penetration value (p) or a similar penalty metric, such as overlap volume; they cannot avoid overlaps and lead to softer contacts, but are usually easy to im- plement and computationally inexpensive. Thus, the penalty force fPwith stiffness

kP can be modeled in general as

fP= X i fi = X i kPpini. (2.9)

• Constraint-based methods impose rigid constraints accurately to the body config- uration and/or dynamics so that no inter-penetration between objects occurs; in other words, the configuration of the object is optimized subject to the unilateral collision constraints. Usually, these methods are more complex and computation- ally expensive, but lead to stiffer and more realistic force values. Once the trans- formation xVC that represents the difference between the constrained (optimized,

in contact) and unconstrained (original, overlapping) is found, the constraint force can be computed with the appropriate stiffness (kC):

fC= kCxVC. (2.10)

Damping terms proportional to the velocity can be added to the force models of each paradigm. Furthermore, torque values with respect to the object origin can be computed as the cross product between the lever distance from the force application point and the force itself.

In comparison to impulse-based approaches, notably more penalty-based and constraint- based methods have been published in the last years; this work itself presents the defi- nitions and implementations of a penalty-based haptic rendering algorithm in Chapter3

and constraint-based method in Chapter 4. Each of the chapters provides a deeper re- view of related works concerning each paradigm and the developed algorithms. For a

(a) Object B will collide with A (b) Penalty-based force computation (c) Constraint-based force computation B A Moved

with device Device / Handle

Proxy

Figure 2.8: Schematics of penalty- and constraint-based haptic rendering approaches. Penalty- based methods require object overlap in order to compute forces out of an intersection metric (e. g., penetration, volume, etc.). On the other hand, constraint-based approaches restrain the virtual object to the contact surface upon contact and the forces are determined from the difference between the device pose and the constrained virtual object. Therefore, whereas the foremost important task for penalty approaches consists in computing the intersection magnitude, for constraint-based methods, the computation of a realistic constrained movement of the virtual object is the major process. In the constraint-based approaches, the unconstrained (xc) and constrained (xc) motions are distinguished, as well as the difference between both (xVC).

schematic though technical understanding of the differences between both paradigms, consider Figure 2.8.

One of the first notable examples of impulse-based approaches was presented by Mirtich [Mir96]. In it, after tracking closest features with the LC algorithm [LC91] (see Section2.3.2.2), micro-impulses are applied to colliding pairs. These are modeled as differential equations and evaluated with local contact and object properties (e. g. relative velocity on contact point or mass distribution, respectively). Altogether, all contact types are unified (i. e., colliding, rolling, sliding, resting), easing the implementation.

Later, Constaninescu et al. [CSC05] developed a hybrid contact rendering method which implements impulsive and penalty forces; the first paradigm is applied when the objects move against each other (increasing overlap), whereas the second one is for rest- ing cases or when objects move away from each other. The impulsive forces lead to an underdetermined system (i. e., more variables than equations) which is tackled with the assumption of Newton’s restitution law, i. e., considering that pre- and post-collision ve- locities are related with a scalar that accounts for the elasticity of the collision. A similar approach based on the difference in velocities was presented by Wang et al. [WCW+12] for a bone-burring application.

Ruffaldi et al. [RMB+08] also worked with an impulse-based haptic rendering method applied to implicit sphere trees embedded in voxelized distance fields. The method com- putes a cumulative impulse from the subset of colliding voxel pairs, considering only

pairs with a relative velocity that would not resolve the penetration in the next cycle. This process starts with the pair realizing the largest penetration, for which the first cor- rection impulse (i. e., necessary velocity change) is calculated; this value is temporarily integrated for updating the velocities of the colliding voxels, and successive voxel pairs are then processed iteratively in the same manner.

The use of penalty-based forces modeled as springs on contact points appears in the earliest rigid body dynamics simulators due to its mentioned simplicity [MW88]. This model defines implicitly a conservative force field that tries to restore a non-penetrating state when objects overlap; in other words, the penalty force is the negative gradient of a penalty energy [TMOT12]. This holds for any penalty metric used, such as penetra- tion [MPT99] or volume [WZ09a].

Despite the popularity of penalty-based approaches (see Table 2.1 and Table 2.2), several drawbacks must be pointed out: (i) if not corrected, objects visually overlap when collision forces are computed, (ii) many redundant contact points lead to an irreg- ular distribution of the stiffness along all possible directions, resulting in lower effective stiffness values in order to keep stability, (iii) in some cases it is unclear which piece of internal volume should be associated with which surface, which might lead to force discontinuities, and finally, (iv) the pop-through or tunneling effect occurs with thin shells or non-watertight objects, as mentioned in the overview of Section2.3.

Several approaches have been proposed to tackle these issues, such as (i) virtual coupling [CSB95] (explained in Section 2.3.3.3), (ii) weighting the stiffness in all the directions for each set of contact points to balance its overall distribution [XB16], or (iii, iv) continuous collision detection (see Section2.3.2.3). However, there is one way to work them all out: constraint-based haptic rendering.

Baraff has been one of the first authors to present constraint-based approaches for contact force and motion computation following a linear programming or optimization formulation: the idea consists in optimizing object configurations to avoid interpenetra- tion upon contact; necessary contact forces that lead to them can be determined along the optimization process or after it. A heuristic method is proposed for solving the optimization problem in [Bar89], whereas in [Bar94] the task is tackled with a method based on the Dantzig’s pivoting algorithm [CD68]. Although not suited for haptic update rates, these works cover all basic dynamic formulations necessary for plausible computer simulations that are referenced later on in the literature.

Zilles and Salisbury [ZS95] presented the first three-DoF constraint-based haptic ren- dering method for general polyhedra explored with a single point. In their implemen- tation, two tool poses are considered: (i) the Haptic Interaction Point (HIP), which describes the endpoint of the haptic device in the virtual world, and (ii) the proxy or god

object, which follows the HIP but remains constrained to the surface upon contact∗. It is important to note that, although the user moves the HIP, only the god object proxy is vi- sualized. First, the pose of the god object proxy is computed as an optimization problem: the potential energy of the spring between god object and HIP is minimized constraining the proxy to the three closest face planes detected beforehand. Using Lagrange multipli- ers, the problem is transformed into a system of linear equations, which resolved, leads to the coordinates of the god object. Lastly, contact forces are rendered by a spring-damper system set between the god object and the HIP; this impedance-based force computation is very common under constraint-based algorithms, which usually spend most resources in determining the constrained god object pose.

Ruspini et al. [RKK97] applied the method to spherical proxies and polyhedra em- bedded in sphere hierarchies, and later, Ortega et al. [ORC07] presented the first gener- alization of the god object method for six-DoF. The major contribution of this multirate (i. e., multi-threaded) method lies in the simulation of the god object, i. e., in computa- tion of the proxy pose. To that purpose, Gauss’ least constraints principle [Gau29] is used. A rigid body under no constraints will follow the regular Newtonian motion equa- tions with its given unconstrained acceleration. Assuming quasi-statics (i. e., velocity is considered negligible), the authors model the unconstrained acceleration proportional to the displacement vector pointing from the previous proxy pose to the current device pose. Gauss’ principle states that the motion of a constrained body will deviate as lit- tle as possible from the unconstrained motion, minimising the kinetic norm or squared difference between the constrained and unconstrained accelerations. Hence, the problem is approached as a constrained optimization in motion-space, being the constraints the proxy’s contact points from previous cycle. Formulations in motion-space, in contrast to more common contact-space, lead to improvements in conditioning, memory, and com- putational efficiency [RKC02b]. Wilhemsen’s nearest point method [Wil76] is used to find the solution efficiently. Once the constrained acceleration is obtained, explicit Euler integration leads to the sought current proxy pose. As a last step, continuous collision detection [RKC02a] is performed for the travel between the last two proxy poses in order to detect the set of contact points (including surface normals) for the next god object simulation cycle.

Constraint-based methods based on other principles have also been presented, such as the three-DoF haptic algorithm for implicit functions by Salisbury and Tarr [ST97]. For obtaining the proxy pose, first, the closest surface point to the device point is calculated

Zilles and Salisbury coined the term god object, used thereafter to categorize similar constraint-based algorithms to theirs. However, as noted by the authors, that designation had been previously used by Dworkin and Zeltzer [DZ93] with another meaning: virtual objects in physical simulations controlled by human users, and hence, being their motion not solely governed by dynamics laws.

Figure 2.9: Virtual coupling between the hap- tic or device handle held by the user (not visual- ized) and the virtual tool which collides with the environment. The stiffness (kVC) and damping (bVC) applied to the the relative translation (x) and rotation (r) between both frames renders the force and torque values applied to the user. The stability is not dictated by the virtual stiff- ness of the computed collisions, but by the pa- rameters of the virtual coupling spring-damper system. Colgate et al. [CSB95] introduced the concept of virtual coupling and pointed out to the conditions necessary for the spring-damper parameters to guarantee passive interactions.

Virtual Tool

Haptic Handle

by steepest descent; the gradient and the penetration value of the of the implicit function at the device point give the step. Then, that point is tracked in two steps per cycle while the device point moves in solid volume: (i) the new device point is projected on the tangent plane of the previous proxy point (using the gradient) and (ii) the closest surface point of that projection is found by steepest descent, i. e., the new proxy point. This idea has been used in several other works, for instance, with signed distance fields or density fields [LYG02], and even with deformable models [CBS13].