Next Article in Journal / Special Issue
Two-Dimensional Path Planning Platform for Autonomous Walk behind Hand Tractor
Previous Article in Journal
Aqueous Seaweed Extract Alleviates Salinity-Induced Toxicities in Rice Plants (Oryza sativa L.) by Modulating Their Physiology and Biochemistry
Previous Article in Special Issue
Research on the End Effector and Optimal Motion Control Strategy for a Plug Seedling Transplanting Parallel Robot
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Automatic Fruit Harvesting Device Based on Visual Feedback Control

Department of Mechanical and Mechatronic Engineering, National Taiwan Ocean University, Keelung City 202301, Taiwan
*
Author to whom correspondence should be addressed.
Agriculture 2022, 12(12), 2050; https://doi.org/10.3390/agriculture12122050
Submission received: 5 November 2022 / Revised: 22 November 2022 / Accepted: 27 November 2022 / Published: 29 November 2022
(This article belongs to the Special Issue Application of Robots and Automation Technology in Agriculture)

Abstract

:
With aging populations, and people′s demand for high-quality or high-unit-price fruits and vegetables, the corresponding development of automatic fruit harvesting has attracted significant attention. According to the required operating functions, based on the fruit planting environment and harvesting requirements, this study designed a harvesting mechanism to independently drive a gripper and scissor for individual tasks, which corresponded to forward or reverse rotation using a single motor. The study utilized a robotic arm in combination with the harvesting mechanism, supported by a single machine vision component, to recognize fruits by deep-learning neural networks based on a YOLOv3-tiny algorithm. The study completed the coordinate positioning of the fruit, using a two-dimensional visual sensing method (TVSM), which was used to achieve image depth measurement. Finally, impedance control, based on visual feedback from YOLOv3-tiny and the TVSM, was used to grip the fruits according to their size and rigidity, so as to avoid the fruits being gripped by excessive force; therefore, the apple harvesting task was completed with a 3.6 N contact force for an apple with a weight of 235 g and a diameter of 80 mm. During the cutting process, the contact point of the metal scissors of the motor-driven mechanism provided a shear force of 9.9 N, which was significantly smaller than the simulation result of 94 N using ADAMS and MATLAB software, even though the scissors were slightly blunt after many cuts. This study established an automatic fruit harvesting device based on visual feedback control, which can provide an automatic and convenient fruit harvest by reducing harvesting manpower.

1. Introduction

Current agricultural harvesting processes have been significantly aided by the development of industrial automation for specific planted crops. The development of automated mechanical harvesting in the United States is particularly advanced: it is common for crops such as rice, potatoes, carrots, and lettuce to be harvested in batches, using large mechanical vehicles; however, fruit harvesting cannot be performed in the same manner. The harvesting of most fruit trees is still manpower-dependent or indirectly assisted by stairs, transport trolleys, and picking machines. The aforementioned crops, that can be harvested in large quantities, are mostly in structured environments, and the planting positions between a single crop and other crops can be controlled at equal intervals, which is done so that mechanical harvesting can create a simple and excellent design for this structure; by contrast, the harvesting of fruit species is limited by the vertical distribution of fruit tree growth and the random uncertainty of the horizontal growth position at the same vertical height, which makes the planting method dense and dependent on the high flexibility of manpower to complete the harvesting work. Owing to the increasingly obvious problems of lack of labor and an aging population in the agriculture industry [1], many researchers are engaged in R&D and improvement in related fields, to try to automate harvesting, by the full use of robots. Abundant Robotics [2] uses a human-driven traction machine to drag an automated harvesting robot. The robot uses a parallel robot as an extension of its mechanical arm, and a vacuum-absorbing harvesting mechanism, to harvest in a structured picking environment. Although the vacuum suction method is feasible, it requires extremely good design arrangements—such as vibration reduction measures—for material collection, and it must be equipped with compressors, transfer pipelines, and control equipment. FFRobotics [3] is designed using a telescopic mechanical rod, which is matched with a three-claw gripper to grip apples. Baeten et al. [4] have developed fruit gripping machines—mainly for gripping apples—which combine industrial robotic arms, personal computers, photographic lenses, and vacuum suction to pick up a single apple, recover it, and move the carrier. Zhao et al. [5] have also harvested apples, have moved a car body with crawler tracks, and have used visual algorithms, grippers, electric scissors, and a design composed of collision, position, and pressure sensors. Given that consumers expect higher-quality fruit and vegetable products, mechanical damage during mechanical gripping is a key factor in reducing their value. The mechanical damage mentioned by Knee et al. [6] shows that from the commencement of apple harvesting, the manual handling process still relies on human hands in most cases, and that apples are easily damaged by uneven manual forces when gripping is not easy: this is especially serious when only two or three fingers are used to pull the fruit, so the grower often asks the harvester to grip the fruit with the whole hand, and to use the twisting method, so as to concentrate on the fruit stem, to pull it off. In addition, Li et al. [7] used a glove that could sense the contact force of human fingers, to compare four fruit-gripping modes: their experimental results showed that manual gripping, with one finger pushing the stem and two fingers holding the apple and applying a pendulum motion, can cause minimal stress and bruising of the apple. However, it is difficult to implement a low-cost and low-degree-of-freedom robotic arm, because the gripping mechanism imitates the gripping action of the human hand; moreover, this approach would force the entire automated harvesting system to be implemented with a high-order multi-degree-of-freedom industrial robotic arm, thereby increasing its speed costs, and reducing its commercial viability. In addition, Liu et al. [8] proposed a compliant gripper for gripping fruit: this gripper can be driven by a linear actuator, and adheres to an object by changing the shape and size of the gripping object. The compliant gripper is a good solution for fragile objects: however, its disadvantage is that the shape and structure design requirements are relatively high, and there are specific deformable material requirements. In recent years, there have been several studies on the use of visual recognition for positioning control [9,10,11,12,13], in addition to several research studies proposing the use of visual recognition for fruits [14,15,16,17]. Reference [17] recognizes the ripeness and stem position of strawberries, so as to provide image-positioning control information for robotic automated strawberry harvesting. Based on the above literature, to avoid fruit damage, the design of the gripping force control of the harvesting mechanism must be considered. To increase the automatic visual identification of fruit species for the positioning control of the gripping mechanism, the harvesting mechanism must be integrated with a multi-dimensional actuator, a gripping mechanism, and a visual lens: the overall production complexity, weight, and cost are high, which makes practical application challenging.
This study utilized a single motor to drive and grip the fruit species and cut the fruit stem, and a charge-coupled device (CCD), based on the image recognition of the You Only Look Once (YOLO) algorithm [18,19,20,21,22] in automatic fruit harvesting devices. At the beginning of the harvesting process, the two-dimensional visual sensing method (TVSM) [11], combined with the YOLO algorithm, could be used to measure fruit position coordinates, to achieve visual feedback. Because only one motor was used to complete the gripping and cutting of the fruit stem, and only one CCD was used to achieve fruit recognition and distance measurement, this mechanism was very light, which was advantageous for the stable gripping of apples in an automated manner with minimal force requirements. In addition, when the size of the fruit was different from its rigidity, the gripper required different forces to grip the fruit, to avoid the fruit being pinched by excessive force; therefore, this study utilized impedance control [23,24,25], which could adjust the dynamic relationship between the displacement and contact force of the system. The device was divided into four parts: control and image recognition computing elements, machine vision elements, the main body of the developed robotic arm, and the harvesting mechanism. In the mechanism design method, the computer-aided design software SolidWorks, and the computer-aided engineering software ADAMS, were used to design, analyze, and simulate the mechanical arm and harvesting mechanism. Based on the image information provided by the machine vision components, the coordinates were measured by the algorithm, so that the robotic arm could complete the fruit harvesting automatically, based on visual feedback control, so as to replace manual harvesting behavior and improve harvesting efficiency.

2. Design of the Harvesting Device

This study used a single motor to drive the gripping of fruit species and subsequently cut the fruit stem. A pair of ratchets were driven by the clockwise and counterclockwise rotation of the motor, to drive components A and J, respectively. The gripper and scissors were driven as shown in Figure 1. In this study, the motor rotated clockwise to drive the ratchet, slider crank mechanism, and gears, so as to sequentially drive components A to I, and thus control the gripper, as shown in Figure 2. Component C drove the slider crank mechanism (component D), so that components F and I could be controlled to rotate the back-and-forth θ angles, so as to complete the grip and release control of the θ angle. The motor rotated clockwise from 0° to 180° to grip the fruit, and from 180° to 360° to loosen the fruit.
Figure 3 shows the gripping forces of the gripper. The fruit is assumed to be a sphere with a radius r ; L is the distance between the contact point of the fruit and the rotation axis of component F; F is the force of the contact point of the fruit; φ is the angle between the contact point of the fruit and the vertical line; θ is the angle of rotation of the gripper; d x is half the distance between the rotation axes of components F and I; d y is the vertical distance between the fruit and rotation axis of components F or I. The relationship equations are represented as:
L = ( r d x ) 2 + ( r + d y ) 2 ,
φ = sin 1 ( r d x L ) ,
F = K φ L ,
F n = F × cos ( φ ) ,
F t = F × sin ( φ ) ,
where K is the torsion spring constant, F n is the normal force when the apple produces friction, and F t is the thrust perpendicular to the direction of the normal force.
The load of the gripper is the composite result of the thrust F t and the weight of the apple W . Considering that the maximum load of the gripper in any attitude is when the thrust and weight directions coincide, the balance relation equation of one gripper is
F n × μ     F t + W g 2 ,
where μ is the friction coefficient of rubber, and g is the gravitational acceleration. According to the literature [26], substituting Equations (3)–(5) into Equation (6) obtains
K = E d 4 10.19 D N a     LWg 2 φ ( cos ( φ ) × μ sin ( φ ) ) .
where E is Young′s coefficient of the material, d is the metal wire diameter, D is the average diameter of the torsion spring, and N a is the effective number of turns. This study completed the design of the torsion spring using Equation (7).
According to the literature [27], Washington apples have the largest share of the market in the United States (64%); in addition, they constitute nearly 30% of the apple export volume every year. In consideration of apple packing, Washington apples grade their products into apples with diameters ranging from 58.7 mm to 92.5 mm [28]; therefore, this study designed the dimensions of the harvesting device to have harvested fruit diameters ranging from 55 mm to 110 mm, as shown in Figure 4. Figure 4 shows the cut control in the upper left, top, and upper right views, using a pair of scissors. Figure 1 shows that the ratchet (component J) was driven counterclockwise by a motor, which, in turn, drove component N. Subsequently, a pair of four-bar linkages, with components L and M as fixed fulcrums, were used to complete the cutting of the fruit stem. The motor’s rotation counterclockwise from 0° to 180° was the process of cutting the fruit stem, and its rotation from 180° to 360° was the process of releasing the scissors. To ensure that the harvesting mechanism had more degrees of freedom, this study integrated a robotic arm with X-and Z-axis motions, and a 0–180° rotation around the Z-axis, as shown in Figure 5. A CCD was installed in the middle of the gripper, to complete fruit recognition, and thus to complete the track approach and the fruit harvesting.

3. Visual Feedback Control

3.1. Visual Position

To harvest fruits automatically, this study used the YOLO algorithm for fruit recognition, which facilitated the automatic positioning and tracking of the harvesting device. YOLOv2 [18] refers to the design of an anchor to improve performance, and YOLOv3 [19] uses multi-size anchor points and a residual network to further improve performance. The anchor points calculated by YOLOv3 additionally scale the input image 1/16 and 1/32 times, before calculating the anchor point size. This method effectively increases recognition performance, and the anchor point is calculated using the k-means clustering algorithm [29]. After confirming the number of clusters to be classified in advance, the following equation is satisfied:
arg min s o i = 1 k x s o i | | x μ i | | 2 ,
where x is the vector of a point in space, μ i is the vector average of all points in space, k is the number of classifications, and so is the cluster. During the training process, the defined loss function was gradually optimized in the process of training the neural network model using a backpropagation algorithm. The loss function L predicted the location, range, and category of the fruits; therefore, the loss function was represented as:
L ( x ,   y ,   w ,   h ,   c ) = λ c + l w + l C + λ n + l p ,
where λ c = λ c o o r d i = 0 S 2 j = 0 B l i j o b j [ ( x i x ^ i ) 2 + ( y i y ^ i ) 2 ] , l w = i = 0 S 2 j = 0 B l i j o b j [ ( w i w ^ i ) 2 + ( h i h ^ i ) 2 ] , l C = i = 0 S 2 j = 0 B l i j o b j ( C i C ^ i ) 2 , λ n = λ n o o b j i = 0 S 2 j = 0 B l i j n o o b j ( C i C ^ i ) 2 , and l p = i = 0 S 2 l i o b j ( C c l a s s e s ) ( p i ( C ) p ^ i ( C ) ) 2 .   x i and y i were the predicted coordinates, x ^ i and y ^ i were the actual coordinates, w i and h i were the predicted width and height, w ^ i and h ^ i were the actual width and height, C i was the predicted target type, and C ^ i was the actual target type, p i ( C ) was the confidence level of the predicted target, p ^ i ( C ) was the confidence level of the actual target, λ c o o r d and λ n o o b j were the loss weights, S was the grid, B was the bounding box, o b j was the cluster with the target, and n o o b j was the cluster without the target. According to the literature [18,19,20,21,22], YOLOv3-tiny is a model based on a simplified version of YOLOv3, and has good execution speed and recognition efficiency; therefore, this study used YOLOv3-tiny to recognize the fruits.
As the harvesting device was harvesting fruit, the weight of the harvesting device itself could not be too heavy; therefore, this study utilized a single motor to perform gripping and cutting actions, so as to reduce the weight of the harvesting device using a CCD. TVSM [11] was combined with the YOLOv3-tiny algorithm to visually position the fruit coordinates. In Figure 6, assuming that the width of the target object remains unchanged after the CCD moves α toward the target fruit, the distance x relationship between the CCD and the target fruit is
( x + α ) n tan ψ = x m tan ψ ,
where n and m represent the width pixels of the field of view (FOV) divided by the width pixels of the target before and after, respectively, the CCD moves α . ψ is the angle of the FOV. After arranging Equation (10), the distance between the CCD and the target can be obtained as
x = m α ( n m ) .

3.2. Cut and Grip control of Harvesting Device

After YOLOv3-tiny recognized the fruit, this study used the robotic arm, with the X-, Z-, and Z-axis rotation motors and TVSM, to continuously track and approach the fruit, and to measure the diameter of the fruit, so as to calculate φ , thus achieving a contact position between the fruit and the harvesting device, where the fruit was gripped and its stem was cut. In this study, a single motor was used to drive the gripper clockwise, so as to rotate the angle of θ to grip the fruit, and counterclockwise, so as to rotate the angle of θ to drive the scissors to cut the fruit stem; therefore, gripping and cutting involved the same mechanism, and the two control actions were completed independently. For cutting control of the harvesting device, this study’s controls scissors were used to cut fruit stems by counterclockwise rotation of the motor. The speed of the motor was inversely proportional to the torque, according to the fixed power of the motor; therefore, in this study, the cutting force control of the cutting fruit stem was achieved by controlling the motor speed. In this study, the input signal to the motor (motor angle from 0° to 180°), ranged from slow cutting frequency (0.25 Hz) to fast frequency (1 Hz); through the output motor speed measurement and instrumental variable method [30], the parameters of the system were identified, to obtain the transfer function of the motor speed to the angle error, as follows:
G ( s ) = s Y ( s ) E ( s ) = 417.4 s + 25.11 .
E ( s ) is the angle error and Y ( s ) is the output angle obtained by the angle sensor. Figure 7a shows a block diagram of the cut control of the harvesting device, where P is the power of the driving motor. This study used ADAMS and MATLAB software to simulate the cutting force analysis of the fruit stems. According to the motor (Dynamixel/MX-106) used in this study, a maximum torque of 5.7 Nm was provided at 180 deg/s, as the driving condition to cut an apple with a stem thickness of 2 mm and a diameter of 80 mm. Based on the final simulation results, the cutting force was approximately 94 N. The literature [31] discusses the cutting force requirement for cutting off mango fruit stems. The highest cutting force requirement of the fruit stem was 8.64 N, which shows that this design is sufficient to provide a cutting force.
This study used the clockwise rotational force of the motor to control the stable grip of the harvesting device. Because a gripper with torsion spring was used in this study, when the size of the fruit was different from its rigidity, the gripper used different forces to grip the fruit, so as to avoid the fruit being gripped by an excessive force; therefore, this study utilized impedance control [23,24,25], which can adjust the dynamic relationship between the displacement and contact force of the system. This study assumed that the gripping dynamics of the harvesting device were a linear second-order system, to control the displacement and contact force of the system by the behavior of the mass-spring-damping system; the target impedance relationship was obtained as follows:
M d ( θ ¨ d θ ¨ r ) + D d ( θ ˙ d θ ˙ r ) + K d ( θ d θ r ) = ( F r F ) L = e F L ,
where M d , D d , and K d were the expected mass, damping, and stiffness coefficients for the target gripping dynamic impedance, θ r was the reference angle of the rotation of the gripper, F r was the reference force of the gripper, F was the force of the gripper to grip the fruit, e F was the force error, and θ d denoted the expected angle of the gripper, generated by the target impedance. The motor drove the gripper to follow the expected position through the mechanism, and when the gripping angle θ of the gripper was greater than the contact angle θ c ( θ c = θ m a x φ ), the gripper began to contact the fruit, to compress the torsion spring, so as to generate force. The target impedance relationship between force and angle was:
θ d θ r ( F r F ) L = 1 M d s 2 + D d s + K d .
The force of the gripper to grip the fruit was the torsional force generated by the compression of the gripper spring under moment arm L (Figure 3) at the contact point of the fruit; therefore, according to Equation (3), the force of the gripper for gripping the fruit was:
F ( θ ) = { 0 , ( θ θ c ) < 0 K ( θ θ c ) L , ( θ θ c ) 0 .
Assuming e θ = θ d θ , then:
e F = F r F = F r K ( θ θ c ) L = F r + K θ c L K L ( θ d e θ ) = F r + K θ c L + K e θ L K L ( θ r + e F L M d s 2 + D d s + K d ) .
Rearranging Equation (16), we get:
[ M d s 2 + D d s + ( K d + K ) ] e F = [ M d s 2 + D d s + K d ] ( F r + K θ c L + K e θ L K θ r L ) .
From Equation (17), the steady-state error e F s s of the gripping force was obtained as follows:
e F s s = K s ( F r K + θ c L + e θ L θ r L ) ,
where K s = K d K ( K d + K ) was the coefficient of the equivalent stiffness of the system, and K d was the stiffness of the fruit. In the design of this study, K d K , so the equivalent stiffness coefficient is rewritten as:
K s = K d K ( K d + K ) K .
Because the contact angle θ c ^ , the diameter 2 r of the fruit, and φ ^ were calculated by the recognition of fruit based on YOLOv3-tiny and image processing, to obtain θ c ^ = θ m a x φ ^ , the contact angle θ c contained the error θ c and was expressed as
θ c = θ c ^ + θ c .
According to Equation (15), θ r was the reference angle of the gripper rotation, and was expressed as
θ r = θ c + F r L K .
Because e θ 0 , Equation (18) was rewritten as
e F s s = K d K θ c ( K d + K ) L .
The results indicated that θ c changed the steady-state error of the gripping force. Figure 7b shows a block diagram of the harvesting device grip control.
To simulate the clamping analysis of the impedance control of fruits (apples with a diameter of 80 mm and a weight of 235 g), ADAMS and MATLAB software were used in this study. According to Equations (2), (3), and (7), the torsion spring provided a force F of 5.5 N for this apple ( r = 40 mm, d x = 28   mm , L = 70 mm, φ =   10 ° , K = 38.75   mNm / deg based on E = 195   GPa , d =   3.2   mm , D =   21.8   mm , and N a = 6.6   r e v ). According to Equations (3) and (7), and its actual required minimum force, F r is 3.6 N ( W = 235   g , g = 9.8   m / s 2 , φ =   10 ° , μ = 0.5 (according to [32], the friction coefficient between apple and rubber ranges from 0.462 to 0.941)); therefore, the compliant gripping mechanism alone ensured that the apple had enough force to be gripped, but it was not the optimal amount of force, and could cause grip damage. Consequently, impedance control was utilized, such that the gripper did not have to be completely closed when gripping, but was adjusted to the optimal angle of rotation of the gripper under a state of force control. According to the mechanism design of this study, if θ m a x was 60 ° , then θ c was 50 ° (apples with a diameter of 80 mm and a weight of 235 g). According to Equation (19), this study adopted K = 38.75 mNm/deg, assuming that K d varied from 0 to 500 mNm/deg, to calculate K s as shown in Figure 8.
In Figure 8, K s begins to converge when K s is greater than 250 mNm/deg; therefore, this study assumed M d = 1   kgm 2 / deg and D d = 0   kgm 2 / sdeg ; then, using impedance control with K d = 200, 250, 300, and 350 mNm/deg, the grip force F was obtained, as shown in Figure 9. The convergent and stable performances of the grip force with K d = 300 and 350 mNm/deg, are shown in Figure 9. In addition, as this study assumed D d = 0   kgm 2 / sdeg and K d = 300   mNm / deg , with M d = 1 ,     0.5 ,     0.05 ,   and   0.01   kgm 2 / deg , the force F of the gripper to hold the fruit was obtained, as shown in Figure 10. The convergent and stable performances of grip force with M d = 0.05   and   0.01   kgm 2 / deg are represented in Figure 10.
As this study assumed M d = 0.05   kgm 2 / deg and K d = 300   mNm / deg , with D d = 0 ,     0.1 ,     and   1   kgm 2 / sdeg , the force F of the gripper, to hold the fruit, was obtained, as shown in Figure 11. According to Figure 11, the performance of the grip force with a D d of 1 was the best among the three simulation results. Finally, the simulation results of the grip control of the harvesting device, with and without impedance control, based on M d = 0.05   kgm 2 / deg , D d = 1   kgm 2 / sdeg , and K d = 300   mNm / deg , are shown in Figure 12. As shown in Figure 12, the gripper contacted the apple at 0.8 s. The gripping forces and angles were 36 N and 56.5°, respectively, with impedance control, and 55 N and 60°, respectively, without impedance control. Accordingly, a gripping force of 9 N more than that of impedance control can easily pinch apples.

4. Experiment and Discussion

The first step in automatic fruit harvesting is to recognize the fruit in the image space, and to follow up with the fruit closest to the harvesting device, for subsequent tracking and harvesting. After completing the harvesting of the first fruit, the above-mentioned steps are repeated, to search for the nearest fruit, and to finish harvesting. When all the fruits on the tree have been harvested, the harvesting operation is complete. This study used the YOLOv3-tiny algorithm to recognize fruits. For convenience of verification, we used apple harvesting as the object. In this study, a motor-rotating platform was used: an apple was placed on it, and pictures of the apple were continuously taken under various angles of rotation, to establish the model for the YOLOv3-tiny algorithm. This study used four kinds of apples: Braeburn, Crimson Snow, Pink Lady, and Red. A total of 2512 apple images from various angles and 2512 blank images were obtained in this study, totaling 5024 images. Among them, 3768 images were used for modeling, and 1256 images were used to test the accuracy of the YOLOv3-tiny algorithm. Finally, after 1500 training iterations, the mean average precision (mAP) reached 100%, to complete the accurate YOLOv3-tiny algorithm modeling.
To verify the apple harvesting experiment, a field was constructed, as shown in Figure 13. This study used a lithium battery of 3300 mAh to drive four motors (MX-106), a motor controller (OpenCM9.04-C), a V2 CCD (Camera Module V2), and a Raspberry Pi 4 Model B. The Raspberry Pi 4 Model B controlled the motor clockwise, to rotate the angle of θ to drive the gripper to grip the fruit, and counterclockwise to rotate the angle of θ to drive the scissors to cut the fruit stem by OpenCM9.04-C, and measured the images of the fruits by Camera Module V2. As shown in Figure 13, a bracket hung an apple (80 mm in diameter, 235 g in weight) at a distance of 200 mm from the automatic fruit harvesting device. First, V2 CCD used the YOLOv3-tiny algorithm to move the harvesting device through the X-axis, Z-axis, and Z-axis rotation motors, to search for and recognize the apple, as shown in Figure 13b,c. To measure the diameter of the apple, this study utilized the image process of a hue saturation value (HSV)-mask filter, to obtain the profile of the apple. Accordingly, the diameter of the apple was calculated for the profile of the apple, by curve-fitting of the circular curve equation, as shown in Figure 13d. Finally, φ was calculated from the diameter of the apple and the geometric dimensions of Figure 3, and θ C was obtained by subtracting φ from θ m a x . After searching for the apple and correcting the alignment of the apple in the direction of the X-axis, by driving the X-axis, Z-axis, and Z-axis rotation motors, the height of the apple was also aligned with the height of the gripper. The X-axis was forward, and the distance between the apple and gripper was sensed by the TVSM. The X-axis motor was then driven along the X-axis direction, to approach the apple and sensing distance. When the gripper touched the apple, it began to drive the motor, to rotate the angle of θ, so as to grip the apple. When θ was greater than θ c , the Raspberry Pi 4 Model B began to use impedance control to control the gripping force F, for gripping the apple according to its size and rigidity, so as to avoid excessive force during the gripping process. Finally, after a firm grip was achieved, the motor was triggered, to rotate the angle of -θ, so as to cut off the stems and complete the apple harvesting action. A flowchart of the apple harvest process is shown in Figure 14. To record the harvesting process in detail, this study took an image of the harvesting process, with the top-view CCD and V2 CCD, during the harvesting process, as shown in Figure 15.
The time results of the gripping force, and the angle in the process of gripping the apple, are shown in Figure 16. In the figure, when the gripper did not touch the apple, the gripping force was 0. Until 0.58 s, the gripping angle was 48.7°, then the apple began to be stressed. At 0.72 s, the gripping force was at a maximum of 3.55 N, and the gripping angle was 57.4°. At 0.9 s, the gripping force and the angle began to converge to 3.54 N and 55.5°, respectively. It can be seen from the experimental results that the difference between the maximum gripping force and final gripping force was 0.01 N. Compared with the simulation results of the gripping force, the experimental results based on impedance control had a smaller overshot. In addition, the difference in the final gripping angle between the simulation and the experiment was 1°. This result indicates that the impedance control algorithm used in this study was successfully applied to an actual fruit gripping application.
The time-resulting graph of the torque, and the angle of the motor in the process of shearing the stem, is shown in Figure 17. When the motor was switched on, there was a starting torque. The scissors were then driven at a constant speed, started touching the fruit stem at 0.6 s, and reached the maximum torque at 0.9 s, to cut the fruit stem. Subsequently, the motor ran at the same speed, and stopped operation when the angle reached 180°. The maximum motor torque when cutting the fruit stem was 0.6 Nm, and the cutting force of the fruit stem—calculated from the geometric dimensions of Figure 4 to the contact point of the fruit stem—was 9.9 N. This result was significantly lower than the theoretical upper limit of the shear force of 94 N, which was simulated by ADAMS, and provided a maximum torque of 5.7 Nm to drive the motor at a speed of 180 deg/s. Accordingly, the harvesting device used in this study was sufficient to complete the pruning of fruit stems in such apples, even though the scissors were slightly blunt after many cuts. Although the verification field of this study was in a laboratory construction field, according to the experimental results, the harvesting device would sufficiently complete fruit harvesting in an orchard, in daytime and in slight wind; moreover, the robotic arm based on the harvesting mechanism was modified into a rainproof wearable device, which could harvest fruits from the high parts of the tree.

5. Conclusions

This study designed a harvesting mechanism to independently drive a gripper and scissor for their individual tasks, which corresponded to forward or reverse rotation by a single motor. Consequently, this study utilized a robotic arm, combined with the harvesting mechanism, and supported by a single machine vision component, to successfully recognize apples using the YOLOv3-tiny algorithm. Furthermore, this study completed the coordinate positioning of the fruit, using TVSM, which was used to achieve an image depth measurement. Finally, this study used impedance control, based on the visual feedback of the YOLOv3-tiny algorithm and TVSM, to grip the apple according to its size and rigidity, so as to avoid excessive force during the gripping process. The gripping process was experimentally verified by observing the gripping of an apple. The apple harvesting task was completed with a 3.6 N contact force for an apple with a weight of 235 g, based on a diameter of 80 mm. During the cutting process, the contact point of the metal scissors of the motor-driven mechanism provided a shear force of 9.9 N, which was significantly smaller than the simulation result of 94 N obtained using ADAMS and MATLAB software, even though the scissors were slightly blunt after many cuts. Although the verification field of this study was in a laboratory construction field, according to the experimental results, the harvesting device would sufficiently complete fruit harvesting in an orchard in daytime and in a slight wind. The robotic arm, based on the harvesting mechanism, was modified into a rainproof wearable device, which could harvest fruits from high parts of the tree. The automatic harvesting technology established in this study can reduce harvesting manpower, and increase the speed and convenience of harvesting.

Author Contributions

Conceptualization, B.-J.W.; methodology, B.-J.W. and C.-C.Y.; software, B.-J.W. and C.-C.Y.; validation, B.-J.W. and C.-C.Y.; formal analysis, B.-J.W. and C.-C.Y.; investigation, B.-J.W.; resources, B.-J.W.; data curation, B.-J.W. and C.-C.Y.; writing—original draft preparation, B.-J.W.; writing—review and editing, B.-J.W.; visualization, B.-J.W.; supervision, B.-J.W.; project administration, B.-J.W.; funding acquisition, B.-J.W. All authors have read and agreed to the published version of the manuscript.

Funding

The authors wish to thank the National Science and Technology Council of Taiwan for financial support (grant numbers: 110-2221-E-019 -058 -MY2).

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Growers: Far Too Few Workers—Fruit Growers News. Available online: https://fruitgrowersnews.com/article/growers-far-too-few-workers/ (accessed on 1 August 2022).
  2. Zhang, Z.; Igathinathane, C.; Li, J.; Cen, H.; Lu, Y.; Flores, P. Technology progress in mechanical harvest of fresh market apples. Comput. Electron. Agric. 2020, 175, 105606. [Google Scholar] [CrossRef]
  3. Sun, Q.; Chai, X.; Zeng, Z.; Zhou, G.; Sun, T. Multi-level feature fusion for fruit bearing branch keypoint detection. Comput. Electron. Agric. 2021, 191, 106479. [Google Scholar] [CrossRef]
  4. Baeten, J.; Donné, K.; Boedrij, S.; Beckers, W.; Claesen, E. Autonomous Fruit Picking Machine: A Robotic Apple Harvester; Springer: Berlin/Heidelberg, Germany, 2008; pp. 531–539. [Google Scholar]
  5. Zhao, D.A.; Jidong, L.; Wei, J.; Ying, Z.; Yu, C. Design and control of an apple harvesting robot. Biosyst. Eng. 2011, 110, 112–122. [Google Scholar]
  6. Knee, M. (Ed.) Fruit Quality and Its Biological Basis; CRC Press: Boca Raton, FL, USA, 2002. [Google Scholar]
  7. Li, J.; Karkee, M.; Zhang, Q.; Xiao, K.; Feng, T. Characterizing apple picking patterns for robotic harvesting. Comput. Electron. Agric. 2016, 127, 633–640. [Google Scholar] [CrossRef] [Green Version]
  8. Liu, C.H.; Chiu, C.H.; Chen, T.L.; Pai, T.Y.; Chen, Y.; Hsu, M.C. A Soft Robotic Gripper Module with 3D Printed Compliant Fingers for Grasping Fruits. In Proceedings of the 2018 IEEE/ASME International Conference on Advanced Intelligent Mechatronics (AIM), Auckland, New Zealand, 9–12 July 2018; pp. 736–741. [Google Scholar]
  9. Wen, B.J.; Liu, T.S. Flexible-characteristics Inspection System for Flexible Substrates by Using Image Feedback Control. Displays 2011, 32, 296–307. [Google Scholar] [CrossRef]
  10. Hsiang-Chen, H.; Li-Ming, C.; Wang, Z.K.; Tsao, S.C. Position control and novel application of SCARA robot with vision system. Adv. Technol. Innov. 2017, 2, 40. [Google Scholar]
  11. Wen, B.J.; Syu, K.C.; Kao, C.H. Dynamic Proportional-Fuzzy Grip Control for Robot Arm by Two-dimensional Vision Sensing Method. J. Intell. Fuzzy Syst. 2019, 36, 985–998. [Google Scholar] [CrossRef]
  12. Thotapalli, P.K.; Kumar, C.R.V.; Reddy, B.C.M. A New Approach to Control the Position of Joint Arm Robot Using Image Background Subtraction Technique. In Advances in Simulation, Product Design and Development; Springer: Singapore, 2020; pp. 845–854. [Google Scholar]
  13. Jiang, D.; Li, G.; Sun, Y.; Hu, J.; Yun, J.; Liu, Y. Manipulator grabbing position detection with information fusion of color image and depth image using deep learning. J. Ambient Intell. Humaniz. Comput. 2021, 12, 10809–10822. [Google Scholar] [CrossRef]
  14. Xiong, J.; Liu, Z.; Lin, R.; Bu, R.; He, Z.; Yang, Z.; Liang, C. Green grape detection and picking-point calculation in a night-time natural environment using a charge-coupled device (CCD) vision sensor with artificial illumination. Sensors 2018, 18, 969. [Google Scholar] [CrossRef] [Green Version]
  15. Ringdahl, O.; Kurtser, P.; Edan, Y. Evaluation of approach strategies for harvesting robots: Case study of sweet pepper harvesting. J. Intell. Robot. Syst. 2019, 95, 149–164. [Google Scholar] [CrossRef] [Green Version]
  16. Ji, W.; Zhang, J.; Xu, B.; Tang, C.; Zhao, D. Grasping mode analysis and adaptive impedance control for apple harvesting robotic grippers. Comput. Electron. Agric. 2021, 186, 106210. [Google Scholar] [CrossRef]
  17. Hayashi, S.; Shigematsu, K.; Yamamoto, S.; Kobayashi, K.; Kohno, Y.; Kamata, J.; Kurita, M. Evaluation of a strawberry-harvesting robot in a field test. Biosyst. Eng. 2010, 105, 160–171. [Google Scholar] [CrossRef]
  18. Redmon, J.; Farhadi, A. YOLO9000: Better, faster, stronger. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 7263–7271. [Google Scholar]
  19. Tian, Y.; Yang, G.; Wang, Z.; Wang, H.; Li, E.; Liang, Z. Apple detection during different growth stages in orchards using the improved YOLO-V3 model. Comput. Electron. Agric. 2019, 157, 417–426. [Google Scholar] [CrossRef]
  20. Liu, G.; Nouaze, J.C.; Touko Mbouembe, P.L.; Kim, J.H. YOLO-tomato: A robust algorithm for tomato detection based on YOLOv3. Sensors 2020, 20, 2145. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  21. Rao, C.; Zheng, Z.; Wang, Z. Multi-Scale Safety Helmet Detection Based on SAS-YOLOv3-Tiny. Appl. Sci. 2021, 11, 3652. [Google Scholar]
  22. Wen, B.-J.; Chang, C.-R.; Lan, C.-W.; Zheng, Y.-C. Magnus-Forces Analysis of Pitched-Baseball Trajectories Using YOLOv3-Tiny Deep Learning Algorithm. Appl. Sci. 2022, 12, 5540. [Google Scholar] [CrossRef]
  23. Seraji, H.; Colbaugh, R. Force tracking in impedance control. Int. J. Robot. Res. 1997, 16, 97–117. [Google Scholar] [CrossRef]
  24. Duan, J.; Gan, Y.; Chen, M.; Dai, X. Adaptive variable impedance control for dynamic contact force tracking in uncertain environment. Robot. Auton. Syst. 2018, 102, 54–65. [Google Scholar] [CrossRef]
  25. Roveda, L.; Piga, D. Robust state dependent riccati equation variable impedance control for robotic force-tracking tasks. Int. J. Intell. Robot. Appl. 2020, 4, 507–519. [Google Scholar] [CrossRef]
  26. Schmid, S.R.; Hamrock, B.J.; Jacobson, B.O. Fundamentals of Machine Elements; CRC Press: Boca Raton, FL, USA, 2013. [Google Scholar]
  27. Tree Fruit Overview. Available online: https://extension.wsu.edu/chelan-douglas/agriculture/treefruit/horticulture/tree_fruit_overview/ (accessed on 19 November 2022).
  28. Our Standards: Washington Apple Commission. Available online: https://waapple.org/standards/ (accessed on 19 November 2022).
  29. Yang, M.S.; Sinaga, K.P. A feature-reduction multi-view k-means clustering algorithm. IEEE Access 2019, 7, 114472–114486. [Google Scholar] [CrossRef]
  30. Soderstrom, T.; Stoica, P. Instrumental variable methods for system identification. Circuits Syst. Signal Process. 2002, 21, 1–9. [Google Scholar] [CrossRef]
  31. Badadal Raghavendra, R.; Naik, S.B. Experimental Determination of Cutting Force Required for Severing Fruit Stalks. Int. J. Innov. Res. Sci. Technol. 2015, 1, 154–157. [Google Scholar]
  32. Puchalski, C.; Brusewitz, G.H.; Slipek, Z. Coefficients of friction for apple on various surfaces as affected by velocity. Agric. Eng. Int. CIGR J. 2003, 5, 1–14. [Google Scholar]
Figure 1. Schematic diagram of the ratchets, with a single motor performing (a) clockwise (b) counterclockwise rotation to (c) drive grippers and scissors by components A and J.
Figure 1. Schematic diagram of the ratchets, with a single motor performing (a) clockwise (b) counterclockwise rotation to (c) drive grippers and scissors by components A and J.
Agriculture 12 02050 g001
Figure 2. Schematic diagram of (a) clockwise rotation of the ratchet to drive components A to C by a single motor, and (b) slider crank mechanism to drive components D to I by component C for (c) grip and release control of 120°.
Figure 2. Schematic diagram of (a) clockwise rotation of the ratchet to drive components A to C by a single motor, and (b) slider crank mechanism to drive components D to I by component C for (c) grip and release control of 120°.
Agriculture 12 02050 g002
Figure 3. Schematic diagram of clamping force by a gripper.
Figure 3. Schematic diagram of clamping force by a gripper.
Agriculture 12 02050 g003
Figure 4. Schematic diagram of cut control in (a) upper left, (b) top, and (c) upper right views by a pair of scissors.
Figure 4. Schematic diagram of cut control in (a) upper left, (b) top, and (c) upper right views by a pair of scissors.
Agriculture 12 02050 g004
Figure 5. Schematic diagram of harvesting device based on a robotic arm with X-, Z-axis, Z-axis rotation motors, and a CCD.
Figure 5. Schematic diagram of harvesting device based on a robotic arm with X-, Z-axis, Z-axis rotation motors, and a CCD.
Agriculture 12 02050 g005
Figure 6. Schematic diagram before and after the CCD moves α forward to the fruit.
Figure 6. Schematic diagram before and after the CCD moves α forward to the fruit.
Agriculture 12 02050 g006
Figure 7. Block diagram of (a) cut and (b) grip impedance controls of harvesting device.
Figure 7. Block diagram of (a) cut and (b) grip impedance controls of harvesting device.
Agriculture 12 02050 g007
Figure 8. Value K s of equivalent stiffness coefficient depends on stiffness K d of the fruit, from 0 to 500 mNm/deg.
Figure 8. Value K s of equivalent stiffness coefficient depends on stiffness K d of the fruit, from 0 to 500 mNm/deg.
Agriculture 12 02050 g008
Figure 9. Simulation results of grip force with M d = 1 kgm 2 deg , D d = 0   kgm 2 sdeg , and K d = (a) 200, (b) 250, (c) 300, and (d) 350 mNm deg .
Figure 9. Simulation results of grip force with M d = 1 kgm 2 deg , D d = 0   kgm 2 sdeg , and K d = (a) 200, (b) 250, (c) 300, and (d) 350 mNm deg .
Agriculture 12 02050 g009
Figure 10. Simulation results of grip force with D d = 0 kgm 2 sdeg , K d = 300 mNm deg , and M d = (a) 1, (b) 0.5, (c) 0.05, and (d) 0.01 kgm 2 deg .
Figure 10. Simulation results of grip force with D d = 0 kgm 2 sdeg , K d = 300 mNm deg , and M d = (a) 1, (b) 0.5, (c) 0.05, and (d) 0.01 kgm 2 deg .
Agriculture 12 02050 g010
Figure 11. Simulation results of grip force with M d = 0 kgm 2 deg , K d = 300 mNm deg , and D d = (a) 0, (b) 0.1, and (c) 1 kgm 2 sdeg .
Figure 11. Simulation results of grip force with M d = 0 kgm 2 deg , K d = 300 mNm deg , and D d = (a) 0, (b) 0.1, and (c) 1 kgm 2 sdeg .
Agriculture 12 02050 g011
Figure 12. Simulation results of gripping force and angle of the harvesting device with and without impedance control, based on M d = 0.05     kgm 2 / deg , D d = 1   kgm 2 / sdeg , and K d = 300   mNm / deg .
Figure 12. Simulation results of gripping force and angle of the harvesting device with and without impedance control, based on M d = 0.05     kgm 2 / deg , D d = 1   kgm 2 / sdeg , and K d = 300   mNm / deg .
Agriculture 12 02050 g012
Figure 13. Photos of (a) apple harvesting experiment field by automatic fruit harvesting device, (b) initial image of apple, (c) recognized image of apple by YOLOv3-tiny algorithm, and (d) image of apple after image process of HSV-Mask filter by V2 CCD.
Figure 13. Photos of (a) apple harvesting experiment field by automatic fruit harvesting device, (b) initial image of apple, (c) recognized image of apple by YOLOv3-tiny algorithm, and (d) image of apple after image process of HSV-Mask filter by V2 CCD.
Agriculture 12 02050 g013
Figure 14. Flowchart of an apple harvest by automatic fruit harvesting device.
Figure 14. Flowchart of an apple harvest by automatic fruit harvesting device.
Agriculture 12 02050 g014
Figure 15. Five photos of (a) searching for apple, (b) approaching apple, (c) starting to grip, (d) gripping apple and cutting its stem, and (e) completing apple harvest, in order, during apple harvest, by automatic fruit harvesting device. Image of V2 CCD is shown in the lower left corner of every photo.
Figure 15. Five photos of (a) searching for apple, (b) approaching apple, (c) starting to grip, (d) gripping apple and cutting its stem, and (e) completing apple harvest, in order, during apple harvest, by automatic fruit harvesting device. Image of V2 CCD is shown in the lower left corner of every photo.
Agriculture 12 02050 g015
Figure 16. Gripping force and angle in experimental results for gripping apple.
Figure 16. Gripping force and angle in experimental results for gripping apple.
Agriculture 12 02050 g016
Figure 17. Motor torque and angle in experimental results for cutting the apple stem.
Figure 17. Motor torque and angle in experimental results for cutting the apple stem.
Agriculture 12 02050 g017
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Wen, B.-J.; Yeh, C.-C. Automatic Fruit Harvesting Device Based on Visual Feedback Control. Agriculture 2022, 12, 2050. https://doi.org/10.3390/agriculture12122050

AMA Style

Wen B-J, Yeh C-C. Automatic Fruit Harvesting Device Based on Visual Feedback Control. Agriculture. 2022; 12(12):2050. https://doi.org/10.3390/agriculture12122050

Chicago/Turabian Style

Wen, Bor-Jiunn, and Che-Chih Yeh. 2022. "Automatic Fruit Harvesting Device Based on Visual Feedback Control" Agriculture 12, no. 12: 2050. https://doi.org/10.3390/agriculture12122050

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop