Height map collision avoidance
By converting workpieces and obstacles into height maps and comparing the height coordinates of tool path points, the problem of complex and time-consuming object interference inspection in existing technologies is solved, achieving fast and accurate collision avoidance, which is suitable for real-time motion planning of machine tools.
Patent Information
- Application Number
- CN202510916277.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2024-07-17
- Filing Date
- 2025-07-03
- Publication Date
- 2026-01-20
AI Technical Summary
In existing technologies for machine tool motion planning, object interference checks are complex and time-consuming to calculate, making it difficult to achieve fast and accurate collision avoidance, especially in real-time motion planning where they are impractical.
Convert the CAD model of the workpiece or obstacle into a height map, and convert the path points of the machine tool to the same reference system. By comparing the height coordinates of the tool path points with the height map values of the mesh cells, interference checks are performed, and new collision avoidance paths are defined.
It achieves fast and accurate object interference detection, which can avoid collisions between machine tools and obstacles in real-time motion planning and improve the efficiency of motion planning.
Smart Images

Figure CN121360992A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of industrial machine motion control, and more particularly, to an object interference checking technique that converts workpieces or other obstacles into a height map, converts tool paths into the same reference frame, and then checks for interference by comparing the height coordinate of each converted tool path point to the height map value of the corresponding grid cell, which defines the obstacle height above the plane of the reference frame. BACKGROUND
[0002] It is well known to use multi-axis machine tools to perform various operations such as milling and drilling. In many machine tool work space environments, there are obstacles, and these obstacles can be in the path of tool motion. Obstacles can be fixed structures such as fixtures that are present in the work space. The workpiece on which the machine tool is operating can itself be an obstacle when the machine tool must maneuver above or around it while moving from one machining operation to the next. Collisions between any part of the machine tool and any obstacle must be absolutely avoided.
[0003] It is known to include an interference checking algorithm in a motion planning program, including during real-time motion planning. One prior art technique for interference checking involves defining geometric primitives such as spheres, cylinders, etc. around the components of the machine tool and around each obstacle. The geometric primitives are used in order to reduce the complexity of the interference checking computation to a manageable level so that it can be performed fast enough for real-time motion planning. However, defining geometric primitives around each obstacle and machine tool component is a tedious and time consuming process. Furthermore, most workpieces on which the machine tool is operating are not amenable to approximation using geometric primitives. Conservative approximations of the geometric primitive shapes can result in false positive interference cases.
[0004] Another prior art technique for interference checking uses CAD models of the machine tool and obstacles. Using CAD models in the interference checking computation avoids the inaccuracy problem of geometric primitives. However, this approach requires computing distances and detecting interference between all locations on one CAD model (e.g. tool) with all locations on the CAD model of every other potential obstacle in the work space (including fixtures, workpieces, etc.). This computation is computationally intensive and slow for all but the simplest work space environments. In most cases, the collision avoidance computation takes too long to be practical in situations where the motion planning computation must be performed in real-time as the machine tool is running. Signed distance field (SDF) techniques are known that simplify geometric shapes into 3D grids for distance or interference computation, but this approach still involves significant computational complexity.
[0005] Other interference checking techniques are also known in the art, including the Axis Aligned Bounding Box (AABB) tree method. The AABB tree method covers objects by bounding boxes and checks to determine if the boxes overlap. This method also suffers from inaccuracies due to approximation, and can also involve complex setup and lengthy computation times.
[0006] In view of the foregoing, there is a need for an improved object interference checking technique that is easy to set up and that quickly and accurately computes potential object interferences, including for use in real-time machine tool collision avoidance path planning. SUMMARY
[0007] In accordance with the teachings of the present disclosure, an object interference checking technique using a collision map is disclosed. A CAD model of a workpiece or other obstacle is converted to a height map that defines an obstacle height above a plane of a reference frame for each cell of a grid. A machine tool center point path is then converted to the same reference frame. Interference checking is performed by comparing the height coordinate of each converted tool path checkpoint to the height map value of the corresponding grid cell. Any detected interferences are resolved by defining new path points with increased height coordinates to replace the interfering key path points. Interference checking can be performed for the entire tool by creating a bottom-up height map of the tool and comparing each pixel of the tool height map to the corresponding grid cell of the obstacle height map.
[0008] Additional features of the apparatus and methods of the present disclosure will become apparent from the following description and appended claims, taken in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0009] Figure 1 is a schematic illustration of a system including a computer-controlled machine tool that performs machining operations on a workpiece of the type to which the techniques of the present disclosure are applicable;
[0010] Figure 2 is an illustration of a height map for a simple object in accordance with an embodiment of the present disclosure, depicting how a height above a reference plane is defined for each cell of a grid projected on the reference plane;
[0011] Figure 3 is an illustrative flowchart of a method for creating a height map of a workpiece that is an obstacle to a machine tool path in accordance with an embodiment of the present disclosure;
[0012] Figure 4 is an illustrative flowchart of a method for performing interference checking of a tool center point path using a height map and defining a new collision avoidance path based on detected interferences using the height map in accordance with an embodiment of the present disclosure; Figure 3
[0013] Figure 5 is a flowchart of a method for performing interference checking of a tool center point path and defining a new collision avoidance path based on interference detected using a height map, according to embodiments of the present disclosure;
[0014] Figure 6 is an illustration of a technique for interference checking individual waypoints of a machine tool center point path using an obstacle height map, and a flowchart of corresponding method steps, according to embodiments of the present disclosure;
[0015] Figure 7 is an illustration of machine tool manipulation in a workpiece obstacle environment, depicting how a portion of a tool body or holder can potentially collide with an obstacle if only tool center point interference checking is performed, according to embodiments of the present disclosure;
[0016] Figure 8 is an illustration of a machine tool and corresponding tool height map used in a graph-to-graph interference checking technique, according to embodiments of the present disclosure;
[0017] Figure 9 is an illustrated flowchart of a method for performing interference checking of a machine tool path using an obstacle height map and a tool height map and defining a new collision avoidance path based on interference detected using the height maps, according to embodiments of the present disclosure;
[0018] Figure 10 is an illustration of a technique for interference checking waypoints of a machine tool path using an obstacle height map and a tool height map, and a flowchart of corresponding method steps, according to embodiments of the present disclosure, in which each pixel in the tool height map is interference checked for each waypoint;
[0019] Figure 11 is a flowchart of a method for performing interference checking between a tool and workspace obstacles, including pre-generation of a workspace collision map and fast tool path interference checking using the collision map, according to embodiments of the present disclosure;
[0020] Figure 12 is an illustration of a technique for reconstructing a tool height map with a radial margin, according to embodiments of the present disclosure;
[0021] Figure 13 is an illustration of a technique for creating a workspace collision map by scanning a tool height map over an obstacle height map, according to embodiments of the present disclosure. DETAILED DESCRIPTION
[0022] The following discussion of object interference checking using height maps and collision maps of embodiments of the present disclosure is merely exemplary and is in no way intended to limit the disclosed apparatus and techniques or their applications or uses.
[0023] It is well known to use multi-axis machine tools to perform various machining operations such as milling and drilling. In many machine tool work space environments, there are obstacles, and these obstacles can be in the path of tool motion. The obstacles can be fixed structures present in the work space, such as a fixture. The work piece on which the machine tool must operate while moving from one machining operation to the next can also be an obstacle as the machine tool operates above or around the work piece. Collisions between any part of the machine tool and any obstacle must be absolutely avoided. This disclosure describes techniques for quickly performing interference checking of motion plans for applications such as these.
[0024] Figure 1 is a schematic illustration of a system 100 of a computer-controlled machine tool that performs machining operations on a work piece that is of the type to which the techniques of this disclosure are applicable. The machine tool 110 rotates a spindle 112 in which a cutting tool 120 is fixed. The machine tool 110 causes the cutting tool 120 to perform machining operations on a work piece 130. The machine tool 110 is in communication with a controller 140, which is a computing device that provides motion commands and spindle motor speed commands to the machine tool 110. In a typical example, the machine tool 110 moves the rotating cutting tool 120 from a start point along a path that results in cutting material from the work piece 130, and then separates the cutting tool 120 from the work piece 130. Before performing the next cutting step, the machine tool 110 must move the cutting tool 120 to the start point of the next operation; this movement between individual cutting steps is referred to as an air cutting step. The machining operations can include milling, drilling, or tapping, for example.
[0025] As will be discussed in detail below, the techniques of this disclosure are applicable to Figure 1 systems 100, particularly to computing collision-free paths for air cutting steps between individual machining operations. The collision avoidance methods of this disclosure that use height maps and collision maps can be programmed in the controller 140 using data that is available in the controller 140 or that is readily provided to the controller 140. Portions of the interference checking computations discussed below can also be programmed in a separate computer that is in communication with the controller 140. Although the height map and collision map interference checking computations are described below in terms of collision avoidance applications for air cutting steps, the same techniques can be applied to cutting steps in which a height map and collision map can be used to compute the thickness of material that is cut.
[0026] Figure 1 The various components of the system 100 are depicted in a fairly simple manner, with the machine tool 110 being movable on three main axes of motion, including "vertically" (parallel to the axis of the cutting tool 120) and in two "horizontal" directions (perpendicular to the axis of the cutting tool 120). However, the techniques of this disclosure are not limited to applications to machine tools that are movable on three axes of motion.Figure 1 and the vertical and horizontal directions shown in the subsequent figures. It should be understood that the height map and collision map collision avoidance methods of the present disclosure are applicable to any type of machine tool in which a collision-free path of a tool relative to a workpiece or other obstacle must be calculated, including multi-axis machine tools with full tool set-up and spatial orientation capabilities, as well as robotically controlled milling and drilling machines with articulated robot arms that provide full tool set-up and orientation flexibility.
[0027] Figure 2 is an illustration of a height map for a simple object according to an embodiment of the present disclosure, depicting how a height above a reference plane is defined for each cell of a grid projected on the reference plane. The object 200 is located in a workspace in which a cutting tool 210 will perform an operation. The cutting tool 210 is shown as a simple thin cylinder, representing a tool such as an end mill. It should be understood that the entire machine tool is also present in the workspace, as shown in Figure 1 . The cutting tool 210 has a tool center point 212, the path of which is controlled by a machine tool controller, also as shown in Figure 1 .
[0028] The object 200 has a very simple shape, as if it were created by joining together fourteen small cubes as shown. Cubes 220 and 222 (and several other unnumbered cubes) are on the bottom layer, and have nothing above them. Cube 224 (and other cubes) are on top of the bottom layer cubes, and have nothing above them. Cube 226 is on top of two other cubes. It is visible in Figure 2 that each cube has a value applied to its top surface. This value represents the height of the object above the grid applied to the reference plane 230. The reference plane 230 is the X-Y plane of the reference coordinate system 232.
[0029] The height map 250 shows, at the right, the correspondence to the object 200. The height map 250 is defined by a grid in the reference plane 230 (i.e., the X-Y plane), where each grid cell contains a value that indicates the height of the object in that grid cell. For example, grid cell 252 has a height value of 3, which corresponds to the cube 226 of the object 200 shown at the left. The correlation between the grid cell values in the height map 250 and the height of each portion of the object 200 is clear and obvious.
[0030] A tool center point path 260 passes over the height map 250. The tool center point path 260 represents the path of the tool center point 212 as it moves over the object 200. The tool center point path 260 starts at a point 262 outside the height map grid and enters the height map 250 over a grid cell 252. Thus, it is known that when the tool center point path expressed in the coordinates of the reference frame 232 is over the grid cell 252, the path 260 must have a height value (Z coordinate) greater than 3. The path 260 then passes over two grid cells with height value 2, and finally passes over two more grid cells with height value 1. The height value (Z coordinate) of the path 260 is checked against the height map value of each grid cell over which the tool center point path 260 passes.
[0031] Figure 2 An illustration of the basic concept of a height map and its use to check for collision with a tool following a path is provided. The blocky shape of the object 200 and the integer height values are for simplicity and clarity only. In a real implementation, a height map can be created for any arbitrary shaped object, where the height map value contained in each grid cell is the maximum height of the object above the reference plane within the vertical projection of the grid cell. These height values can be defined at any desired level of precision (units and significant digits). Such applications are shown in several of the figures below and discussed in detail below. Furthermore, the Z axis orientation of the height map need not be vertical in real world coordinates; the height map reference frame can have any suitable arbitrary orientation.
[0032] Figure 3 is an illustration flowchart of a method for creating a height map of a workpiece according to embodiments of the present disclosure, which is an obstacle for a machine tool path. The workpiece 300 is shown at the top left in solid or surface model form, as it is defined in a computer aided design (CAD) system. Given the CAD model of the workpiece 300, a height map is created for the workpiece 300 at step 310 using the techniques discussed above with respect to Figure 2 the height map is created. That is, a reference coordinate frame is defined, and the CAD model of the workpiece 300 is suitably positioned in the reference frame. In a typical application, the reference frame is defined with its X-Y plane representing the top surface of a worktable or fixture on which the workpiece 300 is fixed in the workspace. Grid cell dimensions in the X and Y directions are defined (which can be the same or different). Then, for each grid cell in the height map, the maximum height (Z coordinate) of the workpiece 300 in the reference coordinate frame is determined.
[0033] The height map image 320 depicts the workpiece 300 in a "bird's eye" view, i.e., perpendicular to the X-Y plane of the height map reference frame. The color or grayscale shading in the image 320 represents the height value of each grid cell in the height map. The height map image 320 is provided merely as a visual representation of the height map concept; the image 320 itself is not used in subsequent interference checking calculations. The height map 330 is a two-dimensional (2D) matrix having a number of rows and columns determined by the dimensions of the workpiece 300 and the X and Y grid cell size. Each grid cell in the height map 330 contains the maximum height of the workpiece 300 in that grid cell. That is, the height map 330 defines z(x,y), where z is the height value (Z coordinate) of a given grid cell (x, y pair) in the height map reference frame. The height map 330 is used in interference checking tool path calculations, as discussed above and in further detail below.
[0034] The height map 330 is simplified in Figure 3 , with numbers shown in some matrix cells, and ellipses ("...") filling in the rest of the matrix. The height map 330 is intended to illustrate the concept, and the numbers shown in some matrix cells are not significant and are not intended to be easily legible.
[0035] Figure 4 is a flowchart illustration of a method for performing interference checking of a tool center point path using a height map and defining a new collision avoidance path based on interference detected using the height map, according to embodiments of the present disclosure. The CAD model of the workpiece 400 is provided as input in the same manner as previously discussed. The waypoints of the tool path are also provided as input at block 410. The tool path waypoints provided at block 410 include at least a start point and an end point, and can also include a plurality of intermediate waypoints that combine into piecewise linear segments, spline curves, or some other path shape to define the tool trajectory. Figure 3 The height map 420 is calculated for the workpiece 400 in the manner discussed above. The height map 420 is shown as a visual representation in
[0036] ; it should be understood that a height map numerical matrix representing z(x,y) of the workpiece 400 is calculated and used in the collision avoidance calculations. The tool center point path 430 is shown superimposed on the height map 420. In this case, the tool center point path 430 is a straight line from a start point 432 to an end point 434. This can be the case, for example, if the tool machines a hole in one corner of the workpiece 400, then lifts and needs to traverse along the path 430 before machining a hole in another corner of the workpiece 400. The tool center point path 430 must be converted to the height map reference coordinate system in order to perform interference checking calculations using the height map. Figure 4
[0037] In block 440, the tool center point path 430 is shown in an isometric view with the workpiece 400, where it can be seen that the tool center point path 430 passes over and through the workpiece 400. It is apparent in block 440 that the tool center point path 430 interferes with two different portions of the workpiece 400. In block 450, the workpiece 400 is shown with the tool center point path 430 and a collision avoidance path 460 (dashed line). Using the height map 420 in the calculations discussed below, it is determined that the tool center point path 430 interferes with the workpiece 400 in two locations indicated at points 472 and 474. At point 472, a new collision avoidance waypoint 462 is defined, and at point 474, a new collision avoidance waypoint 464 is defined. The new collision avoidance waypoints 462 and 464 are defined with a perpendicular offset from the collision check points, which are part of the tool center point path 430 and are determined to interfere with the workpiece 400. The collision avoidance path 460 is calculated from the original start point 432 to the end point 434 using the new collision avoidance waypoints 462 and 464 as intermediate waypoints. The collision avoidance path 460 can again be subjected to a height map interference check calculation to confirm that there is no further interference with the workpiece 400.
[0038] The interference check calculation against the height map 420 of the tool center point path 430 is a very fast calculation, as is the calculation of the new collision avoidance waypoints. These calculations are discussed below.
[0039] Figure 5 is a flowchart 500 of a method for performing an interference check of a tool center point path and defining a new collision avoidance path based on detected interference using a height map, according to embodiments of the present disclosure. Figure 5 The flowchart is arranged with steps performed by a collision checker in block 510 and steps performed by a motion planner in block 520.
[0040] The inputs to the collision checker block 510 include an object model of the workpiece and any other objects that can be obstacles to the tool path. In the example discussed previously, the obstacle is the workpiece on which the machine tool operates. Other workspace obstacles can include clamps, for example. The object model is typically provided as a CAD solid or surface model. The input to the motion planner block 520 is an initial set of commanded waypoints. The commanded waypoints are typically used for air cutting steps such as moving the tool from one hole machining location to another hole machining location, as discussed previously.
[0041] At block 512, a height map of the obstacles (e.g., workpieces) is computed and loaded. This includes converting the workpiece object model to a height map reference coordinate system (e.g., a workcell "world" coordinate system, or a coordinate system whose X-Y plane is on the top surface of the table in the workcell). With the workpiece object model converted to the height map reference coordinate system, the height map is computed as previously discussed, providing a 2D matrix of height values for an X-Y grid of cells.
[0042] At block 522, a tool path is generated for the command waypoints provided as input. In the example discussed previously, the initial tool path is a straight line from the start point to the end point. However, this is merely an example. For example, the tool path can have other shapes, such as a spline function fitted through the command waypoints. At block 524, the tool path (trajectory) is discretized into a set of interference check points. An interference check point is a point along the continuous tool path that will be compared to the height map.
[0043] At block 514, each of the interference check points from block 524 is checked for collision against the height map from block 512. This computation is discussed below with respect to Figure 6 At decision diamond 516, it is determined whether any collisions have been detected at block 514. If any collisions are detected, then at block 518, collision avoidance waypoints are generated for any of the interference check points that interfered with the height map. This collision avoidance waypoint generation is shown in block 450 of Figure 4 After the new collision avoidance waypoints are generated at block 518, the process returns to block 522 to generate a new tool path using the collision avoidance waypoints. The new tool path is generated using the new collision avoidance waypoints in addition to the original command waypoints. The new tool path is then discretized at block 524, and the height map collision checking process is repeated.
[0044] When the collision checking process does not result in a collision, the process moves from decision diamond 516 to block 530, where the new command waypoints are output and used for machine tool motion control. The new command waypoints include a combination of the original command waypoints (typically at least the start point and end point) and any collision avoidance waypoints generated at block 518 on previous iterations through the process.
[0045] Figure 6 An illustration 600 of techniques for interference checking individual waypoints of a machine tool center point path using an obstacle height map in accordance with embodiments of the present disclosure, and a flowchart 650 of corresponding method steps. The height map 610 includes a 2D matrix of height values for a plurality of cells in an X-Y grid, as discussed above. The height map 610 represents any obstacle environment that can be present in a workcell, such as workpieces, workpieces with fixtures, etc. InFigure 6 The height map 610 is shown somewhat conceptually, with most of the height value numbers replaced by ellipses for simplicity. The grid cells of the height map 610 are shaded to represent various ranges of height values, as also discussed previously.
[0046] A plurality of interference checkpoints (620, 622, and other, unnumbered points) are shown superimposed on the height map 610. The interference checkpoints 620 / 622, etc., are a discretized representation of the tool center point path, as discussed above with respect to the Figure 5 discussion. The flowchart 650 defines steps performed in the collision checking block 514 of Figure 5 .
[0047] At block 652, an interference checkpoint (e.g., checkpoint 620) of the tool path is provided. The checkpoint has a location (x tcp , y tcp , z tcp ) in coordinates of the height map reference coordinate system. At decision diamond 654, it is determined whether the checkpoint coordinates are located within the region of the height map 610. For example, based on the dimensions of the workpiece, the height map 610 can have dimensions of 500 x 500 mm in the height map reference coordinate system, defined such that the height map is defined with respect to the coordinate ranges 0 < x < 500 and 0 < y < 500. If the checkpoint has X and Y coordinates (x tcp , y tcp ) outside the height map region, the process returns to block 652 to provide the next checkpoint.
[0048] If the checkpoint is within the height map region, at block 656, the checkpoint X-Y coordinates (x tcp , y tcp ) are converted to height map row-column indices. For example, if the height map 610 defines a 500 x 500 mm space, and the grid cell size is 5 mm square, then the height map 610 includes 100 rows and 100 columns of grid cells. The calculation at block 656 identifies the row and column of grid cells (r tcp , c tcp ) occupied by the checkpoint having X and Y coordinates (x tcp , y tcp ).
[0049] At decision diamond 658, it is determined whether the Z coordinate (z tcp ) of the checkpoint, minus a safety margin (d safe ), is less than or equal to the value in the height map 610 (Hmap(r tcp , c tcpto perform collision check calculations. If the answer is yes at decision diamond 658, this means that there is an interference, and the process returns a collision condition at block 660. This corresponds to the situation in Figure 5 the answer is no at decision diamond 658, this means that the checkpoint being evaluated is safely above the height map, and the process returns to block 652 to evaluate the next checkpoint. This process continues until no checkpoints are left in the tool path.
[0050] The height map interference checking technique discussed above provides very fast and accurate interference checking results for obstacles in the machine tool workspace. However, in some applications, interference checking of the tool center point alone is not sufficient to guarantee a collision-free machine tool motion plan. An enhanced technique for addressing this situation is discussed below.
[0051] Figure 7 is an illustration of a machine tool according to embodiments of the present disclosure maneuvering in the environment of a workpiece obstacle, depicting how a portion of the tool body or holder can collide with the obstacle if only tool center point interference checking is performed. Tool body 710 holds cutting tool 720. Tool body 710 includes a tool holder that is coupled to the spindle of a machine tool. Thus, tool body 710 is more massive than cutting tool 720 itself. Cutting tool 720 is performing an operation on workpiece 730 in the same manner as previously discussed.
[0052] Cutting tool 720 has a tool center point 722. Using the tool center point to height map interference checking technique discussed above, a collision-avoiding tool path 740 is computed that contains a plurality of waypoints, including a start point (at the position shown with respect to tool center point 722), two collision-avoiding waypoints above the highest edge of workpiece 730, and an end point 742. However, due to the combination of tool body shape, workpiece shape, and tool path geometry, it is possible that a point 712 on tool body 710 can collide with a point 732 on workpiece 730 when tool center point 722 follows collision-avoiding tool path 740. To address this situation and ensure collision-free tool motion, it is necessary to model the tool as more than just the tool center point.
[0053] Figure 8 is an illustration of a machine tool and corresponding tool height map used in a graph-to-graph interference checking technique according to embodiments of the present disclosure. Tool 810 includes the cutting tool and any components that couple the cutting tool to the machine tool spindle that can be involved in an interference with a workpiece or other obstacle; generally this can be considered to be the tool body as well as the cutting tool itself.
[0054] A tool height map point set 820 is created for the tool 810. The tool height map point set 820 is a “bottom-up” view of the tool 810 including the cutting tool itself as well as the tool body. In the preferred embodiment, the tool center point is placed at the coordinates (0,0,0) of the local tool coordinate system, and each point in the tool height map point set 820 has a positive Z coordinate. In visual comparison of the tool height map point set 820 with the tool 810, it can be seen that the tool height map point set 820 includes a small cluster of points at the tool center point, a circle of points corresponding to the lower portion of the tool body with upwardly concave curvature, and two additional circles of points corresponding to the increasing diameter shoulder portions on the tool body.
[0055] A tool height map 830 is created from the tool height map point set 820. The tool height map 830 is shown as a visual representation in which different shades of gray represent different heights. When viewed from the bottom up, any “pixel” within the X-Y grid of the tool height map 830 will have a height value based on the Z coordinate of the points within that pixel. As previously discussed with respect to other height maps, it will be understood that a 2D numerical matrix or grid of pixels is created for the tool height map 830 containing the data defining z(x,y). This height data grid is the grid used in the calculations discussed below.
[0056] The tool height map 830 is based on the actual shape of the tool body. In some embodiments, it can be desirable to provide a clearance margin around the outside of the tool body when checking for tool to workpiece interference. Techniques for including a radial offset margin in the tool height map are discussed later.
[0057] Figure 9 is an illustrative flowchart of a method for performing interference checking of a machine tool path using an obstacle height map and a tool height map and defining a new collision avoidance path based on interference detected using the height maps according to embodiments of the present disclosure. In the same manner as previously discussed, a CAD model of the workpiece 900 is provided as input at block 910, and the waypoints of the tool path are also provided as input. A CAD model of the tool 920 is also provided. The tool 920 includes the tool body and the cutting tool itself, as discussed above.
[0058] An initial tool path is generated from the commanded waypoints in the same manner as previously discussed at block 930. An obstacle height map 940 is calculated for the workpiece 900. This includes defining a height map reference coordinate system, defining a grid of a plurality of cells in the X-Y plane of the reference coordinate system, and calculating the maximum height of the workpiece in the Z direction for each grid cell. The obstacle height map 940 is a “top-down” view of the workpiece 900 (and any associated obstacles, such as clamps), in which the maximum value in the obstacle height map 940 corresponds to the highest point of the workpiece 900.
[0059] A tool height map 950 is then computed for the tool 920. The tool height map 950 is a "bottom-up" view of the tool 920, in which each "pixel" (grid cell) in the tool height map 950 has a height value that specifies the Z-direction offset of that point on the tool 920 above the tool center point (the lowest point on the tool 920). The Z-direction offset values in the tool height map 950 are measured in the same Z-direction as the obstacle height map reference coordinate system. In the preferred embodiment, the tool center point has a tool height map value of zero, and the other points (pixels) on the tool body all have positive tool height map values. Other reference system conventions can also be used.
[0060] For purposes of illustration, both the obstacle height map 940 and the tool height map 950 are shown in image form, with different shades of gray representing different heights. Of course, numerical data defining z(x,y) is used in the interference checking calculations discussed below.
[0061] At block 960, the tool path is used to perform a collision check of the obstacle height map 940 in a manner similar to that described earlier. However, in this case, instead of checking only the tool center point against the obstacle height map 940 for each check point, many pixels of the tool height map 950 are checked against the obstacle height map 940 for each check point location. For example, for the first check point, the tool height map 950 is positioned as shown at 950A, with each pixel of the tool height map 950 checked against the corresponding grid cell of the obstacle height map 940. After all of the pixels of the tool height map 950 have been checked for the first tool path check point, the tool height map 950 is moved to the position of the next check point, as shown at 950B. This process is repeated for the entire tool path from block 930. For any detected collisions between the tool height map 950 and the obstacle height map 940, a new collision avoidance waypoint is generated. The new collision avoidance waypoint is generated in any suitable manner, such as by determining the amount of interference between the tool height map pixel and the obstacle height map grid cell and adding that vertical offset (plus an additional amount, if needed) to the tool path check point to obtain the new collision avoidance waypoint.
[0062] At block 970, the new collision avoidance waypoints are used to generate a collision avoidance tool path 980. Since the tool height map 950 has been collision checked against the obstacle height map 940, the collision avoidance tool path 980 will avoid interference between any portion of the tool 920 and any portion of the workpiece 900. Of course, the workpiece 900 and the obstacle height map 940 can include other obstacles, such as clamps, as explained earlier.
[0063] Figure 10An illustration 1000 of techniques to interference check a tool path point of a machine tool path using an obstacle height map and a tool height map according to embodiments of the present disclosure and a flowchart 1050 of corresponding method steps in which each pixel in the tool height map is interference checked for each path point. An obstacle height map 1010 includes height values for a 2D matrix of a plurality of cells in an X-Y grid, as previously discussed above. The height map 1010 corresponds to the height map 940 in FIG. 9. Figure 9 The height map 1010 represents any obstacle environment that can exist in the work cell, such as workpieces, workpieces plus fixtures, etc. Figure 10 The height map 1010 is again shown conceptually in FIG. 10, where most of the height value numbers are replaced by ellipses for simplicity. The grid cells of the height map 1010 are shaded to represent various ranges of height values, as previously discussed.
[0064] The tool height map is shown superimposed on the height map 1010 at a plurality of interference check points (1020, 1022, and other unnumbered points). The tool height map shown in the illustration 1000 corresponds to the tool height map 950 in FIG. 9. The interference check points 1020 / 1022, etc. are a discretized representation of the tool center point path, as discussed above. The flowchart 1050 defines steps for performing a collision check of the tool height map against the obstacle (e.g., workpiece) height map. Figure 9
[0065] At block 1052, an interference check point of the tool path is provided. The check point has a location (x tcp ,y tcp ,z tcp ) in the coordinates of the obstacle height map reference coordinate system. At block 1054, the tool height map is positioned such that the location of the tool center point in the tool height map is at the current check point of the tool path. For example, in the illustration 1000, the tool height map is first moved to check point 1020. At block 1056, a single pixel i is selected in the tool height map. The pixel i has coordinates (x i ,y i ,z i ) in the tool height map. A collision check of the pixel i is then performed in the following steps.
[0066] At decision rhombus 1058, it is determined whether the XY coordinates of pixel i at the current checkpoint are within the area of obstacle height map 1010. Pixel i has X and Y coordinates (in the obstacle height map reference frame), which are found by obtaining the X and Y coordinates of the current tool path checkpoint and adding the X and Y coordinates of pixel i relative to the tool center point in the tool height map. If at decision rhombus 1058, checkpoint i has X and Y coordinates outside the area of obstacle height map, the process returns to decision rhombus 1060.
[0067] If the coordinates of pixel i at the current checkpoint are within the obstacle heightmap region, then at box 1062, the XY coordinates of pixel i at the current checkpoint are converted to the obstacle heightmap row-column index. This is consistent with previous statements regarding... Figure 6 The discussion follows a similar approach, with the calculation of the obstacle height at box 1062 in map 1010 based on coordinates (x...). i y i The number of grid cell rows and columns occupied by pixel i at the current checkpoint (r) i ,c i ).
[0068] At rhombus 1064, the Z coordinate (z) of pixel i at the current checkpoint is determined. i Subtract the safety margin (d) safe Is the height of the obstacle less than or equal to the value of the corresponding grid cell in Figure 1010 (Hmap(r))? i c i The collision check calculation is performed by obtaining the Z coordinate of the current tool path checkpoint and adding it to the Z coordinate of pixel i relative to the tool center point in the tool height map.
[0069] If the answer at decision diamond 1064 is yes, the process returns to the collision condition at box 1066. If the answer at decision diamond 1064 is no, this means that pixel i of the evaluated checkpoint tool heightmap is safely above obstacle heightmap 1010, and the process returns to decision diamond 1060. At decision diamond 1060, if multiple pixels of the tool heightmap remaining for the current tool path checkpoint need to be evaluated, the process returns to box 1056, where the value of i is incremented by one (i = i + 1), and the new pixel i is evaluated using the steps below box 1056 as discussed above. This process continues until all pixels (e.g., several hundred) of the tool heightmap have been checked for the current tool path checkpoint. The spatial resolution of the tool heightmap and the resulting number of pixels can be selected to provide the desired level of accuracy for a particular application.
[0070] At decision diamond 1060, if there are no more pixels of the tool height map to evaluate for the current tool path checkpoint, the process returns to block 1052 to evaluate the next checkpoint in the tool path. This process continues until there are no more checkpoints left in the tool path.
[0071] Collisions mentioned at block 1066 can be handled by immediately computing a new collision avoidance waypoint with a height greater than the current checkpoint, as previously discussed. Alternatively, all collisions mentioned at block 1066 can be stored until all pixels of the tool height map have been collision checked for all tool path checkpoints, and then each checkpoint with any tool height map pixel collision can have a new collision avoidance waypoint generated based on all of the tool height map pixel collision data for that checkpoint.
[0072] Summarizing the foregoing discussion, the present disclosure, which is particularly well suited for machine tool applications, uses height maps to enable fast collision avoidance computation in motion planning. A height map of a workpiece and / or any other obstacles in a work cell is created, and an interference check is performed against the obstacle height map for a representation of a machine tool at multiple points along a tool path. The representation of the machine tool can be just the tool center point (i.e., the tip of a cutting tool), or the representation can be a height map of the tool in the form of a pixel height map.
[0073] The techniques described above enable extremely fast interference check computation to be performed in real time during motion planning, particularly when the machine tool is represented just as a tool center point. However, when a height map is used to represent the machine tool, the amount of computation required greatly increases, and the speed of computation is correspondingly affected. The following discussion is directed to techniques for improving the speed of real-time interference check computation by pre-generating a workspace collision map and then performing fast point-to-map collision check computation during run-time motion planning.
[0074] Figure 11 is a flowchart 1100 of a method for performing interference checks between a tool and workspace obstacles according to embodiments of the present disclosure, including pre-generation of a workspace collision map and fast tool path interference checking using the collision map. Figure 11 The flowchart arrangement of has collision map pre-generation steps above the dashed line and run-time motion planning steps below the dashed line.
[0075] The tool map reconstruction block 1120 includes a tool map reconstruction block 1120 and a workspace map scanning block 1130. The steps performed in the tool map reconstruction block 1120 are shown in Figure 12 and the steps performed in the workspace map scanning block 1130 are shown in Figure 13 .
[0076] Figure 12This is an illustration of a technique for reconstructing a tool height map with radial margin according to embodiments of the present disclosure. The original tool height map 1210 and its corresponding original tool height map point set 1220 are shown in the upper left. The original tool height map 1210 and the original tool height map point set 1220 are based on the actual shape of the tool body, as previously discussed regarding... Figure 8 As discussed, the following steps will be used to construct a new tool height map that incorporates radial clearance margins around the tool body.
[0077] Box 1230 includes a plan view of the original points in the inner circle 1240 (these come from the original tool heightmap point set 1220) and the margin points in the outer ring 1242. For each original point, a margin point is created, which incorporates a radial clearance margin around the tool body. For example, for original point 1250, a radial offset vector 1252 is applied, resulting in margin point 1254. The radial offset vector 1252 is calculated relative to the tool heightmap center point 1256 with coordinates (0,0,0).
[0078] Consider the original point 1250 with tool heightmap coordinates (x, y, z). The coordinates of the margin point 1254 are calculated using the following equation: r′=r+marginR 2) x′=(r′ / r)·x 3) y′=(r′ / r)·y 4) Where r is the original radius (the radial distance from the tool height map center point 1256 to the original point 1250), and r′ is the radius to the margin point 1254 using the radial offset marginR. No vertical offset is provided to the points; therefore, the margin point 1254 has coordinates (x′, y′, z). The calculations described above are performed for each original point in the inner circle 1240, resulting in a set of margin points in the outer ring 1242. The value of the radial offset marginR can be selected to suit a specific application (e.g., 10 mm).
[0079] Combination point set 1260 in Figure 12 The upper right corner is shown in an isometric view, where points from the original tool heightmap point set 1220 are identifiable, and margin points are clearly visible in outer bands 1262, 1264, and 1266. The new tool heightmap 1270 is shown graphically, including data from the original tool heightmap 1210 and data from the radial margin points discussed above. As previously discussed with respect to other heightmaps, it should be understood that a 2D numerical matrix or grid of multiple pixels is created for the new tool heightmap 1270, which contains data defining z(x, y). This height data grid is the grid used in the calculations discussed below.
[0080] Figure 13 is an illustration of the technique for creating a workspace collision map by scanning a tool height map over a obstacle height map according to embodiments of the present disclosure. As discussed several times before, an obstacle height map 1310 is provided. Also provided is a tool height map 1320. In Figure 13 the tool height map 1320 is shown to be a new tool height map 1270 with radial offset margins incorporated. However, instead the original tool height map 1210 (without radial margins) can be used. Whether or not to include radial margins around the tool height map and how much to include if at all is a matter of preference for any given application. Figure 12
[0081] The concept of a workspace collision map is embodied in the following steps: • Scanning the tool height map over the obstacle height map to create a collision map grid, where each grid cell corresponds to a scan point • For each scan point, determining the height that the tool height map must have in order to avoid any collision between any pixel of the tool height map and any cell of the obstacle height map • Each grid cell of the collision map is then populated with the height value computed when the tool center point is placed in that grid cell of the collision map by the tool height map
[0082] At the lower left of Figure 13 , the scan path 1330 is shown to have a back-and-forth shape. This is for illustration purposes only. The actual scan pattern used and the size of the collision map grid are matters of design preference. The collision map grid must have sufficient resolution so that when the tool center point is subsequently checked against the collision map for collisions the result is accurate. For example, the collision map can represent the workspace in a 100x100 cell grid.
[0083] Box 1340 contains an illustration of the tool height map 1320 at one scan point over the obstacle height map 1310, and is used to discuss the scanning process and calculations. Scan point 1350 is one point along the scan path 1330. Around the scan point 1350, a patch 1360 is drawn on the obstacle height map 1310. The patch 1360 has dimensions that match the dimensions of the rectangle drawn around the tool height map 1320. A sub-height map 1370 is created by cropping the obstacle height map 1310 to the dimensions of the patch 1360. The sub-height map 1370 and the tool height map 1320 each have the same size in dimensions and the same pixel resolution in the X and Y directions (e.g. 100x100 pixels). Thus, there is a 1 : 1 correspondence between pixels in the sub-height map 1370 and pixels in the tool height map 1320.
[0084] For scan point 1350, the collision map height value h is calculated using the sub-height map 1370 and the tool height map 1320 as follows. The collision map height value h is the height to which the tool height map 1320 must be raised above the sub-height map 1370 to avoid any interference. The calculation is performed using a process in which the value of h is set to zero, the calculation is performed, and then h is increased to a value that results in no interference between the sub-height map 1370 and the tool height map 1320.
[0085] A temporary matrix, tmp, is defined that is the same size as the number of pixels in the sub-height map 1370 and the tool height map 1320 (e.g., 100x100 pixels using the same example as above). The values in the matrix tmp are calculated by adding h (which is initially zero) to the value in each pixel in the tool height map 1320 (toolHmap + h) and then subtracting the value in each pixel in the sub-height map 1370 plus the vertical clearance margin (subHmap + marginZ).
[0086] Thus, the matrix tmp is calculated as follows: tmp = (toolHmap + h) - (subHmap + marginZ) 5) where toolHmap is a matrix of tool height map pixels and subHmap is a matrix of sub-height map pixels with a 1:1 pixel correspondence.
[0087] After the matrix tmp is calculated for the current scan point and the current value of h, it is determined whether any of the values in the matrix tmp are less than zero. If so, this means that there is interference between at least one pixel of the sub-height map 1370 and the corresponding pixel of the tool height map 1320. In this case, the value of h is increased by the amount of interference (to offset the largest negative value in tmp), and the matrix tmp is recalculated for the same current scan point. An h value that results in no negative values in the matrix tmp indicates the tool center point height needed at the current scan point to avoid any interference between the tool height map 1320 and the sub-height map 1370.
[0088] The calculation described above results in a height value h for scan point 1350; this h value is used in the grid cell of the collision map that corresponds to scan point 1350. This process is repeated for all of the scan points along scan path 1330, resulting in a grid of height values covering the entire workspace.
[0089] 3D model 1380 depicts the results of the collision map calculations described above. As can be seen, 3D model 1380 looks generally similar to Figure 7 and Figure 9The 3D model 1380 of the workpiece previously shown. However, in contrast to the 3D model of the workpiece, the 3D model 1380 contains raised shoulders and platforms, which are the result of lateral and diagonal interference between the tool and the workpiece. These lateral and diagonal interferences are detected using the collision map construction process described above that scans the tool height map over the obstacle height map. The collision map 1390, shown in 2D graphical form, is the end result of this process. As previously discussed with respect to the height maps, it will be understood that a 2D numerical matrix or grid of pixels is created for the collision map 1390 that contains data defining z(x,y). The tool center point path can be evaluated against this height data grid to quickly perform trajectory interference checking, which incorporates detection of lateral and diagonal interferences as discussed above.
[0090] Returning to Figure 11 As Figure 13 discussed, the collision map 1390 calculated as shown is used as the collision map 1140. The collision map 1140 is provided as input to the collision checker block 1150, and the commanded waypoints are provided as input to the motion planner block 1160. The process steps performed by the collision checker block 1150 and the motion planner block 1160 are substantially the same as the analogous portions of the process previously discussed with respect to Figure 5 , except in the case of Figure 11 , the tool center point path is checked against the collision map 1140, which has the obstacle height map and tool height map data built into it.
[0091] At block 1162, a trajectory is planned based on the commanded waypoints provided as input. This includes both generating a tool path and discretizing the tool path into a set of interference check points. These interference check points are individual points along the continuous tool path that will be compared to the collision map. These steps were previously discussed with respect to Figure 5 .
[0092] At block 1152, each of the individual interference check points from block 1162 is checked for collision against the collision map 1140. This calculation was previously discussed with respect to Figure 6 , where each path check point maps to one grid cell of the collision map 1140, and the height (Z coordinate) of the path check point is compared to the height value of the grid cell. At decision diamond 1154, it is determined whether any collisions have been detected at block 1152. If any collisions are detected, then at block 1156, collision avoidance waypoints are generated for any of the interference check points that interfered with the collision map 1140. After new collision avoidance waypoints are generated at block 1156, the process returns to block 1162 to generate a new tool path using the collision avoidance waypoints. The new tool path is then trajectory discretized, and the collision map interference checking process is repeated.
[0093] When the collision check process does not result in a collision, the process moves from decision diamond 1154 to block 1170, where the new command waypoints are output and used for machine tool motion control. The new command waypoints include a combination of the original command waypoints (typically at least the start and end points) and any collision avoidance waypoints generated at block 1156 on previous iterations through the collision map check process.
[0094] Recall that in Figure 11 , for a given machine tool workspace (combination of tool, workpiece, and other obstacles), a collision map generation calculation (above the dashed line) is performed in a one-time initial step. This collision map generation is a fairly long calculation; in experimental implementations of the disclosed technology, the collision map generation took over 1.5 seconds to complete on a given computing device. However, once the collision map has been generated, the collision check calculations for tool path trajectories are very fast, on the order of a few milliseconds for the same computing device. This is because the trajectory collision check involves only point-to-map calculations for tool center point checkpoints; the tool height map data is already built into the collision map. These interference check calculations are fast enough to be performed in real time during motion planning using a machine tool controller as the computing device.
[0095] As explained previously, the collision map technology of Figures 11-13 is used for interference checking. The interference check is performed before the machine tool physically moves along a trajectory. When an interference is detected in the upcoming motion step using the collision map interference checking method, the machine controller calculates a collision avoidance waypoint and computes a new collision-free trajectory before moving the tool.
[0096] Again, Figures 11-13 All of the steps of the method shown are programmed as algorithms that run on a computing device having a processor and memory. The machine controller preferably performs the motion planning and collision checking steps of Figure 11 , while the collision map generation can be performed on the machine controller or another computing device.
[0097] As outlined above, the disclosed technology for machine tool collision avoidance using height maps and collision maps improves the speed and accuracy of interference checking compared to prior art methods. Evaluations of the disclosed height map and collision map interference checking methods show that these techniques are accurate, able to accommodate lateral and diagonal interferences between the tool and workpiece when needed, and are much more computationally efficient than prior art such as the axis-aligned bounding box tree method.
[0098] While numerous example aspects and embodiments of object interference checking techniques using height maps and collision maps have been discussed above, one of ordinary skill in the art will recognize modifications, permutations, additions and subcombinations thereof. It is therefore intended that the following appended claims and claims introduced hereafter be interpreted as including all such modifications, permutations, additions and subcombinations in the true spirit and scope of the disclosure.
Claims
1. A method for object-to-object interference checking, the method comprising: creating a workspace height map on a computing device having a processor and a memory, the workspace height map defining a height of a workspace obstacle above a reference plane for a grid of a plurality of cells in the reference plane; defining a plurality of checkpoints for an object along a path; and performing an interference check for each of the plurality of checkpoints by comparing a height of the object above the reference plane to the workspace height map.
2. The method of claim 1, wherein the workspace obstacle comprises a workpiece around which the object moves during operation.
3. The method of claim 2, wherein the workspace obstacle further comprises one or more clamps, worktables, or other objects.
4. The method of claim 1, wherein the reference plane is a principal plane of a reference coordinate system having a defined position and orientation relative to a workspace world coordinate system.
5. The method of claim 4, wherein the defined position and orientation relative to the workspace world coordinate system comprises any combination of relative position and orientation.
6. The method of claim 1, wherein performing the interference check comprises representing the object as a single point, and comparing a height of the single point to a height value in a corresponding grid cell of the workspace height map, wherein the corresponding grid cell is found by a normal projection of the checkpoint onto the grid of the plurality of cells in the reference plane.
7. The method of claim 6, wherein an interference is detected when the height of the single point is less than or equal to the height value in the corresponding grid cell of the workspace height map minus a safety margin.
8. The method of claim 1, wherein performing the interference check comprises representing the object as an object height map, and comparing a height of each of a plurality of pixels in the object height map to a height value in a corresponding grid cell of the workspace height map.
9. The method of claim 8, wherein the object height map is defined such that a lowest object point has a height value of zero, and all other pixels of the object height map have a height value greater than zero.
10. The method of claim 9, wherein the height values in the object height map are measured in a direction parallel to the heights contained in the workspace height map.
11. The method of claim 8, wherein representing the object as an object height map comprises adding a radial offset margin to each point on a downward-facing surface of the object used to create the plurality of pixels in the object height map.
12. The method of claim 1, further comprising calculating a collision avoidance waypoint for any of the individual checkpoints that produce an interference in the interference check, and using the collision avoidance waypoint to calculate a new path.
13. The method of claim 12, further comprising sending, by the computing device, motion commands to a machine tool to cause the machine tool to move the object according to the new path.
14. A method for object-to-object interference checking, the method comprising: creating, on a computing device having a processor and a memory, a workspace height map defining heights of workspace obstacles above a reference plane for a grid of a plurality of cells in the reference plane; defining a plurality of checkpoints of a tool along a tool path; performing, for each of the plurality of checkpoints, an interference check by comparing a height of the tool above the reference plane to a height value in a corresponding grid cell of the workspace height map, wherein the corresponding grid cell is found by a normal projection of the checkpoint onto the grid of a plurality of cells in the reference plane; calculating, for any of the plurality of checkpoints that result in a collision in the interference check, a collision avoidance waypoint, and using the collision avoidance waypoint to calculate a new tool path; and sending, by the computing device, motion commands to a machine tool to cause the machine tool to move the tool according to the new tool path.
15. An object-to-object interference checking system comprising: one or more obstacles in a workspace; a machine moving a tool in the workspace; and a computing device having a processor and a memory, the computing device in communication with the tool and configured to perform a plurality of steps, the plurality of steps comprising: creating a workspace height map defining heights of the one or more obstacles above a reference plane for a grid of a plurality of cells in the reference plane; defining a plurality of checkpoints of the tool along a tool path; and performing, for each of the plurality of checkpoints, an interference check by comparing a height of the tool above the reference plane to the workspace height map.
16. The system of claim 15, wherein the one or more obstacles comprise one or more of a workpiece on which the tool performs an operation, a fixture, a table, or other object.
17. The system of claim 15, wherein the reference plane is a principal plane of a reference coordinate frame having a defined position and orientation relative to a workspace world coordinate frame, and the defined position and orientation comprises any combination of a relative position and orientation.
18. The system of claim 15, wherein performing the interference check comprises representing the tool as a tool center point, and comparing a height of the tool center point to a height value in a corresponding grid cell of the workspace height map, wherein the corresponding grid cell is found by a normal projection of the checkpoint onto the grid of a plurality of cells in the reference plane.
19. The system of claim 18, wherein an interference is detected when the height of the tool center point is less than or equal to the height value in the corresponding grid cell of the workspace height map minus a safety margin. 20. The system of claim 15, wherein performing the interference check comprises representing the tool as a tool height map, and comparing a height of each of a plurality of pixels in the tool height map to a height value in a corresponding grid cell of the workspace height map.
21. The system of claim 20, wherein the tool height map is defined such that a tool center point has a height value of zero, and all other pixels of the tool height map have a height value greater than zero.
22. The system of claim 21, wherein the height values in the tool height map are measured in a direction parallel to the heights contained in the workspace height map.
23. The system of claim 20, wherein representing the tool as a tool height map comprises adding a radial offset margin to each point on a downward facing surface of the tool used to create the plurality of pixels in the tool height map.
24. The system of claim 15, wherein the computing device is further configured to calculate a collision avoidance waypoint for any of the individual check points that result in an interference in the interference check, and to calculate a new tool path using the collision avoidance waypoint.
25. The system of claim 24, wherein the computing device is further configured to send a motion command to the machine to move the tool according to the new tool path.