A method for gripping circular materials on a flexible disk
Patent Information
- Application Number
- CN202310840343.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-10
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2043-07-10
AI Technical Summary
[0002]通常对于位于柔性盘上的圆形物料,一般都是固定机器人夹爪的角度进行抓取,但当两个圆形物料靠的很近的时候,会导致抓取一个圆形物料时会碰到其另一个圆形物料,从而不能很好的抓取到物料,当夹爪与物料严重磕碰时还会导致机器人夹爪的损毁
[0037] This method incorporates a material recognition algorithm within the gripper area to effectively determine the presence of other circular materials. It also combines multi-angle rotation judgment: when gripping material at a fixed angle would encounter other circular materials, the simulated gripper area is virtually rotated around the material's center by a certain angle to provide an angle that avoids contact with other circular materials. Furthermore, this method introduces an interference judgment algorithm between the gripper area and the flexible disk boundary, combined with multi-angle rotation judgment. When gripping material at the simulated current gripper area position would encounter the flexible disk boundary, the simulated gripper area is virtually rotated around the material's center by a certain angle to provide an angle that does not interfere with the flexible disk edge. Finally, the gripper moves and rotates according to the simulated current gripper area position information to be above the material, thus achieving effective gripping.
Smart Images

Figure CN116728413B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of machine vision and robot control, and in particular to a method for grasping circular materials on a flexible disk. Background Technology
[0002] Normally, for round materials located on a flexible disk, the robot gripper is held at a fixed angle. However, when two round materials are very close together, the robot may bump into the other round material while gripping one, making it difficult to grip the material properly. Severe collision between the gripper and the material can also damage the robot gripper.
[0003] On the other hand, if the gripper is too large, it may touch the edge of the flexible disk when gripping at a fixed angle, thus damaging the gripper. This problem is usually avoided by reducing the robot's search area, but this will prevent the robot from gripping round materials located at the edge of the disk, thereby affecting the gripping cycle. Summary of the Invention
[0004] To address the aforementioned problems and technical requirements, the inventors have proposed a method for gripping circular materials on a flexible disk. The technical solution of this invention is as follows:
[0005] A method for gripping circular materials on a flexible disk includes the following steps:
[0006] Acquire an image of the material and locate the circular material within it;
[0007] For each circular material, simulate the gripper area occupied by the gripper when it grasps the circular material in the image;
[0008] Determine whether there are other round materials in the gripper area. If so, rotate the gripper area around the center of the material by a certain angle and re-determine whether there are other round materials in the current gripper area.
[0009] If not, determine whether the current gripper area collides with the boundary of the flexible disk. If a collision occurs, rotate the gripper area around the material center as an axis by a certain angle, and re-determine whether there are other circular materials in the current gripper area.
[0010] If no collision occurs, the gripper moves and rotates to the simulated current gripper area to grasp the round material.
[0011] The further technical solution is that the method includes:
[0012] Determine whether the location of the gripper area collides with the boundary of the flexible disk. If a collision occurs, rotate the gripper area by a certain angle around the center of the material and re-determine whether the simulated current gripper position collides with the boundary of the flexible disk.
[0013] If no collision occurs, determine whether there are other circular materials in the current gripper area. If there are, rotate the gripper area by a certain angle around the center of the material, and re-determine whether the simulated current gripper position collides with the boundary of the flexible disk.
[0014] If it does not exist, the gripper moves and rotates to the simulated current gripper area to grab the round material.
[0015] A further technical solution is that the method for locating circular materials from an image includes:
[0016] Using the center of the circular material as the template center, a material template is established based on the outline of the circular material, and the material template is trained at 0 degrees; the circular material is located in the image through a template matching algorithm.
[0017] A further technical solution involves determining whether other circular materials exist in the gripper area, including:
[0018] The image containing circular materials and gripper areas is subjected to binarization segmentation to distinguish the gray values of circular and non-circular materials.
[0019] Calculate the ratio of the pixel area of circular material in the gripper region to the total pixel area of the gripper region, and compare it with a set threshold. If the ratio exceeds the threshold, it is considered that there are other circular materials in the gripper region; otherwise, it is considered that there are no other circular materials in the gripper region.
[0020] A further technical solution involves determining whether a collision occurs between the gripper area and the boundary of the flexible disk, including:
[0021] Based on the relationship between the coordinates of the outer boundary vertices of the current gripper region and the coordinates of the vertices of the flexible disk boundary, it is determined whether a collision has occurred.
[0022] The further technical solution involves determining the coordinate relationships using the following methods:
[0023] The outer boundary vertex P of the current gripper region is calculated using the material template used when positioning circular materials. i 'The position of the four vertices N of the flexible disk boundary in the image coordinate system is obtained. j Position in the image coordinate system;
[0024] Determine each outer boundary vertex P′ i If the set conditions are not met, it is assumed that the current gripper region has collided with the boundary of the flexible disk. The set conditions are: vertex P′ i It is simultaneously sandwiched between the upper and lower boundaries and the left and right boundaries of the flexible disk.
[0025] A further technical solution involves calculating the outer boundary vertex P′ of the simulated current gripper region. i Methods for determining position in an image coordinate system include:
[0026] In the material template, the template gripper area occupied by the gripper when grasping a circular material is simulated with a fixed gripper angle, and the outer boundary vertex P of the template gripper area is obtained. i Position in the image coordinate system (PX) i ,PY i );
[0027] For each vertex P i Calculate the deviations DPX between its x and y coordinates and the x and y coordinates of the template center point. i DPY i ;
[0028] The position (PX′0, PY′0) of the center point P′0 of the circular material obtained when positioning the circular material using the material template is obtained in the image coordinate system, and the rotation angle θ of the current gripper area relative to the template gripper area is simulated.
[0029] Calculate vertex P based on the rotation transformation matrix formula. i After rotating counterclockwise to vertex P′ i Position of time (PX′) i ,PY′ i The expression is:
[0030]
[0031] Its further technical solution is to determine vertex P′ i The expression for being sandwiched between the upper and lower boundaries and the left and right boundaries of the flexible disk is:
[0032]
[0033] Wherein, N1 is the upper left vertex of the flexible disk, N2 is the upper right vertex of the flexible disk, N3 is the lower left vertex of the flexible disk, and N4 is the lower right vertex of the flexible disk.
[0034] A further technical solution involves simulating the gripper area occupied by the gripper when grasping a circular material in an image, including:
[0035] In the image, the gripper area is simulated by the actual angle of the gripper when it is about to grasp a circular material. The gripper area is two rectangular frames symmetrical about the center point of the circular material. The side of the rectangular frame that is far from the center point of the circular material is the outer boundary of the simulated gripper area.
[0036] The beneficial technical effects of this invention are:
[0037] This method incorporates a material recognition algorithm within the gripper area to effectively determine the presence of other circular materials. It also combines multi-angle rotation judgment: when gripping material at a fixed angle would encounter other circular materials, the simulated gripper area is virtually rotated around the material's center by a certain angle to provide an angle that avoids contact with other circular materials. Furthermore, this method introduces an interference judgment algorithm between the gripper area and the flexible disk boundary, combined with multi-angle rotation judgment. When gripping material at the simulated current gripper area position would encounter the flexible disk boundary, the simulated gripper area is virtually rotated around the material's center by a certain angle to provide an angle that does not interfere with the flexible disk edge. Finally, the gripper moves and rotates according to the simulated current gripper area position information to be above the material, thus achieving effective gripping. Attached Figure Description
[0038] Figure 1 This is a flowchart of the gripping method for circular materials on a flexible disk provided in this application.
[0039] Figure 2 This is a schematic diagram of the material recognition algorithm in the gripper area provided in this application.
[0040] Figure 3 This is a schematic diagram of the flexible disk boundary interference judgment algorithm provided in this application.
[0041] Figure 4 This is a schematic diagram illustrating the determination of the outer boundary vertex of the gripper region within the boundary of the flexible disk provided in this application.
[0042] Figure 5 This is a comparative diagram of the present application and traditional fixed-angle material grasping. Detailed Implementation
[0043] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings.
[0044] like Figure 1 As shown, this application provides a method for gripping circular materials on a flexible disk, specifically including the following steps:
[0045] Step 1: Acquire a material image and locate the circular material within it. This includes the following sub-steps:
[0046] Step 1-1: Using the center of the circular material as the template center, create a material template based on the outline of the circular material.
[0047] Steps 1-2: Train the material template at 0 degrees.
[0048] Steps 1-3: Use a camera to capture images of the material on the flexible disk, and locate the circular material in the image using a template matching algorithm. Specifically, use a material template to identify the outline of the circular material in the image, and then find the center of the outline to obtain the position of the center point of the circular material in the image coordinate system.
[0049] In this step, since this application targets circular materials, and a circle has no angle, it can be considered as 0 degrees. Thus, only one template is obtained. Compared with the traditional multi-angle template matching algorithm, this application can quickly locate the target shape of the material, and the storage and retrieval of the template are extremely fast.
[0050] Step 2: For each circular material, simulate the gripper area occupied by the gripper when it grasps the circular material in the image.
[0051] Specifically, in the image, the gripper area is simulated by the actual angle of the gripper when it grasps a circular material. This gripper area consists of two rectangular frames symmetrical about the center point of the circular material. For example... Figure 2 As shown, assuming the initial angle of the gripper is 0 degrees, that is, the angle when the midline of the simulated rectangular gripper regions A and B vertically passes through the center point of the circular material, the sides of the rectangles A and B that are far from the center point of the circular material are the outer boundaries of the simulated current gripper regions.
[0052] Step 3a: Determine if there are other round materials in the gripper area. If not, proceed to step 4a; if so, proceed to step 5a. Figure 2 As shown, the specific steps include the following:
[0053] Step 3-1: Perform binarization segmentation on the image containing the circular material and the gripper area to distinguish the grayscale values of the circular and non-circular materials. In the resulting binarized image, the grayscale value of the circular material becomes 255, and the grayscale value of the non-circular material becomes 0 (shown as a shaded example in the figure); or, the grayscale value of the circular material becomes 0, and the grayscale value of the non-circular material becomes 255. Optionally, the former grayscale configuration is preferred in this embodiment.
[0054] Step 3-2: Calculate the total pixel area Num(A+B) of the gripper region, that is, calculate the total number of pixels in the simulated rectangular gripper region A and rectangular gripper region B.
[0055] Step 3-3: Calculate the pixel area C of circular material in the gripper region, that is, calculate the total number of pixels with a grayscale value of 255 in the simulated rectangular gripper regions A and B.
[0056] Steps 3-4: Calculate the area percentage P, P = C / Num(A+B).
[0057] Steps 3-5: Set percentage thresholds T and P for comparison:
[0058] When P <= T, it is assumed that there are no other round materials in the gripper area, that is, the gripper and the material will not collide, and proceed to step 4a; when P > T, it is assumed that there are other round materials in the gripper area, that is, the gripper and the material will collide, and proceed to step 5a.
[0059] Optionally, the threshold T can be set in the range of [0, 100], depending on the actual crawling requirements.
[0060] Step 4a: Determine whether a collision occurs between the current gripper region and the flexible disk boundary. If a collision occurs, proceed to step 5a; otherwise, proceed to step 6. This step determines whether a collision has occurred based on the simulated relationship between the coordinates of the outer boundary vertices of the current gripper region and the coordinates of the vertices of the flexible disk boundary. Figure 3 As shown, the specific steps include the following:
[0061] Step 4-1: Obtain the four vertices N of the flexible disk boundary. j Position in the image coordinate system (NX) j NY j The vertices are denoted as N1(NX1,NY1), N2(NX2,NY2), N3(NX3,NY3), and N4(NX4,NY4), respectively.
[0062] Step 4-2: Calculate the outer boundary vertex P of the simulated current gripper area using the material template used when positioning circular materials. i The position of ' in the image coordinate system. Specifically:
[0063] 1) In the material template, simulate the template gripper area occupied by the gripper when it wants to grasp a round material with a fixed gripper angle (e.g., the initial gripper angle is 0 degrees), and obtain the outer boundary vertex P of the template gripper area. i Position in the image coordinate system (PX) i ,PY i These are denoted as P1(PX1,PY1), P2(PX2,PY2), P3(PX3,PY3), and P4(PX4,PY4), respectively. The method for simulating the gripper region is the same as in step 2, and will not be repeated here.
[0064] 2) For each vertex P i Calculate the deviations between the x and y coordinates of the template and the x and y coordinates of the template center point P0(PX0,PY0), and denote them as DPX. i =(PX i -PX0), DPY i =(PYi -PY0).
[0065] 3) Having obtained the position (PX′0, PY′0) of the center point P′0 of the circular material in the image coordinate system in steps 1-3, we can also obtain the rotation angle θ of the simulated current gripper area relative to the template gripper area. Then, the vertex P is calculated based on the rotation transformation matrix formula. i After rotating counterclockwise to vertex P i Position at time (PX′) i ,PY′ i Let P′1(PX′1,PY′1), P′2(PX′2,PY′2), P′3(PX′3,PY′3), and P′4(PX′4,PY′4) be the rotation transformation matrix formulas.
[0066]
[0067] Taking the calculation of P′1(PX′1,PY′1) as an example, substituting the corresponding DPX1 and DPY1 into equation (1) yields:
[0068] PX′1=(PX1-PX0)*cosθ-(PY1-PY0)*sinθ+PX′0
[0069] PY′1=(PY1-PY0)*cosθ+(PX1-PX0)*sinθ+PY′0
[0070] The calculation methods for the remaining P′2(PX′2,PY′2), P′3(PX′3,PY′3), and P′4(PX′4,PY′4) are similar and will not be repeated here. It should be noted that when clockwise is taken as the positive direction of rotation, the sign of the rotation transformation matrix formula changes accordingly, which is also within the scope of protection of this method.
[0071] Step 4-3: Determine each outer boundary vertex P′ i Does the given condition (vertex P′) meet? i Simultaneously sandwiched between the upper and lower boundaries and the left and right boundaries of the flexible disk, it can be determined using the following formula:
[0072]
[0073] If the two formulas of equation (2) are not satisfied, it is considered that the simulated current gripper area is in collision with the boundary of the flexible disk, that is, there is interference between the gripper and the flexible disk, and proceed to step 5a; if the two formulas of equation (2) are satisfied, it is considered that the simulated current gripper area is not in collision with the boundary of the flexible disk, that is, there is no interference between the gripper and the flexible disk, and proceed to step 6.
[0074] like Figure 4 As shown, this application cleverly transforms the problem of determining whether a point is sandwiched between two line segments into determining whether a point is on one side of a certain line segment. Therefore, the directionality of the cross product of vectors can be used to determine whether the angle exceeds 180 degrees.
[0075] Step 5a: Rotate the gripper area around the center of the material by a certain angle, and re-determine whether there are other circular materials in the current gripper area, that is, return to step 3a.
[0076] In this embodiment, each time a virtual rotation is performed, the simulated gripper area is rotated in a set direction (such as counterclockwise) with the center of the material as the axis, with a certain step size, and the rotation angle range is [0, 180].
[0077] Step 6: Move and rotate the gripper to the simulated current gripper area to grab the current round material, and then return to Step 2 to start grabbing the next round material.
[0078] This step involves the transformation between the image coordinate system and the robot coordinate system. This application is based on existing coordinate transformation methods, so it will not be described in detail.
[0079] Optionally, this application also provides another method for gripping circular materials on a flexible disk, the difference being that the execution order of steps 3a and 4a above is reversed, namely:
[0080] Step 3b: Determine whether the location of the gripper area collides with the boundary of the flexible disk. If no collision occurs, proceed to step 4b; if a collision occurs, proceed to step 5b.
[0081] Step 4b: Determine whether there are other round materials in the current gripper area. If there are, proceed to step 5b; otherwise, proceed to step 6.
[0082] Step 5b: Rotate the gripper area around the material center by a certain angle, and re-determine whether the simulated current gripper position collides with the boundary of the flexible disk, i.e., return to step 3b.
[0083] Since the specific steps under each step are the same, they will not be repeated here.
[0084] like Figure 5As shown, compared with the traditional fixed-angle material gripping method, this method effectively determines whether there are other circular materials in the gripper area by adding a material recognition algorithm (steps 3a and 4b). Combined with multi-angle rotation judgment, when other circular materials are encountered when gripping material at a fixed angle, the gripper area is virtually rotated around the material center by a certain angle to provide an angle that avoids touching other circular materials. This method also introduces an interference judgment algorithm between the gripper area and the flexible disk boundary (steps 4a and 3b), combined with multi-angle rotation judgment. When the flexible disk boundary is encountered when gripping material at the simulated current gripper area position, the gripper area is virtually rotated around the material center by a certain angle to provide an angle that does not interfere with the edge of the flexible disk. Finally, the gripper moves and rotates to the top of the material according to the simulated current gripper area position information, thereby achieving effective gripping.
[0085] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0086] The above descriptions are merely preferred embodiments of this application, and the present invention is not limited to the above embodiments. It is understood that other improvements and variations directly derived or conceived by those skilled in the art without departing from the spirit and concept of the present invention should be considered to be included within the protection scope of the present invention.
Claims
1. A method for gripping circular materials on a flexible disk, characterized in that, The method includes: Acquire an image of the material and locate the circular material within it; For each of the circular materials, the image simulates the gripper area occupied by the gripper when it grasps the circular material; Determine whether there are other round materials in the gripper area. If so, rotate the gripper area around the center of the material by a certain angle and re-determine whether there are other round materials in the current gripper area. If not, determine whether the current gripper area collides with the boundary of the flexible disk. If a collision occurs, rotate the gripper area around the material center as an axis by a certain angle, and re-determine whether there are other circular materials in the current gripper area. If no collision occurs, the gripper is moved and rotated to the simulated current gripper area to grasp the circular material. The methods for determining whether the gripper area collides with the boundary of the flexible disk include: Based on the relationship between the simulated coordinates of the outer boundary vertex of the current gripper area and the vertex coordinates of the flexible disk boundary, it is determined whether a collision has occurred. Methods for determining coordinate relationships include: The outer boundary vertex of the current gripper area is calculated using the material template used when positioning circular materials. The four vertices of the flexible disk boundary are obtained from the position in the image coordinate system. N j Position in the image coordinate system; Determine each of the outer boundary vertices If the set conditions are not met, it is assumed that the current gripper area has collided with the boundary of the flexible disk; the set conditions are: vertex Simultaneously sandwiched between the upper and lower boundaries and the left and right boundaries of the flexible disk; The outer boundary vertex of the current gripper region in the computational simulation. Methods for determining position in an image coordinate system include: In the material template, the template gripper area occupied by the grippers when grasping the circular material is simulated with a fixed gripper angle, and the outer boundary vertex of the template gripper area is obtained. P i Position in the image coordinate system PX i , PY i ); For each vertex P i Calculate the deviations of its x and y coordinates from the x and y coordinates of the template center point. DPX i , DPY i ; Obtain the center point of the circular material when positioning the circular material using the material template. Position in the image coordinate system , and the rotation angle θ of the simulated current gripper region relative to the template gripper region; Calculate vertices based on the rotation transformation matrix formula. P i After rotating counterclockwise to the top Position of time The expression is: 。 2. The method for gripping circular materials on a flexible disk according to claim 1, characterized in that, The method includes: Determine whether the location of the gripper area collides with the boundary of the flexible disk. If a collision occurs, rotate the gripper area by a certain angle around the center of the material and re-determine whether the simulated current gripper position collides with the boundary of the flexible disk. If no collision occurs, determine whether there are other circular materials in the current gripper area. If there are, rotate the gripper area by a certain angle around the center of the material, and re-determine whether the simulated current gripper position collides with the boundary of the flexible disk. If it does not exist, the gripper is moved and rotated to the location of the simulated current gripper area to grasp the circular material.
3. The method for gripping circular materials on a flexible disk according to claim 1, characterized in that, Methods for locating circular materials from an image include: Using the center of the circular material as the template center, a material template is established based on the outline of the circular material, and the material template is trained at 0 degrees; the circular material is located in the image through a template matching algorithm.
4. The method for gripping circular materials on a flexible disk according to claim 1 or 2, characterized in that, Methods for determining whether other round materials exist in the gripper area include: The image containing the circular material and the gripper area is subjected to binarization segmentation processing to distinguish the gray values of the circular material and the non-circular material; Calculate the ratio of the pixel area belonging to the circular material in the gripper region to the total pixel area of the gripper region, and compare it with a set threshold; if it exceeds the threshold, it is considered that there are other circular materials in the gripper region, otherwise it is considered that there are no other circular materials in the gripper region.
5. The method for gripping circular materials on a flexible disk according to claim 4, characterized in that, In the obtained binarized image, the grayscale value of the circular material becomes 255, and the grayscale value of the non-circular material becomes 0; or, the grayscale value of the circular material becomes 0, and the grayscale value of the non-circular material becomes 255.
6. The method for gripping circular materials on a flexible disk according to claim 1, characterized in that, Determine the vertex The expression for being sandwiched between the upper and lower boundaries and the left and right boundaries of the flexible disk is: ; in, N 1 represents the top left vertex of the flexible disk. N 2 represents the upper right vertex of the flexible disk. N 3 represents the lower left vertex of the flexible disk. N 4 represents the lower right vertex of the flexible disk.
7. The method for gripping circular materials on a flexible disk according to claim 1, characterized in that, The method for simulating the gripper area occupied by the gripper when it grasps the circular material in an image includes: In the image, the gripper area is simulated by the actual angle of the gripper when it is about to grasp the circular material. The gripper area is two rectangular frames symmetrical about the center point of the circular material. The side of the rectangular frame away from the center point of the circular material is the simulated outer boundary of the current gripper area.
Citation Information
Patent Citations
Component moving device
CN111278612A
Multi-mode grabbing obstacle avoidance detection optimization method based on drop point area detection
CN113538459A
Work machine and gripping position search method
WO2019102575A1