CN112179602B - Mechanical arm collision detection method - Google Patents

Mechanical arm collision detection method Download PDF

Info

Publication number
CN112179602B
CN112179602B CN202010892066.1A CN202010892066A CN112179602B CN 112179602 B CN112179602 B CN 112179602B CN 202010892066 A CN202010892066 A CN 202010892066A CN 112179602 B CN112179602 B CN 112179602B
Authority
CN
China
Prior art keywords
mechanical arm
bounding box
point cloud
collision detection
collision
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010892066.1A
Other languages
Chinese (zh)
Other versions
CN112179602A (en
Inventor
陈钢
李俊杰
曾晓旭
王一帆
邵文
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing University of Posts and Telecommunications
Original Assignee
Beijing University of Posts and Telecommunications
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing University of Posts and Telecommunications filed Critical Beijing University of Posts and Telecommunications
Priority to CN202010892066.1A priority Critical patent/CN112179602B/en
Publication of CN112179602A publication Critical patent/CN112179602A/en
Application granted granted Critical
Publication of CN112179602B publication Critical patent/CN112179602B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M7/00Vibration-testing of structures; Shock-testing of structures
    • G01M7/08Shock-testing

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention provides a mechanical arm collision detection method, which comprises the following steps: respectively preprocessing a virtual simulation scene model and a mechanical arm model by utilizing a surface rasterization technology to obtain corresponding point cloud files; respectively carrying out space segmentation on the obtained point cloud files by utilizing an octree segmentation technology to determine the subspace position of each point cloud to obtain an octree space of the point cloud files; carrying out hierarchical wrapping on the obtained octree space by using the spherical bounding box and the directional bounding box to obtain a mixed bounding box tree; designing a single-configuration collision detection algorithm of the mechanical arm by using a depth-first search algorithm and a bidirectional breadth search algorithm, and obtaining a single-configuration collision detection result of the mechanical arm based on the single-configuration collision detection algorithm of the mechanical arm; and designing a mechanical arm continuous motion collision detection algorithm by utilizing the mechanical arm motion characteristics and a dynamic planning algorithm, and obtaining a collision detection result when the mechanical arm moves continuously based on the mechanical arm continuous motion collision detection algorithm. According to the technical scheme provided by the embodiment of the invention, a more efficient and accurate mechanical arm collision detection method can be realized.

Description

Mechanical arm collision detection method
[ technical field ] A method for producing a semiconductor device
The invention relates to the field of mechanical arm motion simulation, and belongs to a method for detecting mechanical arm collision in a virtual simulation scene.
[ background of the invention ]
Since the 21 st century, robotics is considered to be one of high-tech technologies having important significance for the development of emerging industries in the future, and great attention is paid to the research of robotics by domestic and foreign industries. Because the application environment of the mechanical arm is often very complicated, the motion of the mechanical arm is simulated in advance, and the condition that the mechanical arm collides with the environment or collides with the mechanical arm per se can be reduced to the greatest extent. Therefore, scholars at home and abroad carry out a great deal of research on collision detection algorithms, and the main tasks of the algorithms are to detect whether objects in a virtual simulation environment are contacted or not in time and prompt specific object model information of the contacted objects in a virtual simulation system. Therefore, the collision detection algorithm is an indispensable part in the field of mechanical arm motion simulation.
The existing collision detection algorithms used in mechanical arm motion simulation are more in types, and a space segmentation method and a bounding box technology are algorithms which are widely applied at the present stage, but when a simulation scene is huge and simulation objects are more, the total number of basic geometric elements for constructing the scene is increased, and the detection accuracy and the real-time performance are difficult to meet by only using a single collision detection method.
[ summary of the invention ]
In view of this, the invention provides a method for detecting a collision of a mechanical arm, so as to improve the accuracy and the real-time performance of a collision detection algorithm in mechanical arm motion simulation.
The embodiment of the invention provides a mechanical arm collision detection method, which comprises the following steps:
respectively preprocessing a virtual simulation scene model and a mechanical arm model by utilizing a surface rasterization technology to obtain a point cloud file corresponding to the virtual simulation scene model and a point cloud file corresponding to the mechanical arm model;
respectively carrying out space segmentation on the obtained point cloud files by utilizing an octree segmentation technology to determine the subspace position of each point cloud to obtain an octree space of the point cloud files;
carrying out hierarchical wrapping on the obtained octree space by using the spherical bounding box and the directional bounding box to obtain a mixed bounding box tree;
designing a single-configuration collision detection algorithm of the mechanical arm by using a depth-first search algorithm and a two-way breadth search algorithm, and obtaining a single-configuration collision detection result of the mechanical arm based on the single-configuration collision detection algorithm of the mechanical arm;
and designing a mechanical arm continuous motion collision detection algorithm by utilizing the mechanical arm motion characteristics and a dynamic planning algorithm, and obtaining a collision detection result when the mechanical arm moves continuously based on the mechanical arm continuous motion collision detection algorithm.
In the above method, the preprocessing the virtual simulation scene model and the robot arm model by using the surface rasterization technology includes:
and performing scattered point sampling on the surface of the virtual simulation scene model by using a line segment intersection method of the OSG three-dimensional engine and preset scanning precision to obtain a point cloud file of scattered points corresponding to the virtual simulation scene model.
And performing scattered point sampling on the surface of the mechanical arm model by using a line segment intersection method of the OSG three-dimensional engine and preset scanning precision to obtain a point cloud file of scattered points corresponding to the mechanical arm model.
In the above method, the performing spatial segmentation on the point cloud files by using the octree segmentation technology, determining the subspace position of each point cloud, and before obtaining the octree space of the point cloud files, further includes:
judging whether the number of point clouds in a space to be divided is smaller than a first specified number;
if the number of the point clouds in the space is less than the first specified number, the space is not divided;
and if the number of the point clouds in the space is not less than the first specified number, executing the step of respectively carrying out space segmentation on the obtained point cloud files by using an octree segmentation technology.
In the method, the root nodes of the octree are all point clouds of the point cloud file; the method for respectively carrying out space segmentation on the point cloud files by utilizing the octree segmentation technology, determining the subspace position of each point cloud, and obtaining the octree space of the point cloud files comprises the following steps:
starting from an octree root node, carrying out average segmentation downwards in a recursion manner, wherein eight subspaces obtained by average segmentation are child nodes of the root node, and all the child nodes comprise all point clouds in the subspaces;
and when the node meets the continuous segmentation condition, performing space segmentation on the node until the node does not meet the segmentation condition.
In the above method, the step of performing hierarchical wrapping on the obtained octree space by using the spherical bounding box and the directional bounding box to obtain the mixed bounding box tree includes:
using two bounding box technologies of a spherical bounding box and a directional bounding box to wrap an octree space, constructing a mixed bounding box tree from the root node of the octree downwards, and tightly wrapping all point clouds by the mixed bounding box tree;
wherein, use the ball bounding box to wrap up octree root node, become the root node of mixing bounding box tree, the construction formula of ball bounding box is:
R={(x,y,z)|(x-ox)2+(y-oy)2+(z-oz)2<r2}
(ox,oy,oz) Representing the sphere center coordinates of the sphere bounding box, R representing the sphere radius of the sphere bounding box, (x, y, z) representing the set of all point cloud coordinates, and R representing all points of the point cloud fileA cloud set;
the method comprises the following steps of using a direction bounding box to wrap point clouds contained in all sub-nodes of an octree space to form sub-nodes of a mixed bounding box tree, wherein the direction bounding box is constructed according to the following formula:
M={C+ar1v1+br2v2+cr3v3|a,b,c∈(-1,1)}
point C is the center point of the bounding box, v1,v2,v3Three vectors, r, passing through the C point and being perpendicular to each other1,r2,r3Respectively is point C at v1,v2,v3The extension lengths in three directions, a, b and c, are preset scalar values of three vectors, and M represents all point cloud sets in the sub-nodes.
In the above method, the obtaining of the mechanical arm single-configuration collision detection result based on the mechanical arm single-configuration collision detection algorithm includes:
searching a mixed bounding box tree based on a mechanical arm single-configuration collision detection algorithm, and performing intersection calculation on directional bounding boxes of the mixed bounding box tree to obtain a mechanical arm single-configuration collision detection result; wherein the intersection calculation is obtained by manhattan distance calculation.
In the method, the searching for the mixed bounding box tree based on the mechanical arm single-configuration collision detection algorithm, and performing intersection calculation on the directional bounding boxes of the mixed bounding box tree to obtain the mechanical arm single-configuration collision detection result includes:
in a virtual simulation scene, when single collision detection is carried out on a single configuration of a mechanical arm and the simulation scene, two mixed bounding box trees of the mechanical arm and the simulation scene are searched, and whether intersected sub-nodes exist in the two mixed bounding box trees is judged;
when the difference of the number of all leaf nodes except the root node in the two mixed bounding box trees is larger than a second specified value, performing depth-first search on the bounding box trees with smaller height in the two mixed bounding box trees, and searching whether an intersected sub node exists or not to obtain a mechanical arm single-configuration collision detection result;
and when the difference of the number of all leaf nodes except the root node in the two mixed bounding box trees is smaller than a second specified value, performing bidirectional breadth search on the two mixed bounding box trees, and searching whether an intersected sub node exists or not to obtain a mechanical arm single-configuration collision detection result.
In the above method, the obtaining of the collision detection result when the mechanical arm continuously moves based on the mechanical arm continuous movement collision detection algorithm includes:
when the mechanical arm is at the initial motion moment, performing mechanical arm single-configuration collision detection on the mechanical arm, and storing the collision detection result, wherein the collision detection result comprises a collision result, an intersection point cloud index, a minimum point cloud distance and a collision depth;
when the mechanical arm is at the non-motion initial moment, if no collision occurs at the previous moment and the minimum point cloud distance is greater than a third specified value, judging that no collision occurs at the current moment;
or when the mechanical arm is at the non-motion initial moment, if no collision occurs at the previous moment and the minimum point cloud distance is smaller than a third specified value, judging that the collision may occur at the current moment, and performing mechanical arm single-configuration collision detection on the mechanical arm in the current state to obtain a collision result at the current moment;
or when the mechanical arm is at the non-motion initial moment, if the mechanical arm collides at the previous moment and the collision depth is greater than a fourth specified value, judging that the mechanical arm collides at the current moment;
or when the mechanical arm is at the non-motion initial moment, if the collision happens at the previous moment and the collision depth is smaller than a fourth specified value, judging that the collision possibly happens at the current moment, and performing mechanical arm single-configuration collision detection on the mechanical arm at the current state to obtain a collision result at the current moment;
or when the mechanical arm does not collide at all times in the motion process, judging that no collision occurs in the motion process, otherwise, judging that collision occurs in the motion process, and acquiring the collision time when collision occurs.
Wherein the third specified value is greater than the fourth specified value.
According to the technical scheme, the embodiment of the invention has the following beneficial effects:
in the technical scheme of the embodiment of the invention, a mechanical arm single-configuration collision detection algorithm is designed by utilizing a depth-first search algorithm and a bidirectional breadth search algorithm, so that the calculation speed and the calculation accuracy of the mechanical arm single-configuration collision detection calculation are improved; by utilizing the motion characteristics of the mechanical arm and the dynamic planning algorithm, the collision detection algorithm of the continuous motion of the mechanical arm is designed, and the calculation speed of the collision detection calculation of the continuous motion of the mechanical arm is improved.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without creativity and labor.
Fig. 1 is a schematic flowchart of a method for detecting a collision of a mechanical arm in a virtual simulation scene according to an embodiment of the present invention;
FIG. 2 is a schematic flow diagram of pretreatment in an embodiment of the present invention;
FIG. 3 is a diagram illustrating octree space partitioning according to an embodiment of the present invention;
FIG. 4 is a flow chart of the octree space division according to the embodiment of the present invention;
FIG. 5 is a schematic flow chart of single configuration collision detection for a robotic arm in an embodiment of the present invention;
[ EXAMPLES ]
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention provides a method for detecting mechanical arm collision in a virtual simulation scene, which comprises the following steps of:
step 101, respectively preprocessing a virtual simulation scene model and a mechanical arm model by using a surface rasterization technology to obtain a point cloud file corresponding to the virtual simulation scene model and a point cloud file corresponding to the mechanical arm model.
Specifically, a specific implementation of step 101 may be as shown in fig. 2, and includes the following steps:
step 201, respectively importing a virtual simulation scene model and a mechanical arm model into an OSG three-dimensional engine;
202, after the model is imported, extracting the surface contours of the virtual simulation scene model and the mechanical arm model by using a surface contour obtaining method osg provided by a three-dimensional engine, wherein bounding sphere, getBack ();
step 203, uniformly taking points on the surface contour according to the preset scanning precision, and obtaining surface scattered points of the virtual simulation scene model and the mechanical arm model by utilizing a method osgUtil for obtaining straight lines provided in a three-dimensional engine, namely an intersectVisitor, and a hits () method;
and step 204, after the surface scatter points of the virtual simulation scene model and the mechanical arm model are obtained, the scatter point information is stored as a binary point cloud file to prepare for subsequent space segmentation operation.
And 102, respectively carrying out space segmentation on the obtained point cloud files by using an octree segmentation technology to determine the subspace position of each point cloud so as to obtain the octree space of the point cloud files.
Specifically, a specific implementation of step 102 may be as shown in fig. 4, and includes the following steps:
step 401, setting all point clouds of a point cloud file as octree space root nodes, and setting the root nodes as nodes to be segmented;
step 402, judging whether the number of point clouds in the space to be divided is less than a first specified number. If the number of the point clouds in the space is less than the first designated number, the space is not divided, and step 405 is executed; if the number of the point clouds in the space is not less than the first designated number, executing step 403;
step 403, performing space segmentation on the space to be segmented, and averagely segmenting the current space to be segmented in the space by using auxiliary surfaces parallel to the plane xoy, the plane yoz and the plane xoz respectively to obtain eight subspaces, wherein the numbers of the eight subspaces are from 0 to 7, and the subspaces contain all point clouds inside; and the parent nodes of the eight subspaces are current nodes. The space division schematic diagram is shown in FIG. 3;
step 404, setting the eight subspaces as nodes to be divided, and executing step 402 again;
step 405, an octree space of the point cloud file is obtained.
And 103, performing hierarchical wrapping on the obtained octree space by using the spherical bounding box and the directional bounding box to obtain a mixed bounding box tree.
The method comprises the following steps of using two bounding box technologies of a spherical bounding box and a directional bounding box to wrap an octree space, starting to downwards construct a mixed bounding box tree from an octree root node, and tightly wrapping all point clouds by the mixed bounding box tree:
specifically, a sphere bounding box construction formula is used for all point clouds in the octree space root node to construct a sphere bounding box, so that the sphere bounding box wraps the octree space root node to form a root node of a mixed bounding box tree;
constructing a direction bounding box by using a direction bounding box construction formula for all point clouds in all nodes of the octree space non-root nodes, and enabling the direction bounding box to wrap all the non-root nodes of the octree space to become child nodes of the mixed bounding box tree;
and 104, designing a single-configuration collision detection algorithm of the mechanical arm by using a depth-first search algorithm and a bidirectional breadth search algorithm, and obtaining a single-configuration collision detection result of the mechanical arm based on the single-configuration collision detection algorithm of the mechanical arm.
Specifically, a specific implementation of step 104 may be as shown in fig. 5, and includes the following steps:
step 501, acquiring the number of all nodes of a mixed bounding box tree of a mechanical arm and the number of all nodes of the mixed bounding box tree of a virtual simulation environment;
step 502, calculating the difference between the number of nodes of the two mixed bounding box trees. When the difference between the numbers of all leaf nodes except the root node in the two mixed bounding box trees is greater than or equal to a second specified value, executing step 503; when the difference between the numbers of all leaf nodes except the root node in the two mixed bounding box trees is less than the second specified value, step 504 is executed.
In step 503, the bounding box trees with smaller height in the two trees are subjected to depth-first search, and branches of the mixed bounding box tree are searched as deeply as possible. When the edge where the node is located is searched, the search backtracks to the initial node of the edge where the node is found. This process continues until all nodes reachable from the source node have been discovered. If the undiscovered nodes exist, selecting one of the nodes as a source node and repeating the process, wherein the whole process is repeated until all the nodes are accessed;
and step 504, performing bidirectional breadth search on the two bounding box trees, starting the search from root nodes of the two bounding box trees respectively, and stopping the search when leaf nodes are searched or intersected nodes are detected.
And 505, performing intersection calculation on the direction bounding boxes of the leaf nodes by using the Manhattan distance.
The method comprises the following specific steps: suppose there are two bounding boxes A and B, with their respective center points OA(xA,yA,zA) And OB(xB,yB,zB) The Euclidean distance between two points is L:
Figure BDA0002656076070000081
suppose OAAnd OBThe length of each of the three axes of the bounding box is XA,YA,ZA,XB,YB,ZBThe maximum and minimum distances from the center point of the bounding box to the eight vertexes are respectively RmaxAnd RminAnd then:
Figure BDA0002656076070000082
RAmin=min(XA,YA,ZA)
Figure BDA0002656076070000083
RBmin=min(XB,YB,ZB)
if L > RAmax+RBmaxThen bounding box A, B must not be intersected; if L is<RAmax+RBmaxThen bounding box A, B is positively intersected; if R isAmin+RBmin<L≤RAmax+RBmaxThen the bounding box A, B needs to be tested for intersection.
The distance L between two points is expressed in manhattan distance:
L=|xA-xB|+|yA-yB|+|zA-zB|
it can be seen that only 2 times of addition calculation, 3 times of subtraction calculation and 3 times of absolute value calculation are needed to calculate the Manhattan distance between two central points, and more calculation cost is reduced compared with the Euclidean distance.
And 105, designing a continuous motion collision detection algorithm of the mechanical arm by utilizing the motion characteristics of the mechanical arm and a dynamic planning algorithm, and obtaining a collision detection result when the mechanical arm moves continuously based on the continuous motion collision detection algorithm of the mechanical arm.
In a virtual simulation environment, the motion of a simulation object is often irregular and unpredictable, and in this case, the motion function of the object cannot be obtained. The state of motion of the robot arm is continuous and its position at this moment is correlated to the position at the previous moment. Suppose there is an object A in the virtual simulation environment, which is at two adjacent time points t1And t2Respectively, the position and the state of (b) are (p)1,s1) And (p)2,s2) And p is the position information of the mechanical arm at the current moment, and s is the collision information of the mechanical arm at the current moment. When the time interval Δ t is t1-t2On a scale of → 0, there is lim (p)1-p2) → 0, and s2Relative to s1The change of the time sequence is small, so that a recursion formula of a dynamic programming algorithm can be designed, a lot of repeated work is reduced, the traversal process is accelerated, the time complexity of a continuous collision detection algorithm is reduced, and the acceleration effect is more obvious under the condition that the depth of the bounding box tree is larger.
When the mechanical arm is in the initial motion moment, executing step 104 on the mechanical arm configuration, performing single-configuration collision detection on the mechanical arm, and storing the collision detection result, wherein the collision detection result comprises a collision result, an intersection point cloud index, a minimum point cloud distance and a collision depth;
when the mechanical arm is at the non-motion initial moment, if no collision occurs at the previous moment and the minimum point cloud distance is greater than a third specified value, judging that no collision occurs at the current moment;
or when the mechanical arm is at the non-motion initial moment, if no collision occurs at the previous moment and the minimum point cloud distance is smaller than a third specified value, judging that the collision may occur at the current moment, executing step 104 in the current state, and performing mechanical arm single-configuration collision detection on the mechanical arm to obtain a collision result at the current moment;
or when the mechanical arm is at the non-motion initial moment, if the collision happens at the previous moment and the collision depth is greater than a fourth specified value, the current moment can be considered to be collided;
or when the mechanical arm is at the non-motion initial moment, if the collision happens at the previous moment and the collision depth is smaller than a fourth specified value, judging that the collision is likely to happen at the current moment, executing step 104 in the current state, and performing mechanical arm single-configuration collision detection on the mechanical arm to obtain a collision result at the current moment;
when the mechanical arm does not collide at all times in the motion process, judging whether the mechanical arm does not collide in the motion process or not, and obtaining the specific collision time.
The technical scheme of the embodiment of the invention has the following beneficial effects:
in the technical scheme of the embodiment of the invention, a mechanical arm collision detection method is designed, a virtual simulation scene model and a mechanical arm model are respectively preprocessed by utilizing a surface rasterization technology to obtain corresponding point cloud files; respectively carrying out space segmentation on the obtained point cloud files by utilizing an octree segmentation technology to determine the subspace position of each point cloud to obtain an octree space of the point cloud files; carrying out hierarchical wrapping on the obtained octree space by using the spherical bounding box and the directional bounding box to obtain a mixed bounding box tree; designing a single-configuration collision detection algorithm of the mechanical arm by using a depth-first search algorithm and a bidirectional breadth search algorithm, and obtaining a single-configuration collision detection result of the mechanical arm based on the single-configuration collision detection algorithm of the mechanical arm; and designing a mechanical arm continuous motion collision detection algorithm by utilizing the mechanical arm motion characteristics and a dynamic planning algorithm, and obtaining a collision detection result when the mechanical arm moves continuously based on the mechanical arm continuous motion collision detection algorithm.
According to the invention, the accuracy and the real-time performance of collision detection during mechanical arm motion simulation are realized by constructing a virtual simulation scene and the octree of the mixed bounding box of the mechanical arm and designing a search strategy according to the motion characteristics of the mechanical arm.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Those skilled in the art will appreciate that those matters not described in detail in the present specification are well known in the art.

Claims (5)

1. A method of mechanical arm collision detection, the method comprising:
respectively preprocessing a virtual simulation scene model and a mechanical arm model by utilizing a surface rasterization technology to obtain a point cloud file corresponding to the virtual simulation scene model and a point cloud file corresponding to the mechanical arm model;
respectively carrying out space segmentation on the obtained point cloud files by utilizing an octree segmentation technology to determine the subspace position of each point cloud to obtain an octree space of the point cloud files;
carrying out hierarchical wrapping on the obtained octree space by using the spherical bounding box and the directional bounding box to obtain a mixed bounding box tree;
searching the mixed bounding box tree by using a depth-first search algorithm and a bidirectional breadth search algorithm, and performing intersection calculation on the directional bounding boxes of the mixed bounding box tree to obtain a mechanical arm single-configuration collision detection result;
in a virtual simulation scene, when single collision detection is carried out on a single configuration of a mechanical arm and the simulation scene, two mixed bounding box trees of the mechanical arm and the simulation scene are searched, and whether intersected sub-nodes exist in the two mixed bounding box trees is judged;
when the difference of the number of all leaf nodes except the root node in the two mixed bounding box trees is larger than a second specified value, performing depth-first search on the bounding box trees with smaller height in the two mixed bounding box trees, and searching whether an intersected sub node exists or not to obtain a mechanical arm single-configuration collision detection result;
when the difference of the number of all leaf nodes except the root node in the two mixed bounding box trees is smaller than a second specified value, performing bidirectional breadth search on the two mixed bounding box trees, and searching whether an intersected sub node exists or not to obtain a mechanical arm single-configuration collision detection result;
obtaining a collision detection result when the mechanical arm continuously moves by utilizing the motion characteristic of the mechanical arm, a dynamic programming algorithm and the detection method for the single configuration of the mechanical arm;
when the mechanical arm is at the initial motion moment, performing mechanical arm single-configuration collision detection on the mechanical arm, and storing the collision detection result, wherein the collision detection result comprises a collision result, an intersection point cloud index, a minimum point cloud distance and a collision depth;
when the mechanical arm is at the non-motion initial moment, if no collision occurs at the previous moment and the minimum point cloud distance is greater than a third specified value, judging that no collision occurs at the current moment;
or when the mechanical arm is at the non-motion initial moment, if no collision occurs at the previous moment and the minimum point cloud distance is smaller than a third specified value, judging that the collision may occur at the current moment, and performing mechanical arm single-configuration collision detection on the mechanical arm in the current state to obtain a collision result at the current moment;
or when the mechanical arm is at the non-motion initial moment, if the mechanical arm collides at the previous moment and the collision depth is greater than a fourth specified value, judging that the mechanical arm collides at the current moment;
or when the mechanical arm is at the non-motion initial moment, if the collision happens at the previous moment and the collision depth is smaller than a fourth specified value, judging that the collision possibly happens at the current moment, and performing mechanical arm single-configuration collision detection on the mechanical arm at the current state to obtain a collision result at the current moment;
or when the mechanical arm does not collide at all times in the motion process, judging that no collision occurs in the motion process, otherwise, judging that collision occurs in the motion process, and acquiring the collision time when collision occurs;
wherein the third specified value is greater than the fourth specified value.
2. The collision detection method according to claim 1, wherein the preprocessing the virtual simulation scene model and the mechanical arm model by using the surface rasterization technology comprises:
performing scatter sampling on the surface of the virtual simulation scene model by using a line segment intersection method of an OSG three-dimensional engine and preset scanning precision to obtain a point cloud file of scatter points corresponding to the virtual simulation scene model;
and performing scattered point sampling on the surface of the mechanical arm model by using a line segment intersection method of the OSG three-dimensional engine and preset scanning precision to obtain a point cloud file of scattered points corresponding to the mechanical arm model.
3. The method of claim 1, wherein the performing spatial segmentation on the point cloud files by using an octree segmentation technique to determine a subspace location of each point cloud, further comprises:
judging whether the number of point clouds in a space to be divided is smaller than a first specified number;
if the number of the point clouds in the space is less than the first specified number, the space is not divided;
and if the number of the point clouds in the space is not less than the first specified number, executing the step of respectively carrying out space segmentation on the obtained point cloud files by using an octree segmentation technology.
4. The collision detection method according to claim 3, characterized in that the root node of the octree is the entire point cloud of the point cloud file; the method for respectively carrying out space segmentation on the point cloud files by utilizing the octree segmentation technology, determining the subspace position of each point cloud, and obtaining the octree space of the point cloud files comprises the following steps:
starting from an octree root node, carrying out average segmentation downwards in a recursion manner, wherein eight subspaces obtained by average segmentation are child nodes of the root node, and all the child nodes comprise all point clouds in the subspaces;
and when the node meets the continuous segmentation condition, performing space segmentation on the node until the node does not meet the segmentation condition.
5. The collision detection method according to claim 1, wherein the step of hierarchically wrapping the obtained octree space by using the sphere bounding box and the direction bounding box to obtain a mixed bounding box tree comprises the steps of:
using two bounding box technologies of a spherical bounding box and a directional bounding box to wrap an octree space, constructing a mixed bounding box tree from the root node of the octree downwards, and tightly wrapping all point clouds by the mixed bounding box tree;
wherein, use the ball bounding box to wrap up octree root node, become the root node of mixing bounding box tree, the construction formula of ball bounding box is:
R={(x,y,z)|(x-ox)2+(y-oy)2+(z-oz)2<r2}
(ox,oy,oz) Representing the sphere center coordinates of the sphere bounding box, R the sphere radius of the sphere bounding box, (x, y, z) all point cloud coordinate sets, R the point cloud coordinate setCollecting all point clouds of the point cloud file;
the method comprises the following steps of using a direction bounding box to wrap point clouds contained in all sub-nodes of an octree space to form sub-nodes of a mixed bounding box tree, wherein the direction bounding box is constructed according to the following formula:
M={C+ar1v1+br2v2+cr3v3|a,b,c∈(-1,1)}
point C is the center point of the bounding box, v1,v2,v3Three vectors, r, passing through the C point and being perpendicular to each other1,r2,r3Respectively is point C at v1,v2,v3The extension lengths in three directions, a, b and c, are preset scalar values of three vectors, and M represents all point cloud sets in the sub-nodes.
CN202010892066.1A 2020-08-28 2020-08-28 Mechanical arm collision detection method Active CN112179602B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010892066.1A CN112179602B (en) 2020-08-28 2020-08-28 Mechanical arm collision detection method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010892066.1A CN112179602B (en) 2020-08-28 2020-08-28 Mechanical arm collision detection method

Publications (2)

Publication Number Publication Date
CN112179602A CN112179602A (en) 2021-01-05
CN112179602B true CN112179602B (en) 2021-06-25

Family

ID=73925257

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010892066.1A Active CN112179602B (en) 2020-08-28 2020-08-28 Mechanical arm collision detection method

Country Status (1)

Country Link
CN (1) CN112179602B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112827175B (en) * 2021-02-26 2022-07-29 腾讯科技(深圳)有限公司 Collision frame determination method and device and computer readable storage medium
CN113001551B (en) * 2021-03-18 2022-09-23 青岛九维华盾科技研究院有限公司 Fast collision detection method based on octree structure segmentation
CN113244622B (en) * 2021-06-22 2022-11-08 腾讯科技(深圳)有限公司 Collision data processing method and device, storage medium and electronic equipment

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101130833B1 (en) * 2011-06-09 2012-03-28 한국해양연구원 Apparatus for standard penetration test investigating geological features of the sea bottom
CN109227539B (en) * 2018-09-27 2021-12-17 北京邮电大学 Method for minimizing collision force of space flexible mechanical arm
CN109591018B (en) * 2019-01-07 2021-10-08 北京邮电大学 Method for controlling stable free floating space mechanical arm after target capture
CN110613511B (en) * 2019-10-16 2021-03-16 武汉联影智融医疗科技有限公司 Obstacle avoidance method for surgical robot
CN111062980B (en) * 2019-11-22 2022-03-25 西安理工大学 Soft body collision detection method
CN111496786A (en) * 2020-04-15 2020-08-07 武汉海默机器人有限公司 Point cloud model-based mechanical arm operation processing track planning method

Also Published As

Publication number Publication date
CN112179602A (en) 2021-01-05

Similar Documents

Publication Publication Date Title
CN112179602B (en) Mechanical arm collision detection method
CN100485662C (en) Characteristic analytical method for product point clouds surface based on dynamic data access model
CN112669434B (en) Collision detection method based on grid and bounding box
CN115661374B (en) Rapid retrieval method based on space division and model voxelization
CN104240290B (en) Three-dimensional cable intersection detecting method based on bounding sphere models
Xú et al. STEP-NC based reverse engineering of in-process model of NC simulation
AU2021266206B1 (en) Obstacle recognition method and system based on 3D laser point clouds
CN104809760A (en) Depth-first strategy based method for automatically constructing geo-spatial three-dimensional outline
Lu et al. An algorithm for the generation of an optimum CMM inspection path
CN112906215A (en) Pipe tool path generation method based on SolidWorks secondary development
CN117115393A (en) NURBS curved surface parallel intersection method, equipment and storage medium based on GPU
Tang et al. Adjacency-based culling for continuous collision detection
Jin et al. High precision indoor model contour extraction algorithm based on geometric information
Kwon et al. Super ray based updates for occupancy maps
Khamayseh et al. Use of the spatial kD-tree in computational physics applications
CN114089692A (en) Rapid numerical control programming method suitable for complex and long surface of part
Nowakiewicz MST-Based method for 6DOF rigid body motion planning in narrow passages
CN112364751A (en) Obstacle state judgment method, device, equipment and storage medium
CN112872114A (en) Metal plate bending process three-dimensional interference detection method integrating OBB bounding box and geometric algorithm
Kuno et al. Object recognition using a feature search strategy generated from a 3D model
Wang et al. Lightweight collision detection algorithm in Web3D robot simulation platform
Chou et al. Real-time and accurate multiple contact detection between general curved objects
He et al. Calculating the minimum distance between two NURBS curves
Qian et al. Point cloud trajectory planning based on Octree and K-dimensional tree algorithm
Wang et al. Online Collision Avoidance Algorithm for Lightweight Web3D Robot Based on M-BVH

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant