Embodiments of the present disclosure generally relate to machine processing application technology, and in particular relate to a method, devices and a numerical control machine for detecting machine processing trajectory space.
In the process of machine processing, in order to prevent the tool or the arm from colliding and causing safety problems during the motion of machine processing, an area (usually a cuboid or a cylinder) is specified before transmitting a motion instruction to a machine or a robot, so as to indicate that a trajectory is overtravel when the trajectory exceeds the specified area (in the case that the area is a safe area) or enters the area (in the case that the area is a prohibited area), which is a detection process known as safe area detection.
In the prior art, the trajectory is determined to be within the specified area or outside the specified area through the spatial geometry algorithm directly, in which the presumed conditions are individually made based on different positional relationships between the trajectory and the specified area, and then the determination is performed. Therefore, the algorithm will be quite large, the complexity of the determination of the geometric space relationship will exponentially increases because of the complexity of the geometric shape, and the presumption is likely to miss some possible cases.
The technical problem to be solved by the present disclosure is to provide a method, devices, a numerical control machine, and a computer storage medium for detecting machine processing trajectory space, so that the analysis based on the relationship between spatial geometries is not necessary when determining the spatial geometry relationship between a trajectory and a specified space area, which reduces the complexity of the algorithm, and improve the flexibility and expansibility.
In order to solve the above-mentioned problems, the present disclosure provides a method for detecting machine processing trajectory space. The method includes: obtaining data of a trajectory AB of a machine processing; obtaining spatial data of a specified space area; converting a function of the data of the trajectory AB into a univariate function P=f (u) which is with respect to a trajectory parameter u, where P is any point on the trajectory AB; determining a point set Ui of the trajectory AB on an inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u), where 1≤i≤m, and m is the amount of the curved surface forming the specified space area; and determining a positional relationship between the trajectory AB and the specified space area based on the point sets Ui.
In one embodiment, the determining the point set Ui of the trajectory AB on the inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u) includes: utilizing a first inequality as follows to calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si:
where, P is any point on the trajectory AB, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M.
In one embodiment, the determining the positional relationship between the trajectory AB and the specified space area based on the point sets Ui includes: obtaining an intersection Uz=U1∩U2 . . . ∩Um of the point sets Ui; and determining that the trajectory AB is on the inner side of all the curved surfaces Si if UT⊂Uz, so as to determine that the trajectory AB is on an inner side of the specified space area, where UT is a set of the point sets of the trajectory AB.
In one embodiment, the determining the positional relationship between the trajectory AB and the specified space area based on the point sets Ui includes: obtaining an intersection Uz=U1∩U2 . . . ∩Um of the point sets Ui; and determining that the trajectory AB is completely outside the specified space area if Uz∩UT=ø, where UT is a set of the point sets of the trajectory AB.
In order to solve the above-mentioned problems, the present disclosure also provides a device for detecting machine processing trajectory space. The device includes: a first obtaining unit configured to obtain data of a trajectory AB of a machine processing; a second obtaining unit configured to obtain spatial data of a specified space area; a converting unit configured to convert a function of the data of the trajectory AB obtained by the first obtaining unit into a univariate function P=f (u) which is with respect to a trajectory parameter u, where P is any point on the trajectory AB; a calculating unit configured to determine spatial data of individual curved surfaces Si forming the specified space area based on the spatial data of the specified space area obtained by the second obtaining unit, and calculate a point set Ui of the trajectory AB on an inner side of each curved surface Si based on the spatial data of the individual curved surfaces Si and the function P=f (u) produced by the converting unit, where 1≤i≤m, and m is the amount of the curved surface forming the specified space area; and a position determining unit configured to determine a positional relationship between the trajectory AB and the specified space area based on the point sets Ui obtained by the calculating unit.
In one embodiment, the calculating unit is configured to calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si based on a first inequality as follows:
where, P is any point on the trajectory AB, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M.
In one embodiment, the position determining unit is configured to determine an intersection Uz=U1∩U2 . . . ∩Un of the point sets Ui based on the point sets Ui obtained by the calculating unit, and determine that the trajectory AB is on an inner side of the specified space area if UT⊂Uz; where UT is a set of the point sets of the trajectory AB.
In one embodiment, the position determining unit is configured to determine an intersection Uz=U1∩U2 . . . ∩Un of the point sets Ui based on the point sets Ui obtained by the calculating unit, and determines that the trajectory AB is completely outside the specified space area if Uz∩UT=ø; where UT is a set of the point sets of the trajectory AB.
In order to solve the above problems, the present disclosure also provides a numerical control machine. The numerical control machine includes a machine body and a numerical control system installed on the machine body. The numerical control system includes a machine processing trajectory space detecting module. The machine processing trajectory space detecting module includes: a first obtaining unit configured to obtain data of a trajectory AB of a machine processing; a second obtaining unit configured to obtain spatial data of a specified space area; a converting unit configured to convert a function of the data of the trajectory AB obtained by the first obtaining unit into a univariate function P=f (u) which is with respect to a trajectory parameter u, where P is any point on the trajectory AB; a calculating unit configured to determine spatial data of individual curved surfaces Si forming the specified space area based on the spatial data of the specified space area obtained by the second obtaining unit, and calculate a point set Ui of the trajectory AB on an inner side of each curved surface Si based on the spatial data of the individual curved surfaces Si and the function P=f (u) produced by the converting unit, where 1≤i≤m, and m is the amount of the curved surface forming the specified space area; and a position determining unit configured to determine a positional relationship between the trajectory AB and the specified space area based on the point sets Ui obtained by the calculating unit.
In one embodiment, the numerical control system further includes: an alarm module configured to issue an alarm information when the positional relationship between the trajectory AB and the specified space area determined by the machine processing trajectory space detecting module does not meet a predetermined safety relationship.
In order to solve the above problems, the present disclosure also provides a machine processing trajectory space detecting device. The device includes a memory and a processor connected to the memory. The processor is configured to: obtain data of a trajectory AB of a machine processing; obtain spatial data of a specified space area; convert a function of the data of the trajectory AB into a univariate function P=f (u) which is with respect to a trajectory parameter u, where P is any point on the trajectory AB; determine a point set Ui of the trajectory AB on an inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u), where 1≤i≤m, and m is the amount of the curved surface forming the specified space area; and determine a positional relationship between the trajectory AB and the specified space area based on the point sets Ui.
In one embodiment, the processor is further configured to: utilize a first inequality as follows to calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si:
where, P is any point on the trajectory AB, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M.
In one embodiment, the processor is further configured to: obtain an intersection Uz=U1∩U2 . . . ∩Um of the point sets Ui; determine that the trajectory AB is on the inner side of all the curved surfaces Si if UT⊂Uz, so as to determine that the trajectory AB is on an inner side of the specified space area, where UT is a set of the point sets of the trajectory AB.
In one embodiment, the processor is further configured to: obtain the intersection Uz=U1∩U2 . . . ∩Um of the point sets Ui; determine that the trajectory AB is completely outside the specified space area if Uz∩UT=ø, where UT is a set of the point sets of the trajectory AB.
In order to solve the above-mentioned problems, the present disclosure also provides a computer storage medium. The computer storage medium includes computer program codes, where the computer program codes cause a computer processor to execute a machine processing trajectory space detecting method when the computer program codes are executed by the computer processor. The method includes: obtaining data of a trajectory AB of a machine processing; obtaining spatial data of a specified space area; converting a function of the data of the trajectory AB into a univariate function P=f (u) with respect to a trajectory parameter u, where P is any point on the trajectory AB; determining a point set Ui of the trajectory AB on an inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u), where 1≤i≤m, and m is the amount of the curved surface forming the specified space area; and determining a positional relationship between the trajectory AB and the specified space area based on the point sets Ui.
In one embodiment, the determining the point set Ui of the trajectory AB on the inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u) includes: utilizing a first inequality as follows to calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si:
where, P is any point on the trajectory AB, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M.
The disclosure provides a method, devices, numerical control machines, and a computer storage medium for detecting machine processing trajectory space, which express the spatial curve via a univariate function so as to participate in the operation of the space area for the curve, express the point sets of any portion of the trajectory via the trajectory parameter set, determines the position of the individual curved surfaces forming the space area and the trajectory, and eventually determine the positions of the space area and the curve. Consequently, the defect of algorithm explosion caused by the space geometry operation which needs to analysis the specific area and straight line type is overcame, which reduces the quantity of operations, and has high reusability.
The technical solutions in the embodiments of the present invention will be described in detail below in connection with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are merely part of the embodiments of the present disclosure, not all embodiments. Based on the embodiments in the present disclosure, all other embodiments can be obtained by those skilled in the art without making creative work are within the scope of the protection of the present disclosure.
Referring to
At S10: obtaining data of a trajectory AB of a machine processing.
At S11: obtaining spatial data of a specified space area.
At S12: converting a function of the data of the trajectory AB into a univariate function P=f (u) which is with respect to a trajectory parameter u, where P is any point on the trajectory AB.
At S13: determining a point set Ui of the trajectory AB on an inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u).
Where, 1≤i≤m, and m is the amount of the curved surface forming the specified space area.
At S14: determining a positional relationship between the trajectory AB and the specified space area based on the point sets Ui.
Referring to
At S20: obtaining data of a trajectory AB of a machine processing.
Where, the trajectory AB may be a straight line, an arc, a parabola, etc.
At S21: obtaining spatial data of a specified space area.
Where, any spatial area can enclose a plurality of curved surfaces to form, for example, a cuboid which is formed by enclosing six planes, in which normal vectors of the six planes point to the direction of the center of the cuboid; a cylinder is which formed by enclosing a cylindrical curved surface and two bottom surfaces, in which normal vectors of the two bottom surfaces points to the direction of the center of the cylinder, and a plane normal vector of the cylindrical curved surface points inwardly toward the cylinder.
At S22: converting a function of the data of the trajectory AB into a univariate function P=f (u) which is with respect to a trajectory parameter u. Where, P is any point on the trajectory AB.
At S23: determining a point set Ui of the trajectory AB on an inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u).
Where, 1≤i≤m, and m is the amount of the curved surface forming the specified space area.
For instance, the step S23 can specifically include: utilizing a first inequality as follows to calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si:
the first inequality
where P is any point on the trajectory AB, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M.
At S24: determining a positional relationship between the trajectory AB and the specified space area based on the point sets Ui.
Referring to
At S240: obtaining an intersection of the point sets Ui.
At S241: determining the positional relationship between the trajectory AB and the specified space area based on the relationship between UT and Uz. Specifically, if UT⊂Uz, the trajectory AB is determined to be on the inner side of all the curved surfaces Si, thereby determining that the trajectory AB is on an inner side of the specified space area. If Uz∩UT=ø, the trajectory AB is determined to be completely outside the specified space area. Where, UT is a set of the point sets of the trajectory AB.
Referring to
In the case that the trajectory AB corresponding to the obtained data is a straight line, any point on the trajectory AB is assumed as P. Where, the point A is a start point of the trajectory AB, and the point B is an end point of the trajectory AB. The trajectory parameter u is directly proportional to the distance between the point P and the start point A, and the value of the trajectory parameter u is 0 when the point P coincides with the point A.
At this time, the univariate function P=f (u) can be expressed as:
Where, is a unit direction vector of the straight line AB. In the case that the trajectory parameter u is zero, the position of the point P is the position of the start point A. In the case that the trajectory parameter u is positive, the position of a point which the start point A points to the direction of the unit direction vector is the position of the point P; when the track parameter u is negative, the position of a point which the start point A points to a direction contrary to the unit direction vector is the position of the point P.
Furthermore, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M. According to the formula (1):
Therefore, based on the first inequality and the formula (2), a point set of the straight line AB on a side of the normal vector satisfies the following inequality:
The range of the trajectory parameter u, that is, the point set Ui of the straight line AB on the inner side of the surface Si, is obtained by solving the inequality (3).
Referring to
In the case that the trajectory AB corresponding to the obtained data is an arc, an arc from the start point A to the end point B which is in a counterclockwise direction is assumed as the arc AB, while O is the center of a circle where the arc AB is, and R is the radius of the circle O. The position of P is obtained by rotating a vector counterclockwise for an angle α with O as the center and R as the radius. Assuming that a unit vector in the direction of the vector is , a unit vector rotated for 90° along the rotation direction of the arc AB (i.e., counterclockwise) is and θ=α−90°, the position of the point P can be expressed as:
Furthermore, a cosine value cos θ of the angle θ is calculated based on the coordinate of the point P and the formula (4), and the trajectory parameter u can be expressed using the cosine value cos θ based on the range of 0:
The position of the point P is determined based on the formula (4) and (5):
Furthermore, assuming that the point M is a projection point of the point P on the curved surface Si, is the normal vector of the surface Si pointing to the inner side of the specified space area, and passes through the point M, according to the formulas (6) and (7):
Therefore, the point set of the arc AB on the side of the normal vector is determined to satisfy the following inequality based on the first inequality and the formula (8) and (9):
The range of the trajectory parameter u, that is, the point set Ui of the arc AB on the inner side of the surface Si, is obtained by solving the inequality (10) and (11).
Referring to
In the case that the trajectory AB corresponding to the obtained data is a parabola, an unit vector which is in the axis direction of the parabola AB is assumed as and an unit direction vector which is in a same plane and perpendicular to the axis direction is assumed as and a, b and c are the constants of the parabola AB, the position of the point P can be expressed as:
Where, the x in a parabolic equation y=ax2+bx+c is replaced by the trajectory parameter u, which represents a distance to the point O in the direction of the horizontal axis.
Furthermore, the point M is a projection point of the point P on the curved surface Si, is the normal vector of the surface Si pointing to the inner side of the specified space area, and 0 passes through the point M.
Therefore, a point set of the parabola AB on a side of the normal vector that is, the point set Ui of the parabola AB on the inner side of the surface Si, is determined based on the first inequality and the formula (12).
Referring to
a first obtaining unit 31 configured to obtain the data of the trajectory AB of the machine processing.
a second obtaining unit 32 configured to obtain the spatial data of the specified space area.
a converting unit 33 configured to convert the function of the data of the trajectory AB obtained by the first obtaining unit 31 into the univariate function P=f (u) which is with respect to the trajectory parameter u, where P is any point on the trajectory AB.
a calculating unit 34 configured to determine the spatial data of individual curved surfaces Si forming the specified space area based on the spatial data of the specified space area obtained by the second obtaining unit 32, and calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si based on the spatial data of the individual curved surfaces Si and the function P=f (u) produced by the converting unit, where 1≤i≤m, and m is the amount of the curved surface forming the specified space area.
a position determining unit 35 configured to determine the positional relationship between the trajectory AB and the specified space area based on the point sets Ui obtained by the calculating unit 34.
Specifically, the calculating unit 34 is configured to calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si based on the first inequality as follows:
where, P is any point on the trajectory AB, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M.
The position determining unit 35 is configured to determine the intersection Uz=U1∩U2 . . . ∩Un of the point sets Ui based on the point sets Ui obtained by the calculating unit 34, and determine the positional relationship between the trajectory AB and the specified space area based on the relationship between UT and Uz:
if UT⊂Uz, the position determining unit 35 determines that the trajectory AB is on the inner side of the specified space area.
if Uz∩UT=ø, the position determining unit 35 determines that the trajectory AB is completely outside the specified space area.
Where, UT is a set of the point sets of the trajectory AB.
Referring to
a first obtaining unit 430 configured to obtain the data of the trajectory AB of the machine processing.
a second obtaining unit 431 configured to obtain the spatial data of the specified space area.
a converting unit 432 configured to convert the function of the data of the trajectory AB obtained by the first obtaining unit 430 into the univariate function P=f (u) which is with respect to the trajectory parameter u, where P is any point on the trajectory AB.
a calculating unit 433 configured to determine the spatial data of individual curved surfaces Si forming the specified space area based on the spatial data of the specified space area obtained by the second obtaining unit 431, and calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si based on the spatial data of the individual curved surfaces Si and the function P=f (u) produced by the converting unit 432, where 1≤i≤m, and m is the amount of the curved surface forming the specified space area;
a position determining unit 434 configured to determine the positional relationship between the trajectory AB and the specified space area based on the point sets Ui obtained by the calculating unit 433.
Furthermore, the numerical control system 42 further includes: an alarm module 44 configured to issue an alarm information when the positional relationship between the trajectory AB and the specified space area determined by the machine processing trajectory space detecting module 43 does not meet a predetermined safety relationship.
Referring to
The receiver 51 is configured to receive data.
The processor 52 is configured to control the operation of the device 50, which may be a CPU (Central Processing Unit). The processor 52 may be an integrated circuit chip with signal processing capability. The processor 52 may also be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), other programmable logic devices, a discrete gate, a transistor logic device, or a discrete hardware component. The general purpose processor may be a microprocessor or any conventional processor.
The transmitter 53 is configured to transmit data.
The memory may include the read-only memory 54 and the random access memory 55, and provide instructions and data to the processor 52. A portion of the memory may also include a nonvolatile random access memory (NVRAM).
The components of the device 50 are coupled with each other via the bus 56. In addition to data bus, the bus 56 may include a power bus, a control bus, and a status signal bus. However, for the sake of clarity, various buses are designated as the bus 56 in the figure.
The memory stores the following elements, executable modules or data structures, or their subsets or expansion sets:
operation instructions: include a variety of operation instructions utilized to achieve a variety of operations.
operation system: includes various system programs utilized to implement various basic services and handle hardware-based tasks.
In this embodiment, the processor 52 performs the following operations by calling operation instructions stored in the memory (the operation instructions can be stored in the operation system):
obtain the data of the trajectory AB of the machine processing.
obtain the spatial data of the specified space area.
convert the function of the data of the trajectory AB into the univariate function P=f (u) with respect to the trajectory parameter u, where P is any point on the trajectory AB.
determine the point set Ui of the trajectory AB on the inner side of each curved surface Si based on the spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u), where 1≤i≤m, and m is the amount of the curved surface forming the specified space area.
determine the positional relationship between the trajectory AB and the specified space area based on the point sets Ui.
Optionally, the processor 52 can be configured to utilize the first inequality as follows to calculate the point set Ui of the trajectory AB on the inner side of each curved surface Si:
Where, P is any point on the trajectory AB, M is a projection point of the point P on the curved surface Si, is a normal vector of the curved surface Si pointing to the inner side of the specified space area, and passes through the point M.
Optionally, the processor 52 can be configured to obtain the intersection Uz=U1∩U2 . . . ∩Um of the point sets Ui:
if UT⊂Uz, the trajectory AB is determined to be on the inner side of all the curved surfaces Si, thereby determining that the trajectory AB is on the inner side of the specified space area, wherein UT is a set of the point sets of the trajectory AB.
if Uz∩UT=ø, the trajectory AB is determined to be completely outside the specified space area. Where, UT is a set of the point sets of the trajectory AB.
Furthermore, the present disclosure also provides a computer storage medium. The computer storage medium includes computer program codes. The computer program codes cause a computer processor to execute a machine processing trajectory space detecting method when the computer program codes are executed by the computer processor. The method includes:
obtaining the data of the trajectory AB of the machine processing.
obtaining the spatial data of the specified space area.
converting the function of the data of the trajectory AB into the univariate function P=f (u) with respect to the trajectory parameter u, where P is any point on the trajectory AB.
determining the point set Ui of the trajectory AB on the inner side of each curved surface Si based on spatial data of the individual curved surfaces Si forming the specified space area and the function P=f (u), where 1≤i≤m, and m is the amount of the curved surface forming the specified space area.
determining the positional relationship between the trajectory AB and the specified space area based on the point sets Ui.
The disclosure provides a method, devices, a numerical control machine, and a computer storage medium for detecting machine processing trajectory space, which express the spatial curve via a univariate function so as to participate in the operation of the space area for the curve, express the point sets of any portion of the trajectory via the trajectory parameter set, determines the position of the individual curved surfaces forming the space area and the trajectory, and eventually determine the positions of the space area and the curve. Consequently, the defect of algorithm explosion caused by the space geometry operation which needs to analysis the specific area and straight line type is overcame, which reduces the quantity of operations, and has high reusability.
The above description depicts merely some exemplary embodiments of the disclosure, but the person skilled in the art can make various modifications after reading the present disclosure without departing from the spirit and scope of the present disclosure.
Number | Date | Country | Kind |
---|---|---|---|
2014 1 0594724 | Oct 2014 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2015/092551 | 10/22/2015 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2016/066052 | 5/6/2016 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
20100063612 | Wang | Mar 2010 | A1 |
20150205283 | Brand | Jul 2015 | A1 |
20160187866 | Noda | Jun 2016 | A1 |
20180207799 | Bretschneider | Jul 2018 | A1 |
Number | Date | Country |
---|---|---|
102063546 | May 2011 | CN |
103279608 | Sep 2013 | CN |
104391481 | Mar 2015 | CN |
104391481 | Mar 2015 | CN |
2001-242921 | Sep 2001 | JP |
Number | Date | Country | |
---|---|---|---|
20170343981 A1 | Nov 2017 | US |