A grabbing motion planning method for a picking robot arm

By using binocular cameras and deep learning technology to identify fruits in an agricultural picking environment, and combining offline and online planning to optimize the robotic arm path, it solves the problems of inaccurate fruit identification and low picking efficiency, and achieves more efficient fruit picking.

CN115139315BActive Publication Date: 2024-10-22DALIAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210884969.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-26
Publication Date
2024-10-22
Estimated Expiration
2042-07-26

AI Technical Summary

Technical Problem

Existing agricultural picking robots are not accurate enough in fruit recognition in unstructured environments, and have low picking efficiency and unreliable systems, making it difficult to complete fruit picking tasks quickly and accurately.

Method used

Binocular cameras are used for initial identification with a wide viewing angle, and a pre-picking plane is defined. Offline and online planning methods are combined, and reinforcement learning algorithms and deep learning technologies are used to optimize the picking sequence and path of the robotic arm. The picking process is decomposed through the pre-picking plane to reduce mechanical The energy consumption of the arm is reduced, and the identification accuracy and picking efficiency are improved.

Benefits of technology

It significantly improves the identification accuracy and picking efficiency of the picking robot, improves the picking success rate, reduces the energy consumption of the mechanical arm, and achieves more efficient fruit picking.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115139315B_ABST
    Figure CN115139315B_ABST
Patent Text Reader

Abstract

The present invention proposes a grasping motion planning method for a picking robot arm. The present invention divides the working space of the robot arm, defines a pre-picking plane, and divides the entire picking planning process into two parts: offline planning and online planning. The offline planning part is trained based on the reinforcement learning algorithm PPO algorithm. First, the position of the fruit is initially identified based on a wide viewing angle, and the position of the fruit pre-picking point is obtained according to the projection of the fruit position to the pre-picking plane, and the trajectory to each pre-picking point is output through reinforcement learning. Then we model the offline planning part and the online planning part, model them into a traveling salesman problem, and plan the optimal picking order. Finally, the robot arm arrives at the pre-picking point in turn according to the planned picking order, and completes the picking by identifying the fruit stalk at a close perspective. The robot arm adopts offline planning and planned picking order to significantly improve the success rate and picking efficiency of the picking robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of robotic agricultural picking, and in particular relates to a grabbing motion planning method for a picking robot arm, which is suitable for the automated picking of sweet pepper fruits in a plant factory or a plant greenhouse. Background Art

[0002] As China's population aging process accelerates, the demographic dividend gradually disappears, leading to rising labor costs. Against the background of new industrialization, urbanization and agricultural modernization, the rural population is migrating, resulting in a sharp decline in the labor force. my country is a large agricultural country. Every year, a large number of workers are needed to pick fruits and vegetables such as tomatoes, bell peppers, apples, and citrus fruits. Workers often need to pick fruits and vegetables under the scorching sun, which is labor-intensive and has low picking efficiency. In order to reduce harvesting costs and improve harvesting efficiency, it is very necessary to develop smart agriculture and develop fruit and vegetable picking robots with autonomous perception and precise grasping capabilities. With the continuous development of machine vision, sensors, robots and other technologies, more and more intelligent fruit and vegetable picking robots are replacing humans to complete fruit and vegetable picking tasks, but the design of fruit and vegetable picking robots still faces many problems that need to be solved.

[0003] The first point is that the recognition of the visual system is not accurate enough. The visual system is like the human eye. Only when you see accurately can you grasp accurately. The agricultural picking environment is an unstructured environment. The existence of factors such as occlusion by branches and leaves and changes in light in the picking environment will have a great impact on the recognition accuracy of fruit stems. In addition, during the recognition process, the fruit stems are thinner than the fruits and are difficult to accurately identify. Therefore, it is very necessary to improve the robustness and accuracy of the recognition algorithm.

[0004] The second point is that the picking efficiency of the picking robot is low and the system is unreliable. The picking robot used in agricultural scenarios uses a six-degree-of-freedom industrial robotic arm to pick the fruit during the fruit picking process. It is hoped that the robotic arm can quickly and efficiently reach the picking point of the fruit stalk in a certain posture to pick the fruit. The workspace of the robotic arm is divided into a flexible workspace and a non-flexible workspace. The flexible workspace is a workspace that can be reached in any posture. In the non-flexible workspace, due to the limitation of the posture during the picking process of the robotic arm, the robotic arm often has no solution or has a solution but the movement of the robotic arm will change drastically, and the fruit cannot be picked according to the expected path. These will cause problems such as low efficiency and unreliable system (low success rate) in the picking robot, and ultimately lead to farmers refusing to use these picking robots. Therefore, in the field of mobile picking, there is still a great demand for how to ensure that the picking robot can pick quickly, reliably and efficiently, and research is urgently needed. Summary of the invention

[0005] In order to overcome the influence of occlusion, illumination and thin fruit stems on the accuracy of fruit stem recognition in the picking environment and solve the problems of low efficiency and unreliable system of picking robots, this invention provides a grabbing motion planning method for a picking robot arm.

[0006] The specific technical scheme of the present invention is:

[0007] A method for planning the grabbing motion of a picking robot arm comprises the following steps:

[0008] Step 1: Use a pair of binocular cameras under a wide viewing angle to perceive the picking environment, perform preliminary recognition of the fruits, identify the number of fruits and the three-dimensional coordinates of each fruit in the camera coordinate system, and obtain the initial picking point;

[0009] Step 2, define a pre-picking plane between the robotic arm and the target fruit, and project the initial picking point obtained in step 1 onto the pre-picking plane to obtain the pre-picking point;

[0010] Step 3: Obtain the trajectory of the robot arm from the starting position to each pre-picking point according to the offline planning; Model the fruits to be picked at the current viewing angle by combining the trajectory of offline planning with the online planning, and plan the optimal picking order for the robot arm to arrive at the pre-picking points in sequence; The robot arm first arrives at a pre-picking point after the planned picking order, and then performs secondary recognition through the binocular camera 2 at a close viewing angle to obtain the corresponding target picking point, and then performs picking through online planning, returns to the pre-picking point after picking is completed, and then arrives at the next pre-picking point according to the planned picking order;

[0011] Step 4: The robot arm repeats step 3 until all pre-picking points in the pre-picking plane in step 2 are traversed and then returns to the initial position of the robot arm.

[0012] Furthermore, the initial identification of the fruit in step 1 adopts yolov.

[0013] Furthermore, the setting of the pre-picking plane in step 2 is specifically as follows: Fig.10 As shown, the working space of the robot arm is a sphere with a radius of Rcm, the distance from the pre-picking plane to the fruit is 10-15cm, the distance from the pre-picking plane to the robot arm base coordinate system is (R-15, R-10), the length of the pre-picking plane is Rcm, and the width is 0.75Rcm. The arrow indicates the position and posture of the robot arm when it reaches the pre-picking plane. The size setting of the pre-picking plane in the present invention can be adjusted according to demand, and the obvious changes or modifications derived from this are still within the protection scope of the present invention.

[0014] Furthermore, in step 3, the offline planning is trained by using a reinforcement learning algorithm to output a trajectory to each pre-picking point.

[0015] Furthermore, in step 3, the reinforcement learning algorithm is a PPO algorithm.

[0016] Furthermore, in step 3, offline planning and online planning are modeled for the entire picking process of the robot arm, the picking order of the robot arm to arrive at the pre-picking points in sequence is planned, an energy cost function is constructed, and the minimum sum of the joint angle changes of the robot arm is used as the optimization indicator; the model is modeled as a traveling salesman problem for solution, and the order of arriving at the pre-picking points, that is, the optimal picking order of the robot arm, is planned.

[0017] Furthermore, in step 3, the specific method of the secondary recognition is to use a second binocular camera to identify the fruit stalk at a close angle after reaching the pre-picking point. First, YOLV is used to identify the fruit and obtain the region of interest of the fruit stalk.

[0018] Furthermore, we use the lightweight instance segmentation network yolact to obtain the location of the fruit stem and the target picking point for the region of interest. This solves the problem that the fruit stem is thinner than the fruit and difficult to accurately identify, and the picking environment is affected by the occlusion of branches and leaves and the large changes in light.

[0019] Furthermore, in step 3, the online planning specifically adopts the moveit framework in the ROS robot operating system to control the robotic arm for picking, adopts the bidirectional RRT to plan the path of the robotic arm during the online planning process, and adopts the bionic optimization BioIK (Biologically Inspired Optimization inverse kinematics) algorithm to obtain the inverse solution of the robotic arm.

[0020] In order to solve the problems of low efficiency and unreliable system (low success rate) of the picking robot, the working space of the robotic arm is divided, and the pre-picking plane is defined to divide the entire picking planning process into two parts: offline planning and online planning. The offline planning part is trained based on the proximal policy optimization PPO (Proximal Policy Optimization) algorithm in the reinforcement learning algorithm. Based on yolov, a binocular vision camera is used to perform initial recognition with a wide viewing angle to obtain the position of the bell pepper fruit. According to the position of the bell pepper fruit, it is projected to the pre-picking plane to obtain the position of the pre-picking point of the bell pepper fruit, and the trajectory to each pre-picking point is output through reinforcement learning. The picking process is divided into the following steps: First, the robotic arm needs to reach the pre-picking point, and then perform secondary recognition and online planning for picking. After picking, it returns to the pre-picking point and then reaches the next pre-picking point. Repeat this process until the fruit is picked at the current viewing angle and finally returns to the initial position. The schematic diagram of online planning and offline planning during the picking process is shown in the figure. Figure 7 shown.

[0021] The online planning process of the robot arm starts after the robot arm reaches the point on the pre-picking plane. The process is as follows: the robot arm starts from the pre-picking point, reaches the target picking point to pick, and then returns to the pre-picking point. The sum of the changes in the angles of each joint during the online planning process of the robot arm is taken as the energy consumed by the robot arm. The smaller the sum of the changes in the angles of each joint, the smaller the energy cost. Figure 7 As can be seen from the schematic diagram, the robotic arm completes the picking of all fruits in the current view during the online planning process, and the energy consumed can be regarded as a constant.

[0022] The offline planning stage is the process in which the robot arm traverses all pre-picking points from the starting point and then returns to the initial position. In the offline planning stage, the order in which the robot arm passes through the pre-picking points is different, and the energy cost consumed by the robot arm is different. In order to reduce the energy cost consumption of the robot arm's picking process and improve the picking efficiency of the robot arm, the offline planning part and the online planning part are modeled as a traveling salesman problem to plan the optimal picking order.

[0023] Since the cost function of the energy consumed by the robot arm in the online planning process is the same during the picking process, the energy cost function of the online planning process can be regarded as a constant in the process of planning the optimal picking sequence. The robot arm starts from the starting position, passes through all the pre-picking points in turn, and finally returns to the starting position. The optimal picking sequence is the one with the smallest sum of the changes in the angles of each joint of the robot arm, and the energy consumed is the smallest. The optimal picking sequence is solved by the genetic algorithm, and the optimal picking sequence for the robot arm to reach the pre-picking points is calculated.

[0024] Using offline planning and planning the picking sequence can significantly improve the success rate and picking efficiency of the picking robot. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 The present invention is a flow chart of a method for planning a grasping motion of a picking robot arm.

[0026] Figure 2 This is a schematic diagram of the actual working environment of the picking robot.

[0027] Figure 3 It is a schematic diagram of the coordinate transformation relationship between the robotic arm and two binocular cameras.

[0028] Figure 4 It is a schematic diagram of the reinforcement learning simulation environment.

[0029] Figure 5 It is a schematic diagram of the region of interest of the bell pepper stalk.

[0030] Figure 6 It is a schematic diagram of the projection of the fruit onto the pre-picking plane.

[0031] Figure 7It is a schematic diagram of offline planning and online planning of picking robots.

[0032] Figure 8 It is a schematic diagram of secondary recognition and online planning of picking robots.

[0033] Fig. 9 It is a schematic diagram of the network structure of the sweet pepper stalk recognition algorithm yolact of the present invention.

[0034] Fig.10 It is a schematic diagram of the size of the pre-picking plane. DETAILED DESCRIPTION

[0035] The present invention will be described in detail below in conjunction with the accompanying drawings.

[0036] The present invention proposes a method for planning the grabbing motion of a harvesting robot. The method is applied in standardized planting scenes such as plant factories and plant greenhouses to realize the fruit picking operation of an agricultural harvesting robot. The fruit described in the present invention takes sweet pepper as an example to realize a method for planning the grabbing motion of a harvesting robot. The flow chart is as follows: Figure 1 The specific implementation steps are as follows:

[0037] A method for planning a grabbing motion of a picking robot arm comprises the following steps:

[0038] Step 1: Build the experimental equipment of the picking robot. The experimental equipment consists of two parts: the picking robot and the pre-picking plane. During the pepper picking process, the pre-picking plane divides the motion planning of the robot arm into two parts, such as Figure 2 As shown in the figure, one is the offline planning part and the other is the online planning part. Since the pepper stem has relatively few pixels in the entire image, the recognition of pepper also consists of two parts. The first part is initially recognized at the initial position with a wide viewing angle by binocular vision camera 1. After reaching the pre-picking point on the pre-picking plane, the second part is accurately recognized at a close viewing angle by binocular vision camera 2. The binocular vision camera 1 is installed as shown in the figure. Figure 3 As shown in the position, the binocular vision camera 1 is mainly responsible for the initial recognition of the fruit position. The camera coordinate system of camera 1 is camera1_frame. The conversion relationship between the camera coordinate system camera1_frame of the binocular vision camera 1 and the base coordinate system base_link of the robotic arm is determined through camera calibration (eye outside the hand).

[0039] The conversion relationship between the camera coordinate system camera1_frame and the robot base coordinate system base_link is represented by (x, y, z, yaw1, pitch1, roll1). (x, y, z, yaw1, pitch1, roll1) means rotating the base_link coordinate system by yaw1 along the X axis, pitch1 along the Y axis, and roll1 along the Z axis, and then translating by x along the X axis, y along the Y axis, and z along the Z axis in the base_link coordinate system. Formula (1) means converting the obtained three-dimensional coordinates of the bell pepper from the camera coordinate system camera1_frame to the robot base coordinate system base_link, using base_link P stands for R camera1_base_link is the rotation matrix from the binocular vision camera coordinate system to the robot base coordinate system, T camera1_base_link It is the translation coordinate from the camera coordinate system to the robot base coordinate system.

[0040] base_link P=R camera1_base_link · camera1_frame P+T camera1_base_link (1)

[0041] Install the second binocular vision camera on the end of the 6-DOF Universal Robot arm. Determine the conversion relationship between the camera coordinate system camera2_frame and the end-of-arm coordinate system tool0 through hand-eye calibration. The conversion relationship between the camera coordinate system camera2_frame and the end-of-arm coordinate system tool0 is represented by (x1, y1, z1, yaw, pitch, roll). (x1, y1, z1, yaw, pitch, roll) means rotating the tool0 coordinate system along the X-axis by yaw, along the Y-axis by pitch, and along the Z-axis by roll, and then translating the tool0 coordinate system by x1 along the X-axis, y1 along the Y-axis, and z1 along the Z-axis. Start the binocular vision camera and the 6-DOF Universal Robot arm, and load the URDF model of the arm and camera. The model describes the position and posture of each joint of the arm and the conversion relationship with the camera coordinate position. For example Figure 3 As shown in the figure, the base coordinate system of the robot is defined as base_link, the coordinate system of camera 2 is camera2_frame, and the coordinate system of the end of the robot is tool0. The positional relationship between the camera coordinate system camera2_frame and the base coordinate system of the robot is determined by translation and rotation. Formula (2) indicates that the obtained three-dimensional coordinates of the bell pepper are converted from the camera 2 coordinate system camera2_frame to the robot end coordinate system tool0. tool0 P stands for R camera2_tool0is the rotation matrix from the camera coordinate system to the robot end coordinate system, T camera2_tool0 is the translation coordinate from the camera 2 coordinate system to the robot end coordinate system. Formula (3) means that the three-dimensional coordinate of the bell pepper obtained from camera 2 is converted from the robot end coordinate system tool0 to the robot base coordinate system base_link. base_link P represents the position of the bell pepper with the robot base coordinate system base_link as the reference system. tool0_base_link is the rotation matrix from the robot end coordinate system to the robot base coordinate system, T tool0_base_link It is the translation coordinate from the robot end coordinate system to the robot base coordinate system.

[0042] tool0 P=R camera2_tool0 · camera2_frame P+T camera2_tool0 (2)

[0043] base_link P=R tool0_base_link · tool0 P+T tool0_base_link (3)

[0044] Step 2: Perform offline learning based on reinforcement learning. Use the PPO reinforcement learning algorithm to control the robot arm to reach the pre-picking plane in a specific posture. The learned model is used for offline planning. Figure 2 As shown in the figure, the direction of the arrow in the pre-picking plane in the real environment indicates the grasping posture of the end of the robot arm, which is perpendicular to the pre-picking plane. The intersection of the arrow and the picking plane is the position where the robot arm reaches the pre-picking plane. The position pointed by an arrow can be represented by (x, y, z, α, β, γ), which includes the position to be reached by the end of the robot arm and the grasping posture. Build a simulation environment and conduct training in the Pybullet simulation environment. The simulation environment is as follows: Figure 4 As shown. The white solid line in the figure is a predefined bounding box. During the training process of the robot arm, if the end leaves the bounding box, a negative reward is given, the training is terminated, and it is restarted. The object in the figure represents the target point during the training process of the robot arm. The grasping posture of the robot arm to reach the target point of the object is (α, β, γ). The training points on the pre-picking plane are calculated by the function f random (x,y,z) generates, function f random (x, y, z) represents the position coordinates (x, y, z) on the pre-picking plane with the robot base coordinate system as the reference system, and the random (a, b) function represents a random number between a and b.

[0045]

[0046] The PPO reinforcement learning algorithm is used to control the robot arm to reach the pre-picking plane in a specific posture. The reward function of the robot arm during the learning process is defined as follows: a positive reward is given when the robot arm reaches the target point, a negative reward is given when the end exceeds the predefined bounding box, and a negative reward is given when the maximum number of steps of the robot arm movement is reached but the target point has not yet been reached. The distance between the coordinates of the end of the robot arm and the coordinates of the target point is calculated as the basis of the reward function. The coordinates of the end of the robot arm in the current state are (current.x, current.y, current.z), and the coordinates of the target point are (target.x, target.y, target.z). The basis of the reward function is expressed by formula 8. When the distance is less than or equal to 1, that is, the end of the robot arm reaches a sphere with a radius of 1 cm centered on the target point, the robot arm is considered to have reached the target point.

[0047] sruare_dx=(current.x-target.x) 2 (5)

[0048] sruare_dy=(current.y-target.y) 2 (6)

[0049] sruare_dz=(current.z-target.z) 2 (7)

[0050] distance=sqrt(sruare_dx+square_dy+square_dz) (8)

[0051] Step 3. In the picking environment, perform an initial identification of the position of the bell pepper fruit. Subscribe to the RGB image of the binocular vision camera 1, and use deep learning yolov to identify the position of the fruit. Configure darknet_ros in the ROS system, collect the bell pepper data set, annotate it through annotation software, and then use yolov for training. Subscribe to the camera's depth image and RGB alignment topics in the ROS system at the same time, use a binocular camera to collect images with an image resolution of 640*480, run yolov in darknet_ros to identify the bell pepper, and the ROS system will return the identification result of the bell pepper, select the position of the bell pepper, and get the pixel position of the identification rectangle at 640*480, such as Figure 5 As shown in the sweet pepper fruit recognition box A, the pixel coordinates of the points represented by the four corners of the rectangular box are A1(x1,y1), A2(x2,y2), A3(x3,y3), and A4(x4,y4). Through the four pixel positions, we can calculate the center position C(x i ,y i), and we can obtain it by formula 9:

[0052]

[0053] The pixel point at the center of the bell pepper fruit is obtained according to the identification frame of the bell pepper fruit. When the deep learning algorithm recognizes that the number of bell pepper fruits is N, the pixel point coordinates of the center of N bell pepper fruits are obtained by calculation through formula 9 and expressed as C(x i ,y i ), i∈N indicates that matching with the depth image of the binocular vision camera will obtain the corresponding coordinates P in the world coordinate system of the binocular vision camera. i =[X i ,Y i ,Z i ],i∈N is obtained by formula 10.

[0054]

[0055] Where (x i ,y i ) represents the pixel coordinates of the depth image, Z represents the depth value of the binocular camera, f is the focal length of the camera, dx, dy represent the physical distances corresponding to the horizontal unit pixel and the vertical unit pixel respectively, the unit is mm, u0, v0 are the midpoints of the horizontal pixel and the vertical pixel respectively.

[0056] Step 4: Based on the initial recognition result P in step 3 i =[X i ,Y i ,Z i ], i∈N find the position of the point projected onto the pre-picking plane. Find the coordinates of the N fruits projected onto the pre-picking plane, and use these coordinate positions as the pre-reaching points of the robot arm, as shown in the figure Figure 6 When N points are projected onto the picking plane, the point on the pre-picking plane is recorded as A. i (i=1...N). The initial position of the robot arm is that the Z axis of the binocular vision camera in the world coordinate system is perpendicular to the pre-picking plane, and the distance is d l Therefore, the position of the bell pepper fruit identified by the camera projected onto the pre-picking plane is A i =[X i ,Y i ,dl],i∈N, through the transformation relationship between the camera coordinate system camera1_frame and the robot base coordinate system base_link, the positions of all pre-picking points relative to the end base_link of the robot base coordinate system are calculated.

[0057] base_link P i (X i ,Y i,Z i )=R camera1_base_link ·A i (X i ,Y i ,dl)+T camera1_base_link (i∈N) (11)

[0058] Step 5: Plan the optimal picking sequence of the robot arm based on the position of the pre-picking point. Load the file trained by the offline planning of reinforcement learning in step 2, input the position coordinates of the pre-picking point, and calculate the time required for the robot end tool0 to reach the pre-picking point A. i ,i∈N trajectory. The planning process of the robot arm consists of two parts, reaching the pre-picking plane and secondary planning for picking. During the picking process, the robot arm needs to reach the pre-picking point first, and then perform secondary perception and recognition for picking. Regardless of the picking order adopted by the robot arm during the online planning process, the energy cost consumed by the robot arm to complete the picking is the same. In the offline planning stage, the order in which the robot arm passes through the pre-picking points is different, and the energy cost consumed by the robot arm is different. In order to reduce the energy cost consumption of the robot arm's picking process, the offline planning part and the online planning part are modeled to construct an energy cost function. The cost of the online planning part is expressed by Z c The planning cost of the offline phase is expressed as M c Indicates that the robot arm starts from A i Move to point A i+1 The trajectory of the time is calculated by using F in formula 12 c (A i ,A i+1 ) function, θ in formula 12 N is a 6-dimensional vector, which represents the angular position of the 6 joints of the robot. The sum of the changes in the angles of each joint during the movement of the robot represents the cost function. The smaller the sum of the changes in the joint angles of the robot passing through each pre-picking point, the lower the energy cost consumed. The function D(F c (A i ,A i+1 )) indicates that the robot arm starts from A i Move to point A i+1 The sum of the joint angle changes.

[0059] F c (A i ,A i+1 )={θ1,θ2…θ N} (12)

[0060]

[0061] D(F c (A i ,A i+1 )) indicates that the robot arm starts from Ai To A i+1 Energy cost consumption, expressed as T c Represents the total energy cost consumption. It can be expressed as Formula 14

[0062]

[0063] like Figure 7 As shown in the figure, the energy consumed by the robot to complete the picking of all fruits in the current perspective can be modeled as a traveling salesman problem. The robot starts from the starting position, passes through all pre-picking points in sequence, and finally returns to the starting position. The optimal picking order is the one with the smallest sum of the angle changes of each joint of the robot, which consumes the least energy. The optimal picking order is solved by a genetic algorithm, and the order in which the robot reaches the pre-picking points is calculated.

[0064] Step 6: Control the robot arm to arrive at the pre-picking points in sequence according to the planned optimal picking order, and then perform secondary recognition and online planning for picking, such as Figure 8 As shown. The secondary recognition process is completed by camera 2 under close-up view. The process is as follows: when the robot arm reaches the pre-picking point, it recognizes the pepper stalk, subscribes to the RGB image of the binocular vision camera 2, and identifies the position of the pepper fruit through the deep learning algorithm yolov. We infer the obtained fruit position and find the area of ​​interest of the pepper stalk according to the position of the pepper fruit, as shown in the figure. Figure 5 The detailed steps are as follows: the position of the bell pepper fruit is framed by the minimum circumscribed rectangle, the center of mass of the bell pepper fruit is calculated, and the identification frame B of the region of interest of the bell pepper stalk is inferred upward from the center of mass of the bell pepper fruit. The rectangular frame of the bell pepper stalk is obtained at the pixel position of 640*480 through the identification frame B. The identification frame B of the bell pepper stalk is calculated in the following way. The length of the fruit identification frame A remains unchanged and is translated upward. Get the pepper stem area B, such as Figure 5 As shown in the figure, the selected area B includes the fruit, leaves, stems, and stalks of the bell pepper. Then, the bell pepper stalk area is identified by the lightweight instance segmentation network yolact network to obtain the picking point. The schematic diagram of the yolact network identifying the bell pepper stalk is shown in the figure. Fig. 9 shown.

[0065] Step 7: Arrive at the picking point and complete the picking of the bell peppers. The fruit is picked by online planning based on the identified picking points, and the robot arm is controlled to complete the picking of the bell peppers. Then the robot arm is controlled to reach the next pre-picking point and repeat step 7 to pick the peppers until all pre-picking points are traversed. Enter the next picking location and repeat the above steps to pick the peppers.

[0066] The algorithm of this embodiment was simulated and compared in the gazebo simulation environment. The comparison algorithm did not use the offline planning algorithm and did not plan the picking order. The picking success rate and the average time of picking a single fruit were used as evaluation indicators. After the comparison algorithm identified the position of the fruit, it first arrived at 15cm in front of the fruit in a specific posture to identify the fruit stem, and then picked it, and returned to the initial position after picking. Repeat this process until the fruit is picked, and the picking order of the fruit is random. During the simulation process, 8 picking fruits were set, and 10 groups of experiments were set. The position of the fruit was random during the 10 groups of experiments. The experimental results show that the picking success rate of the comparison algorithm is 77%, and the picking time of a single fruit is 22s. The picking success rate using offline planning and planning picking order is 92%, and the picking time of a single fruit is 16s. Through the comparison experiment, it is concluded that the picking success rate is increased by 15% and the picking efficiency is increased by 27.3%. The experiment shows that the use of offline planning and planning picking order can significantly improve the success rate and picking efficiency of the picking robot.

Claims

1. A method for planning the grabbing motion of a picking robot arm, characterized in that: The steps include: Step 1: Use a pair of binocular cameras under a wide viewing angle to perceive the picking environment, perform preliminary recognition of the fruits, identify the number of fruits and the three-dimensional coordinates of each fruit in the camera coordinate system, and obtain the initial picking point; Step 2, define a pre-picking plane between the robotic arm and the target fruit, project the initial picking point obtained in step 1 onto the pre-picking plane to obtain the pre-picking point; the setting method of the pre-picking plane is specifically as follows: the working space of the robotic arm is a sphere with a radius of R cm, the position of the pre-picking plane to the fruit is 10-15 cm, the distance between the pre-picking plane and the robotic arm base coordinate system is (R-15, R-10), the length of the pre-picking plane is R cm, and the width is 0.75 R cm; Step 3: Obtain the trajectory of the robot arm from the starting position to each pre-picking point according to the offline planning; Model the fruit to be picked from the current perspective by combining the trajectory of offline planning with the online planning, construct an energy cost function, and take the minimum sum of the joint angle changes of the robot arm as the optimization index; The model is modeled as a traveling salesman problem for solution, and the optimal picking order for the robot arm to arrive at the pre-picking points in sequence is planned; the robot arm first arrives at a pre-picking point after the planned picking order, and then performs secondary recognition through the binocular camera 2 at a close-up perspective to obtain the corresponding target picking point, and then picks through online planning. After picking is completed, it returns to the pre-picking point, and then arrives at the next pre-picking point according to the planned picking order; The offline planning is trained by using the PPO algorithm to output the trajectory to each pre-picking point; The energy cost function of the online planning process under the current viewing angle is regarded as a constant; the secondary recognition method is to use a second binocular camera to recognize the fruit stem at a close viewing angle after reaching the pre-picking point, first use yolov to recognize the fruit and obtain the region of interest of the fruit stem; use a lightweight instance segmentation network yolact for the region of interest to obtain the position of the fruit stem and obtain the target picking point; The online planning specifically adopts the moveit framework in the ROS robot operating system to control the robotic arm for picking, adopts bidirectional RRT to plan the path of the robotic arm during the online planning process, and adopts the bionic optimization BioIK algorithm to obtain the inverse solution of the robotic arm; the online planning robotic arm picking process includes the process of the robotic arm end effector shearing the fruit stalk; the end of the robotic arm is equipped with a shear-clamp integrated end effector, which shears the fruit stalk while clamping the fruit stalk, and a cylindrical collection device is installed under the end effector. The moment the clamp is released, the fruit will fall into the cylindrical collection device, so the robotic arm does not need to return to place the fruit, and the fruit will be collected by the end effector during the picking process; Step 4: The robot arm repeats step 3 until all pre-picking points in the pre-picking plane in step 2 are traversed and then returns to the initial position of the robot arm.

2. The method for planning the grabbing motion of a picking robot arm according to claim 1, characterized in that: In step 1, a binocular camera is used to perform initial fruit recognition with a wide viewing angle, and the recognition method is YOLOV.