1. Field of the Invention
The present invention relates to a moving body placement determining method, a measuring apparatus, a machining apparatus, and a storage medium.
2. Description of the Related Art
Measuring apparatuses or machining apparatuses should preferably have a total processing time required for measurement or machining as short as possible. Here, the measuring apparatuses are apparatuses that move a measurement tool relative to an object to be measured so as to perform a measurement operation for desired points (target points) on the object to be measured using the measurement tool. Also, the machining apparatuses are apparatuses that move a machining tool relative to an object to be machined so as to perform a machining operation for desired points (target points) on the object to be machined using the machining tool. In this case, when the measurement tool or the machining tool is a moving body, a fewer number of times of movement of the moving body is advantageous for reducing a total processing time. Thus, there have been proposed techniques that determine the placements of a moving body minimally required for covering (encompassing) all points expected to be measured or all points expected to be machined. WO 2003/064107 discloses a machining planning method for simply dividing all the machining areas into rectangulars having a predetermined size in both X-axis direction and Y-axis direction along which beams are scanned at high speed. In the method, division numbers of rectangulars in both X-axis direction and Y-axis direction are compared to each other to thereby set a scanning direction having a smaller division number, divided areas, and the placement of the moving body as a measurement condition.
However, the effect of the method disclosed in WO 2003/064107 depends greatly on the machining area of an object to be machined, and thus, can only be expected for a simple surface area such as rectangular or square. The first reason for this is that the scanning direction of the moving body is limited in the method and the second reason for this is that a condition to a machining accuracy (accuracy relative to the moving body) is not taken into account in the method. Even when the method is applied to a machining area undulated in the horizontal direction, such as an S-shaped surface, the result in which the number of placements of the moving body is minimized is not necessarily obtained due to the first reason. Even when the method is applied to a machining area such as a curved surface, a machining accuracy cannot be ensured by the limitations of an angle of incidence and the depth of focus due to the second reason.
The present invention provides, for example, a method for determining the placements and the moving path of a moving body minimally required for covering target points on an object while ensuring accuracy of processing by the moving body which performs a measurement operation or a machining operation.
According to an aspect of the present invention, a method for determining a placement of a moving body that moves to face an object and performs processes at a plurality of target points on the object is provided that includes a first step of setting a plurality of processable areas capable of the processes by the moving body to a plurality of the target points; a second step of determining candidates regarding the placement of the moving body for each of the processable areas set in the first step; and a third step of determining the placement of the moving body and the moving path of the moving body by solving a Generalized Traveling Salesman Problem using the candidates regarding the placement of the moving body determined in the second step.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
processable area candidates before and after solving a Set Covering Problem (SCP).
Hereinafter, preferred embodiments of the
present invention will be described with reference to the drawings.
Firstly, a description will be given of a moving body placement determining method according to a first embodiment of the present invention. The determining method may be employed for an industrial apparatus (hereinafter simply referred to as “apparatus”) such as a measuring apparatus or a machining apparatus. Firstly, an object (hereinafter referred to as “work”) such as an object to be measured or an object to be machined is present, and a plurality of points to be measured or a plurality of points to be machined (hereinafter referred to as “target points”) is set on the work. The apparatus moves a measurement tool or a machining tool (hereinafter referred to as “moving body”) relative to a work so as to perform measurement or machining (hereinafter collectively referred to as “processing”). Note that the determining method may be executed as a program by a general purpose information processing device (computer) or may also be executed by an information processing device provided in an apparatus to be described below. Firstly, a description will be given of the overall flow of the moving body placement determining method according to the present embodiment. Next, a description will be given of a case where the method is specifically applied to an apparatus.
Next, normal directions respectively for the target points are determined with reference to work information and accuracy condition information in step S12 (step 1B) . The normal directions determined respectively for the target points may be seen as geometrical bearings at which the apparatus performs processing for the respective target points, and thus, may be one of parameters for determining accuracy of processing.
Next, an angle between the normal vector of each of the target points and the normal vector of another target point is determined for each of the target points in step S13 (step 1C). Note that, although it is preferable that the angle determined herein is determined from each combination of all normal vectors, a part of the combinations may be omitted when there is a constraint on a calculation time or the like.
Next, it is determined in step S14 (step 1D) whether or not the angle between normal vectors determined in step S13 is equal to or less than a threshold value. The threshold value used herein is determined in advance from accuracy condition information about a direction along which the moving body performs processing. The fact that the angle is equal to or less than a threshold value means that target points respectively corresponding to two normal vectors at that time satisfy desired accuracy even if the moving body performs processing while maintaining the same posture.
Next, a processable area candidate is set for each target point in step S15 (step 1E). Here, the term “processable area candidate” refers to a set of target points which are determined in step S14 to satisfy desired accuracy even if the moving body performs processing while maintaining the same posture and a candidate which may be set as a processable area in the following step.
In the subsequent steps from step S16 to step S19, the processable area candidates set respectively for the target points in step S15 are defined as a Set Covering Problem (hereinafter abbreviated as “SCP”) so as to obtain a solution. Firstly, information about the processable area candidates set respectively for the target points in step S15 is defined as a precondition in step S16 (step 1F).
Next, the cost of solving the SCP is defined as a precondition in step S17 (step 1G). In this case, the cost is the number of processable area candidates required for covering all the target points.
Next, the SCP is defined in step S18 (step 1H) so as to output a solution where the cost is minimized using the preconditions defined in steps S16 and S17. Here, database is created in accordance with the data format of a SCP solving unit. Note that an algorithm for the SCP used herein is not limited to a specific method but any algorithm may be used provided that it calculates a combination such that the number of processable areas is minimized or sub-minimized. For example, a method for calculating an exact solution, such as Mixed Integer Programming or the like, may be used or a method for calculating a near-optimal solution, such as a moderating method or the like, may also be used. The SCP will be described in detail below.
The processable areas are determined in step S19 (step 1I) by solving the SCP defined in step S18. The SCP is a problem for selecting a combination of subsets such that the number of subsets required for covering all the elements of a set U is minimized when the set U and classes of its subsets, i.e., S1, S2, . . . , and Sm are given. Note that a union of subsets S1, S2, . . . , and Sm is assumed to be equal to the set U. An algorithm used for solving the SCP is Mixed Integer Programming. Mixed Integer Programming is an algorithm for calculating an exact solution to the given problem but may take a longer calculation time depending on a problem to be solved. Here, the term “exact solution” refers to a solution in which the cost is ensured to be minimized. Thus, as a method for reducing a calculation time, Mixed Integer Programming may be combined with a branch and bound method. In order to further reduce a calculation time, a moderating method for obtaining a near-optimal solution by moderating constraints may also be used. Here, the term “near-optimal solution” refers to a solution which is regarded as useful from the viewpoints of practical use because the cost is not ensured to be minimized but is sufficiently small as compared with other solutions. In particular, in the present embodiment, the processable areas minimally required for covering all points expected to be measured or all points expected to be machined can be determined by solving the SCP using these methods.
Next, the normal direction of the approximate plane determined in step S211 is determined in step S212 (step 2A-2). The normal direction of the approximate plane may be seen as a geometrical bearing at which the apparatus performs processing for the approximate plane, and thus, may be one of parameters for determining accuracy of processing. It is preferable that the normal direction determined herein is determined for each approximate plane from the viewpoints of reduction in a calculation load imposed until the placement, of the moving body is finally determined. Note that, when the placement of the moving body in which accuracy of processing is ensured more strictly is desired to be determined, a plurality of normal directions may also be determined for one approximate plane. The same applies to the case where the approximate plane is in a simple curved shape in step S211.
The posture of the moving body which is capable of perform processing for each processable area with desired accuracy is determined in step S213 (step 2A-3) using information about the normal direction determined in step S212 and accuracy condition information about a direction along which the moving body performs processing.
Aside from the method described with reference to the flowchart in
Moving body placement candidates are set for each target point in step S22 based on information about the posture of the moving body determined in step S21 and accuracy condition information about the direction and distance by which the moving body performs processing. In other words, information about the coordinates of the moving body is added to information about the posture of the moving body, so that candidates for the placement of the moving body at which posture and at which coordinates with respect to each target point are set. Although the number of moving body placement candidates set for each target point may be any, the number is preferably as many as possible from the viewpoints of the confidence of a finally obtained solution. Note that the number is variable depending on the load on computation processing performed until the moving body placement candidates are set or the load on computation processing in step S3 and subsequent steps. Examples of a method for setting moving body placement candidates include a method for setting moving body placement candidates which are equidistantly spaced apart from one another on a three-dimensional space, a method for setting moving body placement candidates which are equiangularly spaced apart from one another about the center of the target point, and the like. The method for setting moving body placement candidates may vary with the shape of a work, the specification of a moving body, or the like.
Next, the cost of solving the GTSP is defined as a precondition in step S32 (step 3B). In this case, the cost is a total travel time of a moving body required for traveling ail the target points.
The GTSP is defined in step S33 (step 3C) so as to output a solution where the cost is minimized using the preconditions defined in steps S31 and S32. Here, database is created in accordance with the data format of a GTSP solving unit. Note that an algorithm for the GTSP used herein is not limited to a specific method but any algorithm may be used provided that it calculates a combination such that the total travel time of the moving body is minimized or sub-minimized. For example, a method for calculating an exact solution may be used or a method for calculating a near-optimal solution may also be used. A detailed description will be given below of a GTSP and a Traveling Salesman Problem (hereinafter abbreviated as “TSP”) which is a similar algorithm of the GTSP.
Next, a detailed description will be given of step S4 together with the description of a GTSP and a TSP. Firstly, a description will be given of a TSP. The TSP is a problem for determining a path on which the total sum of costs required for looping all the nodes by passing through them only once is minimized in a graph in which a plurality of nodes and a cost of moving between these nodes are defined. The TSP may also be a Symmetric Traveling Salesman Problem (hereinafter abbreviated as “STSP”). The TSP may further be an Asymmetric Traveling Salesman Problem (hereinafter abbreviated as “ATSP”). The ATSP is a problem having different costs between nodes depending on the orientation of movement, whereas the STSP is a problem having the same cost between nodes regardless of the orientation of movement. An ATSP can be converted into an STSP. In practice, when an ATSP is solved, the ATSP is often converted into the STSP so as to be solved by using an STSP solving method. Examples of the STSP solving method include a method for obtaining an exact solution and a method for obtaining a near-optimal solution. In particular, examples of a method for obtaining a near-optimal solution in a short time include the Lin-Kernighan method, a simulated annealing method, a heuristic solving method such as genetic algorithms, and the like.
Next, a description will be given of a GTSP. The GTSP is a problem for determining a path on which the total sum of costs required for looping all the clusters by passing through them only once is minimized in a graph in which a plurality of clusters having sets of a plurality of nodes and a cost of moving between nodes belonging to different clusters are defined. In particular, the path determined by the TSP passes through all the nodes, whereas the path determined by the GTSP passes through only one of nodes in each cluster. In other words, the GTSP is a problem for determining the sequence of visiting clusters so as to minimize the cost of looping and selecting one node from a plurality of nodes in each cluster in a simultaneous manner. A GTSP can be converted into an ATSP. Thus, when a GTSP is solved, the GTSP can be converted into the ATSP so as to be solved by using an ATSP solving method. As described above, when an ATSP is solved, the ATSP can further be converted into the STSP so as to be solved by using an STSP solving method. Here, an exact solution to the converted STSP is ensured to be a feasible solution and an exact, solution to the original GTSP. On the other hand, a near-optimal solution to the converted STSP is not ensured to be a feasible solution to the original GTSP. In other words, the GTSP is a problem for visiting all clusters only once, but a near-optimal solution to the converted STSP may also include a situation where one cluster is visited for multiple times. By expanding the Lin-Kernighan method to the GTSP, a near-optimal solving method for the GTSP may also be directly used without converting the GTSP to the STSP. In particular, in the present embodiment, the moving body placement selected as the placement where the cost is minimized from among the moving body placement candidates and the moving path of the moving body can be determined simultaneously by solving the GTSP using these methods.
Next, a description will be given of the case where the aforementioned moving body placement determining method is specifically applied to an apparatus. Here, as an example, the moving body placement determining method according to the present embodiment is applied to a measuring apparatus that contactlessly measures the distance between a moving body and a work or the shape of the work by projecting light from the moving body to the work.
Next, a detailed description will be given of the flow for determining the placement Q of the moving body 11 provided in the measuring apparatus 100 in accordance with steps from step S1 to step S4. Firstly, when processing is started in step S1, the coordinates of the target points P, the shape of the work 10, and the placement of the work 10 as shown in
Next, the normal directions N (N1 to N5) are respectively determined for the target, points P in step S12.
Next, an angle between the normal vector of each of the target points P and the normal vector of another target point P is determined in step S13.
Next, it is determined in step S14 whether or not each of the angles A1, A2, A4, and A5 between the normal vectors N1, N2, N4, and N5 determined in step S13 is equal to or less than a threshold value. The threshold value used herein may be the maximum angle of incidence of the moving body 11 input, in step S11 or may also be a value having a margin based on the maximum angle of incidence.
Next, the processable area candidate R is set for each target point P in step S15 using the result obtained in step S14.
Next, an SCP is defined in steps S16 to S18 based on the processable area candidate R for each target point P and the cost of the number of the processable area candidates R required for covering all the target points P, and the SCP is solved in step S19.
Next, the process shifts to step S2. Firstly, in step S211 of step S21, surface shape approximation is performed for the processable areas R1, R2, and R5 determined in step S1.
Moving body placement candidates N are set for each target points P in step S22.
Next, the process shifts to step S3 and the moving body placement candidates N set in step S2 are defined as a GTSP as described above. The GTSP defined in step S3 is solved in step S4. By performing a series of steps from step S1 to step S4, the moving body placements Q selected as the placements where the cost is minimized from among the moving body placement candidates K and the moving path U of the moving body 11 can be finally determined.
As described above, according to the present embodiment, a method for determining the placements of a moving body and the moving path of the moving body minimally required for covering all the target points on an object while ensuring accuracy of processing by the moving body may be provided. Consequently, an apparatus that employs the moving body placement determining method can reduce a total processing time while ensuring accuracy of processing,
Next, a description will be given of a moving body placement determining method according to a second embodiment of the present invention. In the first embodiment, when processable area candidates are set in step S1, an angle between the normal vector of each of the target points and the normal vector of another target point is determined for each target point so as to determine whether or not the angle between normal vectors is equal to or less than a threshold value. In contrast, in the present embodiment, when processable area candidates are set, it is determined whether or not a relative distance between target points instead of an angle between normal vectors of the target points is equal to or less than a threshold value. In the present embodiment, the steps other than step S1 are the same as those in the first embodiment.
Firstly, a relative distance between two adjacent target points is determined for each target point in step S13′ (step 1C′) after completion of step S11. The relative distance determined herein may be a distance between a tangent to a target point and a straight line which is a translation of the tangent to an adjacent target, point. Note that an adjacent, target point, may be determined in the order of the most adjacent point, the second most adjacent point, the third most adjacent point, and so on for all the target points, or may also be determined until the relative distance exceeds a threshold value.
Next, it is determined in step S14′ (step 1D′) whether or not the relative position determined in step S13′ is equal to or less than a threshold value. The threshold value used herein is determined in advance from the focal distance and the depth of focus of the moving body which are accuracy condition information. The fact that the relative position is equal to or less than a threshold value means that two adjacent target points at that time satisfy desired accuracy even if the moving body performs processing while maintaining the same posture.
Next, a processable area candidate is set for each target point in step S15′ (step 1E) . Here, the term “processable area candidate” refers to a set of target points which are determined in step S14′ to satisfy desired accuracy even if the moving body performs processing while maintaining the same posture and a candidate which may be set as a processable area in the following step.
According to the present embodiment, the same effects as those of the first embodiment can be obtained.
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2013-101192 filed on May 13, 2013, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2013-101192 | May 2013 | JP | national |