1. Introduction
The trellised pear orchard, which originated in Japan, was introduced to China in the 1990s and was popularized rapidly. The trellised pear orchard has the following five advantages: good fruit quality; convenient operation and management; easy to implement standardized cultivation; being convenient for mechanized operation; and preventing wind and bird damage. The harvest time of pear, the target crop in the trellised orchard in this study, is affected by a variety of characteristics and climatic conditions, so it is very important to harvest fruits at the right time according to specific requirements. Since the efficiency of a single robot arm is low, it is not enough to meet the demand of fruit harvest, and thus this study used multiple-robot-arm cooperative picking to improve efficiency and avoid the problems of quality degradation and low picking efficiency caused by not picking in time.
In general, picking work is divided into three aspects: perception, decision making, and control execution. The environment and fruit information are perceived by sensors. The decision system judges the picking target, and the execution system is driven to complete the picking action. The whole system is known as the “hand–eye–brain” picking system. This research direction has had wide concern worldwide in recent years.
Visual perception target detection in fruit and vegetable picking research is mainly divided into one-stage detection algorithms and two-stage detection algorithms. One stage detection algorithms, such as YOLO, SSD, SqueezeDet, and DetectNet, can directly extract features from the network to predict the classification and position of objects, thus eliminating the need for regional candidate networks (PRNs). The outstanding feature is that the detection speed is fast and only requires one step. On the contrary, two-stage detection algorithms, such as RCNN, FasterR-CNN, and MaskR-CNN, need to first create a proposal box that may contain the object to be detected and then perform further detection based on the object characteristics to complete the recognition and positioning of the target, which is more accurate. Mu et al. [
1] used FasterR-CNN to identify kiwifruit, wherein they input the image and depth image obtained by a Kinectv2 camera (Microsoft, Redmond, WA, USA) into the convolution neural network to detect and locate the kiwifruit in the picture. Yang et al. [
2] proposed a citrus fruit and branch recognition model based on MaskRCNN for fruit recognition and location under different occlusion conditions, and they constructed training datasets under a variety of complex conditions, including single fruit, multiple fruits, covered fruits, branches, and trunks. Qian et al. [
3] proposed a method for mushroom detection and location based on SSD that optimizes the backbone network of the original SSD model to improve the real-time detection performance in embedded devices. The model has good detection performance for Pleurotus ostreatus. For apple fruit and branch segmentation, Kang et al. [
4] adopted the Dasnet network model. Peng et al. [
5] used the DeepLabV3+ semantic segmentation model based on the Xception_65 feature extraction network to detect litchi fruit. The experimental results showed that the model had 0.765 MIoU, which is 0.144 higher than the original DeepLabV3+ model. In order to adapt to the complex growth environment of litchi and simultaneously detect and locate the fruit branches of multiple litchi clusters, Li et al. [
6] proposed a semantic segmentation method based on Deeplabv3 to segment the fruit, branches, and background in RGB images. However, due to the large differences in agronomic characteristics between fruits, we need to develop semantic segmentation and a target detection algorithm for the trellised pear orchard scene on the basis of the above fruit recognition algorithm.
In order to meet the needs of recognition and location of litchi fruit and stem at night, Liang et al. [
7] proposed a litchi fruit detection method based on YOLOv3. In order to verify whether different classification modes will affect the detection effect of the kiwifruit detection model, Suo et al. [
8] collected and classified 1160 kiwifruit images according to picking strategy and occlusion conditions, and they inputted them into YOLOv4 and YOLOv3 network models for training and testing. The experimental results showed that the tagging and classification of datasets in a way that is as detailed as possible can effectively improve the detection accuracy of the network model. Xiong et al. [
9] developed a faster and more accurate system for the real-time vision detection, tracking, and locating of strawberries by combining YOLOv4, DeepSORT, and color threshold. In view of the low accuracy and poor robustness of the traditional green pepper detection methods, Li et al. [
10] proposed an improved green pepper target detection algorithm based on Yolov4_tiny. Based on the backbone network of the classical target detection model, the algorithm introduces adaptive feature fusion and feature attention mechanism to improve the accuracy of the small-target recognition of green pepper while ensuring the accuracy of classification. Aiming at the characteristics of the small size and dense growth of plums, Wang [
11] proposed a lightweight model named improved YOLOv4, based on YOLOv4. The experiments showed that the improved YOLOv4 model had higher average accuracy (mAP); in addition, compared with YOLOv4, the size was compressed by 77.85%, and the detection speed was accelerated by 112%. Yan et al. [
12] proposed an apple detection algorithm based on improved YOLOv5s that can effectively identify graspable apples and ungraspable apples, and the average detection time for a single image was found to be only 0.015 s. In order to meet the requirements of accuracy, lightweight model, and fast response during picking in a trellised pear orchard, on the basis of optimizing the YOLO fruit detection algorithm, a pear detection algorithm based on improved YOLOv5s was developed, combined with a depth camera.
The terminal execution modes of agricultural picking robots usually include negative pressure adsorption, shear, mold cavity-sleeve, and flexible grasping. The Xiong team [
13,
14] of the Norwegian University of Life Sciences is devoted to the research of strawberry picking robots. The end-effector of the picking robot developed is a new cable-driven non-contact picking fixture with sensing function, which is composed of three active fingers, three passive covering fingers, and a cutter mechanism. The robot uses a collision-free motion planning algorithm to make picking safer and more convenient. For the picking of the cluster-shaped fruit of litchi, the Zhou team [
15] of South China Agricultural University developed a picking robot whose end effector is mainly composed of an end-holder and a rotating cutter head. The robot uses a collision-free motion planning algorithm to make picking safer and more convenient. For the picking of cherry tomato, which is also a cluster fruit, Feng et al. [
16] developed a scissor-like end-effector, with two cutters used to cut the stalk. By closing or opening the grip fixed to the cutter, the fruit can be cut and processed reliably.
For tomato picking, Yurni Oktarina et al. [
17] in Indonesia designed a tomato picking robot. The end effector is a pair of scissors, sharp and flexible, which is driven by a servo motor. The strawberry-picking robot developed by Xiong’s team [
14] opens its mold cavity to “swallow” the fruit when picking, and it cuts the fruit stem with a blade to complete strawberry picking. For apple mold cavity-sleeve picking, the team designed a spherical two-finger structure gripper that can effectively reduce the fruit damage rate [
18]. The team also developed a flexible gripper composed of two curved flexible fingers, and they improved and optimized it so that it could not only pick apples, but also pick pomegranates, grapefruits, and other fruits [
19]. In order to further reduce the damage rate of apple picking, the team studied a bionic three-finger flexible gripper inspired by the octopus tentacle [
20]. The end-effector of the pneumatic finger clip structure developed by Hohimer et al. [
21] can pick apples flexibly and with high precision. Yu et al. [
22] designed three-finger grippers made of flexible materials from an ergonomic point of view, being beneficial to protect apples from damage and achieve non-destructive picking. Due to the large difference in agronomic characteristics between fruits, the use outside the scope of the application scenario will greatly affect the integrity and picking efficiency of the fruit. Therefore, based on the above fruit pickers such as strawberry and tomato, an integrated end-picker for the trellised pear garden scene was developed.
The development of multiple robotic arms provides new ideas for picking research. The cherry-picking robot based on multi-joint robot arms developed by the ArimaS team utilizes a visual system to identify obstacles in the environment and perform path planning for a single robot arm [
23,
24]. Wageningen University developed a six-degree-of-freedom cucumber-picking robot that uses an identification device on the end effector to identify fruit stems and picks cucumbers by clamping the fruit stems and cutting them at high temperatures [
25]. DanSteere developed an apple-picking robot in 2015 that is fast, efficient, and has a wide working range. It uses a four-degree-of-freedom robot arm and an air-suction end-effector [
26]. Due to the limitation of picking efficiency of a single robot arm, the advantages of collaborative picking by multiple robotic arms are particularly prominent.
In order to improve the efficiency of apple picking, FFRobotics developed a parallel multiple robot arm apple-picking platform that adopts the way of grouping and dividing the working area [
27]. In order to improve the efficiency of apple picking, FFRobotics developed an apple-picking platform based on a parallel multiple robot arm, which adopts the working mode of grouping and work area division [
27]. This method can improve the picking efficiency and avoid the interference and collision between robot arms. Williams et al. [
28] explored a kiwifruit-picking robot with four three-degree-of-freedom serial robot arms. The robot can collaboratively pick while effectively avoiding collisions between the robot arms. On the other hand, Fu et al. [
29] developed a system containing four three-degree-of-freedom rectangular coordinate robots and applied it to the collaborative picking of kiwifruit. For strawberries, a fruit that is difficult to harvest, Harvest CROO developed a strawberry-harvesting robot for high-ridge cultivation that uses four parallel picking units. Each ridge of strawberries is equipped with an independent picking unit, thus improving work efficiency [
30]. AGROBOT Robotics developed a robot suitable for elevated cultivation, using a solution of 24 parallel robot arms. The linear module utilizes mechanical isolation in the forward direction to avoid interference between robot arms, while robot arms on the same unit adopt a control strategy to achieve isolation [
31].
As the process of population aging intensifies, a labor-intensive industry like picking urgently needs to be replaced by more efficient multiple robot arm systems. This paper focuses on the collaborative picking of multiple robotic arms in a trellised pear orchard. Taking the trellised pear garden as the object of research, the environment, agronomy, and physical characteristics of the fruit and the identification and positioning method of the pear were investigated. Based on the physical characteristics of pears, a pick-place integrated end-picker was designed. Based on kinematic analysis of robot arms and the construction of a private dataset, the YOLOv5s object detection algorithm was utilized in conjunction with a depth camera to achieve fruit positioning, and the hand–eye system calibration was carried out. It meets the research and development needs of an efficient picking robot in a pear orchard. In order to solve the optimal picking sequence, as well as reduce the scheduling time and the energy consumption, a task allocation method for a multiple robotic arms system was proposed, and the picking sequence was optimized through the simulated annealing algorithm, and finally, the experimental environment was set up for the robot arm picking experiment. The comparison experiment between different end-pickers and the comparison experiment before and after picking sequence optimization were conducted to test the efficiency of different end-pickers. On this basis, the task allocation method and optimal configuration were analyzed and verified by simulation experiments. This research can be utilized to advance robotic pear-picking research and development.
4. The Picking Task Planning of Multiple Robot Arms
4.1. The Task Allocation Method of Multiple Robot Arms
In this paper, the Monte Carlo method based on random probability was utilized to solve the working space of a robot arm.
Figure 10 shows the working space of a single AUBO-i5 robot arm and the projection of the working space on xoz. The working space is approximately a sphere, and the picking area is divided based on this.
It can be seen from
Figure 11 that when the picking plane was 0.4009 m away from the unmanned vehicle plane, the radius of the picking plane was 0.8703 m; when the picking plane was 0.923 m away from the unmanned vehicle plane, the radius of the picking plane was 0.4696 m. As picking height increases, the picking range will decrease. The projection of the workspace on xoy, the circular area, decreased as the Z-axis absolute value increased.
The distance between robot arms was set to 1 m. The projection of a multiple robot arm workspace on xoy can be obtained using the Monte Carlo method (
Figure 12).
It can be seen from
Figure 12 that for the trellised pear orchard environment, at different heights from the unmanned vehicle plane, the picking area of each robot arm was approximately a circle. As picking height increased, the overlap of the picking area between adjacent robot arms was approximately an ellipse, wherein the area decreased as picking height increased.
The height of an unmanned vehicle is 1.1 m. The robot arm performs picking operations on a picking plane 0.6 m away from the unmanned vehicle plane. The operating area of the robotic arm is approximately a circle with a radius of 0.8 m. On the basis of the solution of multiple robot arm workspace in the previous section, the picking area of a robot arm was divided (
Figure 13). Collaborative picking task allocation of multiple robotic arms can be described as the problem of multiple robotic arms cooperating to complete the picking task. The ultimate goal is to increase picking efficiency, and at the same time, tending to divide the task volume of each robot arm evenly and improve the utilization rate of each robot arm.
The collaborative picking task allocation model of multiple robotic arms is specifically described as follows:
(1) A set of multiple robotic arms is represented by
, where
represents the number of robot arms and
represents the robot arm,
. (2) The picking area is represented by
, where
represents the number of picking areas and
represents the picking sub-regions,
. (3) The task volume in each sub-regions is represented by
, where
represents the picking task volume in a sub-picking area
,
. (4) Each robot arm is set in different positions, and the picking sub-regions are also different. The set of tasks that the robot arm can pick is
, where
represents the
-th robot arm,
. The task process is shown in
Figure 14.
Firstly, the number of robot arms, the spacing between the robot arms, and the height of the picking plane are determined. Then, the Monte Carlo method is utilized to analyze the workspace of multiple robot arms and divide the picking area.
After the picking area is divided, the picking area that can only be picked by the only robot arm is first matched with its corresponding one. Then, for other areas that can be picked by two or more robot arms, first, we arrange them from small to large according to the number of robot arms that can pick in this area. Then, we take them out in the order from small to large and select the robot arm with the least task volume until all the areas are allocated. This allocation strategy is mainly to distribute tasks evenly while avoiding collision interference between multiple robotic arms. The purpose of the picking robot arms in this area being taken out in order from small to large is to better balance the task volume of robot arms. This is because as the allocation process gradually proceeds, the number of robot arms corresponding to the picking area increases, and the algorithm can further balance the robot arms with a large difference of task volume assigned at the last time. At the same time, the picking area becomes smaller, and the probability of few fruits in the area becomes greater. So, it will not cause the task volume of robot arm with the fewest tasks to become much higher than that of other robot arms after the allocation. Taking two robot arms as an example, due to uneven fruit distribution in most cases, when the difference of the fruit number between and is large, according to the task allocation strategy, the public picking area will be assigned to the robot arm with a smaller task volume, so that task volume of the two robot arms tends to be evenly allocated, with little difference. The same method will be utilized in the common picking area of three, four, and six robot arms.
4.2. Picking Sequence Optimization
In this paper, in a trellised pear orchard environment, the heights of pears were basically the same. The Z-axis coordinate was ignored, and the multi-fruit picking path optimization problem was converted into a two-dimensional traveling salesman problem. The coordinates of each pear can be given by the depth camera, and then the distance between each two pears can be obtained. The picking path optimization problem is to find the shortest path that can traverse all the fruits and does not repeat [
32]. The TSP model of picking path optimization can be expressed by a mathematical model.
The requirement of the picker design is to complete the most picking in the shortest path. If the simple algorithm is used to pick across the region, the picking path will have great redundancy, and it is more time-consuming to schedule the manipulator back and forth. Therefore, we used the simulated annealing algorithm for optimization, to solve the optimal picking sequence, to reduce the scheduling time of the robot arm, and to reduce energy consumption at the same time.
We set the weighted graph as
, and all pear coordinate-sets as
. E is a set of path weights or lengths, and
represents the distance between each pear, where
.
L is the solution sequence. The TSP mathematical model can be expressed in the following form:
The distance between adjacent fruits is set as . S is a non-empty subset of the vertex set V, and |S| is the number of vertices of the set S in the weighted graph G.
This project utilized a simulated annealing algorithm that can avoid falling into local optimality to a certain extent, in order to optimize the picking sequence. The algorithm mainly consists of two parts: one is the Metropolis algorithm, and the other is the annealing cooling process, which corresponds to the internal cycle and the external cycle, respectively.
The algorithm steps are as follows (
Figure 15):
(1) Initialize the temperature, and set the current temperature , the termination temperature , and the maximum number of iterations . Randomly generate an initial solution and then calculate the objective function value . (2) At a certain temperature, the current solution is perturbed by insertion, exchange, reversal, and other ways to generate a new solution. (3) Solve the objective function value , and calculate ; if , then the new solution is accepted. If not, the new solution is accepted according to the probability. (4) At a certain temperature T, the perturbation and acceptance process is repeated for a certain number of times, that is, steps 2 and 3 are repeated. (5) Lower the temperature T. (6) Repeat steps 2–5 until convergence conditions are met.
The simulated annealing algorithm has three important parameters: initial temperature , internal loop iteration number M, and cooling coefficient α, which determine the optimization capacity and comprehensive performance of the simulated annealing algorithm, that is, finding a better solution quickly and accurately with less time cost. (The above initial temperature does not represent the physical temperature in the real environment, but instead a parameter that needs to be optimized in the simulated annealing algorithm, which represents the base temperature in the optimization algorithm.)
In theory, the larger the initial temperature, the better. A low temperature causes the problem of the algorithm not searching enough in the solution space, resulting in missing the optimal solution in the optimizing process. But if the temperature is too high, it will take a lot of time. The number of inner loop iterations also affects the search ability of the algorithm in the solution space. The greater the number of iterations at the same temperature, the greater the chance of finding the optimal solution, but the time cost is often greatly increased. Then, a too large cooling coefficient easily leads to the loss of the optimal solution, while a too small cooling coefficient greatly increases the algorithm’s time cost. The termination temperature determines when the algorithm ends. Setting the termination temperature too high will result in an insufficient search, so the termination temperature is generally set to a smaller value.
- (1)
The adjustment of initial temperature
Only the initial temperature was changed, and other parameters were kept constant and assigned values. The number of iterations was set to 100, the cooling coefficient was 0.9, and the end temperature was 0.02. Twelve groups of temperatures were selected, and the simulated annealing program was run 10 times at each temperature to reduce the accidental error.
Table 2 shows the data of the optimization process.
The average traversal distance and the minimum value at each temperature, as well as the standard deviation, were counted to generate the line chart (
Figure 16). The blue line is the average traversal distance at each temperature, which was utilized to evaluate the overall optimization performance of the algorithm. The smaller the average traversal distance, the better the performance of the algorithm at that temperature. The yellow line represents the optimized minimum value at each temperature, which represents the ability to find the optimal solution at each set of temperatures. The smaller the minimum value, the stronger mining ability of the algorithm at that temperature. The green line represents the standard deviation of each set of data, which was utilized to judge the degree of discreteness of a set of data. If the standard deviation was larger, it means that the set of data fluctuated greatly, and the performance of the algorithm was unstable. The abscissa represents the temperature of each group, and the ordinate represents the corresponding distance at a certain temperature. According to
Figure 16, when the initial temperature was 100 °C, the average traversal distance and the minimum distance were the largest, indicating that the performance of the algorithm was poor. As the temperature increased, the average traversal distance and the minimum distance decreased. After the initial temperature reached 1500 °C, the decrease in amplitude of both slowed down as the initial temperature increased. After the initial temperature reached 3000 °C, the average traversal distance and minimum distance remained basically unchanged, and the algorithm performance tended to be stable. At the same time, it can be seen that the standard deviation fluctuated up and down at the beginning and then decreased to zero at the end, indicating that the algorithm optimization performance became more stable. In summary, 3000 °C was selected as the initial temperature of the algorithm to ensure the performance and reduce the waste of time.
- (2)
The adjustment of the number of inner loop iteration M
Only the iteration number of inner loop was changed, and other parameters were kept constant and assigned. The initial temperature was set to 3000, the cooling coefficient was 0.9, and the end temperature was 0.02. Twelve groups of iteration numbers were selected, and the simulated annealing program was run 10 times at each iteration number to reduce the accidental error (
Table 3).
The average traversal distance, minimum value, and standard deviation under each internal iteration number were counted, and the trend line chart was drawn. When the number of internal iterations was too small, the optimization ability of the algorithm was limited, and the optimization effect of the average traversal distance was not obvious (
Figure 17). With the increase in the number of internal iterations, the average traversal distance and the optimized minimum distance both decreased, indicating that the optimization ability of the algorithm was enhanced with the increase in the number of internal iterations. As the number of internal iterations increased, both the average traversal distance and the optimal minimum distance decreased, indicating that the optimization ability of the algorithm increased as the number of internal iterations increased. When the number of iterations reached 150, the performance of the algorithm almost did not improve with the increase in the iteration numbers. Therefore, the algorithm was already at a relatively optimal level at this time, and further increasing the number of internal iterations would only increase the time cost. In summary, the number of inner iterations was chosen to be 150.
- (3)
The adjustment of cooling coefficient α
Only the cooling coefficient was changed, and other parameters were kept constant and assigned. The initial temperature was set to 3000, the iteration number of each temperature was 150, and the end temperature was 0.02. Twelve groups of cooling coefficient were selected, and the simulated annealing program was run 10 times at each cooling coefficient to reduce the accidental error (
Table 4).
The average traversal distance and the minimum value, as well as the standard deviation, at each iteration number were counted to generate the trend line chart (
Figure 18). The blue line is the average traversal distance at each temperature. The yellow line represents the optimized minimum value at each temperature. The green line represents the standard deviation of each set of data. The abscissa represents the cooling coefficient of each group, and the ordinate represents the corresponding distance at a certain cooling coefficient. According to
Figure 18, with the increase in the cooling coefficient, the optimization ability of the algorithm became better. When the cooling coefficient reached 0.99, with the increase in the cooling coefficient, the optimized effect of the simulated annealing algorithm was not obvious, and the optimized average traversal distance and the optimized minimum value of each group tended to be consistent. Therefore, 0.99 was an appropriate parameter value for this algorithm. In summary, the cooling coefficient of the algorithm was 0.99.
Taking an area as an example, 20 points were randomly generated within the picking range of a robot arm to simulate the distribution of pears on a trellis. Since the impact in the vertical direction is small, only the coordinate information in X and Y directions was considered.
Figure 19 separately shows that the randomly traversed path before optimization was disorderly and the picking path after optimization formed a neat loop, for which the optimization effect was obvious (
Figure 19).
The total number of iterations was 300. As the number of iterations increased, the total path length gradually decreased. In the range of 0–50 times, the curve was steeper, and the convergence speed was faster. At this time, the optimization effect was better. In the range of 50–120 times, the curve was a straight line, and the algorithm fell into a local optimum. As the number of iterations increased, the perturbation caused the solution to jump out of the current local optimum. After the number of iterations reached 240, a better result was achieved (
Figure 20).
6. Conclusions
In view of the current inefficient work of picking robots, this paper studied the collaborative picking of multiple robotic arms in a trellised pear orchard environment to improve the picking efficiency of the system. The physical characteristics of pears were studied through experiments, and the structural design of the end-picker was carried out based on this. We constructed the private dataset of pears, and finally, we output the three-dimensional coordinates of the target fruit through the Yolo-v5s detection model combined with the depth camera and carried out the object detection through the trained weight, and following this, we completed the object detection task accurately. The camera calibration and hand–eye calibration were completed, and the images of the calibration plate at different angles and distances were collected with the camera. After inputting into the Matlab calibration toolbox, the camera’s distortion coefficient and internal parameter matrix were obtained, for which the camera calibration was completed. Through the relationship between two fixed coordinate systems, twenty points were selected to form a hyperparameter equation, and finally, the hand–eye calibration matrix was obtained by fitting the results using the least squares method. The conversion from the pixel coordinate system to the robot arm base coordinate system was completed with good accuracy.
A task allocation method for a multiple robotic arm system was proposed, and the picking sequence was optimized through the simulated annealing algorithm. The several key parameters of the simulated annealing algorithm on the algorithm performance were studied, and the optimal parameter values were selected. After optimization, the picking efficiency was clearly improved. The final result was as follows: initial temperature = 3000 °C, internal loop iteration number M = 150, and cooling coefficient α = 0.99.
The experimental results showed that the picking efficiency of the designed pick-place integrated end-picker is higher than that of the traditional gripper. The success rate of the picking mechanism designed in this paper was 86.67%, which is about 30% higher than that of the claw-gripper. The task allocation method proposed in this paper can make the task volume of a multiple-robotic-arm system tend to be evenly divided, and it obviously improved the utilization rate of each robot arm. Through the simulated annealing algorithm, compared with random traversal, the efficiency of the optimized picking path was increased by about 20%. Moreover, with the increase in fruit number, the efficiency showed an increasing trend.
However, this paper only focused on the structural design of the end-picker, and it did not conduct real experiments under different lighting conditions. In the next step, we will further develop the vision system suitable for a wider range of application scenarios and develop supporting devices that can reduce recognition interference such as light source occlusion, so as to further improve the accuracy rate of the target detection system and the success rate of the picking system. In addition, on the basis of studying the agronomic characteristics and the damage mechanism of fruits, we will further improve the mechanical structure and matching algorithm of the picker to achieve a better picking effect, which is also the next goal of our research.