CN117745831A - Robot grabbing method considering sorting target adjacent interference - Google Patents
Robot grabbing method considering sorting target adjacent interference Download PDFInfo
- Publication number
- CN117745831A CN117745831A CN202311852076.2A CN202311852076A CN117745831A CN 117745831 A CN117745831 A CN 117745831A CN 202311852076 A CN202311852076 A CN 202311852076A CN 117745831 A CN117745831 A CN 117745831A
- Authority
- CN
- China
- Prior art keywords
- area
- workpiece
- grabbing
- clamping jaw
- grabbed
- 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.)
- Granted
Links
Landscapes
- Manipulator (AREA)
Abstract
The invention discloses a robot grabbing method considering adjacent interference of a sorting target. The invention comprises the following steps: firstly, after recognizing and extracting a grabbing task RGB image, determining the final compensating heights of the workpiece to be grabbed, a corresponding sorting target area, a potential interference area and a clamping jaw grabbing point by combining the upper and lower states and the depth image of the sorted workpiece; then, determining a grabbing point searching area and an actual interference area of the clamping jaw; then, after the search constraint conditions are set, the optimal grabbing pose is obtained through detection, and then the clamping jaw of the robot arm is controlled to grab the workpiece to be grabbed, the images are continuously collected, the corresponding workpiece to be grabbed in each image is grabbed, and the workpiece in the image is grabbed completely. The grabbing pose of the sorted workpieces, which is obtained by the invention, avoids adjacent interference to the workpieces in the robot sorting task, and simultaneously gives consideration to the easy grabbing property of the sorting targets, thereby having better engineering practical value.
Description
Technical Field
The invention belongs to the technical field of robots, and relates to a grabbing method for visually sorting workpieces, in particular to a robot optimal grabbing pose obtaining method considering adjacent interference of sorting targets.
Background
In recent years, robots are increasingly widely applied to various fields, and robot technologies are rapidly developed by replacing work which is high in labor intensity, high in repeatability, bad in working environment and other work which is not needed or is not suitable for being completed by human beings, so that the robot has great research value and application prospect.
Sorting is a common and important process in industrial production. By means of a robot vision sorting technology, unordered workpieces are placed on a sorting and sorting assembly line, defective products with defects are identified and screened, and production efficiency is remarkably improved. Compared with the traditional manual sorting, the automatic sorting machine not only avoids human errors, but also has high production speed and saves task cost.
In robot vision sorting, the robot obtains image information of a grabbing task through an external camera, determines the type and position coordinates of a workpiece, and uses vision algorithms such as target recognition, target extraction, grabbing pose detection and the like to achieve grabbing, so that the requirements of various and complex workpiece sorting tasks under the stacking condition are met.
The grabbing is used as an important step of realizing sorting by an industrial robot, and the accurate grabbing pose of the sorted workpiece is obtained as a key for completing grabbing. However, in the existing grabbing pose detection method, the grabbing of the small and medium workpieces is usually only carried out on a single workpiece, and the interference influence of the adjacent workpieces is not considered; the common depth camera is difficult to acquire high-resolution images of small workpieces, so that three-dimensional point clouds of the workpieces are difficult to construct to realize 6D grabbing; the deep learning-based grabbing method also has the problem of lacking a public data set of small and medium-sized workpieces in an industrial environment, and high detection precision is difficult to realize.
Disclosure of Invention
Aiming at the defects existing in the prior art, the invention is mainly used for solving the problems that an industrial robot is interfered by adjacent workpieces and is difficult to acquire the optimal grabbing pose of the sorted workpieces when realizing sorting tasks, and provides a robot grabbing method considering adjacent interference of sorting targets.
The technical scheme of the invention is as follows:
step 1: collecting a grabbing task RGB image and a depth image, identifying and extracting a sorting workpiece by the grabbing task RGB image, and determining an initial workpiece to be grabbed;
step 2: combining the upper and lower states of the sorted workpieces and the depth images, and determining the final to-be-picked workpieces, the corresponding sorting target areas, the potential interference areas and the compensating heights of the gripping points of the clamping jaws;
step 3: according to the sorting target area, the potential interference area and the clamping jaw structure, determining a grabbing point searching area and an actual interference area of the clamping jaw;
step 4: setting search constraint conditions, and carrying out capture pose detection according to a capture point search area and an actual interference area of the clamping jaw and combining the search constraint conditions and the compensation height of the capture point of the clamping jaw to obtain an optimal capture pose; if the optimal grabbing pose cannot be generated, the current workpiece to be grabbed cannot be grabbed, other workpieces to be grabbed in the current task RGB image are selected to serve as new workpieces to be grabbed, and the steps 2-3 are repeated and grabbing pose detection is carried out until the optimal grabbing pose is obtained; further controlling the clamping jaw of the robot arm to realize the grabbing of the workpiece to be grabbed;
step 5: and (3) repeating the steps 1-4, continuously collecting images and grabbing corresponding workpieces to be grabbed in each image until the workpieces in the images are grabbed, and completing the grabbing of the robot.
The step 1 specifically comprises the following steps:
step 1.1: collecting a grabbing task RGB image and a depth image;
step 1.2: performing target recognition on the RGB images of the grabbing task to obtain detection frames of all the sorted workpieces, taking the sorted workpiece with the detection frame closest to the clamping jaw of the robot arm as an initial workpiece to be grabbed, and ending grabbing if the workpiece is not recognized.
The step 2 specifically comprises the following steps:
step 2.1: combining the upper and lower states of the sorted workpieces, determining the final workpiece to be sorted and obtaining a sorting target area and each adjacent target area after carrying out upper and lower judgment on the current workpiece to be sorted;
step 2.2: and based on the sorting target areas and the corresponding depth images, judging the interference areas of each adjacent target area respectively to obtain the potential interference areas and the compensation height of the gripping points of the clamping jaws.
The step 2.1 specifically comprises the following steps:
step 2.1.1: generating a nearest image area according to the current workpiece to be grabbed, further determining potential interference workpieces corresponding to the workpiece to be grabbed, and extracting target areas of the workpieces in the nearest image area;
step 2.1.2: judging whether the current workpiece to be grabbed is in a lower state of physical stacking in a target area where the current workpiece to be grabbed is located, if so, marking the current workpiece to be grabbed as a non-grabbed workpiece, and taking the upper workpiece as a new workpiece to be grabbed;
step 2.1.3: and repeating the steps 2.1.1 to 2.1.2 until the current workpiece to be grabbed is in the uppermost state, taking the final target area where the workpiece to be grabbed is positioned as a sorting target area, and taking the final target area where the potential interference workpiece is positioned as each adjacent target area.
The step 2.1.1 specifically comprises the following steps:
after expanding the periphery of a detection frame corresponding to the workpiece to be grabbed currently, obtaining an initial clamping jaw frame, if a detection frame intersected with the clamping jaw frame exists, expanding the clamping jaw frame, enabling the detection frame intersected with the clamping jaw frame to be contained in the expanded clamping jaw frame, taking the area where the final clamping jaw frame is located as a nearest image area, and then marking the workpiece corresponding to the detection frame except the detection frame where the workpiece to be grabbed currently in the nearest image area as a potential interference workpiece.
The step 2.2 specifically comprises the following steps:
step 2.2.1: generating corresponding lattices by randomly taking points from the classified target areas and each adjacent target area respectively, converting the coordinate system of all lattices by utilizing an internal and external mapping relation matrix of the depth camera, and obtaining corresponding lattice depth information in the depth image so as to obtain corresponding lattice height information;
step 2.2.2: and judging each adjacent target area as a potential interference area and a non-potential interference area according to the lattice height information corresponding to the sorting target area and each adjacent target area, and acquiring the compensation height of the gripping points of the clamping jaws.
The step 2.2.2 specifically comprises the following steps:
step 2.2.2.1: according to the lattice height information corresponding to the sorting target areas and each adjacent target area, respectively calculating the height difference between each adjacent target area and the sorting target area, wherein the calculation formula is as follows:
wherein h is t Representing the difference in height between the i-th adjacent target area and the sorting target area,represents the average height of the lattice corresponding to the sorting target area, max { h } i (x, y) } represents the maximum height of the lattice corresponding to the i-th adjacent target region;
step 2.2.2.2: when a certain adjacent target area and sorting target areaThe height difference between the two is smaller than or equal to a height difference threshold h T And if not, judging the adjacent target area as a non-potential interference area, and calculating the compensation height of the clamping jaw grabbing point according to the height information of all the non-potential interference areas.
The step 3 specifically comprises the following steps:
step 3.1: generating a clamping jaw sliding window according to the clamping jaw structure, wherein two side areas corresponding to the tail end parts of the clamping jaws in the clamping jaw sliding window are marked as grabbing shielding areas; the clamping jaw sliding window can rotate around the center point of the clamping jaw sliding window, and the position and the posture of the clamping jaw sliding window are formed by the coordinates of the center point of the clamping jaw sliding window and the rotation angle;
step 3.2: marking the minimum circumscribed rectangle of the sorting target area as a grabbing point searching area, expanding the periphery of the grabbing point searching area based on the related size of the clamping jaw sliding window, and forming a sliding window searching area;
step 3.3: the method comprises the steps of screening all potential interference areas pixel by pixel, and only reserving pixels existing in a sliding window searching area so as to form an actual interference area; and then marking different gray values of the sorting target area and the actual interference area in the sliding window searching area, and setting 0 if other pixels are pixels in the background area.
In the step 4, the search constraint condition specifically includes:
in the process of searching the grabbing point searching area pixel by pixel, when the grabbing pose of the clamping jaw is changed, pixels of the sorting target area but no pixels of the actual interference area are arranged in the corresponding sliding window of the clamping jaw, and only pixels of the background area are arranged in the grabbing shielding area.
In the step 4, a genetic algorithm is used for detecting the grabbing pose, when the interference area near one workpiece is too much in the process of detecting the grabbing pose, the total fitness of the population is 0, and then sorting workpieces with the closest detection frame to the clamping jaw of the robot arm in other workpieces to be grabbed in the RGB image of the current task are selected as new workpieces to be grabbed; stopping detection after a termination condition is reached in the natural selection process, taking an individual with the optimal fitness as an optimal solution, obtaining an optimal sliding window pose of the clamping jaw, outputting the optimal grabbing pose after combining the compensation height of the grabbing points of the clamping jaw, and controlling the clamping jaw of the robot arm to finish grabbing;
when the gripping jaw sliding window corresponding to each individual has no sorting target area or interference area or the gripping shielding area has a non-background area, the individual satisfies directional extinction, and the fitness function of the genetic algorithm satisfies the following formula:
wherein f (x ', y ', θ ') is the fitness of each individual, x t ′,y t ' is two coordinate values of a mass center of a sorting target area in the sliding window, h is a jaw width of a parallel jaw, and x ', y ' is two coordinate values of a center point of the sliding window of the jaw; k (k) j The value of j represents the different positions of the short side direction of the sliding window when the span is calculated;representing all spans k j Average value of (2); the absolute value is taken.
The beneficial effects of the invention are as follows:
according to the invention, only the grippable workpiece with the closest distance to the gripping jaw of the robot arm is subjected to the gripping pose detection in the nearest image area at each time, so that the sorting operation efficiency of the robot is ensured, and the calculation amount of the gripping pose detection is reduced;
according to the method, whether the potential interference workpieces in the adjacent target areas interfere with the classified target areas is judged, and the problem that the adjacent workpieces are easy to interfere when the grabbing frame is acquired is avoided by combining with the optimized search of the grabbing pose;
according to the invention, the possible interference of the adjacent target areas is considered, meanwhile, the easy grabbing property of the sorting targets is considered, the grabbing pose of the sorting targets is optimized, and the feasibility of the grabbing pose detection result is improved.
Drawings
FIG. 1 is a flow chart of a robot gripping method taking adjacent interference of a sorting object into consideration;
fig. 2 is a schematic diagram of an image region division process according to an embodiment of the present invention, where (a) is a schematic diagram of a nearest image region, (b) is a schematic diagram of a sorting target region and an adjacent target region, (c) is a schematic diagram of a depth image point cloud generation, and (d) is a schematic diagram of a potential interference region;
FIG. 3 is a schematic diagram illustrating the generation of a grabbing point search area and a grabbing frame according to an embodiment of the present invention;
FIG. 4 is a schematic view of a genetic algorithm optimized gripping gesture according to an embodiment of the present invention;
fig. 5 is a schematic diagram of an optimal gripping pose of a workpiece to be sorted according to the embodiment of the invention.
Detailed Description
The invention designs a robot grabbing method considering adjacent interference of sorting targets, and in order to make the above objects, features and advantages of the invention more obvious and understandable, the following detailed description of the specific embodiments of the invention is given with reference to the accompanying drawings.
The specific flow of the method is shown in fig. 1, and the specific embodiment selects a robot arm as a research object, a parallel clamping jaw as a tail end grabbing tool, and an ocean industry camera and an Intel real sensor depth camera as image sensing equipment. The sorting workpieces comprise a cup head long bolt M4 (f-shaped workpiece), a stop washer M14 (n-shaped workpiece), a round washer M4 (i-shaped workpiece), a hexagonal bolt M4 (e-shaped workpiece), a shaft clamp spring M13 (o-shaped workpiece) and a cup head bolt M5 (c-shaped workpiece).
Step 1: the industrial camera and the depth camera respectively acquire a grabbing task RGB image and a depth image, and after the acquired grabbing task RGB image is used for identifying and extracting a sorting workpiece, an initial workpiece to be grabbed is determined;
the step 1 specifically comprises the following steps:
step 1.1: collecting a grabbing task RGB image and a depth image;
step 1.2: and performing target recognition on the grabbing task RGB image by using a target recognition network of the Faster R-CNN, retinaNet, YOLO series to obtain detection frames of all the sorted workpieces, taking the sorted workpiece with the detection frame closest to the clamping jaw of the robot arm as an initial workpiece to be grabbed, and ending grabbing if the workpiece is not recognized.
Step 2: combining the upper and lower states of the sorted workpieces and the depth images, and determining the final to-be-picked workpieces, the corresponding sorting target areas, the potential interference areas and the compensating heights of the gripping points of the clamping jaws;
the step 2 is specifically as follows:
step 2.1: combining the upper and lower states of the sorted workpieces, determining the final workpiece to be sorted and obtaining a sorting target area and each adjacent target area after carrying out upper and lower judgment on the current workpiece to be sorted;
step 2.1.1: generating a nearest image area according to the current workpiece to be grabbed, further determining potential interference workpieces corresponding to the workpiece to be grabbed, and extracting target areas of the workpieces in the nearest image area;
step 2.1.1 is specifically:
after expanding the periphery of a detection frame corresponding to a workpiece to be grasped by 1 clamping jaw, obtaining an initial clamping jaw frame, if a detection frame intersected with the clamping jaw frame exists, expanding the clamping jaw frame, enabling the detection frame intersected with the clamping jaw frame to be contained in the expanded clamping jaw frame, taking the area where the final clamping jaw frame is located as a nearest image area, taking the minimum value of the maximum value of the horizontal coordinate and the vertical coordinate of the clamping jaw frame and the range of the intersected detection frame as shown in (a) of fig. 2, determining the boundary frame range, intersecting the white clamping jaw frame with the c detection frame, the e detection frame and the o detection frame in the range, taking the minimum value of the maximum value of the horizontal coordinate and the vertical coordinate of the c detection frame in the range of the intersected detection frame, namely the horizontal coordinate corresponding to the right boundary of the clamping jaw frame, the horizontal coordinate corresponding to the left boundary of the clamping jaw frame, the vertical coordinate corresponding to the lower boundary of the o detection frame and the vertical coordinate corresponding to the upper boundary of the clamping jaw frame, and determining the boundary frame range. Otherwise, the area where the initial clamping jaw frame is located is directly used as a nearest image area, and then the workpiece corresponding to the detection frame except the detection frame where the workpiece to be grabbed is located in the nearest image area is recorded as a potential interference workpiece.
In the specific implementation, noise reduction, enhancement and inversion are carried out on the nearest image region, and then a background and foreground region segmentation threshold value is obtained by using a maximum inter-class variance method; based on background and foreground region segmentation threshold values, an improved algorithm based on region segmentation and classification merging is used for extracting targets of detection frames where workpieces to be grabbed and potential interference workpieces are located, and corresponding sparse target regions are respectively output. The improved algorithm based on region segmentation and classification merging is that a fragmented watershed region is obtained through labeled watershed transformation, a preliminary segmentation stacking target effect is achieved, the fragmented watershed region is integrated into a larger clustering region through affinity propagation clustering, the attribution detection frames of region elements in a clustering region set are sequentially judged according to the membership relationship between the clustering region and the detection frames, and the regions attributed to the same detection frame are merged. The sparse target area is a sparse matrix for converting a binary image of which the pixels are marked with connected domains into COO format storage data, and a large amount of useless information is stored in a compressed two-dimensional array form.
Step 2.1.2: judging whether the current workpiece to be grabbed is in a lower state of physical stacking in a target area where the current workpiece to be grabbed is located, if the current workpiece to be grabbed is in the lower state, marking the current workpiece to be grabbed as a non-grabbed workpiece, taking the upper workpiece as a new workpiece to be grabbed, otherwise, directly outputting the final workpiece to be grabbed, and obtaining a sorting target area and each adjacent target area;
step 2.1.3: repeating the steps 2.1.1-2.1.2 until the current workpiece to be grabbed is in the uppermost state, taking the target area where the final workpiece to be grabbed is positioned as a sorting target area, and taking the target area where the final potential interference workpiece is positioned as each adjacent target area, wherein the sorting target area corresponds to a cup head long bolt M4 (f-shaped workpiece) as shown in (b) of fig. 2; adjacent target areas 1, 2, 3, 4, and 5 correspond to a back-off washer M14 (n-type piece), a round washer M4 (i-type piece), a hexagonal bolt M4 (e-type piece), a shaft clamp spring M13 (o-type piece), and a cup head bolt M5 (c-type piece), respectively.
Step 2.2: based on the sorting target areas and the corresponding depth images, judging the interference areas of each adjacent target area respectively to obtain potential interference areas and compensating heights of the gripping points of the clamping jaws;
step 2.2 is specifically:
step 2.2.1: generating corresponding lattices by randomly taking points from the classified target areas and each adjacent target area respectively, and obtaining corresponding lattice depth information in a depth image after performing coordinate system conversion on all lattices by utilizing an internal and external mapping relation matrix of the depth camera obtained by a nine-point calibration method as shown in (c) of fig. 2, so as to obtain corresponding lattice height information;
in step 2.2.1, the calculation formula of each dot matrix height information is as follows:
h(x,y)=d(x,y)-d 0
wherein h (x, y) is the height of the (x, y) coordinate in the lattice, d (x, y) is the depth of the (x, y) coordinate in the lattice, d 0 Is the average depth of the work table without work piece.
Step 2.2.2: and judging each adjacent target area as a potential interference area and a non-potential interference area according to the lattice height information corresponding to the sorting target area and each adjacent target area, and acquiring the compensation height of the gripping points of the clamping jaws.
Step 2.2.2 is specifically:
step 2.2.2.1: according to the lattice height information corresponding to the sorting target areas and each adjacent target area, respectively calculating the height difference between each adjacent target area and the sorting target area, wherein the calculation formula is as follows:
wherein h is t Representing the difference in height between the i-th adjacent target area and the sorting target area,represents the average height of the lattice corresponding to the sorting target area, max { h } i (x, y) } represents the maximum height of the lattice corresponding to the i-th adjacent target region;
step 2.2.2.2: when the height difference between a certain adjacent target area and a sorting target area is less than or equal to a height difference threshold valueh T If the workpiece in the adjacent target area may interfere with the grabbing process of the target workpiece, the adjacent target area is determined as a potential interference area, and the adjacent target areas 1, 3 and 5 in fig. 2 (b) finally form potential interference areas 1, 2 and 3 shown in fig. 2 (d), wherein the height of the workpiece in the 3 areas is close to or higher than that of the workpiece to be sorted; otherwise, in the process of grabbing the target workpiece, the workpiece interference of the adjacent target area can be avoided by only lifting the clamping jaw by a certain compensation height, the adjacent target area is judged to be a non-potential interference area, such as the adjacent target areas 2 and 4 in the (b) of fig. 2, the heights of the two areas are far lower than the height of the workpiece to be sorted, and the compensation height of the clamping jaw grabbing point is calculated according to the height information of all the non-potential interference areas.
And calculating the compensation height delta h of the gripping point of the clamping jaw according to the height information of all the non-potential interference areas, wherein the specific formula is as follows:
Δh=max{h i ′}+Δh′
wherein h is i 'is the maximum height of the lattice of the ith non-potential interference area, max { } represents taking the maximum value, and Δh' is the collision avoidance factor, so that the clamping jaw is prevented from colliding with the non-potential interference area.
In the present embodiment, a height difference threshold h is set T The collision avoidance factor Δh' =0.5 mm. The potentially interfering areas 1, 2, 3 of the long cup head bolt M4 (f-shaped workpiece) are shown in the image as (d) of fig. 2, with a grip compensation height Δh=1.5 mm.
Step 3: according to the sorting target area, the potential interference area and the clamping jaw structure, determining a grabbing point searching area and an actual interference area of the clamping jaw;
the step 3 is specifically as follows:
step 3.1: generating a rectangular clamping jaw sliding window according to a clamping jaw structure, wherein the sizes of the clamping jaw sliding windows are (w+2b) multiplied by h, w, b and h are respectively the opening distance, the clamping jaw thickness and the clamping jaw width of the parallel clamping jaws, the center of the clamping jaw sliding window is the horizontal projection position of a clamping jaw grabbing point, two side areas corresponding to the tail end parts of the clamping jaws in the clamping jaw sliding window are marked as grabbing shielding areas, and the grabbing shielding areas on each side are b multiplied by h; the clamping jaw sliding window can rotate around the center point of the clamping jaw sliding window, and the position and the posture of the clamping jaw sliding window are formed by the coordinates of the center point of the clamping jaw sliding window and the rotation angle;
step 3.2: marking the minimum circumscribed rectangle of the sorting target area as a grabbing point searching area, and expanding the periphery of the grabbing point searching area based on the related size of the clamping jaw sliding windowThen, forming a sliding window searching area; in specific implementation, the acute angle formed by the short side of the smallest circumscribed rectangle of the sorting target area and the positive direction of the x axis is recorded as the direction angle theta of the smallest circumscribed rectangle, and the direction angle theta of the smallest circumscribed rectangle is used as the main grabbing direction, as shown in fig. 3 (a) and 3 (b).
Step 3.3: performing pixel-by-pixel screening on all the sparse potential interference areas, and only reserving pixels existing in the sliding window searching area so as to form an actual interference area; and (3) performing rotation transformation of reversely grabbing the main direction-theta around the center of the minimum circumscribed rectangle on the thinned sorting target area and the interference area, reforming a matrix image form, then placing different gray value marks on the sorting target area and the actual interference area in the sliding window searching area, and placing 0 on the pixels of which the other areas are background areas.
Step 4: setting search constraint conditions, and carrying out capture pose detection according to a capture point search area and an actual interference area of the clamping jaw and combining the search constraint conditions and the compensation height of the capture point of the clamping jaw to obtain an optimal capture pose; if the optimal grabbing pose cannot be generated, the current workpiece to be grabbed cannot be grabbed, other workpieces to be grabbed in the current task RGB image are selected to serve as new workpieces to be grabbed, and the steps 2-3 are repeated and grabbing pose detection is carried out until the optimal grabbing pose is obtained; further controlling the clamping jaw of the robot arm to realize the grabbing of the workpiece to be grabbed; according to the invention, the time for searching the sliding window of the grabbing point searching area is saved through genetic algorithm optimization, the interference area is avoided, the easy grabbing property of the workpiece is improved, and the optimal grabbing pose is determined.
In step 4, the search constraint conditions specifically include:
in the process of searching the grabbing point searching area pixel by pixel, when the grabbing pose of the clamping jaw is changed, pixels of the sorting target area but no pixels of the actual interference area are arranged in the corresponding sliding window of the clamping jaw, and only pixels of the background area are arranged in the grabbing shielding area.
In step 4, performing grabbing pose detection by using a genetic algorithm, in the process of detecting grabbing poses, when an interference area near a workpiece is too many, namely the workpiece can not be grabbed, and the condition of initial group extinction possibly occurs, the total fitness of the group is 0, then selecting a sorting workpiece with the closest detection frame to the clamping jaw of a robot arm in other workpieces to be grabbed in the RGB image of the current task as a new workpiece to be grabbed, and then performing grabbing detection on other workpieces in the RGB image of the current task; stopping detection after the termination condition is reached in the natural selection process, taking an individual with the optimal fitness as an optimal solution, obtaining the optimal sliding window pose of the clamping jaw, outputting the optimal grabbing pose after combining the compensation height of the grabbing points of the clamping jaw, and controlling the clamping jaw of the robot arm to finish grabbing once.
In the genetic algorithm, when a sorting target area or an interference area is not arranged in a clamping jaw sliding window corresponding to each individual or a grabbing shielding area is provided with a non-background area, the individual can realize directional extinction, and the fitness function of the genetic algorithm meets the following formula:
wherein f (x ', y ', θ ') is the fitness of each individual, x t ′,y t ' is two coordinate values of a mass center of a sorting target area in the sliding window, h is a jaw width of a parallel jaw, and x ', y ' is two coordinate values of a center point of the sliding window of the jaw; k (k) j The value of j represents the different positions of the short side direction of the sliding window when the span is calculated;representing all spans k j Average value of (2); the absolute value is taken.
The specific process of performing the optimal grabbing pose search through the genetic algorithm in this embodiment is as shown in fig. 4 (a) -4 (d):
establishing a population: the jaw sliding window is defined as an individual, and the pose, namely the gene, is characterized as (x ', y', theta '), wherein (x', y ') is the center point coordinate of the jaw sliding window, and theta' is the rotation angle of the jaw sliding window. At N xy On the basis of group (x ', y ') gene characterization, discrete treatment is carried out on the gene theta ', and (-90 degrees, 90 degrees) is taken]The population size is initialized to n=6n with values of 30 ° -60 °, -30 °,0 °,30 °,60 °,90 ° }6 apart xy 。
Natural selection: firstly checking whether a sorting target area or an interference area exists in each individual sliding window or whether a grabbing shielding area has a non-background area, if so, indicating that the individual cannot grab the corresponding grabbing pose, namely, the individual fitness is equal to 0, and defining the situation as directional extinction; considering the easy grasping property of the target under the corresponding grasping pose of the individual, the grasping position should be as flat as possible without great fluctuation and ensure that the grasping point is close to the middle position of the target workpiece as much as possible, namely the smaller and better the smaller the arithmetic average difference of the span of the sorting target area in the range of the sliding window along the long side direction of the sliding window is, the (x ', y') and the centroid coordinate (x t ′,y t ') the smaller the manhattan distance, the better, the design of the grasp function of the grasp pose as the fitness function of natural choice:
before randomly selecting surviving individuals, carrying out group extinction judgment. If the interference area near one workpiece is too many, the condition of initial group extinction possibly occurs, the total fitness is 0 at the moment, the output is not grippable, the subsequent other workpieces are subjected to gripping detection, and the workpiece can be gripped after the surrounding interference workpiece is gripped.
Randomly selecting surviving individuals by adopting a roulette wheel selection method, wherein the probability P that the first individual in the population can be selected to survive l For its fitness f l (x ', y ', θ ') in populationThe proportion of the stress is as follows:
before each selection, the individuals with the largest fitness are reserved, then N-1 surviving individuals are selected according to the probability, the individuals and the fitness thereof are saved, the reproduction link is entered, and the survival probability of the individuals with high fitness is larger.
Gene recombination: two individuals were randomly paired for gene recombination in the previous round of surviving individuals, yielding only one new individual at a time. Offspring c propagated from both individuals a and b were arithmetically recombined to form their new gene representation (x c ′,y c ′,θ c ′):
x c ′=ω x x a ′+(1-ω x )x b ′
y c ′=ω y y a ′+(1-ω y )y b ′
θ c ′=ω θ θ a ′+(1-ω θ )θ b ′
Wherein the first-third recombinant factors omega x ,ω y ,ω θ ∈[0,1]Given randomly by the system. In this embodiment, there is more than one optimal grabbing point, and the problem that the final individual fitness is concentrated in the local optimal solution does not occur, so that the gene mutation process is not required to be added.
Termination conditions and output: when each round of natural selection is finished, checking whether the natural selection times reach the set times or whether the total fitness and the change rate of the total fitness of the previous round are smaller than the set threshold, and outputting the individual gene representation with the highest current fitness, namely the optimal sliding window pose (x) m ′,y m ′,θ m ′)。
Will (x) m ′,y m ′,θ m ' rotating transformation of grabbing main direction theta is carried out around the minimum circumscribed rectangle center of the sorting target area, and the optimal sliding window pose (x) under the pixel coordinate system of the industrial camera is obtained m ,y m ,θ m ) As shown in FIG. 5, againAfter mapping transformation and adding the compensation height, the information is converted into grabbing pose information under a workpiece coordinate system, and the clamping jaw of the robot arm is controlled to complete grabbing.
Step 5: and (3) repeating the steps 1-4, continuously collecting images and grabbing corresponding workpieces to be grabbed in each image, namely grabbing the stacked workpieces sequentially from top to bottom until the workpieces in the images are grabbed, and completing the grabbing of the robot.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (10)
1. The robot grabbing method considering adjacent interference of sorting targets is characterized by comprising the following steps of:
step 1: collecting a grabbing task RGB image and a depth image, identifying and extracting a sorting workpiece by the grabbing task RGB image, and determining an initial workpiece to be grabbed;
step 2: combining the upper and lower states of the sorted workpieces and the depth images, and determining the final to-be-picked workpieces, the corresponding sorting target areas, the potential interference areas and the compensating heights of the gripping points of the clamping jaws;
step 3: according to the sorting target area, the potential interference area and the clamping jaw structure, determining a grabbing point searching area and an actual interference area of the clamping jaw;
step 4: setting search constraint conditions, and carrying out capture pose detection according to a capture point search area and an actual interference area of the clamping jaw and combining the search constraint conditions and the compensation height of the capture point of the clamping jaw to obtain an optimal capture pose; if the optimal grabbing pose cannot be generated, the current workpiece to be grabbed cannot be grabbed, other workpieces to be grabbed in the current task RGB image are selected to serve as new workpieces to be grabbed, and the steps 2-3 are repeated and grabbing pose detection is carried out until the optimal grabbing pose is obtained; further controlling the clamping jaw of the robot arm to realize the grabbing of the workpiece to be grabbed;
step 5: and (3) repeating the steps 1-4, continuously collecting images and grabbing corresponding workpieces to be grabbed in each image until the workpieces in the images are grabbed, and completing the grabbing of the robot.
2. The robotic grasping method considering adjacent interference of sorting targets according to claim 1, wherein the step 1 specifically comprises:
step 1.1: collecting a grabbing task RGB image and a depth image;
step 1.2: performing target recognition on the RGB images of the grabbing task to obtain detection frames of all the sorted workpieces, taking the sorted workpiece with the detection frame closest to the clamping jaw of the robot arm as an initial workpiece to be grabbed, and ending grabbing if the workpiece is not recognized.
3. The robotic grasping method considering adjacent interference of sorting targets according to claim 1, wherein the step 2 specifically comprises:
step 2.1: combining the upper and lower states of the sorted workpieces, determining the final workpiece to be sorted and obtaining a sorting target area and each adjacent target area after carrying out upper and lower judgment on the current workpiece to be sorted;
step 2.2: and based on the sorting target areas and the corresponding depth images, judging the interference areas of each adjacent target area respectively to obtain the potential interference areas and the compensation height of the gripping points of the clamping jaws.
4. A robotic grasping method considering sorting target adjacent interference according to claim 3, wherein the step 2.1 specifically comprises:
step 2.1.1: generating a nearest image area according to the current workpiece to be grabbed, further determining potential interference workpieces corresponding to the workpiece to be grabbed, and extracting target areas of the workpieces in the nearest image area;
step 2.1.2: judging whether the current workpiece to be grabbed is in a lower state of physical stacking in a target area where the current workpiece to be grabbed is located, if so, marking the current workpiece to be grabbed as a non-grabbed workpiece, and taking the upper workpiece as a new workpiece to be grabbed;
step 2.1.3: and repeating the steps 2.1.1 to 2.1.2 until the current workpiece to be grabbed is in the uppermost state, taking the final target area where the workpiece to be grabbed is positioned as a sorting target area, and taking the final target area where the potential interference workpiece is positioned as each adjacent target area.
5. The method for grasping by a robot in consideration of adjacent interference of sorting targets according to claim 4, wherein the step 2.1.1 specifically comprises:
after expanding the periphery of a detection frame corresponding to the workpiece to be grabbed currently, obtaining an initial clamping jaw frame, if a detection frame intersected with the clamping jaw frame exists, expanding the clamping jaw frame, enabling the detection frame intersected with the clamping jaw frame to be contained in the expanded clamping jaw frame, taking the area where the final clamping jaw frame is located as a nearest image area, and then marking the workpiece corresponding to the detection frame except the detection frame where the workpiece to be grabbed currently in the nearest image area as a potential interference workpiece.
6. A robotic grasping method considering sorting target adjacent interference according to claim 3, wherein the step 2.2 specifically comprises:
step 2.2.1: generating corresponding lattices by randomly taking points from the classified target areas and each adjacent target area respectively, converting the coordinate system of all lattices by utilizing an internal and external mapping relation matrix of the depth camera, and obtaining corresponding lattice depth information in the depth image so as to obtain corresponding lattice height information;
step 2.2.2: and judging each adjacent target area as a potential interference area and a non-potential interference area according to the lattice height information corresponding to the sorting target area and each adjacent target area, and acquiring the compensation height of the gripping points of the clamping jaws.
7. The robotic grasping method considering adjacent interference of sorting targets according to claim 6, wherein the step 2.2.2 specifically comprises:
step 2.2.2.1: according to the lattice height information corresponding to the sorting target areas and each adjacent target area, respectively calculating the height difference between each adjacent target area and the sorting target area, wherein the calculation formula is as follows:
wherein h is t Representing the difference in height between the i-th adjacent target area and the sorting target area,represents the average height of the lattice corresponding to the sorting target area, max { h } i (x, y) } represents the maximum height of the lattice corresponding to the i-th adjacent target region;
step 2.2.2.2: when the height difference between a certain adjacent target area and the sorting target area is less than or equal to the height difference threshold h T And if not, judging the adjacent target area as a non-potential interference area, and calculating the compensation height of the clamping jaw grabbing point according to the height information of all the non-potential interference areas.
8. The robotic grasping method considering adjacent interference of sorting targets according to claim 1, wherein the step 3 specifically comprises:
step 3.1: generating a clamping jaw sliding window according to the clamping jaw structure, wherein two side areas corresponding to the tail end parts of the clamping jaws in the clamping jaw sliding window are marked as grabbing shielding areas; the clamping jaw sliding window can rotate around the center point of the clamping jaw sliding window, and the position and the posture of the clamping jaw sliding window are formed by the coordinates of the center point of the clamping jaw sliding window and the rotation angle;
step 3.2: marking the minimum circumscribed rectangle of the sorting target area as a grabbing point searching area, expanding the periphery of the grabbing point searching area based on the related size of the clamping jaw sliding window, and forming a sliding window searching area;
step 3.3: the method comprises the steps of screening all potential interference areas pixel by pixel, and only reserving pixels existing in a sliding window searching area so as to form an actual interference area; and then marking different gray values of the sorting target area and the actual interference area in the sliding window searching area, and setting 0 if other pixels are pixels in the background area.
9. The method according to claim 1, wherein in step 4, the search constraint conditions are specifically:
in the process of searching the grabbing point searching area pixel by pixel, when the grabbing pose of the clamping jaw is changed, pixels of the sorting target area but no pixels of the actual interference area are arranged in the corresponding sliding window of the clamping jaw, and only pixels of the background area are arranged in the grabbing shielding area.
10. The robot gripping method considering adjacent interference of the sorting targets according to claim 1, wherein in the step 4, a genetic algorithm is used to detect the gripping pose, and in the process of detecting the gripping pose, when the interference area near one workpiece is too large, the total fitness of the population is 0, and then the sorting workpiece where the detection frame closest to the gripping jaw distance of the robot arm is located in the other workpieces to be gripped in the RGB image of the current task is selected as the new workpiece to be gripped; stopping detection after a termination condition is reached in the natural selection process, taking an individual with the optimal fitness as an optimal solution, obtaining an optimal sliding window pose of the clamping jaw, outputting the optimal grabbing pose after combining the compensation height of the grabbing points of the clamping jaw, and controlling the clamping jaw of the robot arm to finish grabbing;
when the gripping jaw sliding window corresponding to each individual has no sorting target area or interference area or the gripping shielding area has a non-background area, the individual satisfies directional extinction, and the fitness function of the genetic algorithm satisfies the following formula:
wherein f (x ', y ', θ ') is the fitness of each individual, x t ′,y t ' is two coordinate values of a mass center of a sorting target area in the sliding window, h is a jaw width of a parallel jaw, and x ', y ' is two coordinate values of a center point of the sliding window of the jaw; k (k) j The value of j represents the different positions of the short side direction of the sliding window when the span is calculated;representing all spans k j Average value of (2); the absolute value is taken.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311852076.2A CN117745831B (en) | 2023-12-29 | 2023-12-29 | Robot grabbing method considering sorting target adjacent interference |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202311852076.2A CN117745831B (en) | 2023-12-29 | 2023-12-29 | Robot grabbing method considering sorting target adjacent interference |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN117745831A true CN117745831A (en) | 2024-03-22 |
| CN117745831B CN117745831B (en) | 2026-06-23 |
Family
ID=90283393
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202311852076.2A Active CN117745831B (en) | 2023-12-29 | 2023-12-29 | Robot grabbing method considering sorting target adjacent interference |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117745831B (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121061894A (en) * | 2025-11-05 | 2025-12-05 | 浙江大学 | Workpiece pose determining method, equipment and storage medium based on self-motion manifold |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN112297013A (en) * | 2020-11-11 | 2021-02-02 | 浙江大学 | A robot intelligent grasping method based on digital twin and deep neural network |
| US20220016766A1 (en) * | 2020-07-14 | 2022-01-20 | Vicarious Fpc, Inc. | Method and system for grasping an object |
| CN115008478A (en) * | 2022-08-09 | 2022-09-06 | 北京航空航天大学 | A method, system and storage medium for selecting grasping pose of a dual-arm robot |
-
2023
- 2023-12-29 CN CN202311852076.2A patent/CN117745831B/en active Active
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20220016766A1 (en) * | 2020-07-14 | 2022-01-20 | Vicarious Fpc, Inc. | Method and system for grasping an object |
| CN112297013A (en) * | 2020-11-11 | 2021-02-02 | 浙江大学 | A robot intelligent grasping method based on digital twin and deep neural network |
| CN115008478A (en) * | 2022-08-09 | 2022-09-06 | 北京航空航天大学 | A method, system and storage medium for selecting grasping pose of a dual-arm robot |
Non-Patent Citations (3)
| Title |
|---|
| HAN SUN 等: "A Novel Robotic Grasp Detection Framework Using Low-Cost RGB-D Camera for Industrial Bin Picking", 《IEEE TRANSACTIONS ON INSTRUMENTATION AND MEASUREMENT》, vol. 73, 25 December 2023 (2023-12-25), pages 1 - 12 * |
| ZHENYU LIU 等: "A Motion Planning Method for Visual Servoing Using Deep Reinforcement Learning in Autonomous Robotic Assembly", 《IEEE/ASME TRANSACTIONS ON MECHATRONICS》, vol. 28, no. 6, 29 May 2023 (2023-05-29), pages 3513 - 3524 * |
| 陈钧 等: "一种多模块神经网络与遗传算法相结合的单目位姿估计方法", 《机器人》, vol. 45, no. 2, 31 March 2023 (2023-03-31), pages 188 - 196 * |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN121061894A (en) * | 2025-11-05 | 2025-12-05 | 浙江大学 | Workpiece pose determining method, equipment and storage medium based on self-motion manifold |
Also Published As
| Publication number | Publication date |
|---|---|
| CN117745831B (en) | 2026-06-23 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN115816460B (en) | Mechanical arm grabbing method based on deep learning target detection and image segmentation | |
| CN104058260B (en) | The robot automatic stacking method that view-based access control model processes | |
| CN112297013B (en) | Robot intelligent grabbing method based on digital twin and deep neural network | |
| JP6529302B2 (en) | INFORMATION PROCESSING APPARATUS, INFORMATION PROCESSING METHOD, AND PROGRAM | |
| CN112295933B (en) | A method for a robot to quickly sort goods | |
| CN115861780B (en) | A YOLO-GGCNN-based robotic arm detection and grasping method | |
| CN113808205B (en) | A Fast Dynamic Object Grasping Method Based on Detection Constraints | |
| CN116206101A (en) | Algorithm for mixed size destacking | |
| CN117315019B (en) | Mechanical arm grabbing method based on deep learning | |
| CN102332094B (en) | Semi-supervised online study face detection method | |
| CN111667463A (en) | Cable inspection method, robot and storage device | |
| CN118865038A (en) | A binocular dynamic servo grasping method based on adversarial fusion of unstructured target point cloud | |
| CN117745831B (en) | Robot grabbing method considering sorting target adjacent interference | |
| WO2021228194A1 (en) | Cable detection method, robot and storage device | |
| CN119972581A (en) | A visual control method for rapid sorting of magnets | |
| Shukla et al. | Automated vision-based bolt sorting by manipulator for industrial applications | |
| CN117474979B (en) | Robot 6D grabbing gesture estimation method and system based on RGB image | |
| CN116206128A (en) | Part sorting method based on deep learning | |
| CN120163982A (en) | Overlapping grape cluster instance segmentation and grasping localization method for table grape picking robot | |
| Zhang et al. | Research on moving arm grasping based on computer vision | |
| Dirr et al. | Evaluation metric for instance segmentation in robotic grasping of deformable linear objects | |
| Meng et al. | Multi-object recognition and grasping detection based on the anchor-free network | |
| CN115601324A (en) | Aluminum product grabbing method and device | |
| Ogas et al. | Object grasping with a robot arm using a convolutional network | |
| CN109492685B (en) | Target object visual detection method for symmetric characteristics |
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 |