Potential Field Approach for Haptic Selection - Jean Simard

used in CAD. We have developed an analyt- ical expression with a generic and unified representation based on potential fields. The result is a simplified model ...
192KB taille 0 téléchargements 247 vues
Potential Field Approach for Haptic Selection Jean Simard∗

Mehdi Ammi†

Flavien Picon‡

Patrick Bourdot§

LIMSI laboratory

A BSTRACT In a number of 3d applications and especially in Computer Aided Design (CAD), the accuracy of the selection process is important for subsequent operations. In this paper, we propose a mathematical model to manage haptic selection of topological entities (vertices, edges, faces. . . ) used in CAD. We have developed an analytical expression with a generic and unified representation based on potential fields. The result is a simplified model for software implementation. Moreover, these functions introduce a smooth, accurate and stable force profile. Keywords: Virtual reality, haptic, CAD, selection, potential field. Index Terms: H.1.2 [Models and principles]: User/Machine theory—Human factors, H.5.2 [Information interfaces and presentation]: User interfaces—Haptic I/O, I.3.6 [Computer Graphics]: Methodology and techniques—Interaction Techniques I.3.7 [Computer Graphics]: Three-dimensional graphics and realism—Virtual Reality, J.6 [Computer-Aided Engineering]: Computer Aided Design 1

I NTRODUCTION

Nowadays, VR technologies take an increasingly significant place in several professional applications (design, industrial supervision, teaching. . . ). Many parameters need to be taken into account in order to have a functional VR application but an important step in any 3d interaction is the selection process. It precedes any other operation like creation, modification or suppression, especially in CAD applications. Earlier work, which we detail below, has already proved that VR technologies and haptic solutions allow the perception of 3d components of complex CAD objects. This paper presents a model based on potential fields which improve the stability and the accuracy in the haptic selection process so the performances and the efficiency of a task. In our study, we experiment a selection approach in CAD context. The activity on a CAD system is divided into three main tasks: selection, creation and modification. The creation and modification steps respectively consist in defining the 3d points and modifying the parameters of the created elements in the scene. The selection process is a fundamental operation before any subsequent modification or creation. Selection consists in reaching an element in a virtual scene (2d or 3d) and marking it for future operations. Therefore, it must respect several constraints (accuracy, velocity, robustness, comfort. . . ) depending on the application and the objectives of the post-selection tasks. Our research on the selection process aims for perception and reach the topological entities (vertex, edge, or face) used in CAD. Several approaches to selection with haptic feedback have been developed. The main objective of introducing haptic feedback is ∗ e-mail:

[email protected] [email protected] ‡ e-mail: [email protected] § e-mail: [email protected] † e-mail:

to assist or constrain the gesture of the user to reach the objective faster and more accurately. In [5, 4], Miller et al. proposed a simple attractive haptic feedback for a 2d selection task on an X-Window System. Oakley et al. [7, 6] carried out several studies and experimentations to evaluate the contribution of haptic feedback in Graphical User Interfaces. Furthermore, Oakley et al. investigated several haptic metaphors to improve the selection. Some work was done to improve selection in CAD systems. Stein and Coquillart in [9] proposed to use a 2 Degree of Freedom (DoF) interface to select a vertex in 3d space. Later, Fiorentino et al. [2] extend this work to 6-DoF interfaces in a CAD application. This solution greatly improves the selection operation in CAD system. Based on Yamada et al.’s works [10], Picon et al. [8] proposed different strategies to assist a CAD user with haptic feedbacks during the selection of the topological entities. The proposed strategies allow an active assistance for selection with several functionalities which consider the CAD model specifications (density of elements, topology and so on). This work showed a significant improvement in execution time, quality of the trajectory and comfort. However the force model based on Yamada et al. is not accurate enough and is difficult to implement when there is heterogeneous topological elements. Because of the drawbacks of the previous approaches, we developed a force model for haptic feedback, based on potential fields which includes the definition of heterogeneous topological elements. It attracts the user onto the nearest topological elements of the CAD model. This paper is structured in three main parts. The first part introduces the definition of the force model. Then, the second part presents the potential field model with its mathematical development. Finally, the last part conclude with several prospects that will be studied for future studies. 2 F ORCE MODEL FOR HAPTIC SELECTION The purpose of the selection process is to point at elements on which to work. This is the first operation before any other. With the haptic feedback, we can determine three specific issues in the process: 1. the user should be able to differentiate the different topological entities (vertex, edge, face); 2. the haptic feedback must be stable even in areas with high density of elements; 3. the haptic feedback must have appropriate force attraction in concavities to avoid incoherent movements. To improve selection process, haptic feedback provides a sequence of virtual guides — with attraction force model — that will drive the user indirectly to the target (vertex, edge or face). In the next section, we present the force model used for haptic feedback. 2.1 Proposed force model In a haptic aided selection process, a force model is required in order to assist or constrain the user interaction. The force model that we present is based on Yamada et al.’s works [10]. These force profiles have two phases, an increasing phase then a decreasing phase.

The force increases when the proxy gets closer to the final point. But to avoid some unwanted vibrations, the force decreases to zero when the distance approaches zero. This proposed force model includes some discontinuities which introduce convergent forces. These convergent forces provoke some unwanted instabilities. So we present a new continuous model which avoids the convergent forces. Currently two phases are linked on a junction point with abscissa σ . We propose three models based on different tangents at the origin: vertical, oblique and horizontal respectively for model Square, Linear and Quadratic. We √ need functions that increase so we use the following functions x, x and x2 to introduce these tangents in our force model. We couple these functions with an attenuation in order to converge to zero with an infinite distance from the target. This attenuation is a simplified Gaussian function exp −x2 whose derivative (also based on the Gaussian function) we can easily calculate. With these specifications we are able to write the new force model: h i fγ (x) = xγ exp −x2

With the previous defined force model, we can express three continuous functions. Each function has its own tangent at the origin. • Square, as shown in Figure 1(a): r  2    x σ − x2 exp fγ ,φ ,σ (x) γ = 1 = φ 2 σ 4σ 2

fγ (σ ) = φ

(2a)

fγ′ (σ ) = 0

(2b)

(10)

• Linear, as shown in Figure 1(b): 

(1)

 where γ ∈ 12 , 1, 2 is the parameter which describes the three different models. In this force model, we want to introduce two constants. The first one is the maximum amplitude called φ which is the maximum force in the model. The second constant σ is the abscissa of this maximum amplitude φ . This second constant defines the size of the attraction area around a topological element. We express these constraints in the force model with the two following equations. (

The definition of the α and β constants allows us to write the force model which fits the constraints (2a) and (2b). This expression of the force model depends on φ and σ constants. " #  x γ γ σ 2 − x2 fγ ,φ ,σ (x) = φ exp (9) σ 2σ 2

 2   x σ − x2 fγ ,φ ,σ (x) γ =1 = φ exp σ 2σ 2

(11)

• Quadratic, as shown in Figure 1(c): 

  2  x2 σ − x2 fγ ,φ ,σ (x) γ =2 = φ 2 exp σ σ2

(12)

F φ

σ

x

(a) Square force model

We introduce two new variables in the expression of the force model to solve equations (2a) and (2b). So we determine these two constants α and β .

F φ

h i fγ (x) = α xγ exp −β x2

(3)

where α , β ∈ R+ . Because x is a distance, α must be positive in order to have a positive force. A negative force will result in repulsive forces instead of attractive forces. β must also be positive to  maintain the attenuation of the Gaussian function exp x2 . If not, the force will not converge to zero. Let us calculate the derivative function of the force model in order to solve (2b). h i  fγ′ (x) = α exp −β x2 γ xγ −1 − 2β xγ +1 (4) We can replace the derivative function in the second equation (2b). Because the exponential function and α are strictly positive, we can reduce the equation and deduce the value of the β constant. fγ′ (σ ) = 0

⇒ ⇒

γσ γ −1 − 2β σ γ +1 = 0 γ β= 2σ 2

⇒ ⇒

h γi α σ γ exp − = φ 2 hγ i φ α = γ exp σ 2

x

(b) Linear force model

F φ

σ

x

(c) Quadratic force model Figure 1: Continuous force models where x is the distance between the attractive point and the proxy and F is the corresponding force amplitude

(5) (6)

Now, with the value of the β constant, we find the value of α with equation (2a). fγ (σ ) = φ

σ

(7) (8)

2.2 3d force model The previous developments describe a force model in 1d. But the final objective is to apply forces in a virtual 3d space. Let us see how to extend it to 3d. Assuming that O is the origin of the coordinate system and X is the proxy position in the 3d space, the expression of the 3d force model is:   →2   2 −− −→ !γ γ σ XO XO → −  f γ ,φ ,σ (X) = φ exp  (13) σ 2σ 2

−→ where XO2 is the square scalar product which can also be written

−→ 2 −→

with the square of the norm: XO2 = XO . In (13), we can observe that the distance between the proxy and the origin of the coordinate system is the unique variable which influences the force. When the distance is important, the force is insignificant. We can − → also notice that the function fγ ,φ ,σ becomes a vector field f γ ,φ ,σ : − → − → − → one force value for each axis Ox, Oy and Oz. In order to simplify the expression of the force model, we define γ = 1. In fact, models Square and Quadratic have drawbacks. Square is unstable because of hard attraction forces for short distances (vertical tangent). Quadratic is the least accurate model because of soft attraction forces in a wide area around the target (horizontal tangent). The linear model is the best compromise. Moreover we can modify the inclination of the tangent with the values of both constants φ and σ . 3 P OTENTIAL FIELD FOR A GLOBAL DEFINITION 3.1 From force model to potential field We will now extend the previous force model with a potential field approach. Our work is inspired by path planning techniques like in Ge and Cui’s work [3] and by the paper from Ammi and Ferreira [1] who use potential fields in nano-manipulation. In robotics, this approach associates attractive and repulsive potential fields (respectively for obstacles and targets) to lead the robot to its target. In our case, we do not need repulsive potential fields because our objective is to attract the proxy to the different topological elements of the CAD object. Thus, we focus the model on the attractive potential fields. This potential field definition will allow us to include several different topological entities simultaneously in 3d scenes. In fact, the potential field Uφ ,σ is linked to the previous defined force model by the function fφ ,σ : → − − → f φ ,σ (X) = − ∇ ·Uφ ,σ (X) (14) → − where ∇ is the gradient operator. This formula is a typical physics relation between forces and energy (potential). So the potential field Uφ ,σ is " −→ # σ 2 − OX 2 (15) Uφ ,σ (X) = φ · σ exp 2σ 2 We can see a graphic representation of this potential field on Figure 2. In this figure, the inflexion point has an abscissa of σ .

Our force model produces an attraction to a vertex. However, some modifications on the vertex model are needed to take edges and faces into consideration. In fact, to attract to an edge, we also attract to the closest point from the proxy and on the edge (or the face). To obtain this point, we use a simple orthogonal projection. 3.2 Model reunification based on the function The previous model entirely defines an attraction for every topological entities. However, CAD applications may create and manage complex scenes with different geometric properties (density of elements, topology. . . ). Thus, we need a global description of the potential field including the potential fields of each topological element. The first approach is to sum the potential fields of every object in the scene like in the work of Ge and Cui [3]. Let Ui be the potential field of a topological element i. We can express the global potential field U of a complex CAD object with N elements. N

Uglobal (X) =



i=1

  Ui (X)vertices ,Ui (X)edges ,Ui (X) f aces

(17)

An example of CAD object and its associated potential field are respectively shown on Figure 3(a) and Figure 3(b).

(a) CAD scene

U

x

y

U (b) Potential field of the superior face Figure 3: Potential field of a complex scene where x, y are the space dimensions and U is the amplitude of the potential

σ

x

Figure 2: Potential field representation of a vertex where x is the distance between the attractive point and the proxy and U is the corresponding potential amplitude

Our force model attracts the proxy toward the origin point (0, 0, 0). In fact, we are using the norm between the origin O and the proxy X. To make it possible with any vertex in the 3d space, we introduce a point P(xP , yP , zP ). " −→ # σ 2 − XP2 Uφ ,σ (X, P) = φ · σ exp (16) 2σ 2

However, the sum operator in (17) induces some inconsistencies in the global model. This error is greater when two objects are very close. Figure 4 shows an example with two close vertices. Summing the two potential fields creates only one local maximum at the middle of the two vertices. However, the local maximum is the mathematical element of the potential field that produces the right haptic feedback. So the sum introduces a erroneous haptic feedback force. This event can also be mathematically demonstrated. With vertices A and B, the global potential field U is written as: (18) U(X) = Uφ ,σ (X, A) +Uφ ,σ (X, B) To determine the abscissa of each local maximum, we calculate the derivative of the global potential field. The derivative is the sum

U

xA

xB

x

Figure 4: Incoherences in the sum of potential fields where x is the distance between the attractive point and the proxy and U is the corresponding potential amplitude

of the force models.

∂ U(X) → − → − = f φ ,σ (X, A) + f φ ,σ (X, B) ∂x

(19)

The derivative of the potential function must be zero on vertex → − A and vertex B but when X = A, the value of f φ ,σ (X, A) becomes → − zero, whereas the value of f φ ,σ (X, B) is strictly positive so the sum of these functions is non-zero. The same effect can be observed when X = B. We can deduce that the global potential field is not zero on neither A nor B. In order to avoid this error, we propose another solution to generate the global model. This solution is based on the max function and can be written as:  N  Uglobal (X) = max Ui (X)vertices ,Ui (X)edges ,Ui (X) f aces i=1

(20)

Figure 5 shows the new global potential field using data from Figure 4. We can observe that the local maxima are preserved.

U

xA

xB

x

Figure 5: Global potential function with max function where x is the distance between the attractive point and the proxy and U is the corresponding potential amplitude

Even if the max function avoids the error of local maxima, it introduces a discontinuity in the global potential field (middle point of Figure 5). The discontinuity produces divergent forces that repulse the proxy from the concerned area (middle point). So this discontinuity does not disturb the haptic feedback of the system because it does not generate any oscillations. Moreover, the presence of this discontinuity introduces a punctual haptic effect when the proxy gets closer to the topological element. This perception is a good indication to the designer that he has reached the final target (vertex, edge, face). 4 C ONCLUSION AND PERSPECTIVES In this paper, we have presented a new approach to apply haptic feedback force for selection processes in 3d applications. In our case, topological elements of CAD objects were taken into consideration but we could extend this mathematical model to another

situation which could require attraction areas. In fact, this method is very generic because of the mathematical definition and can be easily adapted. Another interesting point is the construction of the potential field. For edges and faces, it is built with the orthogonal projection of the proxy on the element. So any other topological element (like surfaces) on which a projection of the proxy can be applied, can be included in the model. In fact, simple curves or complex surfaces can be used with this potential field model. However, it does not solve the problem of concavities. Because we now work with potential fields, there is only one important variable: a distance. In the case of force vector fields, we need to deal with three dimensions so there is a force model function for each axis. It is more complex. Most of the time, we look for new ideas in one dimension and expand them to the second and third dimensions. This potential field approach simplifies the global vision of the force model, which is helpful for haptic selection processes. In future work, we will focus on different enhancements. First of all, we will introduce new other topological elements like NURBS surfaces. We will also study eye-tracking systems in order to explore if eye direction can improve the efficiency of the selection process. Based on our potential field model, we will attenuate the forces that are not in the eye direction, for example, by multiplying with a Gaussian function aligned with the eye direction. R EFERENCES [1] M. Ammi and A. Ferreira. Haptically generated paths of an afm-based nanomanipulator using potential fields. In IEEE Conference on Nanotechnology, pages 355–357, Munich, Allemagne, 08 2004. [2] M. Fiorentino, G. Monno, P. A. Renzulli, and A. E. Uva. 3d pointing in virtual reality: experimental study. In International Conference on Tools and Methods Evolution in Engineering Design, pages 4–6, 06 2003. [3] S. S. Ge and Y. J. Cui. Path planning for mobile robots using new potential functions. In Proceedings of The 3rd Asian Control Conference, pages 2011–2016, Shangaï, Chine, 07 2000. [4] T. Miller. Implementation issues in adding force feedback to the x desktop. In Proceedings of the 3rd PHANToM Users Group Workshop, pages 50–53, 1998. [5] T. Miller and R. C. Zeleznik. An insidious haptic invasion: adding force feedback to the x desktop. In ACM Symposium on User Interface Software and Technology, pages 59–64, Providence, RI, USA, 1998. ACM Press. [6] I. Oakley, A. Adams, S. Brewster, and P. Gray. Guidelines for the design of haptic widgets. In X. Faulkner, J. Finlay, and F. Detienne, editors, 16th British HCI Group Annual Conference, pages 195–211, Londres, Royaume-Uni, 09 2002. Springer Verlag. [7] I. Oakley, M. R. McGee, S. A. Brewster, and P. D. Gray. Putting the feel in ’look and feel’. In ACM CHI 2000, pages 415–422, Glasgow, Royaume-Uni, 2000. ACM Press Addison-Wesley. [8] F. Picon, M. Ammi, and P. Bourdot. Case study of haptic functions for selection on cad models. In Proceedings of the IEEE Virtual Reality Conference 2008, pages 209–212, Reno, NV, USA, 03 2008. [9] T. Stein and S. Coquillart. The metric cursor. In Proceedings of the 8th Pacific Conference on Computer Graphics and Applications, pages 381–386, Washington, DC, USA, 2000. IEEE Computer Society. [10] T. Yamada, T. Ogi, D. Tsubouchi, and M. Hirose. Desk-sized immersive workplace using force feedback grid interface. In Proceedings of the IEEE Virtual Reality Conference 2002, pages 135–142, Washington, DC, USA, 2002. IEEE Computer Society.