Method and apparatus for controlling robots and the like using a bubble data hierarchy placed along a medial axis

Abstract: A robotic controller or similar machine represents the shape of an object as a hierarchy of bubbles. The position and radius of each of the bubbles is determined by first calculating the coordinates of the medial axis of the object and then creating a hierarchy of sbubbles all of which are disposed on the medial axis. The bubbles may be generated using a top-down algorithm which sequentially places bubbles around portions of the object represented by sub-divisions of branches of the medial axis. Alternatively the bubbles may be placed by using a bottom-up algorithm which combines the smallest of a large number of bubbles centered on the medial axis with its smallest neighbour to generate successively higher level bubbles in the hierarchy.

Description: The invention relates to a method for detecting a potential collision between a first object (O) and a second object, whereby space occupied by the first object is represented by a bubble hierarchy. The invention further relates to a robotic controller for detecting a potential collision between a first object (O) and a second object, comprising memory means (30-42) for representing space occupied by the first object by a bubble hierarchy. BACKGROUND OF THE INVENTION In the field of robotics and automation there has recently been much interest in the problem of choosing paths for a set of objects so they do not collide. Hereinafter, such objects include machines as objects per se, and machines for handling etc. such objects, and also a part of the set may be stationary objects. Such methods are described, for example, in EP-A-317 020 (PHA 21,413), EP 365 626 (PHA 21,431), EP 375 055 (PHA 21,477) and US Patent Application Serial No. 392,636, filed August 11, 1989 (PHA 21,515). A simpler problem is collision detection among such objects that is: the determination of whether or not a collision will occur when the paths and positions of objects are determined. Prior art collision detection algorithms are described in "A Study of the Clash Detection Problem in Robotics", S. Cameron, 1985, IEEE International Conference on Robotics and Automation , p. 488 ff., which is incorporated herein as background material. The prior art teaches that the size and shape of objects may be modeled as a series of overlapping circles (in two dimensions) or spheres (in three dimensions). These principles are described, for example, in "A Spherical Representation of the Human Body for Visualizing Movement", S. Badler et al., Proceedings of the IEEE , Vol. 67, No. 10, October 1979 and in published U.K. Patent Application 2,196,763A (May 5, 1988). The prior art also teaches that a hierarchy of such circles or spheres may be effectively used to represent the shape of an object in a data structure at varying levels of detail. See for example "Using an Efficient Collision Detector in the Solution of the Find-Path Problem of Industrial Robots", Sawatzky, El-Zorkany, SPIE In Soc. Opt. Eng. , Vol. 579, pp. 131-141 (1985). The prior art also recognizes that, in some cases, the centers of spheres which were used to represent an object may be used to find the medial axis or skeleton of an object. See, for example, "Decomposition of Three-Dimensional Objects into Spheres", 0'Rourke and Badler, IEEE Transactions on Pattern Analysis and Machine Intelligence , Vol. PAMI-1, No. 3, July 1979. In the description and claims which follow, spheres and circles of the above-mentioned data structure is referred to as a bubble hierarchy. In a typical bubble hierarchy, the top or root of the hierarchy is a single spherical bubble, the enclosing bubble which encloses an entire object. This is the most coarse level of detail in the data structure. Within the top bubble, there are a small plurality of bubbles, each of which encloses a portion of the object and which, between them, enclose the entire object. Within each of the bubbles at this second, successor level, there may be another plurality of bubbles, each of which encloses a smaller portion of the object. The expansion of bubbles to enclose finer level of detail continues until the bottom of the bubble hierarchy is reached. The bubbles at the bottom of the hierarchy each describe a small fragment of the object. In the simplest case, these bubbles are assumed to be solid; i.e. every point in the interior of such a bubble is assumed to be in the interior of the object. A bubble hierarchy is useful for determining whether a point is inside or outside of an object and whether two objects (possibly each represented by separate bubble hierarchies) intersect. The general technique for answering these questions is called bubble bursting. In a typical use of bubble bursting for determining whether a point is inside an object, a point-in-bubble test is first applied to the enclosing bubble. If this succeeds, (i.e., the point is found to be inside the enclosing bubble) then the bubble is burst, revealing the group of successor bubbles immediately below it in the hierharchy. The test is repeated with each of these bubbles. Wherever the test succeeds, the tested bubble is burst, revealing the bubbles at the level immediately below it and those bubbles are then tested. The procedure terminates if the point is found to be inside a bubble at the bottom of the hierarchy (in which case the point is inside the object) or if the point is found to be outside all the remaining bubbles after a certain number have been burst. While techniques for using bubbles to plan and control the motion of machines and robots are well-known in the art, the problem of finding an optimum placement of bubbles to represent a given object remains. Computational time can be decreased and machine speed increased if an optimal bubble placement is determined, yet many bubble placement methods which have been suggested in the prior art operate efficiently in two dimensional systems but which become complex and time consuming when expanded to the representation of three dimensional objects and systems. A method and apparatus as described in the preamble is known from the European Patent Application EP-A-0 268 317. This reference teaches the usage of an estimate for the space occupied by a stationary object, by means of a bubble hierarchy. At the highest level, one bubble represents the object in a very coarse way. This level yields a pessimistic view on the collision danger between a point and the object, i.e. when the point is inside the bubble it could collide with the object but that is not certain and must be verified at a more detailed next level down. At that next level down, the object is represented by two or more smaller bubbles that taken together represent the object in a finer way. At the lowest level, the object is represented by bubbles that are assumed to be solid. When taken together, those solid bubbles constitute the object as precisely as desired for the application at hand. SUMMARY OF THE INVENTION It is an object of the invention to provide a method as described in the preamble, which method is efficient with respect to the required computational time. To this end the method according to invention is characterized in that the method includes the steps of: locating the medial axis system (B) of the first object, creating the bubble hierarchy on this medial axis system (20 - 26), and detecting the potential collision by determining whether the second object collides with any of the bubbles in the bubble hierarchy. The creating of the bubble hierarchy requires a relatively small computational effort and results in an efficient application of the method in detecting collisions. An embodiment of the method according to the invention is characterized in that the step of creating the hierarchy comprises a top-down procedure of: first placing a root bubble which is centred at the centre of the medial axis system and has a radius substantially equal to the maximum distance from said centre to the contour of the first object, next, if the medial axis system has a plurality of branch lines, placing a plurality of first successive bubbles each of which encompasses a distinct part of the object which is described by one of said branch lines, and then successively dividing each line of the medial axis system into at least two new line parts and placing a sequence of next successive bubbles each of which encompasses a distinct part of the first object which is described by one of said new line parts. This procedure of creating the bubble hierarchy is easy to implement and requires little computational effort. An embodiment of the method according to the invention is characterized in that the step of creating the hierarchy comprises a bottom-up procedure of: first representing the medial axis system as a large plurality of discrete points, next placing the centres of a plurality of lowest level bubbles at said discrete points, where the radius of each bubble is equal to the minimum distance from the corresponding centre point to the contour of the first object, and then successively creating new bubbles by merging the lowest level bubbles to successively create higher order bubbles into the bubble hierarchy and repeating this step until a single one root bubble remains. This bottom-up procedure of creating the bubble hierarchy is an easy to implement alternative and requires little computational effort. The bubble transform method of the present invention is particularly useful since it is easily scaled from two to three or more dimensions with minimal increases in the computational complexity. The robotic controller according to the invention is characterized in that the controller includes computational means for: locating the medial axis system (B) of the first object, creating the bubble hierarchy on this medial axis system (20 - 26) to be stored in the memory means, and detecting in the memory means the potential collision by determining whether the second object collides with any of the bubbles in the bubble hierarchy. This provides an apparatus which is capable of executing the methods of the invention. Other advantageous embodiments of the method and the controller according to the invention are recited in the dependent claims. DESCRIPTION OF THE DRAWINGS The invention can be understood with reference to the attached drawings in which: Figure 1 conceptually illustrates the medial axis system of an object; Figures 2 and 3b are flow charts of a top down method for placing bubbles along the medial axis system; Figure 3a illustrates the geometry used in the program of Figure 3b; Figure 4 illustrates the geometry used in a bottom-up method for placing bubbles; and Figure 5 is a data structure for representing a bubble hierarchy. DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the invention will be explained hereinafter, inter alia, with reference to the Appendix, that contains a listing, in c source code, of computer programs which implement the invention. Now, the medial axis system of an object, or for short, the medial axis, is realized by skeletonization of the object which is a data processing operation on a data structure that represents the shape of the physical object. Such data structure may be given in various ways. A very elementary organization is to give, with respect to a particular reference origin and rotational orientation of the physical object, a set of rastered pixels or points that are inside the object, whereas all other rastered pixels or points are outside the object. This approach caters for objects of arbitrary shape, but the granulation of the object remains finite. Another organization of the data structure is to limit the volume of the object by a set of intersecting planes, such as flat planes, cylinders and globes. By themselves, the planes may have complicated mathematical expressions. This approach has infinitely fine granularity, but the decision of declaring a particular coordinate value inside or outside the object may require appreciable data processing. Moreover, the shape of the object should have an analytical expression. Now, skeletonization is a known operation in image processing. Its importance lies in the data reduction of a set of image points to a set of line segments, the "medial axis" or skeleton. in the continuous case the medial axis of an object is defined to be a line with the same topology as the object itself connecting points which lie midway between boundary elements of the objects. In the discrete case, the medial axis satisfies four conditions: it has the same connectedness as the object; it is one pixel thick; it preserves the end points; and it lies in the middle of the object. By itself, the medial axis of certain objects may be of a very elementary form, such as when the object is a cylinder. On sthe other hand, the medial axis may contain various different branches, bifurcations, etcetera. Figure 1 illustrates the medial axis of a two dimensional rectangular object 0 having a contour C. The medial axis consists of a group of five connected line segments or branches B. Further properties of the medial axis, together with various algorithms for calculating its coordinates, are described in "Path Planning in a Three Dimensional Environment", Ruff and Ahuja, IEEE Catalog, No. 84CH2046-1, 1984 and in "Improved Metrics in Image Processing Applied to the Hilditch Skeleton", Verwer, IEEE Catalog, No. CH2614-6/88/0000/0137. For brevity, the generation of the medial axis itself will not be discussed further herein. In a preferred embodiment which is implemented in the routines with the prefix "EUSK" listed in the Appendix, the medial axis is calculated using the Hilditch Skeletonization method by testing Hilditch conditions each time all pixels with a certain distance value have been stored. The calculation uses a bucket sort with directional information for improved efficiency. The invention is not limited, however, to any specific algorithms for the calculation of medial axis coordinates. In many applications of bubble hierarchies in collision avoidance and robotics, the contours of objects are accurately known and pre-digitized, since the objects are often designed and produced using computer aided design (CAD) data bases. The position of the medial axis can then be calculated directly without the necessity for first determining a bubble placement geometry, as taught by O'Rourke and Badler (supra). In accordance with the invention, a bubble hierarchy representing an object is derived by placing bubbles on the medial axis of the object. In a first embodiment utilized to generate the bubble hierarchy, as illustrated in Figure 2, the root bubble is first placed around the center of gravity of the object (20) and has a radius equal to the maximum distance from the center of gravity to the contour. The first level successors of the root bubble each encompass the object parts described by the branches of the medial axis (22). Each next level of the hierarchy cuts each branch in two to yield two new bubbles which sbetter represent the object (24), although in certain circumstances another factor than two would be appropriate. After the division, the next bubble level is generated (26). At each level of bubbles, all -inside- points or pixels of the object are within at least one of the bubbles at that level. Various strategems or iteration steps sequences may be required to reach such effect. The loop consisting of blocks 24, 26 may be traversed a predetermined number of times, or some creterion may be implemented (not shown) to decide whether or not a further traversal is required. Now, by way of example, the method according to the invention is illustrated in a two-dimensional geometry with reference to Figure 3a, for each line piece L of the medial axis branch, the following procedure, illustrated in the flow chart of Figure 3b, is used to define the encompassing bubble. The line segment is first represented as a list of discrete medial axis points, which are depicted along that segment. 3.1 Two pointers, p1 and p2 are initialized, respectively, to the beginning p1(o) and end p2(o) of the list. Pointer p1 has a variable r1 associated with it which is initilaized to the value r1(o) of the distance from the point at the start of the list to the contour of the object, that is the closest point on the contour. Likewise, pointer p2 has a variable r2 associated with it which is initialized to the value r2(o) of the distance from the point at the end of the list to the contour. 3.2 The actual values of the variables r1 and r2 are compared and the variable having the lowest value, in the particular initial case r2, is incremented by the distance d1. 3.3 The associated pointer, p1 or p2, previously pointing to the list element that had its variable incremented in 3.2, is adjusted to point to the next element of the list (if p1(o)) or to the previous element of the list (if p2(o)) and the process reverts to 3.2 unless the branching condition of 3.4 becomes true. 3.4 The process stops if p1 points to the same element as p2. 3.5 The bubble, encompassing the geometry represented by this line segment of the medial axis has its center at the point on the line now indicated by p1 and p2 and has a radius equal to the maximum of the values of r1 and r2. In practice, it has been found that the process so sdescribed gives good results. In cases where curve c would have a big bulge in the middle of Figure 3a, leading to a large value of the actual radius that could extend beyond the incremented values of r1 and r2, usually the local skeleton has an additional branch that should generate its own bubble(s) separately. The looping process (steps 3.2, 3.3) terminates if dividing a medial axis segment would be irrelevant, such as when it only has one element of the list. Furthermore, whereas the example related to a two-dimensional geometry, similar procedure would lead to constructing a hierarchical bubble set around a medial axis system which now could also extend in three dimensions. For brevity, this procedure, which is virtually identical to the one described above only circles now being represented by bubble "globes", has not been described in detail. The top-down method is implemented in two dimensions as "bubble.c" in the Appendix. DESCRIPTION OF THE BOTTOM-UP PROCESS A second, alternate method for placing bubbles on the medial axis starts at the lowest (finest representation) level of the bubble hierarchy and combines bubbles from the bubbles from the bottom up until the root bubble is generated. The medial axis is divided into a larger number of discrete points and to each point thereof a bubble is assigned, the center of the bubble being located at the point in question and the radius of the bubble being equal to the minimum distance from the point to the contour. If the number of points is sufficiently large, all points within the contour lie within at least one lowest-level bubble. The smallest bubble generated in the previous step is merged or combined with its smallest neighbour or neighbours to generate a new bubble and the process is repeated until the root bubble is found. With reference to Figure 4 (two dimensions), the merge operation finds a new bubble from two old bubbles with the following formulas, that apply to two or three dimensions: r' = (r1+j+r2)/2 x' = 1/2(x1+x2+ r1-r2 j (x1-x2)) y' = 1/2(y1+y2+ r1-r2 j (y1-y2)) z' = 1/2 (z1+z2+ r1-r2 j (z1-z2)); where r' is the new radius, r1 and r2 are the radii of the old bubbles and j is the distance between the centers of the old bubbles, (x', y', z') are the three dimensional coordinates of the center of the new bubble, and (x1, y1, z1) and (x2, y2, z2) are the coordinates of the respective centers of the old bubbles. As is clear from Figure 4, the center of the "new" bubble need not lie on the interconnection line between the centers of the bubbles that were combined into it. Similar formulae would apply in case of combination of three or more bubbles, the distance j then being between the two extreme bubbles of the subset. Furthermore in such case, the outer bubbles could possibly carry less weight than the intermediate bubbles. The bottom-up method is implemented as "blower,c" in the Appendix. The bubble placement method of the present invention has an advantage over those of the prior art in that is is essentially dependent only on distance calculations and may thus be readily expanded as the dimensionality of the system increases without substantial increase in the complexity of the calculation. Figure 5 represents a data structure for a bubble hierarchy in a computer. Each bubble is represented as a record, which, as indicated for root bubble 30 indicates variables specifying the coordinates of the bubble center (x/32, y/34, z/36), the bubble radius (r/38) an pointers 40, 42 to the successor bubbles S, D in the hierarchy tree. For the successor bubbles, the record structure is similar. As told, the structure of the tree need not be binary. The pointers are used in the bubble-bursting procedure.

Claims: A method for detecting a potential collision between a first object (O) and a second object, whereby space occupied by the first object is represented by a bubble hierarchy, characterized in that the method includes the steps of: locating the medial axis system (B) of the first object, creating the bubble hierarchy on this medial axis system (20 - 26), and detecting the potential collision by determining whether the second object collides with any of the bubbles in the bubble hierarchy. A method as claimed in Claim 1, wherein the step of creating the hierarchy comprises a top-down procedure of: first placing a root bubble which is centred at the centre of the medial axis system and has a radius substantially equal to the maximum distance from said centre to the contour of the first object, next, if the medial axis system has a plurality of branch lines, placing a plurality of first successive bubbles each of which encompasses a distinct part of the object which is described by one of said branch lines, and then successively dividing each line of the medial axis system into at least two new line parts and placing a sequence of next successive bubbles each of which encompasses a distinct part of the first object which is described by one of said new line parts. A method as claimed in Claim 1, wherein the step of creating the hierarchy comprises a bottom-up procedure of: first representing the medial axis system as a large plurality of discrete points, next placing the centres of a plurality of lowest level bubbles at said discrete points, where the radius of each bubble is equal to the minimum distance from the corresponding centre point to the contour of the first object, and then successively creating new bubbles by merging the lowest level bubbles to successively create higher order bubbles into the bubble hierarchy and repeating this step until a single one root bubble remains. A method as claimed in Claim 3, wherein said creating new bubbles is done by merging any smallest bubble remaining with its smallest neighbour(s) to create a new bubble and repeating this step until only one root bubble remains. A method as claimed in Claim 3 or 4, wherein two old bubbles are merged to yield a new bubble in accordance with the formulae: r' = (r1 + j + r2) / 2 x' = 1/2 (x1 + x2 + (r1 - r2) (x1 - x2) / j) y' = 1/2 (y1 + y2 + (r1 - r2) (y1 - y2) / j) z' = 1/2 (z1 + z2 + (r1 - r2) (z1 - z2) / j) wherein r1 and r2 are the radii of the old bubbles, j is the distance between the centres of the old bubbles, (x1, y1, z1) and (x2, y2, z2) are the coordinates of the centres of the old bubbles, r' is the radius of the new bubble, and (x', y', z') are the coordinates of the centre of the new bubble. A robotic controller for detecting a potential collision between a first object (O) and a second object, comprising memory means (30-42) for representing space occupied by the first object by a bubble hierarchy, characterized in that the controller includes computational means for: locating the medial axis system (B) of the first object, creating the bubble hierarchy on this medial axis system (20 - 26) to be stored in the memory means (30-42), and detecting in the memory means (30-42) the potential collision by determining whether the second object collides with any of the bubbles in the bubble hierarchy. A controller as claimed in Claim 6, wherein the computational means include means for creating a hierarchy of bubbles starting from a sequence of lowest level bubbles which have centres that are disposed on the medial axis system.

Inventors: VERWER BERNARD JOHANNA HENDRIC, WARMERDAM THOMAS PETRUS HENDRI, VERWER, BERNARD JOHANNA HENDRICUS, WARMERDAM, THOMAS PETRUS HENDRICUS
Applicants: PHILIPS ELECTRONICS NV, PHILIPS ELECTRONICS N.V.
Application year: 1990
Main classification: G05B19
IPC codes: G05B19, B25J9