Get 20M+ Full-Text Papers For Less Than $1.50/day. Start a 14-Day Trial for You or Your Team.

Learn More →

Topological representation of cloth state for robot manipulation

Topological representation of cloth state for robot manipulation Forty years ago the notion of configuration space (C-space) revolutionised robot motion planning for rigid and articulated objects. Despite great progress, handling deformable materials has remained elusive because of their infinite-dimensional shape-state space. Finding low-complexity representations has become a pressing research goal. This work tries to make a tiny step in this direction by proposing a state representation for textiles relying on the C-space of some distinctive points. A stratification of the configuration space for n points in the cloth is derived from that of the flag manifold, and topological techniques to determine adjacencies in manipulation-centred state graphs are developed. Their algorithmic implementation permits obtaining cloth state–space representations of different granularities and tailored to particular purposes. An example of their usage to distinguish between cloth states having different manipulation affordances is provided. Suggestions on how the proposed state graphs can serve as a common ground to link the perception, planning and manipulation of textiles are also made. Keywords Configuration space · Deformable objects · Cloth state · Topological representation · Stratification 1 Introduction by a person. An important limitation is that the target objects have been —almost exclusively— rigid ones. Robot manipulation in human environments is an important Indeed, non-rigid objects —textile items in particular— research field that in recent years has experienced tremen- pose many additional challenges with respect to rigid object dous progress. Impressive results have been obtained among manipulation, such as difficult perception, complexity in the many open problems pinpointed a decade ago (Kemp modelling the object and predicting its behaviour, and the et al. 2007), such as humanoid whole-body reaching, mobile many uncertainties hindering motion planning to reach a manipulation and human–robot collaboration. Research has desired outcome. Despite these difficulties, the manipulation focused on core capabilities as grasping everyday objects, of clothing items is nowadays gaining attention in the robotics carrying and placing them, as well as robot hand-over to or community due to the rise of assistive and service robotics (Torras 2016). As clothing items pervade human environ- This work is supported by the European Research Council (ERC) ments, automating their versatile manipulation would have a within the European Union Horizon 2020 Programme under grant large impact on society, in sectors ranging from healthcare to agreement ERC-2016-ADG-741930 (CLOTHILDE: CLOTH clothing industry. The key problem underlying all these dif- manIpulation Learning from DEmonstrations) and by the Spanish State Research Agency through the María de Maeztu Seal of ficulties is that, whereas handling a rigid object only changes Excellence to IRI (MDM-2016-0656). We thank Dr Jordi Sanchez its pose, namely 6 parameters (the configuration space is Riera for providing us with cloth simulations. the well-known R × SO(3)), the manipulation of a textile object takes place in a shape-state space which is poten- B Fabio Strazzeri fstrazzeri@iri.upc.edu tially infinite-dimensional. This huge dimensionality jump prevents the extension of the techniques developed for rigid Carme Torras torras@iri.upc.edu objects (for perception, planning, learning and manipulation) to textile ones, and calls for a radically different approach. Institut de Robòtica i Informàtica Industrial, CSIC-UPC, Llorens i Artigas 4-6, 08028 Barcelona, Spain 123 738 Autonomous Robots (2021) 45:737–754 2 Related work The paper is structured as follows. In Sect. 3 we use the notion of stratification to study the topological space of con- The extension of available techniques consists of modelling figurations of points, focussing first on the case of 4 points. cloth as a finite element mesh and applying both physics We investigate how such stratification can be obtained using simulation and motion planning algorithms for closed-loop the algebraic condition given by the alignment of three points. multi-articulated objects. This is appropriate for render- This allows us to assign to each configuration of n points a ing where realistic appearance is sought, and impressive concise “label” and ensure that those with different label are advances have taken place recently in the computer vision effectively separated by the stratification in different strata. and computer graphics communities (Pumarola et al. 2018; We also provide an explicit algorithm to construct such strat- Bai et al. 2016), but robot manipulation has not benefited ification for the case n < 7. We proceed then, in Sect. 4, so far from them, because of its substantially different final to investigate the complexity of the stratification and how to aims. In the graphics context, the goal can be among others simplify it. This can be efficiently done using its topological to render the dressing of a human body, representing with properties and the action of the symmetric group S , defining accuracy the clothing as offsets from the body (Ma et al. the state of a configuration of points as a collection of one or 2019; Guan et al. 2012; Pons-Moll et al. 2017), as well as to more strata. Thanks to such states, we can investigate how the points of a mesh are distributed with respect to some fixed estimate with precision the clothing pose based on generative models for 3D shapes using topology (Hilaga et al. 2001). ones (for example the corner ones in a rectangular textile) and For these approaches, rendering precision is important, compare different mesh poses based on the state-distribution while for robot manipulation, local details such as wrinkles of their points. and accurate position can be overlooked in favour of properly determining the macro-state the cloth is in. By macro-state we mean a set of cloth configurations that can be manipulated 3 Configuration space of a textile rectangle in the same way, i.e., that have similar grasping affordances. using n points In the robot manipulation community there is a long- standing general agreement that “low complexity represen- Given a rectangular cloth on a planar surface, we could con- tations for the deformable objects should be the objective” sider it as a surface embedded in R with no self-intersection. (Smith et al. 2012) and some attempts to use topological con- Unfortunately, considering the different configurations of structs to this end have been made, using writhe matrices, such surface and studying their space bears difficulties. On winding numbers and Laplacian coordinates for topology- the already complex space of all possible surfaces with same based representations (Ivan et al. 2013; Yuan et al. 2019), area and no self-intersections, we need to impose also con- as well as loops detection (Pokorny et al. 2013) and topol- straints such as gravity force and cloth stiffness. In order to ogy coordinates for representing human pose as captured simplify, we consider instead the cloth as a set of n points on by a motion capture system (Koganti et al. 2017), but also in the real plane R and the space of all possible configurations combination with deep learning approaches (Yan et al. 2020). of them, Con f (R ). This space belongs to the far more gen- Further along this line, we propose to characterise cloth eral family of configuration spaces of points on manifolds, macro-states, called just ’states’ in what follows, using com- binatorial topology techniques. Inspired by previous works Con f (X ) = (p ,..., p ) ∈ X | p = p for i = j . n 1 n i j on the topological representation of robot configuration spaces (Canny 1988; Torras et al. 2006), we consider a set Such spaces are interesting topological objects and both their of significant points in the cloth and rely on the process of homotopy type and homological properties have been studied stratification to decompose the configuration space (C-space) by several authors. In Arnold (1969) some results regarding of such points into manipulation-wise meaningful states, as the homotopy type of Con f (X ) are obtained, assuming X is well as to derive their adjacencies. of dimension 2, while the real homotopy type of Con f (X ), The outcome is a succinct manipulation-oriented cloth when X is a smooth projective variety, was independently state representation in the form of a graph that permits encod- computed by Kriz (1994) and Totaro (1996). In Cohen et al. ing actions as probabilistic state transitions and then applying (1976) under the assumption X = R , the homology of the powerful probabilistic task planning machinery devel- Con f (X ) is computed and, in particular, it is proved that oped within the AI community (Geißer et al. 2019; Canal Con f (R ) is the classifying space of the n-strand pure braid et al. 2019). Another potential advantage is the simplifica- group. tion of perception, since states can be recognised without Since our aim is to distinguish states based on the types accurately recovering the cloth configuration, and only local of robot manipulations they permit, we will investigate how features relevant for grasping need to be located. such space can be subdivided into meaningful regions, each one formed by several configurations of n points. The proce- 123 Autonomous Robots (2021) 45:737–754 739 Fig. 1 The points p and p are fixed, while p has to be inside the 1 2 4 grey circle, of radius d (Color figure online) dure introduced here allows us to assign to any configuration of points a binary vector, whose length depends on the num- ber of points considered. In this way we can group together configurations with the same vector representation and in addition we will be able to plan which regions of C-space we need to “visit” if we want to move from one state to another. To obtain such structure for Con f (R ) we will employ the notion of stratification of a topological space. The idea behind such notion is to decompose topological spaces of dimension m into smooth parts of dimension m, such that the boundary between any two of them is a subspace of dimen- sion m − 1. As we can iterate such process at each dimension Fig. 2 On the top we can see four disconnected 3D strata of the C- space, obtained by cutting the torus with the 2D singularities. These 0 ≤ k ≤ m, the stratification assumes the form of a filtra- 2 are two disks (in purple on the bottom), which correspond to p ∈ tion, ∅⊆ X ⊆ X ⊆ ··· ⊆ X = Con f (R ), where 1 2 m n p p , and one annullus (in light green on the bottom), corresponding 1 2 each X is the union of disconnected smooth parts, called to p ∈ p p . On the bottom picture we show also the 1D singularities 4 1 2 strata of dimension i and the boundary, called singularity of (in black) and two 0D singularities (in yellow). The former correspond to p = p (a circle) and p p = p p (two segments). The latter dimension i − 1, between two strata belongs to X .The 1 4 3 4 1 2 i −1 correponds to the case when both p = p and p p = p p (Color 4 1 3 4 1 2 structure of a stratification can be quite complex, however for figure online) simple cases one can visualise it clearly. Consider 4 points in the plane, as in Fig. 1, such that p and p are fixed and 1 2 ||p − p || ≤ d. 4 1 Their C-space is a solid torus, product of a disk, encod- ing the position of p , and a circle, encoding the angle of p p and p p , and it is clearly contained in Con f (R ). 1 2 3 4 4 Its stratification can be seen in Fig. 2 , where we use align- Fig. 3 Stratification ofFlag(3) into Bruhat cells, where a link indicates ment between points to define singularities. that one is in the boundary of the other. The label of each stratum Our first step towards the construction of a stratification describes if and how any of its flags V intersects with V ,e.g.for any ∗ ∗ flag in v − l it is true that v ∩ l =∅ for Con f (R ) is to investigate the simplest non-trivial case of n = 4, which will prove to be essential in the treatment of the general case. For both this case and the general one the sets {v, l} with v a point and l a line in RP such that the main idea consist in identify as singularity a subspace of ∗ ∗ v ∈ l. If we fix a flag {v , l }, call it reference flag,weare Con f (R ), where three points are aligned, so that, in the able to construct a stratification of Flag(3) that encodes the highest dimensional strata no triple of point can be aligned. possible pose of any flag with respect to the reference one. We will show that such alignment is defined by an algebraic The strata corresponding to such stratification are Bruhat condition (a null determinant) and it provides us with a con- cells, as shown in Hiller (1982); Monk (1959). The resulting cise way to encode the different strata (as vectors of signs stratification can be seen in Fig. 3, we refer the reader to of determinants). This property allows us to determine eas- Milnor and Stasheff (1975) for a more detailed description. ily the corresponding stratum (or singularity) of any point Consider the points p , p , p and p in R as points in 1 2 3 4 configuration. We also introduce a constructive way, Algo- the projective plane, by adding 1 as last projective coordinate. rithm 1, to build such stratification when n < 7 in a finite We define V ={ p , p p } as reference flag and consider 1 1 2 number of steps. the flag V ={ p , p p }. Note that, in an abuse of language, 3 3 4 2 2 3.1 C-space of a textile rectangle using 4 points we are denoting p both the point in RP and the one in R . Each stratum in Fig. 3 of dimension at most 2 corresponds For the case n = 4 we will rely on the stratification of the to some point alignment. For example if V is in the stratum 2 ∗ 2 2 flag manifold of RP , Flag(3). The elements of Flag(3) are v − l then { p , p , p } are aligned, both in R and RP . 1 2 3 123 740 Autonomous Robots (2021) 45:737–754 This means that we can induce a stratification of Con f (R ) using the one of Flag(3). In particular, any alignment of p , p , p can be seen as a pure algebraic condition on the i j k points coordinates, given by the singularity of the determi- nant d =| p p p |. The sign of such determinant will i , j ,k i j k depend on the clockwise or counter-clockwise position of the ordered triple (p , p , p ). Because the determinant is a i j k continuous map onto R, if two configurations p and q differ by one and only one determinant sign, say d , then we i , j ,k Fig. 4 Three different configurations of the 4 corner points of a rectan- gular textile, where we coloured in grey the back side. All configurations know that any continuous path from one configuration to the belong to different strata, (++ ++), (++ −+) and (−− −−), other has to cross the singularity loci of d . i , j ,k respectively, from left to right (Color figure online) The stratification in Fig. 2 can be interpreted using the Flag(3) stratification. Considering the reference flag V = { p , p p } and V ={ p , p p }, we have that the annu- 1 1 2 4 4 3 lus, singularity of dimension 2, corresponds to v − l .Inside it we have v − v , which is the singularity of dimension 1, displayed as a black circle. Finally, the singularities of dimen- ∗ ∗ sion 0, displayed as yellow points, are v −v , l −l . Actually, there are 2 determinants that we are not considering, namely d and d . The singularity surfaces are more difficult 1,3,4 2,3,4 to visualize and would lead to a much finer stratification. Given any configuration of 4 points in R we can map it Fig. 5 Let d be positive, as in the figure. The region on the lower continuously to R , assigning to each coordinate the deter- 1,2,3 left corner (coloured in green) is the only one in common between the minant value of d , d , d and d , respectively. 1,2,3 1,2,4 1,3,4 2,3,4 regions in which d is negative (left of p p , coloured in yellow) 1,2,4 1 2 The singularity locus of a determinant can be seen either as and the ones in which d is negative (below p p , coloured in blue). 2,3,4 2 3 an alignment of three points, as a flag intersection, or also as a In this region also d is negative (Color figure online) 1,3,4 hyperplane in R corresponding to one coordinate equal to 0. If we consider R minus the coordinate hyperplanes, x = 0 for i = 1,... 4, we obtain 16 disconnected smooth regions, will change, resp. cross. The reader can now see that for n < 4 each one containing points with same coordinates signs, that such approach would be trivial. In the case of n = 3weget is, corresponding to configurations of points with same deter- only two strata, corresponding to p being on the right/left minant signs. The reader should be aware however that such of the line p p .If n = 1, 2 then it is clear we cannot even 1 2 mapping is not one-to-one More than one configuration can define any determinant. be mapped to the same point in R , as the determinants are In the case n = 4, the maximum number of strata we invariant under R -isometries. could obtain is 2 = 16, however using the determinants The counter-image of these regions of R are the highest expressions, we derive the following algebraic equation dimensional strata of the stratification of Con f (R ) and they correspond to the subsets of all configuration with identical d + d = d + d . 1,2,3 1,3,4 1,2,4 2,3,4 determinant signs. We can then uniquely associate to each stratum the label of the determinant signs sequence of any configuration of points in it, that is, a binary vector with 4 It is straightforward to see that it is impossible that either entries. d and d are positive and d and d are neg- 1,2,3 1,3,4 1,2,4 2,3,4 Note that each configuration in Fig. 4 would require in ative or vice versa. We can verify it explicitly considering principle different robot manipulations for a folding task, the regions obtained assuming 3 points fixed, say p , p and 1 2 e.g., using the taxonomy in Borràs et al. (2020), we would p , and d either positive or negative. The former case is 3 1,2,3 use point-tableplane sliding for the spread out configuration; showed in Fig. 5. point-point pick-up for the corner in the middle of the cloth; Another consequence of such equation is that, if a config- point-gripperplane sliding for the overfolded cloth, so as to uration of points belongs to a stratum with odd number of turn it out. minuses in its label, then there exists one point lying inside These labels will not only tell us how to group “similar” the triangle spanned by the others. We will call from now configurations but also how “different” two configurations on such strata internal, otherwise we call them external.A are. For example, we can count how many signs, resp. singu- graph of the adjacencies between the strata is shown in Fig. 6. larities, a continuous path from one configuration to another We refer the reader to “Appendix A” for a thorough study of 123 Autonomous Robots (2021) 45:737–754 741 null determinants, or equivalently by the alignments of three points. Such strata will correspond to regions of R after removing all coordinate hyperplanes. From now on, we con- sider the determinants ordered with lexicographic order on their indices with the constraint that for k = 3,..., n,the first ones are those of { p ,..., p }. 1 k Even if we are able to encode each configuration of points as a sign sequence, we do not have a priori a way to determine if a sign sequence is admissible. This is an essential step of our study, because we want to be able, not only to group “similar” configurations, but as well navigate such stratification. For example if we want to find the optimal way to move n points from one configuration to another belonging to a different stratum, we might need to know which are the allowable paths, that is, which strata we can visit. Suppose that n−1 points are fixed and we want to study the regions in which the arrangement of lines spanned by pairs of these points divide R . Note that, these would represent strata of Con f (R ), with identical determinant signs for the fixed n − 1 points. This approach together with the knowledge of the stratification of Con f (R ) would allow to construct n−1 the stratification of Con f (R ). Line arrangements, both in Fig. 6 Representation of Con f (R ), with strata adjacencies indicated the real and projective planes, have been studied extensively by links between different sign sequences. We used cyan ellipses to in various contexts, see Grünbaum (1972) and references denote external strata and red rectangles for internal ones (Color figure online) therein. Several authors have worked on how to bound the number of regions, triangles or polygons (Roudneff 1986; Strommer 1977; Simmons 1973). In Aichholzer et al. (2018), such relationships with respect to the Flag(3) stratification the authors consider the problem of characterising geomet- for the case n = 4. ric graphs using the order type of their vertex set. Using the notion of minimal representation of a graph, they identify which edges prevent the order type from changing via con- 3.2 C-space of a textile rectangle using n points tinuous deformations of the graph. Even if this approach is the closest to ours, to our knowledge in the literature there is We can apply a similar procedure and obtain a similar defini- not a detailed study of the adjacency relations of Con f (R ). tion of stratum for the general case of n points, however some In particular there is not a study that tells us exactly which issues regarding the admissibility of sign sequences need to determinant signs sequence is admissible and which is not. be addressed. We present here an iterative technique to construct the strat- As n increases, the number of flags and their position with ification of Con f (R ). respect to each other becomes more difficult to encode and The adjacency of two strata σ, τ can be seen as the a description based on it would make less clear the structure possibility of nullifying one and only one determinant via of the space. To avoid it we will employ only the determi- continuous movement of a configuration p in σ to another q nants to detect changes between configurations. We know in τ . So if, given any stratum σ , we are able to detect with a that given n points we have k = different triples of deterministic test which determinants can or cannot be nulli- fied, we are effectively identifying which strata are adjacent points, that is, k possible determinants. We can map any con- to σ . We can iteratively apply such test to these strata and, figuration of n points to a point (x ,..., x ), where each 1 k as Con f (R ) is connected (Cohen et al. 1976), we would x corresponds to the determinant of a particular triple of recover all the existing strata. For any n ≥ 3 there exists points. We know that each coordinate hyperplane, x = 0for always a configuration p such that each determinant sign i = 1,..., k, corresponds to a singularity, that is, a determi- of any triple of points is positive, namely when the points nant equal to zero, and the determinants are again continuous are placed to form a convex n-gon and they are in counter- functions. We can then define a stratum of Con f (R ) as the clockwise order. In other words, there is always a stratum set of all configurations of n points with the same determinant σ whose sign sequence is formed only by positive signs sign sequence, and represent singularities between strata by 123 742 Autonomous Robots (2021) 45:737–754 and that can be always used as starting point in such iterative process to find the strata of Con f (R ). We will now proceed to explain how we can rigorously describe such test. We know that the symmetric group S acts on Con f (R ) n n via point permutations. That is, if we have p ={ p } ,a i =1 configuration of n points, then the induced action of g, call it f , is defined as f (p) ={ p } . Note that f is an g g g(i ) g i =1 2 −1 automorphism of Con f (R ),as f = f , furthermore −1 g g Fig. 7 The lines spanned by a triple of non-aligned points p , p , p 1 2 3 it is also an automorphism of the singularity loci, as the sin- divide R in 7 regions. These can be split in three couples of dual regions and a self-dual region, here visually divided by colour and pattern. Each gularity of a matrix does not change when we permute its dual couple is formed by an external region and an internal one, as any rows. The action of g on the sign sequences can be easily point belonging to the former, resp. the latter, together with p , p , p , 1 2 3 deduced. Let σ be the stratum of p and g ∈ S , then the forms an external, resp. internal, sign sequence. The self-dual region sign of d of the stratum τ = g · σ to which g · p consists of one internal region (Color figure online) g(i ),g( j ),g(k) belongs is the same, resp. opposite, of d if the signature i , j ,k of (g(i ), g( j ), g(k)) is positive, resp. negative. From now on, Proof See “Appendix B”. we will study the adjacency between σ and τ that differs by the sign of d , otherwise we can reduce to such case via a 1,2,3 The idea behind this theorem is that if we want to nullify d 1,2,3 permutation of S . In what follows, we assume w.l.o.g. that we need to align p , p , p , without aligning any other triple 1 2 3 σ has d with positive sign. In other words, the adjacency 1,2,3 in the process. For example if a point p is inside the triangle test for σ is reduced, via a suitable permutation, to establish spanned by these three points it is clear that aligning them if the determinant d can be nullified. Such property is 1,2,3 would result in aligning all 4 of them. equivalent to the existence of the following map. As the sign sequence is invariant among all configurations of points in the same stratum σ , we have the following. Definition 1 (Crossing map) Let p be a configuration in Con f (R ) and consider for 1 ≤ i ≤ n the continu- Corollary 1 Let σ and τ be two sign sequences that differ ous map H :[0, 1]→ R , such that H (0) = p . We call by only one sign, namely that of d , positive for σ and i i i 1,2,3 H = H a crossing map for p,if i negative for τ . If there exists a k = 1, 2, 3 such that the σ - subsequence relative to indices (1, 2, 3, k) is (++−+) then σ and τ are not adjacent. Similarly, if there exists j , k = • H (t ) ∈ Con f (R ) for t ∈[0, 1] ; 1, 2, 3 such that the σ -subsequences relative to (1, 2, 3, j ) • d (H (t )) = 0for (u,v,w) = (1, 2, 3) and t ∈ u,v,w and (1, 2, 3, k) are different and not dual, then σ and τ are [0, 1]; not adjacent either. • d (H (0)) · d (H (1)) < 0; 1,2,3 1,2,3 •∃! t ∈ (0, 1) such that d (H (t )) = 0. 1,2,3 The following result tells us when instead it is possible to change sign, that is when the adjacency exists. The existence of a crossing map for p ∈ σ , a continuous Theorem 2 Consider p ∈ Con f (R ) such that Theorem 1 path in Con f (R ), is equivalent to the existence of τ,a is not satisfied. Suppose that for any pair 4 < i , j ≤ nit stratum with sign sequence identical to that of σ but for the is true that either p and p belong to the same region and i j d sign. It is clear now that such existence for a p ∈ σ is 1,2,3 the tuple (p , p , p , p ) has an even number of minuses or 1 3 i j equivalent to the adjacency test for σ we were looking for. We they are in a dual couple and the tuple (p , p , p , p ) has 1 3 i j present here two theorems that allow us to determine if and an odd number of minuses. Then there exists a crossing map when a crossing map exists. Such theorems are constructive, for p. that is, we show also how we move continuously a point (or more if needed) to change only one determinant sign. We Proof See “Appendix B”. know that any triple of not-aligned points in R divide it in 7 open regions (Fig. 7), which are essential for the following When Theorem 2 is satisfied we can construct explicitly a discussion. crossing map so that all points but p are fixed and p moves 2 2 We are now ready to state the following. along the line p p . In terms of strata adjacency we have 4 2 the following corollary. Theorem 1 Let p be a configuration of points in Con f (R ), if there exists a point p ∈ p in the self-dual region then there Corollary 2 Let σ, τ , be two sign sequences that differ by only does not exist a crossing map for p. Similarly, if there exist one sign, namely the one of d . Suppose that for any pair 1,2,3 two points p , p in two regions that are not dual, such map 4 < i < j when the 4-tuples (1, 2, 3, i ) and (1, 2, 3, j ) are j k does not exist either. equal, resp. dual, we have that the sign subsequence relative 123 Autonomous Robots (2021) 45:737–754 743 to (1, 3, i , j ) is external, resp. internal. Then σ and τ are returns the stratification of Con f (R ). We will show that adjacent strata. the number of existing strata increases significantly with the number of points, and to consider such approach, as it is, for Note that, when two signs sequences differ only by one sign, a mesh of hundreds of points would be unfeasible, both for they need to be adjacent, which means that, if they are not, the construction of the stratification and its practical use. We either one or both are not present as strata in Con f (R ).Itis propose here to group different strata in macro-states, called true that Theorem 2 is a necessary and sufficient condition for just states from now on, using both symmetric relationships strata adjacency when n < 7, but this is not true for higher n. and topological properties of the stratification. We will show When n < 7 there is only one pair such that 4 < i < j ≤ n, that using this revised approach we can assign to a mesh on that is, i = 5 and j = 6. This means that all points are hundreds of points a discrete distribution over such states, involved: p , p and p determine the dual regions of the 1 2 3 allowing us to distinguish between different cloth poses. plane and p determines the crossing map for p , permitted 4 2 In Sect. 3 we showed that the combination of Theorem 1 by the position of p , p . For the case n ≥ 7 the conditions in 5 6 and Theorem 2 can be used to determine the existence of a Theorem 2 involve subsets of p and not all of them. When it is crossing map. Algorithm 1 assess the adjacency of a stratum not satisfied, there might exist other ways to move p across σ with respect the singularity of d . We know that the 1,2,3 the line p p , that is, a crossing map for p, for example 1 3 action of S allows to swap any triple (i , j , k) with (1, 2, 3), moving more than one point. so this means that existence of any adjacency with respect to a The adjacency test between a stratum σ with positive sign given d can be determined after permuting some indices. i , j ,k d and τ = H (σ ), the one with identical determinant 1,2,3 1,2,3 We present now two further algorithms: Algorithm 2 signs but d , follows, where we denoted the duality rela- 1,2,3 where we combine Algorithm 1 and the action of S on tionship by  and its negative by ∦. In the next section we Con f (R ) to determine all adjacencies of a stratum, and Algorithm 3 where, from a chosen stratum σ , we search existing adjacencies iteratively to obtain all existing strata Algorithm 1: Adjacent in Con f (R ). Input : Sign sequence σ Output : Boolean foreach 4 ≤ j < k ≤ n do Algorithm 2: Reachable σ ← signs of (p , p , p , p ); j 1 2 3 j Input : Sign sequence σ σ ← signs of (p , p , p , p ); k 1 2 3 k Output : Sign sequences adjacent to σ if σ = (++−+) then return False Y ←∅; if σ = (++−+) then foreach 1 ≤ i < j < k ≤ n do return False g ← (i , 1) · ( j , 2) · (k, 3); if (σ = σ ) ∧ (σ ∦ σ ) then j k j k α ← g · α; return False if α has d negative then 1,2,3 foreach 4 < j < k ≤ n do α ← (1, 2) · α; σ ← signs of (p , p , p , p ); j 1 2 3 j if Adjacent (α) then σ ← signs of (p , p , p , p ); k 1 2 3 k Y ← Y ∪{H (σ )}; i , j ,k σ ← signs of (p , p , p , p ); j ,k 1 3 j k return Y if (σ = σ ) ∧ (σ is external) then j k j ,k return True if (σ  σ ) ∧ (σ is internal) then j k j ,k return True After applying Algorithm 2 to any σ we obtain a set of return False existing strata, to which we can reapply Algorithm 2.This iterative application of Algorithm 2 can be done a finite num- will describe how to effectively compute the sign sequences ber of times, as the number of all possible sign sequences admissible in Con f (R ) when n ≤ 6 and how this structure is finite. Thanks to the connectedness of Con f (R ),itis n n can then be applied effectively to describe the “state” of the also true that we cannot miss any existing strata, if we cloth. iterate enough times. Algorithm 3 encodes such iterative process, assuming that the starting stratum is σ , with all positive determinant signs, obtained placing n points as ver- 4 Implementation and results tices of a convex n-gon and in counter-clockwise order. Thanks to Algorithm 3 we are able to recover the structure In this section we will demonstrate how Theorem 1 and of Con f (R ) and, with it, also the number of strata, that Theorem 2 can be implemented in a finite algorithm that is, sign sequences, present. As we can see in Table 1,the 123 744 Autonomous Robots (2021) 45:737–754 Algorithm 3: C-Space Table 2 Number of S -states and ∼ -states in Con f (R ) n σ n ∗ 2 Input : σ stratum of Con f (R ) n S − states σ − states Output : Configuration space Con f (R ) 31 2 i ← 0; 42 5 X ={σ }; while X =∅ do 53 23 6 20 150 X ←∪ Reachable(σ)\ ∪ X ; i +1 j σ ∈X j =0 i ← i + 1; X = ∪ X ; j of view, such possibility should be avoided, as a general rule. j =0 return X It implies that there exists a state containing a singularity loci, as two adjacent strata belong to it. We acknowledge the possibility that for a particular goal, the practitioner might Table 1 The number of strata of Con f (R ) is displayed together with n allow it, if that singularity loci is not relevant for the particular their topological properties considering their adjacency graph task or goal sought. n Strata Adjacencies Degrees Each stratum is labelled with a binary vector of determi- nant signs and we can measure the distance between two 32 1 (1) strata with the Hamming distance. It measures how many 4 14 24 (3,4) different determinant signs they have, or equivalently the 5 264 600 (4,5) number of singularity loci to be crossed to continuously move 6 11904 30240 (2, 3, 4, 5, 6, 7, 9, 10) from one stratum to the other. The following equivalence relation ensures that no pair of adjacent strata belongs to the same state. Definition 2 (∼ -States) Given a stratum of Con f (R ), call σ n it σ , we say that two strata τ and τ belongs to the same 1 2 state if they are equally distant from σ w.r.t. the Hamming distance and they are in the same S -state. We will denote Fig. 8 Three different configurations of the 4 corner points of a rectan- such equivalence relation as τ ∼ τ . 1 σ 2 gular textile, where we coloured in grey the back side. All configurations belong to different strata, but they are the same with respect to the S It is easy to see that given two adjacent strata it is impossible action. These configuration require in principle different robot manip- for them to be inside the same state, as they will always have ulations, for example if the goal is folding or unfolding (Color figure different sign distances from σ . It can be shown explicitly online) that, for different σ , the number of ∼ -states might change. To avoid confusion and be coherent in the choice of such number of strata increases rapidly, and it is expected to rise σ we will assume from now on that σ = σ , that is, the quadratically in terms of n (Strommer 1977). stratum with correspondent sign sequence formed by only As we are aiming to deal with meshes with hundreds of positive signs. Table 2 shows the number of S -states and points, considering the strata as representating cloth poses, it ∼ -states for n < 7. might be computationally challenging as their number grows For any two states we can define a distance between them dramatically. To overcome such problem, we will show how as the minimum Hamming distance between two strata in to group different strata, and so configurations entailing simi- each state, which will always be greater than 0 if the states lar robotic manipulations, in states. In Cohen et al. (1976)the are different. We will say then that two states are adjacent if action of S on Con f (R ) is studied and, in particular, we such distance is 1, as it implies that there exists at least two n n obtain that the quotient of this action gives us the unordered adjacent strata, one in each state. configuration space of n points. In terms of our stratification, As in each state we can have one or more strata, to such action induces an identification between configurations, avoid confusion, from now on we label each state using the and so between strata, whose determinant signs coincide after sign sequence of one of them. As choice of label we con- a permutation of the point labels, {1,..., n}. An example of sider the lowest sign sequence in the lexicographic order, different configurations belonging to the same S -state is dis- assuming + < −.InFig. 9 we can see the S -states of played in Fig. 8. Con f (R ), using the labelling just explained, where we con- Such action however does not always preserve faithfully nected together states that are adjacent. the adjacency relationships, as it can happen that two strata in As anticipated such states do not always preserve the same S -equivalence class are adjacent. From our point adjacencies. Consider the sign sequence τ = (+++++ 123 Autonomous Robots (2021) 45:737–754 745 Fig. 9 Adjacency graph of the S -states using lexicographic order for the choice of labels Fig. 11 For the same mesh of a rectangular cloth with ∼ 700 points on the top, we plot on the bottom the distribution of S -states (on the left) and the ∼ -states (on the right) using different colours for the internal points based on their associated states (Color figure online) assuming the 4 corner points always in these subsets. As the case of m = 5 is the simplest and visual considerations can be made quite clearly, we will focus first on this case and only after show its generalisation. The cloth simulations presented here are obtained synthetically using a Blender simulator (Sánchez-Riera et al. 2010). As we are considering subsets with m points (with 4 corner points always present) there exists a one-to-one matching between each subset and the (internal) point of the mesh. We can then associate the S -state, or ∼ -state, of this subset n σ to its unique internal point and vice versa. This allows us to show in a clear fashion how the distribution of states varies from different cloth meshes. In Fig. 11 we show how this distribution can change when using different states, S -states and ∼ -states. It is clear that we are dividing the mesh cloth in differ- ∗ 2 Fig. 10 Adjacency graph of the σ -states of Con f (R ) using lexico- ent “zones”, each one associated to a different state, and so graphic order for the choice of labels having more states could imply obtaining more zones for the same mesh. We refer the reader to “Appendix C”for more particular state definitions. They are presented with a discus- +++−−), which is in Con f (R ). We know that τ can- sion on the differences with the S -states and ∼ -states, as not be in A = (+++++++++−−−) otherwise it would n σ be its label and so it has to be in B = (+++++++++−). well as on the possible uses for the practitioner. It is impor- tant to note that the definition of state we propose can be This means that in B we have two adjacent strata, as the label of a state corresponds to a stratum in it. For the ∼ -states this adapted to different needs from the user, as well as different goals. For example the coarsening of the states, that is, of does not happen, thanks to their definition, even if they are a refinement of the S -states, as to be ∼ -equivalent two strata the grouping of strata in Con f (R ), can be tuned and focus n σ can be put or reduced on different states depending on their need to be S -equivalent. We show their adjacency graph in relative importance for the task at hand. Fig. 10. Given a mesh, we can map its state-zones to a vector in R , We know that the stratum with all negative signs always with k the number of states considered, simply assigning to exists, as it is obtained displaying the points in clockwise th n the i -coordinate the number of internal points associated order. Its distance from σ is exactly . This means that th 3 to the i state. In other words, given a mesh of n points, we are assigning to it a vector that encapsulates the state the number of ∼ -states for Con f (R ) is at least . σ n distribution of its points. The reader should bear in mind that Again, even using states for representing C-space, instead of this procedure can be also viewed in terms of configurations the stratification, their number for a mesh with hundreds of of n points. We are effectively projecting a configuration points becomes computationally challenging. in Con f (R ) to n − 4 copies of the state-decomposition of 2 2 To avoid such challenge we propose to consider instead the Con f (R ). Then, the state decomposition of Con f (R ) can 5 n distribution of states for the subsets of m points in the mesh, be obtained by identifying strata with identical Con f (R )- 123 746 Autonomous Robots (2021) 45:737–754 If we want to generalise this approach for m > 5we should bear in mind that the association with the internal points will be impossible, that is, a “zone” decomposition of the mesh cloth would be meaningless. We will be considering n − 4 all subsets of m − 4 internal points, so we cannot m − 4 associate uniquely a state to a point. However, given a mesh cloth of n points such that the 4 corner points are given and a state definition, we can again associate to it a vector in R where k is the number of states in Con f (R ). This allows us to see any cloth mesh as a vector in an Euclidean space and measure distances between different meshes, and addi- tionally it gives also a way to decompose Con f (R ) into regions on the basis of their associated vectors. Fig. 12 We consider the distribution of points in S -states for different 5 Conclusion cloth meshes. The distribution of points in each S -state, a vector in R , is displayed for each mesh as a histogram. For brevity we indicate state (+++++++++−) with A,state (+++++++−−−) with We have proposed an approach to represent the state of tex- B and state (++++++++++) with C tiles in a global, coarse way useful for robot manipulation. It is well founded in topological grounds, as it relies on the con- figuration space (C-space) of distinctive points in the cloth, whose combinatorial structure is derived from the stratifica- tion of the flag manifold. Moreover, two theorems, Theorem 1 and Theorem 2, defining conditions for adjacency in C-space, have been proved. Their algorithmic implementation in Algo- rithm 3 permits to derive the decomposition of the C-space of a rectangular cloth with different granularities dependent on the particular goal sought. More concretely, we proved in Sect. 3 how to deter- mine computationally the adjacency relations of the strata in Con f (R ) for n ≤ 6 and we are currently working on more general techniques for n > 6. Note that this doesn’t limit the number of points used to determine the state of cloth, since all points in the cloth mesh can be used to this end (Fig. 11). Such topological characterisation of cloth state represents a key element for the development of a theory of cloth manipulation based on computational topology and machine learning, that we are undertaking, as well as its implemen- tation in the mobile manipulation robots servicing in our Fig. 13 A confusion matrix between different mesh poses using the heat function to represent low distance values (in red) and high ones assisted living facility. (in blue). We can see that the similarity decreases for this particular The cloth representation, as a distribution of states, will example as the corner is moved across and out of the initial rectangle be used to link perception and planning. As shown in Sect. 4, area (Color figure online) using a state classification, the practitioner can obtain a subdi- vision of a rectangular cloth into state-induced “zones”. This state distribution with respect to such projection. Examples could make way for a robot visual recognition of different of such identification follow in Fig. 12. global states of the cloth, depending on the amount of points This state distribution can be considered as a vector in each zone (Fig. 13). Future works would include apply- in the Euclidean space R , so one could also identify ing deep learning to cloth state recognition from images, “close” enough state-distribution vectors with respect to the by generating training instances using a physical simulator Euclidean distance. We show in Fig. 13 how this distance can and labelling them with our proposed state encoding. Since, be able to encode such similarities and differences. for the training instances we have the meshes (ground truth) 123 Autonomous Robots (2021) 45:737–754 747 recently how to learn dynamics of deformable objects and fluids (Li et al. 2019) and in a reinforcement learning context Jangir et al. (2020) distinguishing between static and dynamic cloth manipulation tasks. These approaches, together with our state-subdivision in zones of the cloth, could determine efficiently the effect of a grasp by prop- agating the long-range influence among cloth particles, as in Mrowca et al. (2018), and consequently enabling us to determine the state-distribution after the grasp as well as to predict, under dynamical effects, the optimal path between two different state-distribution vectors in R . In sum, we believe that the proposed topological repre- sentation of cloth macro-state is a promising element towards effectively closing the perception-action loop in cloth manip- ulation. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adap- tation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indi- cate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copy- right holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/. Fig. 14 Example of subpath of cloth meshes and distribution of S - states, that would appear in a graph of states and transitions to plan the A Adjacency study folding of a towel, using the taxonomy of Borràs et al. (2020) In this appendix, we investigate further the adjacency rela- tions of the stratification of Con f (R ). We proceed first with which the images have been generated, we can exactly introducing the concept of affine flag and the corresponding obtain the state-distribution vectors of the mesh poses with stratification of Flag (3), subset of affine flags in Flag(3). our algorithms. Thanks to this stratification and the symmetric action of S On the manipulation planning side, characterising the on Con f (R ) we are able to provide a matching between states of textile objects and the feasible transformations the singularities of Flag (3) and those of Con f (R ).This A 4 under given actions in a compact operational way (i.e., allows us to determine how the singularity, that is, alignment a graph-encoding manipulation-oriented states and transi- of three points, between two strata has to be crossed, in terms tions), would permit probabilistic planning of actions that of the relative position of such points. ensure reaching a desired cloth configuration despite low- In Sect. 3 we show how the stratification of Con f (R ) accuracy perceptions. In this direction, a framework to can be obtained using the Flag(3) one. This is done after characterise and systematise grasps, manipulation primitives mapping each point to RP and then considering the pair of and tasks for the versatile handling of clothes by robots has flags these projective points determine. These flags are affine been proposed (Borràs et al. 2020). Tasks are represented flags, as both the point v and the line l in each of them does as sequences of manipulation primitives, which yield state not belong to the line at infinity z = 0. In other words, affine changes. We envisage to map these changes to transitions in flags are those flag that can be projected in the affine plane our state graph. A toy example of this approach is displayed R . The set of all such flags, indicated with Flag (3), can in Fig. 14. be stratified using the stratification of Flag(3), see Fig. 2.If In this paper we have only considered static cloth states X is the set of i-dimension strata of Flag(3) then we define and envisaged their usage in manipulations where cloth i dynamics can be neglected. Other authors have studied the set of i-dimensional strata of Flag (3) as the connected 123 748 Autonomous Robots (2021) 45:737–754 Fig. 15 Stratification of Flag (3) induced by the one of Flag(3), where stratum signs indicates how the affine flags in it are placed with respect to the reference one, V components of X ∩Flag (3). It can happen that, when inter- i A Fig. 16 We show the effect of each basis element, e = (i , i + 1),of S i 4 sected with Flag (3),astratumof Flag(3) is disconnected on the alignments of any three points. Any possible alignment of three into two connected components. To distinguish them in such points is reached using a finite composition of the basis elements cases, we annotate their label with a + or − sign depending on the placement of V and V with respect with each other, see Fulton (1997); Hiller (1982). The resulting stratification is displayed in Fig. 15. ∗ ∗ For the singularities v − l and l − v , the difference between the two connected components is the following. If ∗ ∗ + one consider the flag as V ={ p , p p } then (v − l ) is 1 1 2 formed by all those flags V ={v, l} such that v ∈ l and the vectors p − p and v − p are concord, otherwise we are 2 1 1 ∗ − in the singularity (v − l ) . Similarly happens for the two connected components of l − v . Any stratum in Con f (R ) can be associated to a stra- tum of Flag (3), modulo the definition of V and V with respect to p , p , p and p . For example, the stratum with 1 2 3 4 + ∗ label (++++) is ∅ when we consider V ={ p , p , p } 1 1 2 Fig. 17 We show the effect of each basis element, e = (i , i + 1),of S i 4 and V ={ p , p , p }. We will show next how we can associ- 3 3 4 on the alignments of any three points, in terms ofFlag (3) singularities ated to any singularity of Con f (R ) between adjacent strata a singularity of Flag (3). Thanks to the action of S on A 4 Con f (R ), such characterisation can be easily determined. belongs to the segment of p and p , identifying i − j − k i k A permutation g ∈ S induces on Con f (R ) the map f 4 4 g with k − j − i. such that it sends any configuration p to one determined by 4 We consider the following flags { p } , permuting accordingly the points. The map f is g(i ) g i =1 an automorphism of Con f (R ) and when restricted to the singularity loci, it remains an automorphism, as the singu- • V ={v , l } with v = p and l = p p ; 1 1 1 1 1 1 1 2 ∗ ∗ ∗ ∗ ∗ larity of a determinant does not change under permutation. • V ={v , l } with v = p and l = p p 3 3 4 1 1 1 1 1 The reader should bear in mind that this does not imply that f is an automorphism when restricted to each singularity and alone. Without loss of generality we can focus only on the maps induced by the permutations (1, 2), (2, 3) and (3, 4), • V ={v , l } with v = p and l = p p ; 1 2 2 2 2 2 2 1 as they generate the entire S . As explained before the sin- ∗ ∗ ∗ ∗ ± ∗ ± • V ={v , l } with v = p and l = p p . 2 2 4 4 3 2 2 2 gularities (v − l ) and (l − v ) can be expressed in terms of “concordant” or not alignment of three points. We can track the effect of permutation on such alignments and so Note that, given two adjacent strata σ and τ , with connecting we can detect how a permutation g will change any singu- singularity i − j − k, their images, under the action of any larity of Flag (3), again assuming V and V are previously g ∈ S , will still be adjacent and g(i ) − g( j ) − g(k) will A 4 defined. In Fig. 16 we show how the alignment changes via correspond to the singularity between them. We can then permutations, denoting by i − j − k the alignment where p rewrite Fig. 16 in terms of the singularity of Flag (3). j A 123 Autonomous Robots (2021) 45:737–754 749 −1 x − x x − x 2 1 3 1 p → f (p) = (p − p ). (1) y − y y − y 2 1 3 1 Note that f does not change the sign of any determinant. In addition we can assume that H is constant over t, that is H (t ) ≡ (0, 0). If not, we apply to each H :[0, 1]→ R 1 i the translation −H :[0, 1]→ R .The map H − H 1 1 is also a crossing map, because for any t the configura- tion q ={H (t ) − H (t )} has identical sign sequence to i 1 i =1 {H (t )} . In addition, at any t the configuration q has i =1 q = (0, 0). Similarly we assume that p belongs to the positive x- semiaxis. If not, we apply now a suitable rotation with centre the origin, such that for any t the point H (t ) is mapped to the positive x-semiaxis. Again we have a crossing map, as rotations are sign-preserving isometries, and clearly for any t the image of p with respect to such map is on the positive Fig. 18 Representation of Con f (R ), with strata adjacencies in terms x-semiaxis. One can alternatively assume that p is on the 4 3 ∗ ∗ of singularities of Flag (3), using the pair of flags V , V and V , V . A 1 2 positive, or negative, y-semiaxis instead. Furthermore we can 1 2 We used cyan ellipses to denote external strata and red rectangles for assume that H (t ) ≡ (1, 0), via an homogeneous dilation at internal ones (Color figure online) each t of R with centre the origin and dilation factor y > 0, which ensures that the sign sequence does not change. If we Using Fig. 17 and knowing that the connecting singularity suppose that p is constantly on the positive y-semiaxis, we ∗ + of (++++) and (−+++) is 1−2−3, or also (v −l ) ,we can similarly assume H (t ) ≡ (0, 1). 1 3 can determine the “type” of any singularity between two adja- In the following proof of Theorem 1, we make use of these cent strata, that is, the corresponding singularity ofFlag (3), assumptions, that w.l.o.g. extremely simplify the proof. For as follows (Fig. 18). brevity, to denote the determinant of the image of points ∗ ± It is easy to check that each possible singularity, (v −l ) p , p and p under H , we will write d (t ) when the i i j k i , j ,k ∗ ± 2 and (l − v ) , is present in the stratification of Con f (R ) context is clear i 4 showed in Fig. 15. In particular we have that any stratum Proof Suppose there exists p ∈ p in the self-dual region has always at least one singularity in terms of V , V and (cf. Fig. 7) and H is a crossing map. As the sign sequence one V , V , which should convince the reader that we need of H (0) is (++−+), H (1) has sign sequence (−+−+), both pairs. We leave the study of singularities with lower which is impossible as it is not an admissible sequence of ∗ ∗ ± dimension, that is, associated to v − v and (l − l ) ,for i i 2 i i Con f (R ). the future. For i = 1,..., n let H (t ) = x (t ), y (t ) and suppose ( ) i i i there exist two points p , p in two not dual regions. Thanks j k to our assumptions on H,wehave d (t ) = y (t ), and, 1,2,3 3 B Proofs of Theorems 1 and 2 because H is a crossing map, we have that for some t it is true that y (0)> y (t ) = 0 > y (1). Denoted by σ (t ),for 3 3 0 3 s In this section we will prove Theorem 1 and Theorem 2 in s = j , k, the sign sequence of the points H (t ), H (t ), H (t ) 1 2 3 details, using the notion of dual regions, as in Fig. 7,totest and H (t ), we can analyse each possible case. if there exists a crossing map between two strata, see Defini- tion 1. Case 1. Consider σ (0) = (++++).If σ (0) is (++−−) j k For any crossing map H , the configurations H (0) and or (+++−), we have the following inequalities. H (1) belong to adjacent strata. We can assume then that the configuration H (0) = p, is such that p = (0, 0), p = 1 2 0 < d = y (t ) ⎪ 1,2, j j (1, 0) and p = (0, 1). This can be achieved via f : R → 3 ⎨ 0 < d = y (t ) 1,2,k k R with 0 < d (t ) = d (t ) − y (t ) + x (t )y (t ) ⎪ 2,3, j 1,2,3 j 3 j 0 > d (t ) = d (t ) − y (t ) + x (t )y (t ). 2,3,k 1,2,3 k 3 k 123 750 Autonomous Robots (2021) 45:737–754 then q = (x , y) is in the self-dual region we have x , y > 0 and x + y < 1, as its state corresponds to the sign sequence 0 < y (t ) ⎪ j 0 (++−+). We will denote σ the sign sequence of the i , j state relative to (p , p , p , p ). As we will make broad use 0 < y (t ) 1 3 i j k 0 of them, we write the explicit expressions of d and d , 1,i , j 3,i , j 0 < −y (t ) + x (t )y (t ) ⇒ x (t )> 1 ⎪ j 0 3 0 j 0 3 0 given w.l.o.g. that p = (0, 0), p = (1, 0) and p = (0, 1). 1 2 3 0 > −y (t ) + x (t )y (t ) ⇒ x (t )< 1. k 0 3 0 k 0 3 0 d = x y − x y , 1,i , j i j j i This is a contradiction. (3) d = d + x − x . 3,i , j 1,i , j j i Case 2. Suppose σ (0) is (+++−) and σ (0) is (+−++), j k or σ (0) is (++++) and σ (0) is (+−++).In j k As before we need to examine different cases depending on both cases we have the following inequalities. σ , resp. σ , the sign sequence of the points p , p , p and p , i j 1 2 3 i resp. p , p , p and p . That is, each case will correspond 1 2 3 j 0 < d (t ) = y (t ) ⎪ 1,2, j j ⎪ to a different pair of regions to which p and p belong. i j 0 > d (t ) = y (t ) 1,2,k k 0 < d (t ) = x (t )y (t ) − y (t )x (t ) ⎪ 1,3, j 3 j 3 j Case 1. If both σ and σ are (+−−−), then σ is either ⎪ i j i , j 0 < d (t ) = x (t )y (t ) − y (t )x (t ). (−−++) or (−−−−). Note that the permutation (i , j ) 1,3,k 3 k 3 k allows to pass from one case to the other, that is, we can then assume both d and d positive. Suppose there exists 1,i , j 3,i , j L(t ) from Eq. (2) inside the self-dual region, that is, x (t)> 0 < y (t ) ⎪ j 0 0. We know that x , x < 0 from the expression of σ and i j i 0 > y (t ) k 0 σ , so by continuity there exists a t such that x (t ) = 0. In j 0 0 ⎪ particular, this implies that x − x = 0, otherwise x (t ) will 0 < x (t )y (t ) ⇒ x (t )> 0 i j ⎪ 3 0 j 0 3 0 ⎩ be constant and always negative. 0 < x (t )y (t ) ⇒ x (t )< 0. 3 0 k 0 3 0 (a) If x < x ,fromEq. (2)wehave i j This is a contradiction. x j x (t ) i 0 It is left to the reader to see that any other pair of different and not dual configurations can be reduced via a suitable t t 01 0 symmetric action to the two considered above. With  we indicate that the value is increasing from left to right, Given a couple of dual regions we can map it to another one otherwise we will use . using the permutation (2, 3, 1) or (3, 1, 2), which will also keep the determinant d of the same sign. This means that 1,2,3 3,i , j we can reduce our considerations to only one of such couples, As x (t ) = 0 then z(t ) = 1 + > 1, with z(t ) = 0 0 x −x j i namely (++++) and (+−−−). We assume w.l.o.g. that x (t ) + y(t ).Wehave the crossing map is such that H (t ) is the origin and H (t ) ≡ 1 3 (0, 1) for any t. We are now ready to prove Theorem 2. j z(t ) z(t ) 1 0 Proof The proof is divided into three parts. First we prove 1 t t that any line passing through p and p with i , j > 4 does i j not cross the self-dual region. Then we prove that it does not happen also for the lines passing through p , p and p , p . 1 i 3 i As 1 < z(t ), we have that L(t ) is not in the self-dual As a consequence, we are able in the last part to construct region. explicitly a crossing map for p. (b) If x < x ,fromEq. (2)wehave j i Consider L : R → R , parametric expression of p p , i j such that we have L(0) = p and L(1) = p . i j x (t ) x j 0 i x (t ) = (x − x ) t + x , t t j i i  0 01 L(t ) = (2) y(t ) = (y − y ) t + y , j i i 1,i , j As x (t ) = 0 then y(t ) = < 0. From y > with p = (x , y ) and p = (x , y ). We show first that 0 0 i i i i j j j x −x i j the line p p never crosses the self-dual region. If a point 1 − x > 0we have i j i 123 Autonomous Robots (2021) 45:737–754 751 The condition σ = (+−++) is equivalent to d > 0 y(t ) y(t ) y i , j 1,i , j 0 0 i as the sign sequence (+−+−) is not admissible. Simi- t t larly we have that σ equal to (+−−−) is equivalent to i , j assume d < 0. As before, suppose there exists L(t ) from 3,i , j Eq. (2) inside the self-dual region, that is, x (t ), y(t)> 0 Thus, L(t ) is not in the self-dual region as y(t ) is nega- and z(t)< 1for some t. Note that as p = (0, 1) we have tive. d =−x for any 3 ≤ k. We know that y < 0 < y from 1,3,k k j i Case 2. If both σ and σ are (++++), then σ is either i j i , j the expression of σ and σ , so by continuity of Eq. (2) there i j (++−−) or (++++). Note that the permutation (i , j ) exists t such that y(t ) = 0. Similarly, as x < 0 < x , 0 0 j i allows to pass from one case to the other, that is, we can there exists a t such that x (t ) = 0. Thus we have 1 1 assume both d and d negative. Suppose there exists 1,i , j 3,i , j L(t ) from Eq. (2) inside the self-dual region, that is, z(t)< 1 y(t ) j for some t. We know that z , z are greater than 1, as both i j d and d are negative, so by continuity there exists t tt 1,i , j 3,i , j 0  1 such that z(t ) = 1. In particular, this implies that z = z , 0 i j otherwise z(t ) will be constant and always greater than 1. and x x (t ) (a) If z < z ,fromEq. (2)wehave i i j t t 0 1 z(t ) z j 1 i t t 0 01 In particular t < t < t ,so x (t )> 0 and y(t )> 0. 1 0 0 1 Furthermore, as z < 1 < z we have z(t )< z(t)< z(t ). i j 0 1 3,i , j (a) If d > 0 then, as x (t ) = 0, we have y(t ) = 1,i , j 1 1 As z(t ) = 1 then we have x (t ) = < 0from 0 0 z −z i j d 1,i , j < 0, contradiction. Then there cannot exists L(t ) Eq. (2), and, therefore, x −x j i inside the self-dual region. 3,i , j (b) If d < 0 then, as z(t ) = 1 + > 1, we have 3,i , j 0 x −x i j x (t ) x (t ) x 0 0 i z(t)> 1, contradiction. Then there cannot exists L(t ) t t 0 0 inside the self-dual region. In conclusion, any line p p with i , j > 4 does not cross i j Thus, L(t ) is not in the self-dual region as x (t)< 0. the self-dual region. (b) If z < z ,fromEq. (2)wehave j i Consider p , p with i > 4 and its parametric expression 1 i x (t ) = x t , z j z(t ) i 1 L (t ) : (4) y(t ) = y t . t t 01 0 If σ = (++++) then x < 0 < y , so either x t , y t are i i i i i both 0 or they are discordant, that is, the point L (t ) is never 3,i , j As z(t ) = 1 then y(t ) = 1 + > 1 and x (t )< 0. 0 0 0 z −z in the self-dual region. Similarly if σ = (+−−−). j i From Eq. (2)wehave Consider p , p with i > 4 and its parametric expression 3 i x (t ) = x t , x (t ) x (t ) x 0 0 i L (t ) : (5) y(t ) = (y − 1) t + 1. t t 0 0 If σ = (++++) then x < 0. Suppose that L (t ) belongs to i i 3 the self-dual region, then t < 0as x (t)> 0, but x + y < 1 i i Since x (t)< 0, we have that L(t ) is not in the self-dual so x (t ) + y(t)> 1. That is, the point L (t ) is never in the region. self-dual region. Similarly if σ = (+−−−). Case 3. σ is (++++) and σ is (+−−−). In conclusion we have that the only lines crossing the self- i j We now have that σ is either (+−++) or (+−−−), dual region will be p p for i = 1,..., n. In particular as any i , j 2 i with i < j. The case j < i is obtained permuting i with j. pair of them crosses at p , then they cannot cross inside the 123 752 Autonomous Robots (2021) 45:737–754 self-dual region. If we move p inside the self-dual region, along p p and so continuously, the sign sequence of p 2 4 remains the same. That is, we are describing a continuous path of Con f (R ) that is contained inside the stratum σ of p. It is only when p p crosses p p that the sign sequence 2 4 1 3 changes, that is, when the singularity loci is crossed at d . 1,2,3 Let L = p p and λ such that L (λ) ∈ p p .We 2,4 2 4 2,4 1 3 can assume, modulo orientation of L , that λ> 0 and 2,4 L (0) = p , in particular this means that for any t >λ we 2,4 2 have L (t ) with x-coordinate negative. Consider μ>λ 2,4 such that for any t >λ such that L (t ) belongs to some 2,4 p p ,wehave t >μ.For i = 2 consider the continuous i j map H :[0, 1]→ R as the constant map H (t ) ≡ p and i i i H as follows. H (t ) = μ(p − p )t + p , (6) 2 4 2 2 To check that H is a crossing map we need to check only H . Clearly H (0) = p and H is continuous. Consider 2 2 2 2 0 < t = < 1, then H (t ) ∈ p p , and as H is a linear 0 2 0 1 3 2 Fig. 19 Adjacency graph of Γ(m, n)-states, blue dashed lines denote a change for the state of q map this can happen only once. It remains to prove that the sign sequence of H (1) differs only by the sign of d with 1,2,3 respect to σ . We have that H (1) has negative x-coordinate, points in p, again for user-defined states such assumption so d changes sign as wanted. Furthermore, if any other 1,2,3 might not be true. determinant d changes sign, for (i , j ) = (1, 3), then 2,i , j As explained previously, if we consider the S -states, we d (t ) = 0for t ∈ (t , 1), as inside the self-dual region n 2,i , j 0 are effectively forgetting the labelling given to each point. it cannot happen. That is, there exists λ<ν < μ such that On the other hand, when using the ∼ -states we are able to L (ν) belongs to p , p , which is impossible. All in all, σ 2,4 i j track how far away we are from the “base-stratum” σ.Ifwe H ={H } is a crossing map, as wanted. i =1 are interested on the labels of the first m points and how their Note that, thanks to these two theorems we are able to con- distance change, we would define the following. struct Algorithm 1, and, thanks to the proof of Theorem 2, we can explicitly construct the crossing map between two Definition 3 (Γ(m, n)-States) Given two strata τ ,τ of 1 2 adjacent strata. Con f (R ),for i = 1, 2 we denote by σ the subsequence n i of the first signs, strata in Con f (R ). We say that τ m 1 and τ belong to the same S -state if they are in the same C Different states definitions 2 n S -state and σ is in the same ∼ -state of σ . We will denote n 1 σ 2 such equivalence relation as τ ∼ τ . 1 2 In Sect. 4 we proposed two different state definitions based (m,n) on S and on the topological structure of the stratification of The adjacency graph of such classes for n = 5 and m = 4is Con f (R ). A practitioner however might want or need to displayed in Fig. 19, note that unlike the ∼ -states, self-loops study the state of a cloth with particular (or less) focus on can now occur as they are a refinement of the S -states. a subset of points. For example, if q is a configuration of On the opposite case, if our intention is to study the state m points, subset of p ∈ Con f (R ), then one could group of the cloth, without giving importance to the labelling of q, together strata of Con f (R ) depending on the strata of p then we can define the following states. and that of q, or instead that of p \ q. In this appendix we will show other two state definition based on the S -states n Definition 4 (Γ(n, m)-States) Given two strata τ ,τ of 1 2 and ∼ -ones. Again we will assume that ∼ is defined using σ σ Con f (R ),for i = 1, 2 we denote by σ the subsequence n i as “base-stratum” the sequence of all positive signs. Even of the first signs, strata in Con f (R ). We say that τ m 1 if we show here only two cases, it is clear that depending on the cloth in analysis, the mesh properties but as well the and τ belong to the same ∼ -state if they are in the same 2 σ manipulation task in mind, different states can be defined. S -state and σ is in the same S -state of σ . We will denote n 1 m 2 For now on, we will assume that q are always the first m such equivalence relation as τ ∼ τ . 1 (n,m) 2 123 Autonomous Robots (2021) 45:737–754 753 The adjacency graph of such states for n = 5 and m = 4is displayed in Fig. 19. As the graphs displayed in Figs. 19 and 20 are not isomor- phic, we know that these two state definitions are different. Note that, as Γ(n, m)-states are a refinement of the ∼ -states, there cannot be self-loops in its adjacency graph. This does not always happen for the Γ(m, n)-states as they are a refine- ment of S -states, which do have self-loops. There are clearly a lot more possible state definitions than the ones we presented here. From our point of view, interest- ing ones can arise when considering instead of S subgroups of it, for example the one generated by the cycle (1, 2 ..., n). This would produce a refinement of S -states which is not identical to the one of ∼ . Furthermore one could use such states as in Definition 4 or Definition 3 to group together configuration that are equal after cyclic permutation of m,or n, points. References Aichholzer, O., Balko, M., & et al. (2018). Minimal geometric graph representations of order types. In Proceeding of 34th European workshop on computational geometry EuroCG’18 (pp. 21–1). Arnold, V. I. (1969). The cohomology ring of the coloured braid group. Mathematical Notes of the Academy of Sciences of the USSR, 5(2), 138–140. Bai, Y., Yu, W., & Liu, C. K. (2016). Dexterous manipulation of cloth. In Proceedings of the 37th annual conference of the European association for computer graphics (pp. 523–532). Eurographics Association. Borràs, J., Alenya, G., & Torras, C. (2020). A grasping-centered analy- sis for cloth manipulation. IEEE Transactions on Robotics, 36(3), 924–936. Canal, G., Alenyà, G., & Torras, C. (2019). Adapting robot task plan- ning to user preferences: An assistive shoe dressing example. Autonomous Robots, 43(6), 1343–1356. Canny, J. (1988). The complexity of robot motion planning. Cambridge: MIT Press. Cohen, F. R., Lada, T. J., & May, P. J. (1976). The homology of iterated loop spaces (Vol. 533). Berlin: Springer. Fulton, W. (1997). Young tableaux: With applications to representation theory and geometry (Vol. 35). Cambridge: Cambridge University Press. Geißer, F., Speck, D., & Keller, T. (2019). An analysis of the proba- bilistic track of the IPC 2018. In ICAPS 2019 workshop on the international planning competition (WIPC) (pp. 27–35). Grünbaum, B. (1972). Arrangements and spreads. Providence: Ameri- can Mathematical Society. Guan,P., Reiss, L.,Hirshberg,D.A., Weiss, A.,&Black,M.J. (2012). Drape: Dressing any person. ACM Transactions on Graph- ics (TOG), 31(4), 1–10. Hilaga, M., Shinagawa, Y., Kohmura, T., & Kunii, T. L. (2001). Topol- ogy matching for fully automatic similarity estimation of 3d shapes. In Proceedings of the 28th annual conference on Com- puter graphics and interactive techniques (pp. 203–212). Hiller, H. (1982). Geometry of Coxeter groups (Vol. 54). London: Pit- man Publishing. Fig. 20 Adjacency graph of Γ(n, m)-states, blue dashed lines denote Ivan, V., Zarubin, D., Toussaint, M., Komura, T., & Vijayakumar, S. a change for the state of q (Color figure online) (2013). Topology-based representations for motion planning and 123 754 Autonomous Robots (2021) 45:737–754 generalization in dynamic environments with interactions. The international conference on robotics and automation (ICRA) (pp. International Journal of Robotics Research, 32(9–10), 1151–1163. 2153–2160). IEEE. Jangir, R., Alenya, G., & Torras, C. (2020). Dynamic cloth manipula- tion with deep reinforcement learning. In 2020 IEEE international Publisher’s Note Springer Nature remains neutral with regard to juris- conference on robotics and automation (pp. 4630–4636). IEEE. dictional claims in published maps and institutional affiliations. Kemp, C., Edsinger, A., & Torres-Jara, E. (2007). Challenges for robot manipulation in human environments [grand challenges of robotics]. IEEE Robotics & Automation Magazine, 14(1), 20–29. Koganti, N., Tamei, T., Ikeda, K., & Shibata, T. (2017). Bayesian non- Fabio Strazzeri (https://www.iri. parametric learning of cloth models for real-time state estimation. upc.edu/staff/fstrazzeri) obtained IEEE Transactions on Robotics, 33(4), 916–931. his M.Sc. degree in Mathemat- Kriz, I. (1994). On the rational homotopy type of configuration spaces. ics at the University of Pisa and Annals of Mathematics, 139(2), 227–237. his Ph.D. degree at the Univer- Li, Y., Wu, J., Tedrake, R., Tenenbaum, J.B., & Torralba, A. sity of Southampton. During Ph.D. (2019). Learning particle dynamics for manipulating rigid bod- project “Topological Data Fusion ies, deformable objects, and fluids. In International conference on – A novel approach for high- learning representations. dimensional data integration, anal- Ma, Q., Tang, S., Pujades, S., Pons-Moll, G., Ranjan, A., & Black, M.J. ysis and visualisation”, he devel- (2019). Dressing 3d humans using a conditional mesh-vae-gan. oped a novel clustering algorithm, arXiv preprint arXiv:1907.13615. Morse, which integrates combi- Milnor, J. W., & Stasheff, J. D. (1975). Characteristic classes. Annals natorial topology and graph the- of Mathematics Studies, 76, 80. ory. He applied it to multi ’omics Monk, D. (1959). The geometry of flag manifolds. Proceedings of the data integration and analysis, London Mathematical Society, 3(2), 253–286. together with other topological methods, for patient stratification and Mrowca, D., Zhuang, C., Wang, E., Haber, N., Fei-Fei, L. F., Tenen- identification of disease sub-phenotypes. He is currently a Postdoc- baum, J., & Yamins, D. L. (2018). Flexible neural representation toral Researcher at the Institut de Robòtica i Informàtica Indus- for physics prediction. In Advances in neural information process- trial (CSIC-UPC) in Barcelona, for the project CLOTHILDE—Cloth ing systems (pp. 8799–8810). manipulation learning from demonstrations. Pokorny, F. T., Stork, J. A., & Kragic, D. (2013). Grasping objects with holes: A topological approach. In 2013 IEEE international conference on robotics and automation (pp. 1100–1107). IEEE. Carme Torras (https://www.iri. Pons-Moll, G., Pujades, S., Hu, S., & Black, M. J. (2017). Clothcap: upc.edu/people/torras) is Research Seamless 4d clothing capture and retargeting. ACM Transactions Professor at the Institut de Robòtica on Graphics (TOG), 36(4), 1–15. i Informàtica Industrial (CSIC- Pumarola, A., Agudo, A., Porzi, L., Sanfeliu, A., Lepetit, V., & Moreno- UPC) in Barcelona, where she Noguer, F. (2018). Geometry-aware network for non-rigid shape leads a research group on assis- prediction from a single view. In Proceedings of the IEEE confer- tive and collaborative robotics. ence on computer vision and pattern recognition (pp. 4681–4690). She received M.Sc. degrees in Roudneff, J. P. (1986). On the number of triangles in simple arrange- Mathematics and Computer Sci- ments of pseudolines in the real projective plane. Discrete Math- ence from the University of ematics, 60, 243–251. Barcelona and the University of Sánchez-Riera, J., Östlund, J., Fua, P., & Moreno-Noguer, F. (2010). Massachusetts, respectively, and a Simultaneous pose, correspondence and non-rigid shape. In 2010 Ph.D. degree in Computer Sci- IEEE computer society conference on computer vision and pattern ence from the Technical Univer- recognition (pp. 1189–1196). sity of Catalonia (UPC). Prof. Tor- Simmons, G. (1973). A maximal 2-arrangement of sixteen lines in the ras has published six research books and about three hundred papers projective plane. Periodica Mathematica Hungarica, 4(1), 21–23. in robotics, machine learning, geometric reasoning, and neurocomput- Smith, C., Karayiannidis, Y., Nalpantidis, L., Gratal, X., Qi, P., ing. She has supervised 18 Ph.D. theses and led 16 European projects, Dimarogonas, D. V., et al. (2012). Dual arm manipulation-a survey. the latest being her ERC Advanced Grant project CLOTHILDE— Robotics and Autonomous systems, 60(10), 1340–1353. Cloth manipulation learning from demonstrations. Prof. Torras is Strommer, T. O. (1977). Triangles in arrangements of lines. Journal of IEEE and EurAI Fellow, member of Academia Europaea and the Combinatorial Theory, Series A, 23(3), 314–320. Royal Academy of Sciences and Arts of Barcelona. She has served Torras, C. (2016). Service robots for citizens of the future. European as Senior Editor of the IEEE Transactions on Robotics, and Associate Review, 24(1), 17–30. Vice-President for Publications of the IEEE Robotics and Automation Torras, C., Thomas, F., & Alberich-Carramiñana, M. (2006). Stratify- Society. Convinced that science fiction can help promote ethics in AI ing the singularity loci of a class of parallel manipulators. IEEE and robotics, one of her novels—winner of the Pedrolo and Ictineu Transactions on Robotics, 22(1), 23–32. awards—has been translated into English with the title The Vestigial Totaro, B. (1996). Configuration spaces of algebraic varieties. Topology, Heart (MIT Press, 2018) and published together with online materials 35(4), 1057–1067. to teach a course on “Ethics in Social Robotics and AI”. Yan, M., Zhu, Y., Jin, N., & Bohg, J. (2020). Self-supervised learning of state estimation for manipulating deformable linear objects. IEEE Robotics and Automation Letters, 5(2), 2372–2379. Yuan, W., Hang, K., Song, H., Kragic, D., Wang, M. Y., & Stork, J. A. (2019). Reinforcement learning in topology-based representation for human body movement with whole arm manipulation. In 2019 http://www.deepdyve.com/assets/images/DeepDyve-Logo-lg.png Autonomous Robots Springer Journals

Topological representation of cloth state for robot manipulation

Autonomous Robots , Volume 45 (5) – Jul 10, 2021

Loading next page...
 
/lp/springer-journals/topological-representation-of-cloth-state-for-robot-manipulation-UZDp1WBE0V

References (40)

Publisher
Springer Journals
Copyright
Copyright © The Author(s) 2021
ISSN
0929-5593
eISSN
1573-7527
DOI
10.1007/s10514-021-09968-7
Publisher site
See Article on Publisher Site

Abstract

Forty years ago the notion of configuration space (C-space) revolutionised robot motion planning for rigid and articulated objects. Despite great progress, handling deformable materials has remained elusive because of their infinite-dimensional shape-state space. Finding low-complexity representations has become a pressing research goal. This work tries to make a tiny step in this direction by proposing a state representation for textiles relying on the C-space of some distinctive points. A stratification of the configuration space for n points in the cloth is derived from that of the flag manifold, and topological techniques to determine adjacencies in manipulation-centred state graphs are developed. Their algorithmic implementation permits obtaining cloth state–space representations of different granularities and tailored to particular purposes. An example of their usage to distinguish between cloth states having different manipulation affordances is provided. Suggestions on how the proposed state graphs can serve as a common ground to link the perception, planning and manipulation of textiles are also made. Keywords Configuration space · Deformable objects · Cloth state · Topological representation · Stratification 1 Introduction by a person. An important limitation is that the target objects have been —almost exclusively— rigid ones. Robot manipulation in human environments is an important Indeed, non-rigid objects —textile items in particular— research field that in recent years has experienced tremen- pose many additional challenges with respect to rigid object dous progress. Impressive results have been obtained among manipulation, such as difficult perception, complexity in the many open problems pinpointed a decade ago (Kemp modelling the object and predicting its behaviour, and the et al. 2007), such as humanoid whole-body reaching, mobile many uncertainties hindering motion planning to reach a manipulation and human–robot collaboration. Research has desired outcome. Despite these difficulties, the manipulation focused on core capabilities as grasping everyday objects, of clothing items is nowadays gaining attention in the robotics carrying and placing them, as well as robot hand-over to or community due to the rise of assistive and service robotics (Torras 2016). As clothing items pervade human environ- This work is supported by the European Research Council (ERC) ments, automating their versatile manipulation would have a within the European Union Horizon 2020 Programme under grant large impact on society, in sectors ranging from healthcare to agreement ERC-2016-ADG-741930 (CLOTHILDE: CLOTH clothing industry. The key problem underlying all these dif- manIpulation Learning from DEmonstrations) and by the Spanish State Research Agency through the María de Maeztu Seal of ficulties is that, whereas handling a rigid object only changes Excellence to IRI (MDM-2016-0656). We thank Dr Jordi Sanchez its pose, namely 6 parameters (the configuration space is Riera for providing us with cloth simulations. the well-known R × SO(3)), the manipulation of a textile object takes place in a shape-state space which is poten- B Fabio Strazzeri fstrazzeri@iri.upc.edu tially infinite-dimensional. This huge dimensionality jump prevents the extension of the techniques developed for rigid Carme Torras torras@iri.upc.edu objects (for perception, planning, learning and manipulation) to textile ones, and calls for a radically different approach. Institut de Robòtica i Informàtica Industrial, CSIC-UPC, Llorens i Artigas 4-6, 08028 Barcelona, Spain 123 738 Autonomous Robots (2021) 45:737–754 2 Related work The paper is structured as follows. In Sect. 3 we use the notion of stratification to study the topological space of con- The extension of available techniques consists of modelling figurations of points, focussing first on the case of 4 points. cloth as a finite element mesh and applying both physics We investigate how such stratification can be obtained using simulation and motion planning algorithms for closed-loop the algebraic condition given by the alignment of three points. multi-articulated objects. This is appropriate for render- This allows us to assign to each configuration of n points a ing where realistic appearance is sought, and impressive concise “label” and ensure that those with different label are advances have taken place recently in the computer vision effectively separated by the stratification in different strata. and computer graphics communities (Pumarola et al. 2018; We also provide an explicit algorithm to construct such strat- Bai et al. 2016), but robot manipulation has not benefited ification for the case n < 7. We proceed then, in Sect. 4, so far from them, because of its substantially different final to investigate the complexity of the stratification and how to aims. In the graphics context, the goal can be among others simplify it. This can be efficiently done using its topological to render the dressing of a human body, representing with properties and the action of the symmetric group S , defining accuracy the clothing as offsets from the body (Ma et al. the state of a configuration of points as a collection of one or 2019; Guan et al. 2012; Pons-Moll et al. 2017), as well as to more strata. Thanks to such states, we can investigate how the points of a mesh are distributed with respect to some fixed estimate with precision the clothing pose based on generative models for 3D shapes using topology (Hilaga et al. 2001). ones (for example the corner ones in a rectangular textile) and For these approaches, rendering precision is important, compare different mesh poses based on the state-distribution while for robot manipulation, local details such as wrinkles of their points. and accurate position can be overlooked in favour of properly determining the macro-state the cloth is in. By macro-state we mean a set of cloth configurations that can be manipulated 3 Configuration space of a textile rectangle in the same way, i.e., that have similar grasping affordances. using n points In the robot manipulation community there is a long- standing general agreement that “low complexity represen- Given a rectangular cloth on a planar surface, we could con- tations for the deformable objects should be the objective” sider it as a surface embedded in R with no self-intersection. (Smith et al. 2012) and some attempts to use topological con- Unfortunately, considering the different configurations of structs to this end have been made, using writhe matrices, such surface and studying their space bears difficulties. On winding numbers and Laplacian coordinates for topology- the already complex space of all possible surfaces with same based representations (Ivan et al. 2013; Yuan et al. 2019), area and no self-intersections, we need to impose also con- as well as loops detection (Pokorny et al. 2013) and topol- straints such as gravity force and cloth stiffness. In order to ogy coordinates for representing human pose as captured simplify, we consider instead the cloth as a set of n points on by a motion capture system (Koganti et al. 2017), but also in the real plane R and the space of all possible configurations combination with deep learning approaches (Yan et al. 2020). of them, Con f (R ). This space belongs to the far more gen- Further along this line, we propose to characterise cloth eral family of configuration spaces of points on manifolds, macro-states, called just ’states’ in what follows, using com- binatorial topology techniques. Inspired by previous works Con f (X ) = (p ,..., p ) ∈ X | p = p for i = j . n 1 n i j on the topological representation of robot configuration spaces (Canny 1988; Torras et al. 2006), we consider a set Such spaces are interesting topological objects and both their of significant points in the cloth and rely on the process of homotopy type and homological properties have been studied stratification to decompose the configuration space (C-space) by several authors. In Arnold (1969) some results regarding of such points into manipulation-wise meaningful states, as the homotopy type of Con f (X ) are obtained, assuming X is well as to derive their adjacencies. of dimension 2, while the real homotopy type of Con f (X ), The outcome is a succinct manipulation-oriented cloth when X is a smooth projective variety, was independently state representation in the form of a graph that permits encod- computed by Kriz (1994) and Totaro (1996). In Cohen et al. ing actions as probabilistic state transitions and then applying (1976) under the assumption X = R , the homology of the powerful probabilistic task planning machinery devel- Con f (X ) is computed and, in particular, it is proved that oped within the AI community (Geißer et al. 2019; Canal Con f (R ) is the classifying space of the n-strand pure braid et al. 2019). Another potential advantage is the simplifica- group. tion of perception, since states can be recognised without Since our aim is to distinguish states based on the types accurately recovering the cloth configuration, and only local of robot manipulations they permit, we will investigate how features relevant for grasping need to be located. such space can be subdivided into meaningful regions, each one formed by several configurations of n points. The proce- 123 Autonomous Robots (2021) 45:737–754 739 Fig. 1 The points p and p are fixed, while p has to be inside the 1 2 4 grey circle, of radius d (Color figure online) dure introduced here allows us to assign to any configuration of points a binary vector, whose length depends on the num- ber of points considered. In this way we can group together configurations with the same vector representation and in addition we will be able to plan which regions of C-space we need to “visit” if we want to move from one state to another. To obtain such structure for Con f (R ) we will employ the notion of stratification of a topological space. The idea behind such notion is to decompose topological spaces of dimension m into smooth parts of dimension m, such that the boundary between any two of them is a subspace of dimen- sion m − 1. As we can iterate such process at each dimension Fig. 2 On the top we can see four disconnected 3D strata of the C- space, obtained by cutting the torus with the 2D singularities. These 0 ≤ k ≤ m, the stratification assumes the form of a filtra- 2 are two disks (in purple on the bottom), which correspond to p ∈ tion, ∅⊆ X ⊆ X ⊆ ··· ⊆ X = Con f (R ), where 1 2 m n p p , and one annullus (in light green on the bottom), corresponding 1 2 each X is the union of disconnected smooth parts, called to p ∈ p p . On the bottom picture we show also the 1D singularities 4 1 2 strata of dimension i and the boundary, called singularity of (in black) and two 0D singularities (in yellow). The former correspond to p = p (a circle) and p p = p p (two segments). The latter dimension i − 1, between two strata belongs to X .The 1 4 3 4 1 2 i −1 correponds to the case when both p = p and p p = p p (Color 4 1 3 4 1 2 structure of a stratification can be quite complex, however for figure online) simple cases one can visualise it clearly. Consider 4 points in the plane, as in Fig. 1, such that p and p are fixed and 1 2 ||p − p || ≤ d. 4 1 Their C-space is a solid torus, product of a disk, encod- ing the position of p , and a circle, encoding the angle of p p and p p , and it is clearly contained in Con f (R ). 1 2 3 4 4 Its stratification can be seen in Fig. 2 , where we use align- Fig. 3 Stratification ofFlag(3) into Bruhat cells, where a link indicates ment between points to define singularities. that one is in the boundary of the other. The label of each stratum Our first step towards the construction of a stratification describes if and how any of its flags V intersects with V ,e.g.for any ∗ ∗ flag in v − l it is true that v ∩ l =∅ for Con f (R ) is to investigate the simplest non-trivial case of n = 4, which will prove to be essential in the treatment of the general case. For both this case and the general one the sets {v, l} with v a point and l a line in RP such that the main idea consist in identify as singularity a subspace of ∗ ∗ v ∈ l. If we fix a flag {v , l }, call it reference flag,weare Con f (R ), where three points are aligned, so that, in the able to construct a stratification of Flag(3) that encodes the highest dimensional strata no triple of point can be aligned. possible pose of any flag with respect to the reference one. We will show that such alignment is defined by an algebraic The strata corresponding to such stratification are Bruhat condition (a null determinant) and it provides us with a con- cells, as shown in Hiller (1982); Monk (1959). The resulting cise way to encode the different strata (as vectors of signs stratification can be seen in Fig. 3, we refer the reader to of determinants). This property allows us to determine eas- Milnor and Stasheff (1975) for a more detailed description. ily the corresponding stratum (or singularity) of any point Consider the points p , p , p and p in R as points in 1 2 3 4 configuration. We also introduce a constructive way, Algo- the projective plane, by adding 1 as last projective coordinate. rithm 1, to build such stratification when n < 7 in a finite We define V ={ p , p p } as reference flag and consider 1 1 2 number of steps. the flag V ={ p , p p }. Note that, in an abuse of language, 3 3 4 2 2 3.1 C-space of a textile rectangle using 4 points we are denoting p both the point in RP and the one in R . Each stratum in Fig. 3 of dimension at most 2 corresponds For the case n = 4 we will rely on the stratification of the to some point alignment. For example if V is in the stratum 2 ∗ 2 2 flag manifold of RP , Flag(3). The elements of Flag(3) are v − l then { p , p , p } are aligned, both in R and RP . 1 2 3 123 740 Autonomous Robots (2021) 45:737–754 This means that we can induce a stratification of Con f (R ) using the one of Flag(3). In particular, any alignment of p , p , p can be seen as a pure algebraic condition on the i j k points coordinates, given by the singularity of the determi- nant d =| p p p |. The sign of such determinant will i , j ,k i j k depend on the clockwise or counter-clockwise position of the ordered triple (p , p , p ). Because the determinant is a i j k continuous map onto R, if two configurations p and q differ by one and only one determinant sign, say d , then we i , j ,k Fig. 4 Three different configurations of the 4 corner points of a rectan- gular textile, where we coloured in grey the back side. All configurations know that any continuous path from one configuration to the belong to different strata, (++ ++), (++ −+) and (−− −−), other has to cross the singularity loci of d . i , j ,k respectively, from left to right (Color figure online) The stratification in Fig. 2 can be interpreted using the Flag(3) stratification. Considering the reference flag V = { p , p p } and V ={ p , p p }, we have that the annu- 1 1 2 4 4 3 lus, singularity of dimension 2, corresponds to v − l .Inside it we have v − v , which is the singularity of dimension 1, displayed as a black circle. Finally, the singularities of dimen- ∗ ∗ sion 0, displayed as yellow points, are v −v , l −l . Actually, there are 2 determinants that we are not considering, namely d and d . The singularity surfaces are more difficult 1,3,4 2,3,4 to visualize and would lead to a much finer stratification. Given any configuration of 4 points in R we can map it Fig. 5 Let d be positive, as in the figure. The region on the lower continuously to R , assigning to each coordinate the deter- 1,2,3 left corner (coloured in green) is the only one in common between the minant value of d , d , d and d , respectively. 1,2,3 1,2,4 1,3,4 2,3,4 regions in which d is negative (left of p p , coloured in yellow) 1,2,4 1 2 The singularity locus of a determinant can be seen either as and the ones in which d is negative (below p p , coloured in blue). 2,3,4 2 3 an alignment of three points, as a flag intersection, or also as a In this region also d is negative (Color figure online) 1,3,4 hyperplane in R corresponding to one coordinate equal to 0. If we consider R minus the coordinate hyperplanes, x = 0 for i = 1,... 4, we obtain 16 disconnected smooth regions, will change, resp. cross. The reader can now see that for n < 4 each one containing points with same coordinates signs, that such approach would be trivial. In the case of n = 3weget is, corresponding to configurations of points with same deter- only two strata, corresponding to p being on the right/left minant signs. The reader should be aware however that such of the line p p .If n = 1, 2 then it is clear we cannot even 1 2 mapping is not one-to-one More than one configuration can define any determinant. be mapped to the same point in R , as the determinants are In the case n = 4, the maximum number of strata we invariant under R -isometries. could obtain is 2 = 16, however using the determinants The counter-image of these regions of R are the highest expressions, we derive the following algebraic equation dimensional strata of the stratification of Con f (R ) and they correspond to the subsets of all configuration with identical d + d = d + d . 1,2,3 1,3,4 1,2,4 2,3,4 determinant signs. We can then uniquely associate to each stratum the label of the determinant signs sequence of any configuration of points in it, that is, a binary vector with 4 It is straightforward to see that it is impossible that either entries. d and d are positive and d and d are neg- 1,2,3 1,3,4 1,2,4 2,3,4 Note that each configuration in Fig. 4 would require in ative or vice versa. We can verify it explicitly considering principle different robot manipulations for a folding task, the regions obtained assuming 3 points fixed, say p , p and 1 2 e.g., using the taxonomy in Borràs et al. (2020), we would p , and d either positive or negative. The former case is 3 1,2,3 use point-tableplane sliding for the spread out configuration; showed in Fig. 5. point-point pick-up for the corner in the middle of the cloth; Another consequence of such equation is that, if a config- point-gripperplane sliding for the overfolded cloth, so as to uration of points belongs to a stratum with odd number of turn it out. minuses in its label, then there exists one point lying inside These labels will not only tell us how to group “similar” the triangle spanned by the others. We will call from now configurations but also how “different” two configurations on such strata internal, otherwise we call them external.A are. For example, we can count how many signs, resp. singu- graph of the adjacencies between the strata is shown in Fig. 6. larities, a continuous path from one configuration to another We refer the reader to “Appendix A” for a thorough study of 123 Autonomous Robots (2021) 45:737–754 741 null determinants, or equivalently by the alignments of three points. Such strata will correspond to regions of R after removing all coordinate hyperplanes. From now on, we con- sider the determinants ordered with lexicographic order on their indices with the constraint that for k = 3,..., n,the first ones are those of { p ,..., p }. 1 k Even if we are able to encode each configuration of points as a sign sequence, we do not have a priori a way to determine if a sign sequence is admissible. This is an essential step of our study, because we want to be able, not only to group “similar” configurations, but as well navigate such stratification. For example if we want to find the optimal way to move n points from one configuration to another belonging to a different stratum, we might need to know which are the allowable paths, that is, which strata we can visit. Suppose that n−1 points are fixed and we want to study the regions in which the arrangement of lines spanned by pairs of these points divide R . Note that, these would represent strata of Con f (R ), with identical determinant signs for the fixed n − 1 points. This approach together with the knowledge of the stratification of Con f (R ) would allow to construct n−1 the stratification of Con f (R ). Line arrangements, both in Fig. 6 Representation of Con f (R ), with strata adjacencies indicated the real and projective planes, have been studied extensively by links between different sign sequences. We used cyan ellipses to in various contexts, see Grünbaum (1972) and references denote external strata and red rectangles for internal ones (Color figure online) therein. Several authors have worked on how to bound the number of regions, triangles or polygons (Roudneff 1986; Strommer 1977; Simmons 1973). In Aichholzer et al. (2018), such relationships with respect to the Flag(3) stratification the authors consider the problem of characterising geomet- for the case n = 4. ric graphs using the order type of their vertex set. Using the notion of minimal representation of a graph, they identify which edges prevent the order type from changing via con- 3.2 C-space of a textile rectangle using n points tinuous deformations of the graph. Even if this approach is the closest to ours, to our knowledge in the literature there is We can apply a similar procedure and obtain a similar defini- not a detailed study of the adjacency relations of Con f (R ). tion of stratum for the general case of n points, however some In particular there is not a study that tells us exactly which issues regarding the admissibility of sign sequences need to determinant signs sequence is admissible and which is not. be addressed. We present here an iterative technique to construct the strat- As n increases, the number of flags and their position with ification of Con f (R ). respect to each other becomes more difficult to encode and The adjacency of two strata σ, τ can be seen as the a description based on it would make less clear the structure possibility of nullifying one and only one determinant via of the space. To avoid it we will employ only the determi- continuous movement of a configuration p in σ to another q nants to detect changes between configurations. We know in τ . So if, given any stratum σ , we are able to detect with a that given n points we have k = different triples of deterministic test which determinants can or cannot be nulli- fied, we are effectively identifying which strata are adjacent points, that is, k possible determinants. We can map any con- to σ . We can iteratively apply such test to these strata and, figuration of n points to a point (x ,..., x ), where each 1 k as Con f (R ) is connected (Cohen et al. 1976), we would x corresponds to the determinant of a particular triple of recover all the existing strata. For any n ≥ 3 there exists points. We know that each coordinate hyperplane, x = 0for always a configuration p such that each determinant sign i = 1,..., k, corresponds to a singularity, that is, a determi- of any triple of points is positive, namely when the points nant equal to zero, and the determinants are again continuous are placed to form a convex n-gon and they are in counter- functions. We can then define a stratum of Con f (R ) as the clockwise order. In other words, there is always a stratum set of all configurations of n points with the same determinant σ whose sign sequence is formed only by positive signs sign sequence, and represent singularities between strata by 123 742 Autonomous Robots (2021) 45:737–754 and that can be always used as starting point in such iterative process to find the strata of Con f (R ). We will now proceed to explain how we can rigorously describe such test. We know that the symmetric group S acts on Con f (R ) n n via point permutations. That is, if we have p ={ p } ,a i =1 configuration of n points, then the induced action of g, call it f , is defined as f (p) ={ p } . Note that f is an g g g(i ) g i =1 2 −1 automorphism of Con f (R ),as f = f , furthermore −1 g g Fig. 7 The lines spanned by a triple of non-aligned points p , p , p 1 2 3 it is also an automorphism of the singularity loci, as the sin- divide R in 7 regions. These can be split in three couples of dual regions and a self-dual region, here visually divided by colour and pattern. Each gularity of a matrix does not change when we permute its dual couple is formed by an external region and an internal one, as any rows. The action of g on the sign sequences can be easily point belonging to the former, resp. the latter, together with p , p , p , 1 2 3 deduced. Let σ be the stratum of p and g ∈ S , then the forms an external, resp. internal, sign sequence. The self-dual region sign of d of the stratum τ = g · σ to which g · p consists of one internal region (Color figure online) g(i ),g( j ),g(k) belongs is the same, resp. opposite, of d if the signature i , j ,k of (g(i ), g( j ), g(k)) is positive, resp. negative. From now on, Proof See “Appendix B”. we will study the adjacency between σ and τ that differs by the sign of d , otherwise we can reduce to such case via a 1,2,3 The idea behind this theorem is that if we want to nullify d 1,2,3 permutation of S . In what follows, we assume w.l.o.g. that we need to align p , p , p , without aligning any other triple 1 2 3 σ has d with positive sign. In other words, the adjacency 1,2,3 in the process. For example if a point p is inside the triangle test for σ is reduced, via a suitable permutation, to establish spanned by these three points it is clear that aligning them if the determinant d can be nullified. Such property is 1,2,3 would result in aligning all 4 of them. equivalent to the existence of the following map. As the sign sequence is invariant among all configurations of points in the same stratum σ , we have the following. Definition 1 (Crossing map) Let p be a configuration in Con f (R ) and consider for 1 ≤ i ≤ n the continu- Corollary 1 Let σ and τ be two sign sequences that differ ous map H :[0, 1]→ R , such that H (0) = p . We call by only one sign, namely that of d , positive for σ and i i i 1,2,3 H = H a crossing map for p,if i negative for τ . If there exists a k = 1, 2, 3 such that the σ - subsequence relative to indices (1, 2, 3, k) is (++−+) then σ and τ are not adjacent. Similarly, if there exists j , k = • H (t ) ∈ Con f (R ) for t ∈[0, 1] ; 1, 2, 3 such that the σ -subsequences relative to (1, 2, 3, j ) • d (H (t )) = 0for (u,v,w) = (1, 2, 3) and t ∈ u,v,w and (1, 2, 3, k) are different and not dual, then σ and τ are [0, 1]; not adjacent either. • d (H (0)) · d (H (1)) < 0; 1,2,3 1,2,3 •∃! t ∈ (0, 1) such that d (H (t )) = 0. 1,2,3 The following result tells us when instead it is possible to change sign, that is when the adjacency exists. The existence of a crossing map for p ∈ σ , a continuous Theorem 2 Consider p ∈ Con f (R ) such that Theorem 1 path in Con f (R ), is equivalent to the existence of τ,a is not satisfied. Suppose that for any pair 4 < i , j ≤ nit stratum with sign sequence identical to that of σ but for the is true that either p and p belong to the same region and i j d sign. It is clear now that such existence for a p ∈ σ is 1,2,3 the tuple (p , p , p , p ) has an even number of minuses or 1 3 i j equivalent to the adjacency test for σ we were looking for. We they are in a dual couple and the tuple (p , p , p , p ) has 1 3 i j present here two theorems that allow us to determine if and an odd number of minuses. Then there exists a crossing map when a crossing map exists. Such theorems are constructive, for p. that is, we show also how we move continuously a point (or more if needed) to change only one determinant sign. We Proof See “Appendix B”. know that any triple of not-aligned points in R divide it in 7 open regions (Fig. 7), which are essential for the following When Theorem 2 is satisfied we can construct explicitly a discussion. crossing map so that all points but p are fixed and p moves 2 2 We are now ready to state the following. along the line p p . In terms of strata adjacency we have 4 2 the following corollary. Theorem 1 Let p be a configuration of points in Con f (R ), if there exists a point p ∈ p in the self-dual region then there Corollary 2 Let σ, τ , be two sign sequences that differ by only does not exist a crossing map for p. Similarly, if there exist one sign, namely the one of d . Suppose that for any pair 1,2,3 two points p , p in two regions that are not dual, such map 4 < i < j when the 4-tuples (1, 2, 3, i ) and (1, 2, 3, j ) are j k does not exist either. equal, resp. dual, we have that the sign subsequence relative 123 Autonomous Robots (2021) 45:737–754 743 to (1, 3, i , j ) is external, resp. internal. Then σ and τ are returns the stratification of Con f (R ). We will show that adjacent strata. the number of existing strata increases significantly with the number of points, and to consider such approach, as it is, for Note that, when two signs sequences differ only by one sign, a mesh of hundreds of points would be unfeasible, both for they need to be adjacent, which means that, if they are not, the construction of the stratification and its practical use. We either one or both are not present as strata in Con f (R ).Itis propose here to group different strata in macro-states, called true that Theorem 2 is a necessary and sufficient condition for just states from now on, using both symmetric relationships strata adjacency when n < 7, but this is not true for higher n. and topological properties of the stratification. We will show When n < 7 there is only one pair such that 4 < i < j ≤ n, that using this revised approach we can assign to a mesh on that is, i = 5 and j = 6. This means that all points are hundreds of points a discrete distribution over such states, involved: p , p and p determine the dual regions of the 1 2 3 allowing us to distinguish between different cloth poses. plane and p determines the crossing map for p , permitted 4 2 In Sect. 3 we showed that the combination of Theorem 1 by the position of p , p . For the case n ≥ 7 the conditions in 5 6 and Theorem 2 can be used to determine the existence of a Theorem 2 involve subsets of p and not all of them. When it is crossing map. Algorithm 1 assess the adjacency of a stratum not satisfied, there might exist other ways to move p across σ with respect the singularity of d . We know that the 1,2,3 the line p p , that is, a crossing map for p, for example 1 3 action of S allows to swap any triple (i , j , k) with (1, 2, 3), moving more than one point. so this means that existence of any adjacency with respect to a The adjacency test between a stratum σ with positive sign given d can be determined after permuting some indices. i , j ,k d and τ = H (σ ), the one with identical determinant 1,2,3 1,2,3 We present now two further algorithms: Algorithm 2 signs but d , follows, where we denoted the duality rela- 1,2,3 where we combine Algorithm 1 and the action of S on tionship by  and its negative by ∦. In the next section we Con f (R ) to determine all adjacencies of a stratum, and Algorithm 3 where, from a chosen stratum σ , we search existing adjacencies iteratively to obtain all existing strata Algorithm 1: Adjacent in Con f (R ). Input : Sign sequence σ Output : Boolean foreach 4 ≤ j < k ≤ n do Algorithm 2: Reachable σ ← signs of (p , p , p , p ); j 1 2 3 j Input : Sign sequence σ σ ← signs of (p , p , p , p ); k 1 2 3 k Output : Sign sequences adjacent to σ if σ = (++−+) then return False Y ←∅; if σ = (++−+) then foreach 1 ≤ i < j < k ≤ n do return False g ← (i , 1) · ( j , 2) · (k, 3); if (σ = σ ) ∧ (σ ∦ σ ) then j k j k α ← g · α; return False if α has d negative then 1,2,3 foreach 4 < j < k ≤ n do α ← (1, 2) · α; σ ← signs of (p , p , p , p ); j 1 2 3 j if Adjacent (α) then σ ← signs of (p , p , p , p ); k 1 2 3 k Y ← Y ∪{H (σ )}; i , j ,k σ ← signs of (p , p , p , p ); j ,k 1 3 j k return Y if (σ = σ ) ∧ (σ is external) then j k j ,k return True if (σ  σ ) ∧ (σ is internal) then j k j ,k return True After applying Algorithm 2 to any σ we obtain a set of return False existing strata, to which we can reapply Algorithm 2.This iterative application of Algorithm 2 can be done a finite num- will describe how to effectively compute the sign sequences ber of times, as the number of all possible sign sequences admissible in Con f (R ) when n ≤ 6 and how this structure is finite. Thanks to the connectedness of Con f (R ),itis n n can then be applied effectively to describe the “state” of the also true that we cannot miss any existing strata, if we cloth. iterate enough times. Algorithm 3 encodes such iterative process, assuming that the starting stratum is σ , with all positive determinant signs, obtained placing n points as ver- 4 Implementation and results tices of a convex n-gon and in counter-clockwise order. Thanks to Algorithm 3 we are able to recover the structure In this section we will demonstrate how Theorem 1 and of Con f (R ) and, with it, also the number of strata, that Theorem 2 can be implemented in a finite algorithm that is, sign sequences, present. As we can see in Table 1,the 123 744 Autonomous Robots (2021) 45:737–754 Algorithm 3: C-Space Table 2 Number of S -states and ∼ -states in Con f (R ) n σ n ∗ 2 Input : σ stratum of Con f (R ) n S − states σ − states Output : Configuration space Con f (R ) 31 2 i ← 0; 42 5 X ={σ }; while X =∅ do 53 23 6 20 150 X ←∪ Reachable(σ)\ ∪ X ; i +1 j σ ∈X j =0 i ← i + 1; X = ∪ X ; j of view, such possibility should be avoided, as a general rule. j =0 return X It implies that there exists a state containing a singularity loci, as two adjacent strata belong to it. We acknowledge the possibility that for a particular goal, the practitioner might Table 1 The number of strata of Con f (R ) is displayed together with n allow it, if that singularity loci is not relevant for the particular their topological properties considering their adjacency graph task or goal sought. n Strata Adjacencies Degrees Each stratum is labelled with a binary vector of determi- nant signs and we can measure the distance between two 32 1 (1) strata with the Hamming distance. It measures how many 4 14 24 (3,4) different determinant signs they have, or equivalently the 5 264 600 (4,5) number of singularity loci to be crossed to continuously move 6 11904 30240 (2, 3, 4, 5, 6, 7, 9, 10) from one stratum to the other. The following equivalence relation ensures that no pair of adjacent strata belongs to the same state. Definition 2 (∼ -States) Given a stratum of Con f (R ), call σ n it σ , we say that two strata τ and τ belongs to the same 1 2 state if they are equally distant from σ w.r.t. the Hamming distance and they are in the same S -state. We will denote Fig. 8 Three different configurations of the 4 corner points of a rectan- such equivalence relation as τ ∼ τ . 1 σ 2 gular textile, where we coloured in grey the back side. All configurations belong to different strata, but they are the same with respect to the S It is easy to see that given two adjacent strata it is impossible action. These configuration require in principle different robot manip- for them to be inside the same state, as they will always have ulations, for example if the goal is folding or unfolding (Color figure different sign distances from σ . It can be shown explicitly online) that, for different σ , the number of ∼ -states might change. To avoid confusion and be coherent in the choice of such number of strata increases rapidly, and it is expected to rise σ we will assume from now on that σ = σ , that is, the quadratically in terms of n (Strommer 1977). stratum with correspondent sign sequence formed by only As we are aiming to deal with meshes with hundreds of positive signs. Table 2 shows the number of S -states and points, considering the strata as representating cloth poses, it ∼ -states for n < 7. might be computationally challenging as their number grows For any two states we can define a distance between them dramatically. To overcome such problem, we will show how as the minimum Hamming distance between two strata in to group different strata, and so configurations entailing simi- each state, which will always be greater than 0 if the states lar robotic manipulations, in states. In Cohen et al. (1976)the are different. We will say then that two states are adjacent if action of S on Con f (R ) is studied and, in particular, we such distance is 1, as it implies that there exists at least two n n obtain that the quotient of this action gives us the unordered adjacent strata, one in each state. configuration space of n points. In terms of our stratification, As in each state we can have one or more strata, to such action induces an identification between configurations, avoid confusion, from now on we label each state using the and so between strata, whose determinant signs coincide after sign sequence of one of them. As choice of label we con- a permutation of the point labels, {1,..., n}. An example of sider the lowest sign sequence in the lexicographic order, different configurations belonging to the same S -state is dis- assuming + < −.InFig. 9 we can see the S -states of played in Fig. 8. Con f (R ), using the labelling just explained, where we con- Such action however does not always preserve faithfully nected together states that are adjacent. the adjacency relationships, as it can happen that two strata in As anticipated such states do not always preserve the same S -equivalence class are adjacent. From our point adjacencies. Consider the sign sequence τ = (+++++ 123 Autonomous Robots (2021) 45:737–754 745 Fig. 9 Adjacency graph of the S -states using lexicographic order for the choice of labels Fig. 11 For the same mesh of a rectangular cloth with ∼ 700 points on the top, we plot on the bottom the distribution of S -states (on the left) and the ∼ -states (on the right) using different colours for the internal points based on their associated states (Color figure online) assuming the 4 corner points always in these subsets. As the case of m = 5 is the simplest and visual considerations can be made quite clearly, we will focus first on this case and only after show its generalisation. The cloth simulations presented here are obtained synthetically using a Blender simulator (Sánchez-Riera et al. 2010). As we are considering subsets with m points (with 4 corner points always present) there exists a one-to-one matching between each subset and the (internal) point of the mesh. We can then associate the S -state, or ∼ -state, of this subset n σ to its unique internal point and vice versa. This allows us to show in a clear fashion how the distribution of states varies from different cloth meshes. In Fig. 11 we show how this distribution can change when using different states, S -states and ∼ -states. It is clear that we are dividing the mesh cloth in differ- ∗ 2 Fig. 10 Adjacency graph of the σ -states of Con f (R ) using lexico- ent “zones”, each one associated to a different state, and so graphic order for the choice of labels having more states could imply obtaining more zones for the same mesh. We refer the reader to “Appendix C”for more particular state definitions. They are presented with a discus- +++−−), which is in Con f (R ). We know that τ can- sion on the differences with the S -states and ∼ -states, as not be in A = (+++++++++−−−) otherwise it would n σ be its label and so it has to be in B = (+++++++++−). well as on the possible uses for the practitioner. It is impor- tant to note that the definition of state we propose can be This means that in B we have two adjacent strata, as the label of a state corresponds to a stratum in it. For the ∼ -states this adapted to different needs from the user, as well as different goals. For example the coarsening of the states, that is, of does not happen, thanks to their definition, even if they are a refinement of the S -states, as to be ∼ -equivalent two strata the grouping of strata in Con f (R ), can be tuned and focus n σ can be put or reduced on different states depending on their need to be S -equivalent. We show their adjacency graph in relative importance for the task at hand. Fig. 10. Given a mesh, we can map its state-zones to a vector in R , We know that the stratum with all negative signs always with k the number of states considered, simply assigning to exists, as it is obtained displaying the points in clockwise th n the i -coordinate the number of internal points associated order. Its distance from σ is exactly . This means that th 3 to the i state. In other words, given a mesh of n points, we are assigning to it a vector that encapsulates the state the number of ∼ -states for Con f (R ) is at least . σ n distribution of its points. The reader should bear in mind that Again, even using states for representing C-space, instead of this procedure can be also viewed in terms of configurations the stratification, their number for a mesh with hundreds of of n points. We are effectively projecting a configuration points becomes computationally challenging. in Con f (R ) to n − 4 copies of the state-decomposition of 2 2 To avoid such challenge we propose to consider instead the Con f (R ). Then, the state decomposition of Con f (R ) can 5 n distribution of states for the subsets of m points in the mesh, be obtained by identifying strata with identical Con f (R )- 123 746 Autonomous Robots (2021) 45:737–754 If we want to generalise this approach for m > 5we should bear in mind that the association with the internal points will be impossible, that is, a “zone” decomposition of the mesh cloth would be meaningless. We will be considering n − 4 all subsets of m − 4 internal points, so we cannot m − 4 associate uniquely a state to a point. However, given a mesh cloth of n points such that the 4 corner points are given and a state definition, we can again associate to it a vector in R where k is the number of states in Con f (R ). This allows us to see any cloth mesh as a vector in an Euclidean space and measure distances between different meshes, and addi- tionally it gives also a way to decompose Con f (R ) into regions on the basis of their associated vectors. Fig. 12 We consider the distribution of points in S -states for different 5 Conclusion cloth meshes. The distribution of points in each S -state, a vector in R , is displayed for each mesh as a histogram. For brevity we indicate state (+++++++++−) with A,state (+++++++−−−) with We have proposed an approach to represent the state of tex- B and state (++++++++++) with C tiles in a global, coarse way useful for robot manipulation. It is well founded in topological grounds, as it relies on the con- figuration space (C-space) of distinctive points in the cloth, whose combinatorial structure is derived from the stratifica- tion of the flag manifold. Moreover, two theorems, Theorem 1 and Theorem 2, defining conditions for adjacency in C-space, have been proved. Their algorithmic implementation in Algo- rithm 3 permits to derive the decomposition of the C-space of a rectangular cloth with different granularities dependent on the particular goal sought. More concretely, we proved in Sect. 3 how to deter- mine computationally the adjacency relations of the strata in Con f (R ) for n ≤ 6 and we are currently working on more general techniques for n > 6. Note that this doesn’t limit the number of points used to determine the state of cloth, since all points in the cloth mesh can be used to this end (Fig. 11). Such topological characterisation of cloth state represents a key element for the development of a theory of cloth manipulation based on computational topology and machine learning, that we are undertaking, as well as its implemen- tation in the mobile manipulation robots servicing in our Fig. 13 A confusion matrix between different mesh poses using the heat function to represent low distance values (in red) and high ones assisted living facility. (in blue). We can see that the similarity decreases for this particular The cloth representation, as a distribution of states, will example as the corner is moved across and out of the initial rectangle be used to link perception and planning. As shown in Sect. 4, area (Color figure online) using a state classification, the practitioner can obtain a subdi- vision of a rectangular cloth into state-induced “zones”. This state distribution with respect to such projection. Examples could make way for a robot visual recognition of different of such identification follow in Fig. 12. global states of the cloth, depending on the amount of points This state distribution can be considered as a vector in each zone (Fig. 13). Future works would include apply- in the Euclidean space R , so one could also identify ing deep learning to cloth state recognition from images, “close” enough state-distribution vectors with respect to the by generating training instances using a physical simulator Euclidean distance. We show in Fig. 13 how this distance can and labelling them with our proposed state encoding. Since, be able to encode such similarities and differences. for the training instances we have the meshes (ground truth) 123 Autonomous Robots (2021) 45:737–754 747 recently how to learn dynamics of deformable objects and fluids (Li et al. 2019) and in a reinforcement learning context Jangir et al. (2020) distinguishing between static and dynamic cloth manipulation tasks. These approaches, together with our state-subdivision in zones of the cloth, could determine efficiently the effect of a grasp by prop- agating the long-range influence among cloth particles, as in Mrowca et al. (2018), and consequently enabling us to determine the state-distribution after the grasp as well as to predict, under dynamical effects, the optimal path between two different state-distribution vectors in R . In sum, we believe that the proposed topological repre- sentation of cloth macro-state is a promising element towards effectively closing the perception-action loop in cloth manip- ulation. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adap- tation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indi- cate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copy- right holder. To view a copy of this licence, visit http://creativecomm ons.org/licenses/by/4.0/. Fig. 14 Example of subpath of cloth meshes and distribution of S - states, that would appear in a graph of states and transitions to plan the A Adjacency study folding of a towel, using the taxonomy of Borràs et al. (2020) In this appendix, we investigate further the adjacency rela- tions of the stratification of Con f (R ). We proceed first with which the images have been generated, we can exactly introducing the concept of affine flag and the corresponding obtain the state-distribution vectors of the mesh poses with stratification of Flag (3), subset of affine flags in Flag(3). our algorithms. Thanks to this stratification and the symmetric action of S On the manipulation planning side, characterising the on Con f (R ) we are able to provide a matching between states of textile objects and the feasible transformations the singularities of Flag (3) and those of Con f (R ).This A 4 under given actions in a compact operational way (i.e., allows us to determine how the singularity, that is, alignment a graph-encoding manipulation-oriented states and transi- of three points, between two strata has to be crossed, in terms tions), would permit probabilistic planning of actions that of the relative position of such points. ensure reaching a desired cloth configuration despite low- In Sect. 3 we show how the stratification of Con f (R ) accuracy perceptions. In this direction, a framework to can be obtained using the Flag(3) one. This is done after characterise and systematise grasps, manipulation primitives mapping each point to RP and then considering the pair of and tasks for the versatile handling of clothes by robots has flags these projective points determine. These flags are affine been proposed (Borràs et al. 2020). Tasks are represented flags, as both the point v and the line l in each of them does as sequences of manipulation primitives, which yield state not belong to the line at infinity z = 0. In other words, affine changes. We envisage to map these changes to transitions in flags are those flag that can be projected in the affine plane our state graph. A toy example of this approach is displayed R . The set of all such flags, indicated with Flag (3), can in Fig. 14. be stratified using the stratification of Flag(3), see Fig. 2.If In this paper we have only considered static cloth states X is the set of i-dimension strata of Flag(3) then we define and envisaged their usage in manipulations where cloth i dynamics can be neglected. Other authors have studied the set of i-dimensional strata of Flag (3) as the connected 123 748 Autonomous Robots (2021) 45:737–754 Fig. 15 Stratification of Flag (3) induced by the one of Flag(3), where stratum signs indicates how the affine flags in it are placed with respect to the reference one, V components of X ∩Flag (3). It can happen that, when inter- i A Fig. 16 We show the effect of each basis element, e = (i , i + 1),of S i 4 sected with Flag (3),astratumof Flag(3) is disconnected on the alignments of any three points. Any possible alignment of three into two connected components. To distinguish them in such points is reached using a finite composition of the basis elements cases, we annotate their label with a + or − sign depending on the placement of V and V with respect with each other, see Fulton (1997); Hiller (1982). The resulting stratification is displayed in Fig. 15. ∗ ∗ For the singularities v − l and l − v , the difference between the two connected components is the following. If ∗ ∗ + one consider the flag as V ={ p , p p } then (v − l ) is 1 1 2 formed by all those flags V ={v, l} such that v ∈ l and the vectors p − p and v − p are concord, otherwise we are 2 1 1 ∗ − in the singularity (v − l ) . Similarly happens for the two connected components of l − v . Any stratum in Con f (R ) can be associated to a stra- tum of Flag (3), modulo the definition of V and V with respect to p , p , p and p . For example, the stratum with 1 2 3 4 + ∗ label (++++) is ∅ when we consider V ={ p , p , p } 1 1 2 Fig. 17 We show the effect of each basis element, e = (i , i + 1),of S i 4 and V ={ p , p , p }. We will show next how we can associ- 3 3 4 on the alignments of any three points, in terms ofFlag (3) singularities ated to any singularity of Con f (R ) between adjacent strata a singularity of Flag (3). Thanks to the action of S on A 4 Con f (R ), such characterisation can be easily determined. belongs to the segment of p and p , identifying i − j − k i k A permutation g ∈ S induces on Con f (R ) the map f 4 4 g with k − j − i. such that it sends any configuration p to one determined by 4 We consider the following flags { p } , permuting accordingly the points. The map f is g(i ) g i =1 an automorphism of Con f (R ) and when restricted to the singularity loci, it remains an automorphism, as the singu- • V ={v , l } with v = p and l = p p ; 1 1 1 1 1 1 1 2 ∗ ∗ ∗ ∗ ∗ larity of a determinant does not change under permutation. • V ={v , l } with v = p and l = p p 3 3 4 1 1 1 1 1 The reader should bear in mind that this does not imply that f is an automorphism when restricted to each singularity and alone. Without loss of generality we can focus only on the maps induced by the permutations (1, 2), (2, 3) and (3, 4), • V ={v , l } with v = p and l = p p ; 1 2 2 2 2 2 2 1 as they generate the entire S . As explained before the sin- ∗ ∗ ∗ ∗ ± ∗ ± • V ={v , l } with v = p and l = p p . 2 2 4 4 3 2 2 2 gularities (v − l ) and (l − v ) can be expressed in terms of “concordant” or not alignment of three points. We can track the effect of permutation on such alignments and so Note that, given two adjacent strata σ and τ , with connecting we can detect how a permutation g will change any singu- singularity i − j − k, their images, under the action of any larity of Flag (3), again assuming V and V are previously g ∈ S , will still be adjacent and g(i ) − g( j ) − g(k) will A 4 defined. In Fig. 16 we show how the alignment changes via correspond to the singularity between them. We can then permutations, denoting by i − j − k the alignment where p rewrite Fig. 16 in terms of the singularity of Flag (3). j A 123 Autonomous Robots (2021) 45:737–754 749 −1 x − x x − x 2 1 3 1 p → f (p) = (p − p ). (1) y − y y − y 2 1 3 1 Note that f does not change the sign of any determinant. In addition we can assume that H is constant over t, that is H (t ) ≡ (0, 0). If not, we apply to each H :[0, 1]→ R 1 i the translation −H :[0, 1]→ R .The map H − H 1 1 is also a crossing map, because for any t the configura- tion q ={H (t ) − H (t )} has identical sign sequence to i 1 i =1 {H (t )} . In addition, at any t the configuration q has i =1 q = (0, 0). Similarly we assume that p belongs to the positive x- semiaxis. If not, we apply now a suitable rotation with centre the origin, such that for any t the point H (t ) is mapped to the positive x-semiaxis. Again we have a crossing map, as rotations are sign-preserving isometries, and clearly for any t the image of p with respect to such map is on the positive Fig. 18 Representation of Con f (R ), with strata adjacencies in terms x-semiaxis. One can alternatively assume that p is on the 4 3 ∗ ∗ of singularities of Flag (3), using the pair of flags V , V and V , V . A 1 2 positive, or negative, y-semiaxis instead. Furthermore we can 1 2 We used cyan ellipses to denote external strata and red rectangles for assume that H (t ) ≡ (1, 0), via an homogeneous dilation at internal ones (Color figure online) each t of R with centre the origin and dilation factor y > 0, which ensures that the sign sequence does not change. If we Using Fig. 17 and knowing that the connecting singularity suppose that p is constantly on the positive y-semiaxis, we ∗ + of (++++) and (−+++) is 1−2−3, or also (v −l ) ,we can similarly assume H (t ) ≡ (0, 1). 1 3 can determine the “type” of any singularity between two adja- In the following proof of Theorem 1, we make use of these cent strata, that is, the corresponding singularity ofFlag (3), assumptions, that w.l.o.g. extremely simplify the proof. For as follows (Fig. 18). brevity, to denote the determinant of the image of points ∗ ± It is easy to check that each possible singularity, (v −l ) p , p and p under H , we will write d (t ) when the i i j k i , j ,k ∗ ± 2 and (l − v ) , is present in the stratification of Con f (R ) context is clear i 4 showed in Fig. 15. In particular we have that any stratum Proof Suppose there exists p ∈ p in the self-dual region has always at least one singularity in terms of V , V and (cf. Fig. 7) and H is a crossing map. As the sign sequence one V , V , which should convince the reader that we need of H (0) is (++−+), H (1) has sign sequence (−+−+), both pairs. We leave the study of singularities with lower which is impossible as it is not an admissible sequence of ∗ ∗ ± dimension, that is, associated to v − v and (l − l ) ,for i i 2 i i Con f (R ). the future. For i = 1,..., n let H (t ) = x (t ), y (t ) and suppose ( ) i i i there exist two points p , p in two not dual regions. Thanks j k to our assumptions on H,wehave d (t ) = y (t ), and, 1,2,3 3 B Proofs of Theorems 1 and 2 because H is a crossing map, we have that for some t it is true that y (0)> y (t ) = 0 > y (1). Denoted by σ (t ),for 3 3 0 3 s In this section we will prove Theorem 1 and Theorem 2 in s = j , k, the sign sequence of the points H (t ), H (t ), H (t ) 1 2 3 details, using the notion of dual regions, as in Fig. 7,totest and H (t ), we can analyse each possible case. if there exists a crossing map between two strata, see Defini- tion 1. Case 1. Consider σ (0) = (++++).If σ (0) is (++−−) j k For any crossing map H , the configurations H (0) and or (+++−), we have the following inequalities. H (1) belong to adjacent strata. We can assume then that the configuration H (0) = p, is such that p = (0, 0), p = 1 2 0 < d = y (t ) ⎪ 1,2, j j (1, 0) and p = (0, 1). This can be achieved via f : R → 3 ⎨ 0 < d = y (t ) 1,2,k k R with 0 < d (t ) = d (t ) − y (t ) + x (t )y (t ) ⎪ 2,3, j 1,2,3 j 3 j 0 > d (t ) = d (t ) − y (t ) + x (t )y (t ). 2,3,k 1,2,3 k 3 k 123 750 Autonomous Robots (2021) 45:737–754 then q = (x , y) is in the self-dual region we have x , y > 0 and x + y < 1, as its state corresponds to the sign sequence 0 < y (t ) ⎪ j 0 (++−+). We will denote σ the sign sequence of the i , j state relative to (p , p , p , p ). As we will make broad use 0 < y (t ) 1 3 i j k 0 of them, we write the explicit expressions of d and d , 1,i , j 3,i , j 0 < −y (t ) + x (t )y (t ) ⇒ x (t )> 1 ⎪ j 0 3 0 j 0 3 0 given w.l.o.g. that p = (0, 0), p = (1, 0) and p = (0, 1). 1 2 3 0 > −y (t ) + x (t )y (t ) ⇒ x (t )< 1. k 0 3 0 k 0 3 0 d = x y − x y , 1,i , j i j j i This is a contradiction. (3) d = d + x − x . 3,i , j 1,i , j j i Case 2. Suppose σ (0) is (+++−) and σ (0) is (+−++), j k or σ (0) is (++++) and σ (0) is (+−++).In j k As before we need to examine different cases depending on both cases we have the following inequalities. σ , resp. σ , the sign sequence of the points p , p , p and p , i j 1 2 3 i resp. p , p , p and p . That is, each case will correspond 1 2 3 j 0 < d (t ) = y (t ) ⎪ 1,2, j j ⎪ to a different pair of regions to which p and p belong. i j 0 > d (t ) = y (t ) 1,2,k k 0 < d (t ) = x (t )y (t ) − y (t )x (t ) ⎪ 1,3, j 3 j 3 j Case 1. If both σ and σ are (+−−−), then σ is either ⎪ i j i , j 0 < d (t ) = x (t )y (t ) − y (t )x (t ). (−−++) or (−−−−). Note that the permutation (i , j ) 1,3,k 3 k 3 k allows to pass from one case to the other, that is, we can then assume both d and d positive. Suppose there exists 1,i , j 3,i , j L(t ) from Eq. (2) inside the self-dual region, that is, x (t)> 0 < y (t ) ⎪ j 0 0. We know that x , x < 0 from the expression of σ and i j i 0 > y (t ) k 0 σ , so by continuity there exists a t such that x (t ) = 0. In j 0 0 ⎪ particular, this implies that x − x = 0, otherwise x (t ) will 0 < x (t )y (t ) ⇒ x (t )> 0 i j ⎪ 3 0 j 0 3 0 ⎩ be constant and always negative. 0 < x (t )y (t ) ⇒ x (t )< 0. 3 0 k 0 3 0 (a) If x < x ,fromEq. (2)wehave i j This is a contradiction. x j x (t ) i 0 It is left to the reader to see that any other pair of different and not dual configurations can be reduced via a suitable t t 01 0 symmetric action to the two considered above. With  we indicate that the value is increasing from left to right, Given a couple of dual regions we can map it to another one otherwise we will use . using the permutation (2, 3, 1) or (3, 1, 2), which will also keep the determinant d of the same sign. This means that 1,2,3 3,i , j we can reduce our considerations to only one of such couples, As x (t ) = 0 then z(t ) = 1 + > 1, with z(t ) = 0 0 x −x j i namely (++++) and (+−−−). We assume w.l.o.g. that x (t ) + y(t ).Wehave the crossing map is such that H (t ) is the origin and H (t ) ≡ 1 3 (0, 1) for any t. We are now ready to prove Theorem 2. j z(t ) z(t ) 1 0 Proof The proof is divided into three parts. First we prove 1 t t that any line passing through p and p with i , j > 4 does i j not cross the self-dual region. Then we prove that it does not happen also for the lines passing through p , p and p , p . 1 i 3 i As 1 < z(t ), we have that L(t ) is not in the self-dual As a consequence, we are able in the last part to construct region. explicitly a crossing map for p. (b) If x < x ,fromEq. (2)wehave j i Consider L : R → R , parametric expression of p p , i j such that we have L(0) = p and L(1) = p . i j x (t ) x j 0 i x (t ) = (x − x ) t + x , t t j i i  0 01 L(t ) = (2) y(t ) = (y − y ) t + y , j i i 1,i , j As x (t ) = 0 then y(t ) = < 0. From y > with p = (x , y ) and p = (x , y ). We show first that 0 0 i i i i j j j x −x i j the line p p never crosses the self-dual region. If a point 1 − x > 0we have i j i 123 Autonomous Robots (2021) 45:737–754 751 The condition σ = (+−++) is equivalent to d > 0 y(t ) y(t ) y i , j 1,i , j 0 0 i as the sign sequence (+−+−) is not admissible. Simi- t t larly we have that σ equal to (+−−−) is equivalent to i , j assume d < 0. As before, suppose there exists L(t ) from 3,i , j Eq. (2) inside the self-dual region, that is, x (t ), y(t)> 0 Thus, L(t ) is not in the self-dual region as y(t ) is nega- and z(t)< 1for some t. Note that as p = (0, 1) we have tive. d =−x for any 3 ≤ k. We know that y < 0 < y from 1,3,k k j i Case 2. If both σ and σ are (++++), then σ is either i j i , j the expression of σ and σ , so by continuity of Eq. (2) there i j (++−−) or (++++). Note that the permutation (i , j ) exists t such that y(t ) = 0. Similarly, as x < 0 < x , 0 0 j i allows to pass from one case to the other, that is, we can there exists a t such that x (t ) = 0. Thus we have 1 1 assume both d and d negative. Suppose there exists 1,i , j 3,i , j L(t ) from Eq. (2) inside the self-dual region, that is, z(t)< 1 y(t ) j for some t. We know that z , z are greater than 1, as both i j d and d are negative, so by continuity there exists t tt 1,i , j 3,i , j 0  1 such that z(t ) = 1. In particular, this implies that z = z , 0 i j otherwise z(t ) will be constant and always greater than 1. and x x (t ) (a) If z < z ,fromEq. (2)wehave i i j t t 0 1 z(t ) z j 1 i t t 0 01 In particular t < t < t ,so x (t )> 0 and y(t )> 0. 1 0 0 1 Furthermore, as z < 1 < z we have z(t )< z(t)< z(t ). i j 0 1 3,i , j (a) If d > 0 then, as x (t ) = 0, we have y(t ) = 1,i , j 1 1 As z(t ) = 1 then we have x (t ) = < 0from 0 0 z −z i j d 1,i , j < 0, contradiction. Then there cannot exists L(t ) Eq. (2), and, therefore, x −x j i inside the self-dual region. 3,i , j (b) If d < 0 then, as z(t ) = 1 + > 1, we have 3,i , j 0 x −x i j x (t ) x (t ) x 0 0 i z(t)> 1, contradiction. Then there cannot exists L(t ) t t 0 0 inside the self-dual region. In conclusion, any line p p with i , j > 4 does not cross i j Thus, L(t ) is not in the self-dual region as x (t)< 0. the self-dual region. (b) If z < z ,fromEq. (2)wehave j i Consider p , p with i > 4 and its parametric expression 1 i x (t ) = x t , z j z(t ) i 1 L (t ) : (4) y(t ) = y t . t t 01 0 If σ = (++++) then x < 0 < y , so either x t , y t are i i i i i both 0 or they are discordant, that is, the point L (t ) is never 3,i , j As z(t ) = 1 then y(t ) = 1 + > 1 and x (t )< 0. 0 0 0 z −z in the self-dual region. Similarly if σ = (+−−−). j i From Eq. (2)wehave Consider p , p with i > 4 and its parametric expression 3 i x (t ) = x t , x (t ) x (t ) x 0 0 i L (t ) : (5) y(t ) = (y − 1) t + 1. t t 0 0 If σ = (++++) then x < 0. Suppose that L (t ) belongs to i i 3 the self-dual region, then t < 0as x (t)> 0, but x + y < 1 i i Since x (t)< 0, we have that L(t ) is not in the self-dual so x (t ) + y(t)> 1. That is, the point L (t ) is never in the region. self-dual region. Similarly if σ = (+−−−). Case 3. σ is (++++) and σ is (+−−−). In conclusion we have that the only lines crossing the self- i j We now have that σ is either (+−++) or (+−−−), dual region will be p p for i = 1,..., n. In particular as any i , j 2 i with i < j. The case j < i is obtained permuting i with j. pair of them crosses at p , then they cannot cross inside the 123 752 Autonomous Robots (2021) 45:737–754 self-dual region. If we move p inside the self-dual region, along p p and so continuously, the sign sequence of p 2 4 remains the same. That is, we are describing a continuous path of Con f (R ) that is contained inside the stratum σ of p. It is only when p p crosses p p that the sign sequence 2 4 1 3 changes, that is, when the singularity loci is crossed at d . 1,2,3 Let L = p p and λ such that L (λ) ∈ p p .We 2,4 2 4 2,4 1 3 can assume, modulo orientation of L , that λ> 0 and 2,4 L (0) = p , in particular this means that for any t >λ we 2,4 2 have L (t ) with x-coordinate negative. Consider μ>λ 2,4 such that for any t >λ such that L (t ) belongs to some 2,4 p p ,wehave t >μ.For i = 2 consider the continuous i j map H :[0, 1]→ R as the constant map H (t ) ≡ p and i i i H as follows. H (t ) = μ(p − p )t + p , (6) 2 4 2 2 To check that H is a crossing map we need to check only H . Clearly H (0) = p and H is continuous. Consider 2 2 2 2 0 < t = < 1, then H (t ) ∈ p p , and as H is a linear 0 2 0 1 3 2 Fig. 19 Adjacency graph of Γ(m, n)-states, blue dashed lines denote a change for the state of q map this can happen only once. It remains to prove that the sign sequence of H (1) differs only by the sign of d with 1,2,3 respect to σ . We have that H (1) has negative x-coordinate, points in p, again for user-defined states such assumption so d changes sign as wanted. Furthermore, if any other 1,2,3 might not be true. determinant d changes sign, for (i , j ) = (1, 3), then 2,i , j As explained previously, if we consider the S -states, we d (t ) = 0for t ∈ (t , 1), as inside the self-dual region n 2,i , j 0 are effectively forgetting the labelling given to each point. it cannot happen. That is, there exists λ<ν < μ such that On the other hand, when using the ∼ -states we are able to L (ν) belongs to p , p , which is impossible. All in all, σ 2,4 i j track how far away we are from the “base-stratum” σ.Ifwe H ={H } is a crossing map, as wanted. i =1 are interested on the labels of the first m points and how their Note that, thanks to these two theorems we are able to con- distance change, we would define the following. struct Algorithm 1, and, thanks to the proof of Theorem 2, we can explicitly construct the crossing map between two Definition 3 (Γ(m, n)-States) Given two strata τ ,τ of 1 2 adjacent strata. Con f (R ),for i = 1, 2 we denote by σ the subsequence n i of the first signs, strata in Con f (R ). We say that τ m 1 and τ belong to the same S -state if they are in the same C Different states definitions 2 n S -state and σ is in the same ∼ -state of σ . We will denote n 1 σ 2 such equivalence relation as τ ∼ τ . 1 2 In Sect. 4 we proposed two different state definitions based (m,n) on S and on the topological structure of the stratification of The adjacency graph of such classes for n = 5 and m = 4is Con f (R ). A practitioner however might want or need to displayed in Fig. 19, note that unlike the ∼ -states, self-loops study the state of a cloth with particular (or less) focus on can now occur as they are a refinement of the S -states. a subset of points. For example, if q is a configuration of On the opposite case, if our intention is to study the state m points, subset of p ∈ Con f (R ), then one could group of the cloth, without giving importance to the labelling of q, together strata of Con f (R ) depending on the strata of p then we can define the following states. and that of q, or instead that of p \ q. In this appendix we will show other two state definition based on the S -states n Definition 4 (Γ(n, m)-States) Given two strata τ ,τ of 1 2 and ∼ -ones. Again we will assume that ∼ is defined using σ σ Con f (R ),for i = 1, 2 we denote by σ the subsequence n i as “base-stratum” the sequence of all positive signs. Even of the first signs, strata in Con f (R ). We say that τ m 1 if we show here only two cases, it is clear that depending on the cloth in analysis, the mesh properties but as well the and τ belong to the same ∼ -state if they are in the same 2 σ manipulation task in mind, different states can be defined. S -state and σ is in the same S -state of σ . We will denote n 1 m 2 For now on, we will assume that q are always the first m such equivalence relation as τ ∼ τ . 1 (n,m) 2 123 Autonomous Robots (2021) 45:737–754 753 The adjacency graph of such states for n = 5 and m = 4is displayed in Fig. 19. As the graphs displayed in Figs. 19 and 20 are not isomor- phic, we know that these two state definitions are different. Note that, as Γ(n, m)-states are a refinement of the ∼ -states, there cannot be self-loops in its adjacency graph. This does not always happen for the Γ(m, n)-states as they are a refine- ment of S -states, which do have self-loops. There are clearly a lot more possible state definitions than the ones we presented here. From our point of view, interest- ing ones can arise when considering instead of S subgroups of it, for example the one generated by the cycle (1, 2 ..., n). This would produce a refinement of S -states which is not identical to the one of ∼ . Furthermore one could use such states as in Definition 4 or Definition 3 to group together configuration that are equal after cyclic permutation of m,or n, points. References Aichholzer, O., Balko, M., & et al. (2018). Minimal geometric graph representations of order types. In Proceeding of 34th European workshop on computational geometry EuroCG’18 (pp. 21–1). Arnold, V. I. (1969). The cohomology ring of the coloured braid group. Mathematical Notes of the Academy of Sciences of the USSR, 5(2), 138–140. Bai, Y., Yu, W., & Liu, C. K. (2016). Dexterous manipulation of cloth. In Proceedings of the 37th annual conference of the European association for computer graphics (pp. 523–532). Eurographics Association. Borràs, J., Alenya, G., & Torras, C. (2020). A grasping-centered analy- sis for cloth manipulation. IEEE Transactions on Robotics, 36(3), 924–936. Canal, G., Alenyà, G., & Torras, C. (2019). Adapting robot task plan- ning to user preferences: An assistive shoe dressing example. Autonomous Robots, 43(6), 1343–1356. Canny, J. (1988). The complexity of robot motion planning. Cambridge: MIT Press. Cohen, F. R., Lada, T. J., & May, P. J. (1976). The homology of iterated loop spaces (Vol. 533). Berlin: Springer. Fulton, W. (1997). Young tableaux: With applications to representation theory and geometry (Vol. 35). Cambridge: Cambridge University Press. Geißer, F., Speck, D., & Keller, T. (2019). An analysis of the proba- bilistic track of the IPC 2018. In ICAPS 2019 workshop on the international planning competition (WIPC) (pp. 27–35). Grünbaum, B. (1972). Arrangements and spreads. Providence: Ameri- can Mathematical Society. Guan,P., Reiss, L.,Hirshberg,D.A., Weiss, A.,&Black,M.J. (2012). Drape: Dressing any person. ACM Transactions on Graph- ics (TOG), 31(4), 1–10. Hilaga, M., Shinagawa, Y., Kohmura, T., & Kunii, T. L. (2001). Topol- ogy matching for fully automatic similarity estimation of 3d shapes. In Proceedings of the 28th annual conference on Com- puter graphics and interactive techniques (pp. 203–212). Hiller, H. (1982). Geometry of Coxeter groups (Vol. 54). London: Pit- man Publishing. Fig. 20 Adjacency graph of Γ(n, m)-states, blue dashed lines denote Ivan, V., Zarubin, D., Toussaint, M., Komura, T., & Vijayakumar, S. a change for the state of q (Color figure online) (2013). Topology-based representations for motion planning and 123 754 Autonomous Robots (2021) 45:737–754 generalization in dynamic environments with interactions. The international conference on robotics and automation (ICRA) (pp. International Journal of Robotics Research, 32(9–10), 1151–1163. 2153–2160). IEEE. Jangir, R., Alenya, G., & Torras, C. (2020). Dynamic cloth manipula- tion with deep reinforcement learning. In 2020 IEEE international Publisher’s Note Springer Nature remains neutral with regard to juris- conference on robotics and automation (pp. 4630–4636). IEEE. dictional claims in published maps and institutional affiliations. Kemp, C., Edsinger, A., & Torres-Jara, E. (2007). Challenges for robot manipulation in human environments [grand challenges of robotics]. IEEE Robotics & Automation Magazine, 14(1), 20–29. Koganti, N., Tamei, T., Ikeda, K., & Shibata, T. (2017). Bayesian non- Fabio Strazzeri (https://www.iri. parametric learning of cloth models for real-time state estimation. upc.edu/staff/fstrazzeri) obtained IEEE Transactions on Robotics, 33(4), 916–931. his M.Sc. degree in Mathemat- Kriz, I. (1994). On the rational homotopy type of configuration spaces. ics at the University of Pisa and Annals of Mathematics, 139(2), 227–237. his Ph.D. degree at the Univer- Li, Y., Wu, J., Tedrake, R., Tenenbaum, J.B., & Torralba, A. sity of Southampton. During Ph.D. (2019). Learning particle dynamics for manipulating rigid bod- project “Topological Data Fusion ies, deformable objects, and fluids. In International conference on – A novel approach for high- learning representations. dimensional data integration, anal- Ma, Q., Tang, S., Pujades, S., Pons-Moll, G., Ranjan, A., & Black, M.J. ysis and visualisation”, he devel- (2019). Dressing 3d humans using a conditional mesh-vae-gan. oped a novel clustering algorithm, arXiv preprint arXiv:1907.13615. Morse, which integrates combi- Milnor, J. W., & Stasheff, J. D. (1975). Characteristic classes. Annals natorial topology and graph the- of Mathematics Studies, 76, 80. ory. He applied it to multi ’omics Monk, D. (1959). The geometry of flag manifolds. Proceedings of the data integration and analysis, London Mathematical Society, 3(2), 253–286. together with other topological methods, for patient stratification and Mrowca, D., Zhuang, C., Wang, E., Haber, N., Fei-Fei, L. F., Tenen- identification of disease sub-phenotypes. He is currently a Postdoc- baum, J., & Yamins, D. L. (2018). Flexible neural representation toral Researcher at the Institut de Robòtica i Informàtica Indus- for physics prediction. In Advances in neural information process- trial (CSIC-UPC) in Barcelona, for the project CLOTHILDE—Cloth ing systems (pp. 8799–8810). manipulation learning from demonstrations. Pokorny, F. T., Stork, J. A., & Kragic, D. (2013). Grasping objects with holes: A topological approach. In 2013 IEEE international conference on robotics and automation (pp. 1100–1107). IEEE. Carme Torras (https://www.iri. Pons-Moll, G., Pujades, S., Hu, S., & Black, M. J. (2017). Clothcap: upc.edu/people/torras) is Research Seamless 4d clothing capture and retargeting. ACM Transactions Professor at the Institut de Robòtica on Graphics (TOG), 36(4), 1–15. i Informàtica Industrial (CSIC- Pumarola, A., Agudo, A., Porzi, L., Sanfeliu, A., Lepetit, V., & Moreno- UPC) in Barcelona, where she Noguer, F. (2018). Geometry-aware network for non-rigid shape leads a research group on assis- prediction from a single view. In Proceedings of the IEEE confer- tive and collaborative robotics. ence on computer vision and pattern recognition (pp. 4681–4690). She received M.Sc. degrees in Roudneff, J. P. (1986). On the number of triangles in simple arrange- Mathematics and Computer Sci- ments of pseudolines in the real projective plane. Discrete Math- ence from the University of ematics, 60, 243–251. Barcelona and the University of Sánchez-Riera, J., Östlund, J., Fua, P., & Moreno-Noguer, F. (2010). Massachusetts, respectively, and a Simultaneous pose, correspondence and non-rigid shape. In 2010 Ph.D. degree in Computer Sci- IEEE computer society conference on computer vision and pattern ence from the Technical Univer- recognition (pp. 1189–1196). sity of Catalonia (UPC). Prof. Tor- Simmons, G. (1973). A maximal 2-arrangement of sixteen lines in the ras has published six research books and about three hundred papers projective plane. Periodica Mathematica Hungarica, 4(1), 21–23. in robotics, machine learning, geometric reasoning, and neurocomput- Smith, C., Karayiannidis, Y., Nalpantidis, L., Gratal, X., Qi, P., ing. She has supervised 18 Ph.D. theses and led 16 European projects, Dimarogonas, D. V., et al. (2012). Dual arm manipulation-a survey. the latest being her ERC Advanced Grant project CLOTHILDE— Robotics and Autonomous systems, 60(10), 1340–1353. Cloth manipulation learning from demonstrations. Prof. Torras is Strommer, T. O. (1977). Triangles in arrangements of lines. Journal of IEEE and EurAI Fellow, member of Academia Europaea and the Combinatorial Theory, Series A, 23(3), 314–320. Royal Academy of Sciences and Arts of Barcelona. She has served Torras, C. (2016). Service robots for citizens of the future. European as Senior Editor of the IEEE Transactions on Robotics, and Associate Review, 24(1), 17–30. Vice-President for Publications of the IEEE Robotics and Automation Torras, C., Thomas, F., & Alberich-Carramiñana, M. (2006). Stratify- Society. Convinced that science fiction can help promote ethics in AI ing the singularity loci of a class of parallel manipulators. IEEE and robotics, one of her novels—winner of the Pedrolo and Ictineu Transactions on Robotics, 22(1), 23–32. awards—has been translated into English with the title The Vestigial Totaro, B. (1996). Configuration spaces of algebraic varieties. Topology, Heart (MIT Press, 2018) and published together with online materials 35(4), 1057–1067. to teach a course on “Ethics in Social Robotics and AI”. Yan, M., Zhu, Y., Jin, N., & Bohg, J. (2020). Self-supervised learning of state estimation for manipulating deformable linear objects. IEEE Robotics and Automation Letters, 5(2), 2372–2379. Yuan, W., Hang, K., Song, H., Kragic, D., Wang, M. Y., & Stork, J. A. (2019). Reinforcement learning in topology-based representation for human body movement with whole arm manipulation. In 2019

Journal

Autonomous RobotsSpringer Journals

Published: Jul 10, 2021

Keywords: Configuration space; Deformable objects; Cloth state; Topological representation; Stratification

There are no references for this article.