Robots, computer algebra and eight connected components
RRobots, computer algebra and eight connected components
Jose Capco * , Mohab Safey El Din † , Josef Schicho ‡ September 1, 2020
Abstract
Answering connectivity queries in semi-algebraic sets is a long-standing and chal-lenging computational issue with applications in robotics, in particular for the analysisof kinematic singularities. One task there is to compute the number of connectedcomponents of the complementary of the singularities of the kinematic map. Anothertask is to design a continuous path joining two given points lying in the same connectedcomponent of such a set. In this paper, we push forward the current capabilities ofcomputer algebra to obtain computer-aided proofs of the analysis of the kinematicsingularities of various robots used in industry.We first show how to combine mathematical reasoning with easy symbolic com-putations to study the kinematic singularities of an infinite family (depending onparamaters) modelled by the UR-series produced by the company “Universal Robots”.Next, we compute roadmaps (which are curves used to answer connectivity queries)for this family of robots. We design an algorithm for “solving” positive dimensionalpolynomial system depending on parameters. The meaning of solving here meanspartitioning the parameter’s space into semi-algebraic components over which thenumber of connected components of the semi-algebraic set defined by the input systemis invariant. Practical experiments confirm our computer-aided proof and show thatsuch an algorithm can already be used to analyze the kinematic singularities of theUR-series family. The number of connected components of the complementary of thekinematic singularities of generic robots in this family is . The individual parts of a serial robot, called links, are moved by controlling the angle ofeach joint connecting two links. The inverse kinematics problem asks for the values ofall angles producing a desired position of the end effector, where “position” includes not * Innsbruck University, Innsbruck, Austria, email:[email protected]. † Sorbonne Université, CNRS, LIP6, Paris, France, email:[email protected]. ‡ JKU University, Linz, Austria, email:[email protected] a r X i v : . [ c s . S C ] A ug ust the location of the end effector in 3-space but also the orientation. In a sense, thismeans inverting a function which is called the forward kinematics map in robotics, whichdetermines the position of the end effector for given angles by a well-known formula (seeSection 2). In robot controlling, the inverse kinematics problem is often solved incrementally:starting from some known initial angle configuration and its corresponding end effectorposition, we want to compute the change of the angles required to achieve a desired smallchange in the end effector position.Kinematic singularities are defined as critical points of the forward map, i.e. angle config-urations where the Jacobian matrix of the forward map is rank deficient. There are twoknown facts that make rather difficulty to control a robot in a singular or near a singularconfiguration. First, if an end effector velocity or force outside the image of the singularJacobian is desired, then the necessary joint velocity or torque is either not defined orvery large (see [23] §4.3 and [31] §5.9). The second reason is that industrial controllers arebased on Newton’s method for the incremental solution of the inverse problem, and thismethod is not guaranteed to converge if it is used with a starting point close to the singularset. For these reasons, engineers prefer to plan the robot movements avoiding kinematicsingularities.For a general serial robot with six joints, the singular set is a hypersurface defined locallyby the Jacobian determinant of the forward map. Its complementary, a real manifold, is notconnected. Counting the number of connected components of this manifold and answeringconnectivity queries in this set is then of crucial importance in this application domain.Answering connectivity queries in semi-algebraic sets is a classical problem of algorithmicsemi-algebraic geometry which has attracted a lot of attention through the developmentof the so-called ROADMAP algorithms (see e.g. [12, 11, 9, 6, 8, 27, 28, 21]). Up to ourknowledge, such algorithms had never been developed enough and implemented efficientlyto tackle real-life applications.In this paper, we push forward the capabilities of computer algebra in this applicationdomain by solving connectivity queries for the non singular configuration sets of industrialrobots from the UR series of the company “Universal Robots”. For a particular robot inthis series, the UR5, the number of components of the non singular configuration set is8 (see Section 3). For two points in the same component, we show how to construct aconnecting path, in two ways: either by an ad hoc way (which has its own algorithmicinterest) taking advantage of the specialty of the geometric parameters of UR5, and byusing the ROADMAP algorithm (see Section 5). Next, we go further and extend ouranalysis of UR5 to the whole UR series and prove that outside a proper Zariski closed set(UR5 is outside this closed set) the number of connected components of the non singularconfiguration set is constant. These are computer-aided mathematical proofs involving«easy» symbolic computationsThe next contribution is based on the fact that the family of UR robots is determined by afinite list of real parameters. Hence, an algorithmic way of tackling the problem of analyzingkinematic singularities of the whole UR family is to «solve» a positive dimensional system depending on parameters (i.e. after specialization of the parameters, the specialized system2s positive dimensional). We design an algorithm that decomposes the parameter’s spaceinto semi-algebraic subsets, such that the number of connected components of the nonsingular configurations is constant in each of these subsets. As far as we know, this is thefirst algorithm of that type which is designed.We also implemented this algorithm and used it for the analysis of the kinematic singularitiesof the UR series. Computations are heavy but already doable (on a standard laptop) within hours. This is a computational way to retrieve the same results as our computer-aided mathematical proofs. These computations show that computer algebra today isefficient enough to solve connectivity queries that are of practical interest in industrialrobot applications. We define a manipulator or robot as follows: we have finite ordered rigid bodies called links which are connected by 𝑛 revolute joints that are also ordered. To each joint we associate acoordinate system or a frame . The links are connected in a serial manner i.e. if we considerthe robot as a graph such that the vertices are joints and the edges are links then this graphis a path (the first and last joint has degree 1 and all other joints have degree 2) and thejoints allow rotation about its axes, so that if a joint rotates then all other subsequent linksrotate about the axes of this joint. A reference coordinate system is chosen for the finaljoint which is called the end-effector .In theoretical kinematics one may forget that the links are rigid bodies so that collision between links are disregarded. In this case we may as well think of a robot as a differentiablemap 𝐹 : SO(2) 𝑛 −→ SE(3) where
SO(2) is the one-dimensional group of rotations arounda fixed line, parameterised by the rotation angle, and
SE(3) is the six-dimensional group ofEuclidean congruence transformations. This map is defined in the following way: ∙ The 𝑖 -th coordinate of an element in SO(2) 𝑛 is associated to the 𝑖 -th (revolute) jointparameter. ∙ For joint values ⃗𝜃 := ( 𝜃 , . . . , 𝜃 𝑛 ) in SO(2) 𝑛 , the image 𝐹 ( ⃗𝜃 ) is the transformation ofthe end-effector from the initial position corresponding to all angles being zero to thefinal position obtained by composing the 𝑛 rotations.The map 𝐹 itself is called the kinematic map (of the robot). Its domain is called the configuration space , while its image is called the work-space or the kinematic image .We use the Denavit-Hartenberg (DH) convention when describing relations between twojoint frames. It is standard in robotics ; its advantages are discussed in e.g. [31, §3.2], [1,§4.2]. The transformation between the frames is given by the following rule: ∙ The 𝑧 -axis of the reference frame will be the axis of rotation of the joint. this is usually another frame, but this is just an additional fixed transformation in SE(3) and w.l.o.g.we assume that the final offset, distance and twist is To obtain the next frame, one starts with a rotation about the 𝑧 -axis of the referenceframe, called the rotation , followed by ∙ a translation along the 𝑧 -axis of the reference frame, called the offset , followed by ∙ a translation along the 𝑥 -axis, called the distance , followed by ∙ a rotation about the 𝑥 -axis, called the twist .The transformation between frame 𝑖 to frame 𝑖 + 1 is 𝑅 𝑧 ( 𝜃 𝑖 ) 𝑇 𝑧 ( 𝑑 𝑖 ) 𝑇 𝑥 ( 𝑎 𝑖 ) 𝑅 𝑥 ( 𝛼 𝑖 ) where 𝑅 𝑧 , 𝑇 𝑧 , 𝑇 𝑥 , 𝑅 𝑥 are rotations or translations with respect to 𝑧 - or 𝑥 -axis parameterisedby the angle of rotation 𝜃 𝑖 (the 𝑖 -th joint parameter), the offset 𝑑 𝑖 , the distance 𝑎 𝑖 and theangle of twist 𝛼 𝑖 of the 𝑖 -th frame. For a given robot with 𝑛 joints all DH parameters exceptfor the rotation are fixed values. So that image of 𝐹 for given joint values (the rotations) ( 𝜃 , . . . , 𝜃 𝑛 ) is just the multiplication of these transformations in SE(3) . The parameters 𝑑 , 𝑑 𝑛 , 𝑎 𝑛 , 𝛼 𝑛 are assumed to be . This is not a loss of generality, because we can freelychoose the frame at the base and at the end-effector. More detailed discussion on these canbe seen in [31]. Example 2.1.
The UR5 robot has the following DH parameters: distances (m.) ( 𝑎 , . . . , 𝑎 ) := (0 , − , − , , , offsets (m.) ( 𝑑 , . . . , 𝑑 ) := (0 , , , , , twist angles (rad.) ( 𝛼 , . . . , 𝛼 ) := ( 𝜋 , , , 𝜋 , − 𝜋 , For example, the following joint angles (rotations, in rad.) ( 𝜃 , . . . , 𝜃 ) := (︂ , , , , , )︂ leads to the following transformation in ( 𝑅, ⃗𝑡 ) ∈ SE(3) (represented as elements in
SO(3) (cid:111)R ) where: 𝑅 ≃ ⎛⎝ . − . − . − .
393 0 . − . .
918 0 . − . ⎞⎠ , ⃗𝑡 ≃ ( − . , − . , − . . Definition.
Given the kinematic map of a manipulator 𝐹 : SO(2) 𝑛 → SE(3) , the kinematicsingularities in the configuration space are the points 𝑃 ∈ ( P ) 𝑛 such that the Jacobian of 𝐹 at 𝑃 is rank-deficient. In this paper, we will only deal with 6-jointed manipulators. Therefore the kinematic mapis a differentiable map from the 6-dimensional configuration space (SO(2)) to the group SE(3) , which is also -dimensional. For non-singular points of the map, the Jacobian istherefore invertible, and 𝐹 is a local homeomorphism. Here is a well-known geometricdescription of singularities. 4 heorem 2.2. Let 𝐹 : SO(2) → SE(3) be the kinematic map of a robot with 6 joints. Let 𝑃 ∈ SO(2) . Then the following are equivalent.1. 𝑃 is a kinematic singularity.2. The Jacobian of 𝐹 at 𝑃 is singular.3. If 𝑃 , . . . , 𝑃 ∈ P ( R ) are the Plücker representation of the axes (lines in P ) of thejoints of the robot at the configuration point 𝑃 then the matrix consisting of thePlücker coordinates ( 𝑝 𝑖,𝑗 ) 𝑖,𝑗 ≤ ( 𝑃 𝑖 = ( 𝑝 𝑖, : 𝑝 𝑖, : · · · : 𝑝 𝑖, ) for 𝑖 = 1 , . . . , ) is singular.Proof. The equivalence of the first two items is clear by definition. The equivalence of thefirst and the third item is found in [30, §4.5.1], [23, §4.1] or [1, §4.5.1.]Assume that we have two non-singular points in the configuration set. As explained earlier,we want to decide if these two configurations can be connected by a curve of configurationswhich avoids the singular hypersurface (see [33] §1.2 for some history on this question).If yes, then an explicit construction of such a curve is also of interest. In order to tacklethese problems, we choose parameters for
SO(2) so that the equation of the hypersurfacebecomes a polynomial. This is not the case when we use the angles 𝜃 , . . . , 𝜃 𝑛 , because theJacobian contains trigonometric functions in these angles. One well-known strategy is toparametrize by points on a unit circle, i.e. by two parameters satisfying the equation ofthe unit circle. This has a clear disadvantage: the number of variables increases, and thesingular set has co-dimension greater than one. Another well-known strategy is to replace 𝜃 𝑖 by 𝑣 𝑖 = tan 𝜃 𝑖 . The variable 𝑣 𝑖 ranges over the projective line, and the angle 𝜋 correspondsto the point at infinity. If we set 𝑣 𝑖 = tan 𝜃 𝑖 for 𝑖 = 1 , . . . , 𝑛 , then we obtain, in general,a polynomial in 𝑣 , . . . , 𝑣 . More precisely, the degree is 2 in 𝑣 and 𝑣 and degree 4 in 𝑣 and in 𝑣 . The Jacobian does not depend on the joint angles 𝜃 and 𝜃 . This is clear fromthe third characterization of singularities in Theorem 2.2: only the position of the axes arerelevant, and a rotation along the first or the last axis does not change the position of anyaxis.We define the UR Family to be robots having a similar DH-parameter as the knownUR robots (UR5, UR10, etc.). Such
UR robots are parameterised by the following DHparametersdistances (m.) ( 𝑎 , . . . , 𝑎 ) := (0 , 𝑎 , 𝑎 , , , offsets (m.) ( 𝑑 , . . . , 𝑑 ) := (0 , , , 𝑑 , 𝑑 , twist angles (rad.) ( 𝛼 , . . . , 𝛼 ) := ( 𝜋 , , , 𝜋 , − 𝜋 , For these robots, the determinant of the Jacobian (see [34]), expressed as a polynomial in 𝑣 , . . . , 𝑣 , is 𝐴 = − 𝐵𝑣 𝑣 with 𝐵 = 𝑎 𝑣 𝑣 𝑣 − 𝑎 𝑣 𝑣 𝑣 − 𝑑 𝑣 𝑣 𝑣 − 𝑑 𝑣 𝑣 𝑣 − 𝑑 𝑣 𝑣 𝑣 + 𝑎 𝑣 𝑣 + 𝑎 𝑣 𝑣 − 𝑎 𝑣 𝑣 − 𝑎 𝑣 𝑣 + 𝑎 𝑣 𝑣 + 4 𝑎 𝑣 𝑣 𝑣 + 𝑎 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 8 𝑑 𝑣 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 𝑎 𝑣 − 𝑎 𝑣 − 𝑎 𝑣 + 𝑎 𝑣 + 4 𝑎 𝑣 𝑣 + 𝑎 𝑣 − 𝑎 𝑣 − 𝑑 𝑣 − 𝑑 𝑣 − 𝑑 𝑣 − 𝑎 − 𝑎 Note that there is a degree drop in three of the four cases: the degree in 𝑣 is only , andnot , and the degree in 𝑣 is only , and not , and the degree in 𝑣 is only , and not5 . The drop in the degree means that the homogeneous form of the Jacobian has a linearfactor that vanishes if and only if the value of the variable whose degree drops is infinity, orequivalently, that the corresponding angle is 𝜋 . Since we are interested in the complementof the singular space, we may assume that none of these three angles is equal to 𝜋 , and wecan use the parameters 𝑣 , 𝑣 , 𝑣 without worrying about paths crossing infinity.For the angle 𝜃 , the situation is different. There is no degree drop, hence there are configu-rations with 𝜃 = 𝜋 in the non singular configuration set. If we use the parametrizationby half angle, then we have to take paths in the projective line into account that crossinfinity, or, in other words, consider this variable in the projective space P ( R ) . But, totake advantage on algorithms acting on semi-algebraic sets, one needs variables that rangeover R .Hence, we instead use parameters 𝑠 = sin( 𝜃 ) and 𝑐 = cos( 𝜃 ) and add the additionalequation 𝑠 + 𝑐 = 1 , obtaining a polynomial in the variables 𝑠 , 𝑐 , 𝑣 , 𝑣 , 𝑣 with coefficientsdepending on the parameters 𝑎 , 𝑎 , 𝑑 , 𝑑 . Of course, the reason for this more costlytreatment for 𝜃 is just necessary if we use the ROADMAP algorithm subsequently. For analternative analysis not using it, it is still better to use the half tangent ranging over theprojective line. We gave in Example 2.1 the Denavit-Hartenberg parameters of the UR5 robot. These valuesare used to instantiate 𝑎 , 𝑎 and 𝑑 in the above polynomial 𝐵 ; the specialized polynomialis then denoted by ˜ 𝐵 and we let ˜ 𝐴 = ˜ 𝐵𝑣 𝑣 . Recall that 𝑣 ranges over P , while 𝑣 , 𝑣 , 𝑣 range only over the affine line.We investigate the discriminant of ˜ 𝐵 with respect to the variable 𝑣 (thus the projection ofthe critical set to the ( 𝑣 , 𝑣 ) -plane). The discriminant of ˜ 𝐵 with respect to the variable 𝑣 we denote as 𝑏 ∈ R [ 𝑣 , 𝑣 ] . This discriminant is still factorisable in C [ 𝑣 , 𝑣 ] . In fact, onechecks, that it is the factor of two complex conjugates of some polynomial in R [ 𝑣 , 𝑣 ] . Thisimplies that 𝑏 = 𝑐 + 𝑑 is the sum of two squares of real polynomials 𝑐, 𝑑 ∈ R [ 𝑣 , 𝑣 ] . Thesetwo polynomials are given by 𝑐 = 1577212 𝑣 − 𝑣 − √ 𝑑 = ( √ 𝑣 + 1239915 − 𝑣 + 16090500 𝑣 √ Thus, 𝑏 can have only two real roots (i.e. two pairs ( 𝑣 , 𝑣 ) ), i.e the vanishing set of 𝑏 in R is finite, namely they points that are the zeros of both 𝑐 and 𝑑 . We solve this as floatingnumbers to have an idea of their vicinity in an affine chart of the ambient space of thekinematic singularity. The roots are 𝑞 = ( 𝑣 ≃ − . , 𝑣 ≃ − . 𝑞 = ( 𝑣 ≃ . , 𝑣 ≃ − . 𝑞 and 𝑞 in the ( 𝑣 , 𝑣 -plane, all three coefficients of ˜ 𝐵 withrespect to 𝑣 are zero.Now, since the discriminant 𝑏 is positive except at these two points and since ˜ 𝐵 itself isquadratic with respect to 𝑣 we conclude that the preimage of the projection (to ( 𝑣 , 𝑣 ) -plane) are two real points in the variety defined by ˜ 𝐵 . Thus, the variety defined by ˜ 𝐵 iscomposed of two sheets (above any two points ( 𝑣 , 𝑣 ) except 𝑞 and 𝑞 ). Let 𝑋 be thecomplement of the vanishing points of ˜ 𝐵 in P × A . Set 𝑌 := A ∖ ( { 𝑞 , 𝑞 } ∪ { (0 , 𝑣 ) | 𝑣 ∈ R } ) So we have a canonical projection (to the ( 𝑣 , 𝑣 ) -plane) from 𝑋 ∩ ( P × 𝑌 ) to 𝑌 . The fiberof this projection is a projective line without two distinct points. Hence, every fiber hastwo components. The sign of ˜ 𝐵 is different for the two components of each fiber. Then, wehave two components of 𝑋 for each component of 𝑌 . Obviously, 𝑌 has two components,hence we have a total number of components.For the non singular set, which is the complement of the zero set of ˜ 𝐴 , we get components:for each component of 𝑋 , we have one component where 𝑣 is positive and one where 𝑣 isnegative.Now assume that we have two non singular configuration points 𝑥, 𝑦 in the same component,and we want to construct a path connecting them. The projections to 𝑌 have to lie in thesame component of 𝑌 , and because 𝑌 is the plane without a line and two points, it is easyto connect the images of the projections in 𝑌 : in most cases, a straight line segment is fine;if the straight line segment connecting the two image points contains 𝑞 or 𝑞 , we have to doa random detour via a third point. The zero set of ˜ 𝐵 is a two-sheeted covering of 𝑌 . So, forany value of 𝑌 , we have two points in the zero set of ˜ 𝐵 projecting to it. If we look at thesepoints as points in SO(2) , then it is clear that there are two “midpoints” in the zero set of ˜ 𝐵 , which have equal angle distance to these two points. The value of ˜ 𝐵 is positive for oneof the two midpoints and negative for the other one. The sign of ˜ 𝐵 ( 𝑥 ) and ˜ 𝐵 ( 𝑦 ) , however,must be the same because the two points are in the same connected component. Suppose,without loss of generality, that ˜ 𝐵 ( 𝑥 ) and ˜ 𝐵 ( 𝑦 ) are both positive. Then we first connect 𝑥 to the midpoint over the projection of 𝑥 to 𝑌 with positive sign, by a curve in the fiber.Next, we lift the path in 𝑌 , connecting the projections of 𝑥 and 𝑦 in the same component,to a path of midpoints with positive sign, arriving at the midpoint with positive sign lyingover the projection of 𝑦 . Finally, we connect this midpoint to 𝑦 by the other fiber.Below, we show the sheets in Figure 1 to illustrate that:(i) the regions above and below the sheets can be connected(ii) the region between the two sheets is the other connected component(iii) the two points 𝑞 and 𝑞 are points in the projection where the sheets get connected(see assymptotes in Fig. 1). Thus, the variety describing the two sheets is connected.7 egends: path in component 1path in component 2asymptotes Figure 1:
The two sheets of ˜ 𝐵 We can make a general statement for robots belonging to the UR family (e.g. UR10, UR3etc. ). We define the
UR Family to be robots which have a similar DH-parameter as theknown UR robots (UR5, UR10 etc.), a robot in this family we shall call a
UR robot . Namelythey are parameterised by the following DH parameters :distances (m.) ( 𝑎 , . . . , 𝑎 ) := (0 , 𝑎 , 𝑎 , , , offsets (m.) ( 𝑑 , . . . , 𝑑 ) := (0 , , , 𝑑 , 𝑑 , twist angles (rad.) ( 𝛼 , . . . , 𝛼 ) := ( 𝜋 , , , 𝜋 , − 𝜋 , i.e. these robots are parameterised by parameters: 𝑎 , 𝑎 , 𝑑 , 𝑑 .We can write the largest (in number of terms and in degree) polynomial factor of thepolynomial whose vanishing points is the kinematic singularity in configuration space of aUR robot as 𝐵 = 𝑎 𝑣 𝑣 𝑣 − 𝑎 𝑣 𝑣 𝑣 − 𝑑 𝑣 𝑣 𝑣 − 𝑑 𝑣 𝑣 𝑣 − 𝑑 𝑣 𝑣 𝑣 + 𝑎 𝑣 𝑣 + 𝑎 𝑣 𝑣 − 𝑎 𝑣 𝑣 − 𝑎 𝑣 𝑣 + 𝑎 𝑣 𝑣 + 4 𝑎 𝑣 𝑣 𝑣 + 𝑎 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 8 𝑑 𝑣 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 2 𝑑 𝑣 𝑣 + 𝑎 𝑣 − 𝑎 𝑣 − 𝑎 𝑣 + 𝑎 𝑣 + 4 𝑎 𝑣 𝑣 + 𝑎 𝑣 − 𝑎 𝑣 − 𝑑 𝑣 − 𝑑 𝑣 − 𝑑 𝑣 − 𝑎 − 𝑎 Note that 𝑑 does not affect the singularity of the robot. Taking the discriminant of 𝐵 with respect to 𝑣 yields the sum of two squares i.e. the product of two quadratic complexconjugate polynomials disc( 𝐵, 𝑣 ) = 𝑔𝑔 . 𝑔 = ( − 𝑎 𝑣 𝑣 + 𝑎 𝑣 𝑣 + 𝑑 𝑣 + 𝑑 𝑣 + 𝑎 + 𝑎 ) + ( − 𝑑 𝑣 𝑣 + 𝑎 𝑣 + 𝑎 𝑣 − 𝑎 𝑣 + 𝑎 𝑣 + 𝑑 ) 𝑖 For a robot determined by some real quadruple 𝑢 ∈ R , let 𝐴 𝑢 , 𝐵 𝑢 , 𝑔 𝑢 be the polynomialsobtained by instantiating in 𝐴, 𝐵, 𝑔 the variables 𝑎 , 𝑎 , 𝑑 , 𝑑 by the corresponding realvalues in the quadruple. Let 𝑓 : R → R be the projection ( 𝑣 , 𝑣 , 𝑣 ) ↦→ ( 𝑣 , 𝑣 ) . Let 𝑌 𝑢 ⊂ R be the complement of (the union of the line 𝑣 = 0 and the common zero set of Re 𝑔 𝑢 and Im 𝑔 𝑢 ) . Then the real zero set of 𝐵 𝑢 in R intersected with 𝑓 − ( 𝑌 𝑢 ) projects tosurjectively to 𝑌 𝑢 , in such a way that there are two sheets, each projecting homeomorphicallyto 𝑌 𝑢 .For general robot 𝑢 , the real set of 𝑔 , which is meaning the set of all points in the real ( 𝑣 , 𝑣 ) -plane such that both the real part and the imaginary part of 𝑔 is equal to zero,is a finite subset of R . All arguments from the previous sections work in this case aswell. Hence we get components for these parameters’values. Moreover, we have pathsconnecting points in the same component, as in the previous section.8t remains to treat the non-general robots where the real zero set of 𝑔 is one-dimensional.This is the case if and only if 𝑑 = 𝑎 − 𝑎 = 0 . The even more special case 𝑑 = 𝑎 = 𝑎 = 0 is easy to analyze: here, the determinant of the Jacobian 𝐴 is identically zero, which meansthat there are no non singular configurations. Excluding that case, we have two families ofrobots, and in each family, up to the value of 𝑑 , the parameters are unique up to scaling.Without loss of generality, we can reduce to exactly two non-general robots 𝑢 ′ = (1 , , , and 𝑢 ′′ = (1 , − , , . Then the polynomial 𝐵 𝑢 ′ has a factor is 𝐶 ′ := 𝑣 𝑣 − 𝑣 − 𝑣 − , andthe polynomial 𝐵 𝑢 ′′ has a factor 𝐶 ′′ := 𝑣 𝑣 + 𝑣 + 𝑣 − . Apart from that complication,the analysis proceeds similar as in the general case: the set 𝑌 𝑢 ′ is the plane minus theline 𝑣 = 0 minus the hyperbola with equation 𝐶 ′ , and the set 𝑌 𝑢 ′′ is the plane minus thehyperbola with equation 𝐶 ′′ . In both cases, the number of components of 𝑌 is 5, as it canbe seen in Figure 2. Consequently, we have 20 components in total. The paths betweenpoints in the same component can be constructed similarly as in the general case. We explain the ROADMAP algorithm for the special case where the semi-algebraic set 𝑆 isgiven as a subset of some vector space R 𝑁 , 𝑁 ∈ N , defined by an equation 𝑓 ( 𝑥 , . . . , 𝑥 𝑁 ) = 0 and an inequation 𝑔 ( 𝑥 , . . . , 𝑥 𝑁 ) ̸ = 0 . We assume that the algebraic set defined by 𝑓 = 0 is smooth. This is sufficient for our application: the inequation is the determinant of theJacobian of the kinematic map 𝐴 , and the equality is 𝑠 + 𝑐 − .One first reduces the problem to one where the semi-algebraic set we consider is bounded.Note that there exists 𝑅 > large enough such that the connected components of 𝑆 are inone-to-one correspondence with the intersection of 𝑆 with the hyper-ball defined by N 𝑅 ≤ where N 𝑅 = 𝑥 + · · · + 𝑥 𝑛 − 𝑅 . We denote this intersection by 𝑆 ′ . Note that a roadmap of 𝑆 ′ provides a roadmap of 𝑆 .Determining such a large enough real number 𝑅 is done by choosing it larger than thelargest critical value of the restriction of the map 𝑥 → ‖ 𝑥 ‖ to each regular strata of thethe Euclidean closure of 𝑆 . This leads us to compute critical values of that map restrictedto the hypersurface defined by 𝑓 = 0 and next take the limits of the critical values of thesets defined by 𝑔 = ± 𝜀 and 𝑓 = 𝑔 ± 𝜀 = 0 when 𝜀 → .Next, we compute the critical values 𝜂 < · · · < 𝜂 𝑠 of the restriction of the map 𝑥 → 𝑔 ( 𝑥 ) tothe semi-algebraic set defined by 𝑓 = 0 and N 𝑅 ≤ . Following Thom’s isotopy lemma [13],Figure 2: Left (resp. right) shows the components of 𝑣 ( 𝑣 𝑣 + 𝑣 + 𝑣 − ̸ = 0 (resp. 𝑣 ( 𝑣 𝑣 − 𝑣 − 𝑣 − ̸ = 0 ) in 𝑌 𝑒 is chosen between and min( | 𝜂 𝑖 | , ≤ 𝑖 ≤ 𝑠 ) , the connected components of the semi-algebraic set 𝑆 + 𝑒 (resp. 𝑆 − 𝑒 ) defined by N 𝑅 ≤ , 𝑓 = 𝑔 − 𝑒 = 0 (resp. N 𝑅 ≤ , 𝑓 = 𝑔 + 𝑒 = 0 )are in one-to-one correspondence with the connected components of the semi-algebraic setdefined by N 𝑅 ≤ , 𝑓 = 0 , 𝑔 > (resp. N 𝑅 ≤ , 𝑓 = 0 , 𝑔 > ). Besides, 𝑆 + 𝑒 ⊂ 𝑆 ′ (resp. 𝑆 − 𝑒 ⊂ 𝑆 ′ ). Then a roadmap of 𝑆 ′ is obtained by taking the union of a roadmap of 𝑆 + 𝑒 withthe roadmap of 𝑆 − 𝑒 . Hence, we have performed a reduction to computing roadmaps in thecompact semi-algebraic sets 𝑆 + 𝑒 and 𝑆 − 𝑒 .In our application, the algebraic sets defined by the vanishing of all subsets of the definingpolynomials of 𝑆 + 𝑒 and 𝑆 − 𝑒 are smooth. Hence, we can rely on a slight modification of theroadmap algorithm given in [12] where we replace computations with multivariate resultantsfor solving polynomial systems by computations of Gröbner bases.The algorithm in [12] then takes as input a polynomial system defining a closed and boundedsemi-algebraic set 𝑆 and proceeds as follows. The core idea is to start by computing a curve C which has a non-empty intersection with each connected component of 𝑆 . That curvewill be typically the critical locus on the ( 𝑥 , 𝑥 ) -plane when one is in generic coordinates(else, one just needs to change linearly generically the coordinate system). A few remarksare in order here. When 𝑆 is defined by 𝑓 = · · · = 𝑓 𝑝 = 0 and 𝑔 ≥ , · · · , 𝑔 𝑠 ≥ , to definethe critical locus of the projection on the ( 𝑥 , 𝑥 ) -plane restricted to 𝑆 one takes the unionof the critical loci of that projection restricted to the real algebraic sets defined for all { 𝑖 , . . . , 𝑖 ℓ } ⊂ { , . . . , 𝑠 } , by 𝑓 = · · · = 𝑓 𝑝 = 𝑔 𝑖 = · · · = 𝑔 𝑖 ℓ = 0 and intersect this union ofcritical loci with 𝑆 (see [12]).That way, one obtains curves that intersect all connected components of 𝑆 but theseintersections may not be connected. To repair these connectivity failures, Canny’s algorithmfinds appropriate slices of 𝑆 . Let 𝜋 be the canonical projection ( 𝑥 , . . . , 𝑥 𝑛 ) → 𝑥 . Thisbasically consists in finding 𝛼 < . . . < 𝛼 𝑘 in R such that the union of ∪ 𝑘𝑖 =1 𝑆 ∩ 𝜋 − ( 𝛼 𝑖 ) with the critical curve C has a non-empty and connected intersection with each connectedcomponent of 𝑆 .The way Canny proposes to find those 𝛼 𝑖 ’s is to compute the critical values of the restrictionof 𝜋 to C . By the algebraic Sard’s theorem (see e.g. [28, Appendix B]), these values are infinite number and Canny proposes to take 𝛼 , · · · , 𝛼 𝑘 as those critical values. This leads tocompute with real algebraic numbers which can be encoded with their minimal polynomialsand isolating intervals. Since these minimal polynomials may have large degrees (singlyexponential in 𝑛 ), that step can be prohibitive for practical computations. We use then thetechnique introduced in [22] which consists in replacing 𝛼 < · · · < 𝛼 𝑘 with rational numbers 𝜌 < · · · < 𝜌 𝑘 − with 𝛼 𝑖 < 𝜌 𝑖 < 𝛼 𝑖 +1 . We refer to [22] for the rationale justifying this trick.All in all, one obtains a recursive algorithm with a decreasing number of variables at eachrecursive call. Combined with efficient Gröbner bases engines, we illustrate in Section 7that the ROADMAP algorithm (with the modifications introduced above) can be used inpractice to answer connectivity queries in semi-algebraic sets in concrete applications.The concept of roadmap and the algorithm computing it, described above, may seemcumbersome and unnecessarily sophisticated, especially when compared with the muchmore direct CAD approach [29]. The CAD algorithm is also a recursive algorithm, producingits recursive instance by projecting the hypersurface to R 𝑛 +1 and analyzing the discriminant.10his leads to an iteration of discriminants, and it is easy to see that the degree of the iterateddiscriminants grows double exponentially in 𝑛 : roughly, the degree of the discriminantis squared in every iteration. There lies the motivation for all the sophistication of theROADMAP algorithm: for each instance in the all recursive calls, the degree of the inputpolynomial is exactly the same as the degree of the initially given polynomial 𝑓 . This leadsto an asymptotic complexity which is only single exponential in 𝑛 . We refer to [27, 9, 28, 8]for more recent algorithms improving the complexity of roadmap computations. Let 𝐹 = ( 𝑓 , . . . , 𝑓 𝑝 ) and 𝐺 = ( 𝑔 , . . . , 𝑔 𝑞 ) in Q [ 𝑥 , 𝑦 ] with 𝑥 = ( 𝑥 , . . . , 𝑥 𝑛 ) and 𝑦 =( 𝑦 , . . . , 𝑦 𝑡 ) . We consider further 𝑦 as a sequence of parameters and the polynomial system 𝑓 = · · · = 𝑓 𝑝 = 0 , 𝑔 𝜎 , . . . , 𝑔 𝑞 𝜎 𝑞 with 𝜎 𝑖 ∈ { >, ≥} . We let 𝑆 ⊂ R 𝑛 × R 𝑡 be the semi-algebraic set defined by this system. For 𝑦 ∈ R 𝑡 , we denote by 𝐹 𝑦 and 𝐺 𝑦 the sequences of polynomials obtained after instantiating 𝑦 to 𝑦 in 𝐹 and 𝐺 respectively. Also, we denote by 𝑆 𝑦 ⊂ R 𝑛 the semi-algebraic set defined bythe above system when 𝑦 is specialized to 𝑦 . The algebraic set defined by the simultaneousvanishing of the entries of 𝐹 (resp. 𝐹 𝑦 ) is denoted by 𝑉 ( 𝐹 ) ⊂ C 𝑛 + 𝑡 (resp. 𝑉 ( 𝐹 𝑦 ) ⊂ C 𝑛 ).We describe an algorithm for solving such a parametric polynomial system without assumingthat for a generic point 𝑦 in C 𝑡 , 𝑉 ( 𝐹 𝑦 ) is finite. In that situation, solving such a parametricpolynomial system may consist in partitioning the parameters’space R 𝑡 into semi-algebraicsets 𝑇 , . . . , 𝑇 𝑟 such that, for ≤ 𝑖 ≤ 𝑟 , the number of connected components of 𝑆 𝑦 isinvariant for any choice of 𝑦 in 𝑇 𝑖 . We prove below that such an algorithmic problem makessense. Proposition 6.1.
Let 𝑆 ⊂ R 𝑛 × R 𝑡 be a semi-algebraic set and 𝜋 be the canonical projection ( 𝑥 , . . . , 𝑥 𝑛 , 𝑦 , . . . , 𝑦 𝑡 ) → ( 𝑦 , . . . , 𝑦 𝑡 ) . There exist semi-algebraic sets 𝑇 , . . . , 𝑇 𝑟 in R 𝑡 such that ∙ R 𝑡 = 𝑇 ∪ · · · ∪ 𝑇 𝑟 , ∙ there exists 𝑏 𝑖 ∈ N such that for any 𝑦 ∈ 𝑇 𝑖 , the number of connected components of 𝑆 𝑦 is 𝑏 𝑖 .Proof. Observe that the restriction of 𝜋 to 𝑆 is semi-algebraically continuous. From Hardt’ssemi-algebraic triviality theorem [10, Theorem 9.3.2], there exists a finite partition of R 𝑡 into semi-algebraic sets 𝑇 , . . . , 𝑇 𝑟 and for each ≤ 𝑖 ≤ 𝑟 , a trivialization 𝜗 𝑖 : 𝑇 𝑖 × 𝐸 𝑖 → 𝜋 − ( 𝑇 𝑖 ) ∩ 𝑆 (where 𝐸 𝑖 is a fiber 𝜋 − ( 𝑦 ) ∩ 𝑆 for some 𝑦 ∈ 𝑇 𝑖 ). Fix 𝑖 and choose an arbitrarypoint 𝑦 ′ ∈ 𝑇 𝑖 . Observe that we are done once we have proved that 𝜋 − ( 𝑦 ′ ) ∩ 𝑆 and 𝐸 𝑖 havethe same number of connected components. Recall that, by definition of a trivialization (see[10, Definition 9.3.1]), 𝜃 𝑖 : 𝑇 𝑖 × 𝐸 𝑖 → 𝜋 − ( 𝑇 𝑖 ) ∩ 𝑆 is a semi-algebraic homeomorphism and forany ( 𝑦 ′ , 𝑥 ) ∈ 𝑇 𝑖 × 𝐸 𝑖 , 𝜋 ∘ 𝜃 𝑖 ( 𝑦 ′ , 𝑥 ) = 𝑦 ′ . Hence, we deduce that 𝐸 𝑖 is homeomorphic 𝜋 − ( 𝑦 ′ ) ∩ 𝑆 .As a consequence, they both have the same number of connected components.11nstead of computing a partition of the parameters’space into semi-algebraic sets 𝑇 , . . . , 𝑇 𝑟 as above, one will consider non-empty disjoint open semi-algebraic sets 𝑈 , . . . , 𝑈 ℓ in R 𝑡 such that the complement of 𝑈 ∪ · · · ∪ 𝑈 ℓ in R 𝑡 is a semi-algebraic set of dimension less than 𝑡 and such that for ≤ 𝑖 ≤ 𝑡 , there exists 𝑏 𝑖 ∈ N such that 𝑏 𝑖 is the number of connectedcomponents of 𝑆 𝑦 for any 𝑦 ∈ 𝑈 𝑖 . For instance, one can take 𝑈 , . . . , 𝑈 ℓ as the non-emptyinteriors (for the Euclidean topology) of 𝑇 , . . . , 𝑇 𝑟 .Our strategy to solve this problem is to first compute a polynomial ∆ in Q [ 𝑦 ] − { } defininga Zariski closed set D ⊂ C 𝑡 such that D contains R 𝑡 − ( 𝑈 ∪ · · · ∪ 𝑈 ℓ ) . The next lemma isimmediate. Lemma 6.2.
Let E ⊂ R 𝑡 be a finite set of points which has a non-empty intersection withany of the connected components of the semi-algebraic set defined by ∆ ̸ = 0 . For ≤ 𝑖 ≤ ℓ , E ∩ 𝑈 𝑖 is not empty. Hence, computing sample points in each connected component of the set defined by ∆ ̸ = 0 (e.g. using the algorithm in [26] applied to the set defined by 𝑧 ∆ − where 𝑧 is a newvariable) is enough to obtain at least one point per connected component of 𝑈 , . . . , 𝑈 ℓ .Finally, for each such a point 𝑦 , it remains to count the number of connected componentsof the set 𝑆 𝑦 by using a roadmap algorithm.We call partial semi-algebraic resolution of ( 𝐹, 𝐺 ) the data ( 𝑏 , 𝜂 ) , . . . , ( 𝑏 𝑘 , 𝜂 𝑘 ) where 𝑏 𝑖 isthe number of connected components of 𝑆 𝜂 𝑖 and { 𝜂 , . . . , 𝜂 𝑘 } has a non-empty intersectionwith each connected component of 𝑈 ∪ · · · ∪ 𝑈 ℓ .Hence, our algorithm relies on three subroutines. The first one, which we call Eliminate , takesas input 𝐹 and 𝐺 , as well as 𝑥 and 𝑦 and outputs ∆ ∈ Q [ 𝑦 ] as above ; we let D = 𝑉 (∆) .The second one, which we call SamplePoints takes as input ∆ and outputs a finite set ofsample points { 𝜂 , . . . , 𝜂 𝑘 } (with 𝜂 𝑖 ∈ Q 𝑡 ) which meets each connected component of R 𝑡 − D .The last one, which we call NumberOfConnectedComponents takes 𝐹 𝜂 and 𝐺 𝜂 and for some 𝜂 ∈ Q 𝑡 and computes the number of connected components of the semi-algebraic set 𝑆 𝜂 .The algorithm is described hereafter. Algorithm 1:
ParametricSolve ( 𝐹, 𝐺, 𝑥 , 𝑦 ) Data:
Finite sequences 𝐹 and 𝐺 in Q [ 𝑥 , 𝑦 ] with 𝑥 = ( 𝑥 , . . . , 𝑥 𝑛 ) and 𝑦 = ( 𝑦 , . . . , 𝑦 𝑡 ) . Result: a partial semi-algebraic resolution of ( 𝐹, 𝐺 ) ∆ ← Eliminate ( 𝐹, 𝐺, 𝑥 , 𝑦 ) { 𝜂 , . . . , 𝜂 𝑘 } ← SamplePoints (∆ ̸ = 0) for 𝑖 from to 𝑘 do 𝑏 𝑖 = NumberOfConnectedComponents ( 𝐹 𝜂 𝑖 , 𝐺 𝜂 𝑖 ) end return { ( 𝑏 , 𝜂 ) , . . . , ( 𝑏 𝑘 , 𝜂 𝑘 ) } . 12hile the rationale of algorithm ParametricSolve is mostly straightforward, detailing eachof its subroutines is less. The easiest ones are
SamplePoints and
NumberOfConnectedCompo-nents : they rely on known algorithms using the critical point method [5, 7], polar varieties[26, 24, 4, 3] and for computing roadmaps [6, 9, 28, 27].The most difficult one is subroutine
Eliminate . We provide a detailed description of it underthe following regularity assumption. We say that ( 𝐹, 𝐺 ) satisfies assumption ( A )( A ) for any { 𝑖 , . . . , 𝑖 𝑠 } in { , . . . , 𝑞 } , the Jacobian matrix associated to ( 𝑓 , . . . , 𝑓 𝑝 , 𝑔 𝑖 , . . . , 𝑔 𝑖 𝑠 ) has maximal rank at any complex solution to 𝑓 = · · · = 𝑓 𝑝 = 𝑔 𝑖 = · · · = 𝑔 𝑖 𝑠 = 0 Note that using the Jacobian criterion [14, Chap. 16], it is easy to decide whether ( A ) holds.Note also that it holds generically.For 𝑖 = { 𝑖 , . . . , 𝑖 𝑠 } ⊂ { , . . . , 𝑞 } , under assumption ( A ) , the algebraic set 𝑉 𝑖 ⊂ C 𝑛 + 𝑡 definedby 𝑓 = · · · = 𝑓 𝑝 = 𝑔 𝑖 = · · · = 𝑔 𝑖 𝑠 = 0 . are smooth and equidimensional and these systems generate radical ideals (applying theJacobian criterion [14, Theorem 16.19]). Besides, the tangent space to 𝑧 ∈ 𝑉 𝑖 coincides withthe the (left) kernel of the Jacobian matrices associated to ( 𝑓 , . . . , 𝑓 𝑝 , 𝑔 𝑖 , . . . , 𝑔 𝑖 𝑠 ) at 𝑧 .Let 𝐼 be the ideal generated by ( 𝑓 , . . . , 𝑓 𝑝 , 𝑔 𝑖 , . . . , 𝑔 𝑖 𝑠 ) and the maximal minors of thetruncated Jacobian matrix associated to ( 𝑓 , . . . , 𝑓 𝑝 , 𝑔 𝑖 , . . . , 𝑔 𝑖 𝑠 ) obtained by removing thecolumns corresponding to the partial derivatives w.r.t. the 𝑦 -variables. Under assumption ( A ) , one can compute the set of critical values of the restriction of the projection 𝜋 to thealgebraic set 𝑉 𝑖 by eliminating the variables 𝑥 from 𝐼 .Hence, using elimination algorithms, which include Gröbner bases [15, 16] with eliminationmonomial orderings, or triangular sets (see e.g. [32, 2]) or geometric resolution algorithms[20, 18, 19], one can compute a polynomial ∆ 𝑖 ∈ Q [ 𝑦 ] whose vanishing set is the set ofcritical values of the restriction of 𝜋 to 𝑉 𝑖 . By the algebraic Sard’s theorem (see e.g. [28,App. A]), ∆ 𝑖 is not identically zero (the critical values are contained in a Zariski closedsubset of C 𝑡 ).Under assumption ( A ) , we define the set of critical points (resp. values) of the restrictionof 𝜋 to the Euclidean closure of 𝑆 as the union of the set of critical points (resp. values) ofthe restriction of 𝜋 to 𝑉 𝑖 ∩ R 𝑛 + 𝑡 when 𝑖 ranges over the subsets of { , . . . , 𝑞 } . We denotethe Euclidean closure of 𝑆 by 𝑆 , the set of critical points (resp. values) of the restriction of 𝜋 to 𝑆 by W ( 𝜋, 𝑆 ) (resp. D ( 𝜋, 𝑆 ) ).We say that 𝑆 satisfies a properness assumption ( P ) if: ( P ) the restriction of 𝜋 to 𝑆 is proper ( ∀ 𝑦 ∈ R 𝑡 , there exists a ball 𝐵 ∋ 𝑦 s.t. 𝜋 − ( 𝐵 ) ∩ 𝑆 is closed and bounded).Our interest in critical points and values is motivated by the semi-algebraic version ofThom’s isotopy lemma (see [13]) which states the following, under assumption ( P ) . Takean open semi-algebraic subset 𝑈 ⊂ R 𝑡 which does not meet the set of critical values of13he restriction of 𝜋 to 𝑆 , 𝑦 ∈ 𝑈 and 𝐸 = 𝜋 − ( 𝑦 ) ∩ 𝑆 . Then, there exists a semi-algebraictrivialization 𝜗 : 𝑈 × 𝐸 → 𝜋 − ( 𝑈 ) ∩ 𝑆 .Hence, ∪ 𝑖 ⊂{ ,...,𝑞 } D ( 𝜋, 𝑉 𝑖 ) contains the boundaries of the open disjoint semi-algebraic set 𝑈 , . . . , 𝑈 ℓ . Recall that by Sard’s theorem it has co-dimension ≥ . This leads to thefollowing algorithm. Algorithm 2:
EliminateProper ( 𝐹, 𝐺, 𝑥 , 𝑦 ) Data:
Finite sequences 𝐹 and 𝐺 in Q [ 𝑥 , 𝑦 ] with 𝑥 = ( 𝑥 , . . . , 𝑥 𝑛 ) and 𝑦 = ( 𝑦 , . . . , 𝑦 𝑡 ) , defining a semi-algebraic set 𝑆 ⊂ R 𝑛 × R 𝑡 .Assumes that assumptions ( A ) and ( P ) hold. Result: ∆ ∈ Q [ 𝑦 ] such that 𝜋 realizes a fibration over all connected components of R 𝑡 − { ∆ = 0 } for all subsets 𝑖 in { , . . . , 𝑞 } do ℳ ← maximal minors of jac([
𝐹, 𝐺 𝑖 ] , 𝑥 ) ∆ 𝑖 ← AlgebraicElimination ([ 𝐹, 𝐺 𝑖 , ℳ ] , 𝑥 ) end ∆ ← ∏︀ 𝑖 ∆ 𝑖 . return ∆ . Lemma 6.3.
On input ( 𝐹, 𝐺 ) in Q [ 𝑥 , 𝑦 ] satisfying ( A ) , algorithm EliminateProper is correct.
For some applications, deciding if ( P ) holds is easy (e.g. when the inequalities in 𝐺 definea box). However, in general, one needs to generalize EliminateProper to situations where ( P ) does not hold.To do so, we use a classical technique from effective real algebraic geometry. Let 𝜀 bean infinitesimal and R ⟨ 𝜀 ⟩ be the field of Puiseux series in 𝜀 with coefficients in R . By [7,Chap. 2], R ⟨ 𝜀 ⟩ is a real closed field and one can define semi-algebraic sets over R ⟨ 𝜀 ⟩ 𝑛 + 𝑡 .In particular the set solutions in R ⟨ 𝜀 ⟩ 𝑛 + 𝑡 to the system defining 𝑆 is a semi-algebraic setwhich we denote by ext( 𝑆, R ⟨ 𝜀 ⟩ ) . We refer to [7] for properties of real Puiseux series fieldsand semi-algebraic sets defined over such field. We make use of the notions of boundedpoints of R ⟨ 𝜀 ⟩ 𝑛 over R (those whose all coordinates have non-negative valuation) and theirlimits in R (when 𝜀 → ). We denote by lim the operator taking the limits of such points.For 𝑎 = ( 𝑎 , . . . , 𝑎 𝑛 ) , we consider the intersection of ext( 𝑆, R ⟨ 𝜀 ⟩ ) with the semi-algebraicset defined by Φ ( 𝑎 ) = 𝑎 𝑥 + · · · + 𝑎 𝑛 𝑥 𝑛 − /𝜀 ≤ where 𝑎 𝑖 > in R for ≤ 𝑖 ≤ 𝑛 . We denote by 𝑆 ′ 𝜖 this intersection. Since 𝑎 𝑖 > for all ≤ 𝑖 ≤ 𝑛 , 𝑆 ′ 𝜖 satisfies ( P ) . Lemma 6.4.
Assume that ( 𝐹, 𝐺 ) satisfies ( A ) . There exists a non-empty Zariski openset A ⊂ C 𝑛 such that for any choice of 𝑎 = ( 𝑎 , . . . , 𝑎 𝑛 ) ∈ A , ( 𝐹, 𝐺 ( 𝑎 ) ) satisfies ( A ) with 𝐺 ( 𝑎 ) = 𝐺 ∪ { Φ ( 𝑎 ) } . roof. Let 𝑖 = { 𝑖 , . . . , 𝑖 𝑠 } ⊂ { , . . . , 𝑞 } . We prove below that there exists a non-emptyZariski open set A 𝑖 ⊂ C 𝑛 such that for ( 𝑎 , . . . , 𝑎 𝑛 ) ∈ A 𝑖 , the following property ( A ) 𝑖 holds.Denoting by 𝐺 ( 𝑎 ) , 𝑖 the sequence ( 𝑔 𝑖 , . . . , 𝑔 𝑖 𝑠 , Φ ( 𝑎 ) ) , the Jacobian matrix of ( 𝐹, 𝐺 ( 𝑎 ) , 𝑖 ) hasmaximal rank at any point of 𝑉 ( 𝐹, 𝐺 ( 𝑎 ) , 𝑖 ) . Taking the intersection of the (finitely many) A 𝑖 ’s is then enough to define A .Consider new indeterminates 𝛼 , . . . , 𝛼 𝑛 and the polynomial Φ ( 𝛼 ) = 𝛼 𝑥 + · · · + 𝛼 𝑛 𝑥 𝑛 − /𝜀 .Let Ψ be the map Ψ : ( 𝑥, 𝑎 ) → 𝐹 ( 𝑥 ) , 𝑔 𝑖 ( 𝑥 ) , . . . , 𝑔 𝑖 𝑠 ( 𝑥 ) , Φ ( 𝑎 ) ( 𝑥 ) Observe that is a regular value for Ψ since ( 𝐹, 𝐺 ) satisfies ( A ) . Hence, Thom’s weaktransversality theorem (see e.g. [28, App. B]) implies that there exists A 𝑖 such that ( A ) 𝑖 for any 𝑎 ∈ A 𝑖 .Assume for the moment that ( 𝐹, 𝐺 ′ ) satisfies assumption (A) . Observe that the coefficientsof 𝐹 and 𝐺 ′ lie in Q ( 𝜀 ) . Hence, applying the subroutine EliminateProper to ( 𝐹, 𝐺 ′ ) and theabove inequality will output a polynomial ∆ 𝜀 ∈ Q ( 𝜀 )[ 𝑦 ] such that the restriction of 𝜋 to 𝑆 ′ 𝜀 realizes a trivialization over each connected component of R ⟨ 𝜀 ⟩ 𝑡 − { ∆ 𝜀 = 0 } . Without lossof generality, one can assume that ∆ 𝜀 ∈ Q [ 𝜀 ][ 𝑦 ] and has content . In other words, one canwrite ∆ 𝜀 = ∆ + 𝜀 ˜∆ with ∆ ∈ Q [ 𝑦 ] and ˜∆ ∈ Q [ 𝜀 ][ 𝑦 ] . Lemma 6.5.
Let 𝑈 be a connected component of R 𝑡 − { ∆ = 0 } . Then, there exists asemi-algebraically connected component 𝑈 𝜀 of R ⟨ 𝜀 ⟩ 𝑡 − { ∆ 𝜀 = 0 } such that ext( 𝑈, R ⟨ 𝜀 ⟩ ) ⊂ 𝑈 𝜀 .Proof. Let 𝑦 and 𝑦 ′ be two distinct points in 𝑈 . Since 𝑈 is a semi-algebraically connectedcomponent of R 𝑡 − { ∆ = 0 } , there exists a semi-algebraic continuous function 𝛾 : [0 , → 𝑈 with 𝛾 (0) = 𝑦 and 𝛾 (1) = 𝑦 ′ such that ∆ is sign invariant over 𝛾 ([0 , (assume, withoutloss of generality that it is positive). Note also for all 𝑡 ∈ [0 , , ∆ ( 𝛾 ( 𝑡 )) ∈ R . We deducethat ∆ 𝜀 ( 𝛾 ( 𝑡 )) > for all 𝑡 ∈ [0 , . Now, take 𝜗 ∈ ext([0 , , R ⟨ 𝜀 ⟩ ) . Observe that 𝜗 isbounded over R and then lim 𝜗 exists and lies in [0 , . We deduce that ∆ 𝜀 (lim 𝜗 ) > andits limit when 𝜀 → is ∆ (lim 𝜗 ) > in R . We deduce that ∆ 𝜀 ( 𝜗 ) > . Hence, ∆ 𝜀 is signinvariant over ext( 𝛾 ([0 , , R ⟨ 𝜀 ⟩ ) and then 𝑦 and 𝑦 ′ both lie in the same semi-algebraicallyconnected component of R ⟨ 𝜀 ⟩ 𝑡 − { ∆ 𝜀 = 0 } .We deduce that there exists 𝑏 ′ ∈ N such that for all 𝑦 ∈ 𝑈 , the number of semi-algebraicallyconnected components of 𝑆 ′ 𝜀 ∩ 𝜋 − ( 𝑦 ) is 𝑏 . Using the transfer principle as in [9], wededuce that there exists 𝑒 ′ ∈ R positive and small enough such that, the following holds.There exists 𝑏 ∈ N such that for all 𝑒 ∈ ]0 , 𝑒 ′ [ the number of connected components of 𝑆 ∩ { 𝑎 𝑥 + · · · + 𝑎 𝑛 𝑥 𝑛 ≤ 𝑒 } ∩ 𝜋 − ( 𝑦 ) . is 𝑏 when 𝑦 ranges over 𝑈 . This proves the followinglemma. Lemma 6.6.
Let 𝑈 be as above. Then the number of connected components of 𝑆 𝑦 isinvariant when 𝑦 ranges over 𝑈 . Finally, we can describe the subroutine
Eliminate whose correctness follows from the previouslemma. 15 lgorithm 3:
Eliminate ( 𝐹, 𝐺, 𝑥 , 𝑦 ) Data:
Finite sequences 𝐹 and 𝐺 in Q [ 𝑥 , 𝑦 ] with 𝑥 = ( 𝑥 , . . . , 𝑥 𝑛 ) and 𝑦 = ( 𝑦 , . . . , 𝑦 𝑡 ) , defining a semi-algebraic set 𝑆 ⊂ R 𝑛 × R 𝑡 .Assumes that ( 𝐹, 𝐺 ) satisfies assumption ( A ) . Result: ∆ ∈ Q [ 𝑦 ] such that the number of connected components of 𝑆 𝑦 is invariantwhen 𝑦 ranges over a connected component of R 𝑡 − { ∆ = 0 } Choose 𝑎 > , . . . , 𝑎 𝑛 > in Q randomly and let 𝑔 ← 𝑎 𝑥 + · · · + 𝑎 𝑛 𝑥 𝑛 ≤ 𝜀 ∆ ← EliminateProper ( 𝐹, 𝐺 ∪ 𝑔, 𝑥 , 𝑦 ) ∆ ← Normalize (∆) return ∆ . We have implemented several variants of the roadmap algorithms sketched in Section 5 aswell as variants of the algorithm
ParametricSolve . To perform algebraic elimination, we useGröbner bases implemented in the
FGb library by J.-C. Faugère [17]. The roadmap algo-rithm and the routines for computing sample points in semi-algebraic sets are implementedin the
RAGlib library [25].We have not directly applied the most general version of
ParametricSolve to the polynomial 𝐵 . Indeed, since its variables 𝑣 , 𝑣 , 𝑣 lie in the Cartesian product P ( R ) × P ( R ) × P ( R ) (which is compact), the projection on the parameter’s space is proper and it suffices tocompute critical loci of that projection. There is one technical (but easy) difficulty toovercome: polynomial 𝐵 actually admits a positive dimensional singular locus. But aneasy computation shows that this singular locus has one purely complex component (whichsatisfies 𝑣 + 1 ) which can then be forgotten. The other component has a projection onthe paramaters’space which Zariski closed (it is contained in the set satisfied by 𝑎 𝑎 = 0 ).This way, we directly obtain the following polynomial for ∆ by computing the critical locusand consider additionally the set defined by 𝑎 𝑎 = 0 . 𝑎 𝑎 𝑑 ( 𝑎 + 𝑎 + 𝑑 ) ( 𝑎 + 𝑎 − 𝑑 ) Computing ∆ as above does not take more than sec. on a standard laptop using FGb .Getting sample points in the set defined by ∆ ̸ = 0 is trivial. We obtain the following sample points using RAGlib { 𝑎 = − , 𝑎 = − , 𝑑 = 3 } , { 𝑎 = − , 𝑎 = − , 𝑑 = 3 } , { 𝑎 = − , 𝑎 = 2 , 𝑑 = 3 } , { 𝑎 = − , 𝑎 = 5 , 𝑑 = 3 } , { 𝑎 = − , 𝑎 = 12 , 𝑑 = 3 } , { 𝑎 = 1 , 𝑎 = − , 𝑑 = 118 } , { 𝑎 = 1 , 𝑎 = − , 𝑑 = 118 } , { 𝑎 = 1 , 𝑎 = 1 , 𝑑 = 118 } , { 𝑎 = 1 , 𝑎 = 118 , 𝑑 = 118 } , { 𝑎 = 1 , 𝑎 = − / , 𝑑 = 118 } Our implementation allows us to compute a roadmap for one sample point within minutes on a standard laptop. Analyzing the connectivity of these roadmaps islonger as it takes min. All in all, approximately hours are required to handlethis positive dimensional parametric system. The data we computed are available at http://ecarp.lip6.fr/papers/materials/issac20/ . These computations allow to re-trieve the conclusions of our theoretical analysis of the UR family. They illustrate thatprototype implementations of our algorithms are becoming efficient enough to tackleautomated kinematic singularity analysis in robotics.16 cknowledgments. The three authors are supported by the joint ANR-FWF ANR-19-CE48-0015, FWF I 4452-N
ECARP project. Mohab Safey El Din is supported by the ANRgrants ANR-18-CE33-0011
Sesame and ANR-19-CE40-0018
De Rerum Natura , thePGMO grant
CAMiSAdo and the European Union’s Horizon 2020 research and innovationprogramme under the Marie Sklodowska-Curie grant agreement N. 813211 (POEMA).
References [1]
Angeles, J.
Fundamentals of Robotic Mechanical Systems, Theory, Methods, andAlgorithms . Springer, 2007.[2]
Aubry, P., Lazard, D., and Maza, M. M.
On the theories of triangular sets.
Journal of Symbolic Computation 28 , 1-2 (1999), 105–124.[3]
Bank, B., Giusti, M., Heintz, J., and Mbakop, G.
Polar varieties and efficientreal equation eolving: the hypersurface case.
J. of Complexity 13 , 1 (1997), 5–27.[4]
Bank, B., Giusti, M., Heintz, J., Safey El Din, M., and Schost, E.
On thegeometry of polar varieties.
Applicable Algebra in Engineering, Communication andComputing 21 , 1 (2010), 33–83.[5]
Basu, S., Pollack, R., and Roy, M.-F.
On computing a set of points meetingevery cell defined by a family of polynomials on a variety.
Journal of Complexity 13 , 1(1997), 28 – 37.[6]
Basu, S., Pollack, R., and Roy, M.-F.
Computing roadmaps of semi-algebraicsets on a variety.
Journal of the American Mathematical Society 13 , 1 (2000), 55–82.[7]
Basu, S., Pollack, R., and Roy, M.-F.
Algorithms in real algebraic geometry .Springer-Verlag, 2003.[8]
Basu, S., and Roy, M.-F.
Divide and conquer roadmap for algebraic sets.
Discrete& Computational Geometry 52 , 2 (2014), 278–343.[9]
Basu, S., Roy, M.-F., Safey El Din, M., and Schost, É.
A baby step–giantstep roadmap algorithm for general algebraic sets.
Foundations of ComputationalMathematics 14 , 6 (2014), 1117–1172.[10]
Bochnak, J., Coste, M., and Roy, M.-F.
Real Algebraic Geometry . Springer-Verlag, 1998.[11]
Canny, J.
The complexity of robot motion planning . MIT press, 1988.[12]
Canny, J.
Computing roadmaps of general semi-algebraic sets.
The Computer Journal36 , 5 (1993), 504–514. 1713]
Coste, M., and Shiota, M.
Thom’s first isotopy lemma: a semialgebraic ver-sion, with uniform bound. In
Real Analytic and Algebraic Geometry: Proc. of theInternational Conference, Trento (1995), Walter de Gruyter, p. 83.[14]
Eisenbud, D.
Commutative Algebra: with a view toward algebraic geometry , vol. 150.Springer Science & Business Media, 2013.[15]
Faugère, J.-C.
A new efficient algorithm for computing gröbner bases (f4).
Journalof pure and applied algebra 139 , 1-3 (1999), 61–88.[16]
Faugère, J. C.
A new efficient algorithm for computing gröbner bases withoutreduction to zero (f 5). In
Proc. of the 2002 international symposium on Symbolic andalgebraic computation (2002), ACM, pp. 75–83.[17]
Faugère, J.-C.
Fgb: A library for computing gröbner bases. In
Mathematical Software- ICMS 2010 (Berlin, Heidelberg, September 2010), K. Fukuda, J. Hoeven, M. Joswig,and N. Takayama, Eds., vol. 6327 of
Lecture Notes in Computer Science , Springer,pp. 84–87.[18]
Giusti, M., Heintz, J., Morais, J.-E., Morgenstern, J., and Pardo, L.-M.
Straight-line programs in geometric elimination theory.
Journal of Pure and AppliedAlgebra 124 (1998), 101–146.[19]
Giusti, M., Heintz, J., Morais, J.-E., and Pardo, L.-M.
When polynomialequation systems can be solved fast? In
AAECC-11 (1995), vol. 948 of
LNCS , Springer,pp. 205–231.[20]
Giusti, M., Lecerf, G., and Salvy, B.
A gröbner free alternative for polynomialsystem solving.
Journal of Complexity 17 , 1 (2001), 154 – 211.[21]
Gournay, L., and Risler, J.-J.
Construction of roadmaps in semi-algebraicsets.
Applicable Algebra in Engineering, Communication and Computing 4 , 4 (1993),239–252.[22]
Mezzarobba, M., and Safey El Din, M.
Computing roadmaps in smoothreal algebraic sets. In
Proc. of Transgressive Computing (2006), J.-G. Dumas, Ed.,pp. 327–338.[23]
Murray, R., Li, Z., and Sastry, S.
A Mathematical Introduction to RoboticManipulation . CRC Press Taylor & Francis Group, 1994.[24]
Safey El Din, M.
Finding sampling points on real hypersurfaces is easier in singularsituations.
MEGA (Effective Methods in Algebraic Geometry) Electronic proceedings (2005).[25]
Safey El Din, M.
Real algebraic geometry library. available at ∼ safey , 2007.1826] Safey El Din, M., and Schost, E.
Polar varieties and computation of one pointin each connected component of a smooth real algebraic set. In
Proc. of the 2003 Int.Symp. on Symb. and Alg. Comp. (NY, USA, 2003), ISSAC’03, ACM, pp. 224–231.[27]
Safey El Din, M., and Schost, E.
A baby steps/giant steps probabilistic algorithmfor computing roadmaps in smooth bounded real hypersurface.
Disc. Comput. Geom.45 , 1 (2011), 181–220.[28]
Safey El Din, M., and Schost, É.
A nearly optimal algorithm for decidingconnectivity queries in smooth and bounded real algebraic sets.
Journal of the ACM(JACM) 63 , 6 (2017), 48.[29]
Schwartz, J. T., and Sharir, M.
Algorithmic motion planning in robotics. In
Algorithms and Complexity . Elsevier, 1990, pp. 391–430.[30]
Selig, J.
Geometric Fundamentals of Robotics . Monographs in Computer Science.Springer, 2005.[31]
Spong, M., Hutchinson, S., and Vidyasagar, M.
Robot Dynamics and Control ,2nd ed. Monographs in Computer Science. John Wiley & Sons, 2005.[32]
Wang, D.
Elimination methods . Springer Science & Business Media, 2001.[33]
Wenger, P.
Cuspidal robots. In
Singular Configurations of Mechanisms and Manip-ulators , Z. D. Müller A., Ed. Springer International Publishing, 2019, pp. 67–100.[34]
Weyrer, M., Brandstötter, M., and Husty, M.
Singularity avoidance controlof a non-holonomic mobile manipulator for intuitive hand guidance.