Garbage can recycling tipping method and system for a garbage recycling vehicle

By combining ultrasonic modules and image recognition with Canney edge detection, a waste bin recycling method has been developed, which has enabled automated identification and emptying of waste bins. This solves the problem of low automation in waste bin recycling, improves the working efficiency of waste collection vehicles, and reduces damage to waste bins.

CN116309535BActive Publication Date: 2026-03-31ZHEJIANG UNIV OF SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-21
Publication Date
2026-03-31

Smart Images

  • Figure CN116309535B_ABST
    Figure CN116309535B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of artificial intelligence, and particularly relates to a garbage can recycling and dumping method and system for a garbage recycling vehicle. The method comprises the following steps: S1, determining the distance between the garbage recycling vehicle and the garbage can through an ultrasonic module, and changing the speed of the garbage recycling vehicle to keep the distance between the garbage recycling vehicle and the garbage can at a preset distance; S2, performing image recognition on the garbage can, determining the position of the garbage can in the image, and adjusting the position of the garbage recycling vehicle so that the garbage can is placed at the central position of a mechanical arm; S3, detecting the garbage capacity in the garbage can by using a Canny edge detection sub-module, and determining whether the corresponding garbage can needs to be dumped; if the garbage can does not need to be dumped, the garbage can is returned; if the garbage can needs to be dumped, the next step is performed; and S4, sequentially clamping, lifting and dumping the garbage can by using the mechanical arm. The application has the characteristics of high automation, can improve the working efficiency of the garbage recycling vehicle, and reduces the damage to the garbage can.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of artificial intelligence technology, specifically relating to a method and system for recycling and dumping garbage bins for garbage collection vehicles. Background Technology

[0002] Existing methods for collecting and emptying trash cans mainly involve garbage trucks for collecting large outdoor trash cans and small garbage-cleaning robots for cleaning indoor dust. There are no dedicated garbage trucks for collecting small indoor trash cans. Indoor trash cans are scattered in various places, requiring manual emptying. Furthermore, manual sorting of trash is necessary during emptying, which can be irritating when people come into contact with the trash cans. In areas with many and scattered trash cans, manual collection is required, which is labor-intensive for people.

[0003] Therefore, it is essential to design a highly automated garbage bin recycling and dumping method and system for garbage recycling trucks that can improve the working efficiency of garbage recycling trucks and reduce damage to garbage bins.

[0004] For example, Chinese patent document CN202111398802.9 describes a self-dumping garbage sweeper and a self-dumping garbage method. The self-dumping garbage sweeper includes a wire-controlled chassis, a fan assembly, a housing assembly, a sweeping device, a dust collection device, and an unmanned driving module. The housing assembly includes a garbage bin, a lifting cylinder, and a self-opening and closing mechanism. The fan assembly is located above the garbage bin, and the garbage bin has a rear door. The self-opening and closing mechanism is located between the garbage bin and the rear door to drive the rear door to open or close relative to the garbage bin. The unmanned driving module is used to acquire feedback data including the sweeping device, the garbage bin, and the wire-controlled chassis, and control the sweeping device, the fan assembly, the lifting cylinder, the dust collection device, and the wire-controlled chassis to execute relevant commands. Although the sweeper travels along the optimal path to the garbage dumping point and automatically dumps the garbage by adjusting its position, and no manual operation is required during the garbage dumping process, which significantly improves the efficiency of sweeping operations, its drawback is that it cannot identify the contents of the garbage bins to determine whether the corresponding garbage bins need to be emptied, thus failing to reduce workload and improve the efficiency of garbage collection trucks. Summary of the Invention

[0005] The present invention aims to overcome the problems of low automation, large workload, and easy damage to garbage bins in existing garbage bin recycling and dumping methods. It provides a garbage bin recycling and dumping method and system for garbage recycling trucks that has a high degree of automation, can improve the working efficiency of garbage recycling trucks, and reduce damage to garbage bins.

[0006] To achieve the above-mentioned objectives, the present invention adopts the following technical solution:

[0007] The method for emptying garbage bins used in garbage collection trucks includes the following steps:

[0008] S1, the ultrasonic module determines the distance between the garbage truck and the garbage bin, and changes the speed of the garbage truck to maintain a preset distance between the garbage truck and the garbage bin;

[0009] S2, perform image recognition on the trash can and determine its position in the image, while adjusting the position of the garbage collection truck so that the trash can is placed in the center of the robotic arm;

[0010] S3. Use the Canney edge detector to detect the amount of trash in the trash can and determine whether the corresponding trash can needs to be emptied. If it does not need to be emptied, put the trash back in the trash can. If it needs to be emptied, proceed to the next step.

[0011] S4 uses a robotic arm to sequentially grip, lift, and empty the trash can.

[0012] Preferably, step S1 includes the following steps:

[0013] S11: When the ultrasonic module on the garbage truck detects a garbage bin within 1 meter ahead, it sends a feedback signal to the microcontroller, which then begins to reduce the operating speed of the garbage truck. If the current speed of the garbage truck is 1 m / s, the speed is reduced to 0.1 m / s. When the garbage bin is detected to be 0.3 m away from the garbage truck, the garbage truck stops moving.

[0014] Preferably, step S2 includes the following steps:

[0015] S21, capture and save images with a camera, correct the images using an image correction function, and then use a QR code recognition function to recognize the QR code on the trash can to obtain the trash can material and serial number information;

[0016] S22: Using the rectangle drawing function, draw a rectangle in the image to represent the position of the trash can, compare it with the pre-set middle area of ​​the image, and change the position of the garbage truck so that the rectangle drawn based on the trash can appears in the middle area of ​​the image.

[0017] Preferably, step S22 includes the following steps:

[0018] S221, when the trash can appears in the upper left corner of the camera's internal image, the garbage truck turns left in place, bringing the trash can closer to the center line inside the camera, until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves backward until the trash can appears in the middle area of ​​the camera's internal image.

[0019] S222, when the trash can appears in the upper right corner of the camera's internal image, the garbage truck turns right in place, bringing the trash can closer to the center line inside the camera until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves backward until the trash can appears in the middle area of ​​the camera's internal image.

[0020] S223, when the trash can appears in the lower left corner of the camera's internal image, the garbage truck turns left in place, bringing the trash can closer to the center line inside the camera, until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves forward until the trash can appears in the middle area of ​​the camera's internal image.

[0021] S224, when the trash can appears in the lower right corner of the camera's internal image, the garbage truck turns right in place, bringing the trash can closer to the center line inside the camera, until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves forward until the trash can appears in the middle area of ​​the camera's internal image.

[0022] Preferably, step S3 includes the following steps:

[0023] S31 performs Gaussian filtering to denoise the acquired image, performs grayscale conversion to RGB, and performs preprocessing operations to convert the three channels to a single channel.

[0024] S32, the edge of the target trash can image is extracted using the Canney edge detection sub-edge detection algorithm, the pixel distance between the center coordinates of the circle and the target edge is located, and the pixel equivalent is obtained by the precise physical size of the calibrator.

[0025] S33 uses the least squares method to perform curve fitting on the pixel equivalent to obtain the garbage height value, and finally obtains the estimated garbage volume.

[0026] Preferably, step S32 includes the following steps:

[0027] S321, the original image is smoothed using a Gaussian filter. The two-dimensional Gaussian function is:

[0028]

[0029] Where σ is a spatial constant, and G(x,y) represents a Gaussian function;

[0030] The smoothed image obtained by convolving G and f is f. s (x,y)=G(x,y) * f(x,y); fs (x,y) represents the smoothed image obtained by convolution using G and f; f(x,y) represents the input image;

[0031] S322, Calculate the gradient magnitude image and angle image:

[0032]

[0033] Where M s (x,y) represents the gradient magnitude image, and α(x,y) represents the gradient direction. For gradient images,

[0034] S323 applies non-maximum suppression to the gradient image, specifically as follows:

[0035] Find the direction d that is closest to α(x,y) k Let K represent At one or two neighboring points of (x,y) If the value is , then let g N (x,y)=0; otherwise, let g N (x,y)=K;

[0036] S324 uses dual thresholding and connectivity analysis to detect and connect edges, specifically:

[0037] S3241, in g NH Locate the next unvisited edge pixel p in (x,y); strong pixel image g NH (x,y)=g N (x,y)≥T H T H High threshold;

[0038] S3242, g NL In the graph (x, y), all weak pixels connected to p by 8-connectivity are denoted as effective edge pixels; the weak pixel image g NL (x,y)=g N (x,y)≥T L ;T L Low threshold;

[0039] S3243, if g NH If all non-pixels in (x,y) have been visited, skip to the next step; otherwise, return to step S3241.

[0040] S3244, g NL All pixels in (x,y) that are not marked as valid edge pixels are set to 0.

[0041] Preferably, step S33 includes the following steps:

[0042] S331, given a dataset S = {(x1,y1),(x2,y2),…(x...} n ,y n To find a function f(x) = ax + b such that the result of f(x) approximates the experimental result y:

[0043] Q = (ax1 + b - y1) 2 +(ax²+b-y²) 2 +…+(ax n +by n ) 2

[0044]

[0045] Where Q is the deviation. These are the fitted values;

[0046] S332, differentiate with respect to Q, and solve for the values ​​of a and b when Q is minimized:

[0047]

[0048] S333, after finding the values ​​of a and b, the relationship between the pixel distance between the edge points of the target location in the image data and the actual height are fitted to obtain the data relationship. The mean value is used as the matching result value. Then, the height of the garbage edge from the edge of the bin wall is obtained by the fitting function, and the mean value is used as the final estimated target edge height.

[0049] Since the actual height and base area of ​​the trash can are fixed, the estimated volume is obtained by subtracting the target edge height from the actual height of the trash can and finally using the formula for the volume of a cylinder.

[0050] V = S × h

[0051] Where S is the bottom area of ​​the trash can, and h is the height of the trash in the trash can.

[0052] Preferably, step S4 includes the following steps:

[0053] S41, a fuzzy PID control method for robotic arm motion based on gravity compensation and rotation angle, specifically:

[0054] The input quantities are error and error rate of change. In the gravity compensation control process of the robotic arm, the membership function is selected for the fuzzy linguistic variables. Substituting the fuzzy-processed variables into the following formula, the input values ​​of the controller are calculated:

[0055]

[0056] In the formula, i(t) and o(t) represent the set value and the actual output value, respectively, and the calculated results e(t) and e c (t) represents the error and error rate, respectively, where t represents time; the proportionality coefficient K of the deviation is... P Integral coefficient K i and differential coefficient K d Adjustments are made to combine and form the control quantity; K p The integral coefficient reflects the proportional relationship between the controller's output and input deviations; the integral coefficient is used to eliminate steady-state error, which gradually decreases over time and eventually reaches zero; the derivative coefficient is used to improve the controller's operational stability; by setting and adjusting the operating parameters of the fuzzy PID controller, the discrete control law of the controller is derived as follows:

[0057]

[0058] In the formula, u(t) represents the PID output result;

[0059] Create fuzzy rules and adjust the operating parameters of the PID controller. The adjustment rules for the PID controller operating parameters are as follows: if the input error value e(t) is greater than the set threshold, increase the proportional coefficient K upwards. p The value of is reduced, while the integral coefficient K is decreased. i and differential coefficient K d The specific value of K; if the input error value e(t) is the set threshold, K is not adjusted. P and K i The value of K is reduced. d Parameter; when the input error value e(t) is less than the set threshold, K is reduced. p While increasing the value of K i The parameter K is determined by considering the rate of change of error to eliminate the static error of the system while reducing oscillations. d The adjustment direction is determined; the adjusted parameters are substituted to obtain the output result of the fuzzy PID controller; finally, the value output by the fuzzy PID controller is converted into a precise quantity that can control the actuator. The defuzzification process is represented as follows:

[0060]

[0061] Where: u i δ represents the output of the fuzzy PID controller. i Representing fuzzy variable values, in the process of solving the gravity compensation amount of the robotic arm, the calculated load torque and rotation angle of the robotic arm are imported into the controller as input quantities. Considering the working stability of the robotic arm, the gravity compensation control quantity u is obtained. con for:

[0062]

[0063] Among them, M o (F) represents the torque vector, and θ represents the angle of rotation of the robotic arm.

[0064] The present invention also provides a garbage bin collection and dumping system for garbage collection vehicles, comprising:

[0065] The distance judgment module is used to determine the distance between the garbage truck and the garbage bin through the ultrasonic module, and to change the speed of the garbage truck to maintain a preset distance between the garbage truck and the garbage bin.

[0066] The image recognition and judgment module is used to perform image recognition on the trash can and determine its position in the image. At the same time, it adjusts the position of the garbage collection vehicle so that the trash can is placed in the center of the robotic arm.

[0067] The garbage capacity detection module uses the Canney edge detector to detect the garbage capacity in the garbage bin and determine whether the corresponding garbage bin needs to be emptied; if it does not need to be emptied, it is put back into the garbage bin; if it needs to be emptied, it proceeds to the next step.

[0068] The trash can tipping module is used to sequentially grip, lift, and tip trash cans using a robotic arm.

[0069] Compared with the prior art, the beneficial effects of this invention are: (1) The garbage bin recycling and dumping method proposed in this invention has a high degree of automation. It can identify the contents of the garbage bin to determine whether the garbage bin needs to be dumped, which can reduce the workload and improve the working efficiency of the garbage recycling truck; (2) By identifying garbage bins of different materials, this invention controls the robotic arm to adopt a targeted gripping method, thereby reducing damage to the garbage bin and reducing energy consumption, thereby improving the working efficiency of the robotic arm; (3) This invention improves the shaking phenomenon that occurs during the lifting of the garbage bin by using a fuzzy PID robotic arm gravity compensation control system, thereby improving the working efficiency and safety of the robotic arm, protecting the robotic arm and the garbage bin, and reducing unnecessary energy consumption. Attached Figure Description

[0070] Figure 1 This is a flowchart of a garbage bin recycling and dumping method for a garbage recycling truck in this invention;

[0071] Figure 2 This is a schematic diagram illustrating how a trash can is detected in the upper left corner of the image inside the camera in this invention;

[0072] Figure 3 This is a schematic diagram illustrating how a trash can is detected in the upper right corner of the image inside the camera in this invention;

[0073] Figure 4 This is a schematic diagram illustrating how a trash can is detected in the lower left corner of the image inside the camera in this invention;

[0074] Figure 5 This is a schematic diagram illustrating how a trash can is detected in the lower right corner of the image inside the camera in this invention.

[0075] Figure 6 This is a schematic diagram of a coordinate system for the image of a trash can in this invention;

[0076] Figure 7 This is a schematic diagram of one structure of the robotic arm device in this invention;

[0077] Figure 8 This is a front view of the robotic arm device in this invention;

[0078] Figure 9 This is a top view of the robotic arm device in this invention;

[0079] Figure 10 This is another structural schematic diagram of the robotic arm device in this invention;

[0080] Figure 11 This is a block diagram illustrating the principle of fuzzy PID algorithm control in this invention.

[0081] In the diagram: 1. Mechanical left arm; 2. Mechanical right arm; 3. First slider; 4. Second slider; 5. Third slider; 6. Pressure sensor; 7. Telescopic motor; 8. Fourth slider; 9. Stepper motor; 10. First coupling; 11. Lead screw; 12. Nut; 13. Second coupling; 14. Stainless steel rod; 15. First connector; 16. Second connector; 17. Fixture; 18. Servo motor; 19. Mechanical arm platform; 20. Fifth slider; 21. Sixth slider; 22. Third slide rail; 23. Fourth slide rail; 24. Limit switch. Detailed Implementation

[0082] To more clearly illustrate the embodiments of the present invention, specific implementation methods will be described below with reference to the accompanying drawings. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings and other implementation methods can be obtained based on these drawings without any creative effort.

[0083] Example:

[0084] like Figure 1 As shown, the method for emptying and recycling garbage bins in a garbage collection truck includes the following steps:

[0085] S1, the ultrasonic module determines the distance between the garbage truck and the garbage bin, and changes the speed of the garbage truck to maintain a preset distance between the garbage truck and the garbage bin;

[0086] S2, perform image recognition on the trash can and determine its position in the image, while adjusting the position of the garbage collection truck so that the trash can is placed in the center of the robotic arm;

[0087] S3. Use the Canney edge detector to detect the amount of trash in the trash can and determine whether the corresponding trash can needs to be emptied. If it does not need to be emptied, put the trash back in the trash can. If it needs to be emptied, proceed to the next step.

[0088] S4 uses a robotic arm to sequentially grip, lift, and empty the trash can.

[0089] For step S1, the ultrasonic module determines the distance between the garbage truck and the garbage bin, and sends the result back to the microcontroller, which then adjusts the speed of the garbage truck to stop at a suitable distance. Specifically:

[0090] S11: When the ultrasonic module on the garbage truck detects a garbage bin within 1 meter ahead, it sends a feedback signal to the microcontroller, which then begins to reduce the operating speed of the garbage truck. If the current speed of the garbage truck is 1 m / s, the speed is reduced to 0.1 m / s. When the garbage bin is detected to be 0.3 m away from the garbage truck, the garbage truck stops moving.

[0091] For step S2, the specific process is as follows:

[0092] S21, capture and save images with a camera, correct the images using an image correction function, and then use a QR code recognition function to recognize the QR code on the trash can to obtain the trash can material and serial number information;

[0093] S22: Using the rectangle drawing function, draw a rectangle in the image to represent the position of the trash can, compare it with the pre-set middle area of ​​the image, and change the position of the garbage truck so that the rectangle drawn based on the trash can appears in the middle area of ​​the image.

[0094] For step S22, the specific situations include the following:

[0095] S221, as Figure 2 As shown, when the trash can appears in the upper left corner of the camera's internal image, the garbage truck turns left in place, bringing the trash can closer to the center line inside the camera until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves backward until the trash can appears in the middle area of ​​the camera's internal image.

[0096] S222, as Figure 3 As shown, when the trash can appears in the upper right corner of the camera's internal image, the garbage truck turns right in place, bringing the trash can closer to the center line inside the camera until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves backward until the trash can appears in the middle area of ​​the camera's internal image.

[0097] S223, such as Figure 4 As shown, when the trash can appears in the lower left corner of the camera's internal image, the garbage truck turns left in place, bringing the trash can closer to the center line inside the camera until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves forward until the trash can appears in the middle area of ​​the camera's internal image.

[0098] S224, such as Figure 5 As shown, when the trash can appears in the lower right corner of the camera's internal image, the garbage truck turns right in place, bringing the trash can closer to the center line inside the camera until the trash can appears in the center line area of ​​the camera's internal image; when the trash can appears in the center line area of ​​the camera's internal image, the garbage truck moves forward until the trash can appears in the middle area of ​​the camera's internal image.

[0099] Furthermore, step S3 includes the following steps:

[0100] S31 performs Gaussian filtering to denoise the acquired image, performs grayscale conversion to RGB, and performs preprocessing operations to convert the three channels to a single channel.

[0101] S32, the edge of the target trash can image is extracted using the Canney edge detection sub-edge detection algorithm, the pixel distance between the center coordinates of the circle and the target edge is located, and the pixel equivalent is obtained by the precise physical size of the calibrator.

[0102] S33 uses the least squares method to perform curve fitting on the pixel equivalent to obtain the garbage height value, and finally obtains the estimated garbage volume.

[0103] The Canney edge detector is used to detect edges in the trash can image and extract the target edges. The Canney edge detector is an excellent edge detector, and the algorithm implementation process is as follows:

[0104] S321, the original image is smoothed using a Gaussian filter. The two-dimensional Gaussian function is:

[0105]

[0106] Where σ is a spatial constant, and G(x,y) represents a Gaussian function;

[0107] The smoothed image obtained by convolving G and f is f. s (x,y)=G(x,y)*f(x,y); f s (x,y) represents the smoothed image obtained by convolution using G and f; f(x,y) represents the input image;

[0108] S322, Calculate the gradient magnitude image and angle image:

[0109]

[0110] Where M s (x,y) represents the gradient magnitude image, and α(x,y) represents the gradient direction. For gradient images,

[0111] S323 applies non-maximum suppression to the gradient image, specifically as follows:

[0112] Find the direction d that is closest to α(x,y) k Let K represent At one or two neighboring points of (x,y) If the value is , then let g N (x,y)=0; otherwise, let g N (x,y)=K;

[0113] S324 uses dual thresholding and connectivity analysis to detect and connect edges, specifically:

[0114] S3241, in g NH Locate the next unvisited edge pixel p in (x,y); strong pixel image g NH (x,y)=g N (x,y)≥T H T H High threshold;

[0115] S3242, g NL In the graph (x, y), all weak pixels connected to p by 8-connectivity are denoted as effective edge pixels; the weak pixel image g NL (x,y)=g N (x,y)≥T L ;T L Low threshold;

[0116] S3243, if g NH If all non-pixels in (x,y) have been visited, skip to the next step; otherwise, return to step S3241.

[0117] S3244, g NLAll pixels in (x,y) that are not marked as valid edge pixels are set to 0.

[0118] After obtaining the pixel distance experimental data, the least squares method is used to fit the data, thereby deriving the corresponding fitting function and obtaining the relationship between the known sample data. The least squares method mainly aims to obtain the function that best matches the data, requiring the minimization of the sum of squared errors. Specifically, step S33 includes the following steps:

[0119] S331, given a dataset S = {(x1,y1),(x2,y2),…(x...} n ,y n To find a function f(x) = ax + b such that the result of f(x) approximates the experimental result y:

[0120] Q = (ax1 + b - y1) 2 +(ax²+b-y²) 2 +…+(ax n +by n ) 2

[0121]

[0122] Where Q is the deviation. These are the fitted values;

[0123] S332, differentiate with respect to Q, and solve for the values ​​of a and b when Q is minimized:

[0124]

[0125] S333, after finding the values ​​of a and b, the relationship between the pixel distance between the edge points of the target location in the image data and the actual height are fitted to obtain the data relationship. The mean value is used as the matching result value. Then, the height of the garbage edge from the edge of the bin wall is obtained by the fitting function, and the mean value is used as the final estimated target edge height.

[0126] Since the actual height and base area of ​​the trash can are fixed, the estimated volume is obtained by subtracting the target edge height from the actual height of the trash can and finally using the formula for the volume of a cylinder.

[0127] V = S × h

[0128] Where S is the bottom area of ​​the trash can, and h is the height of the trash in the trash can.

[0129] During the movement of the garbage truck, the distance between the camera and the garbage bin is not fixed. Therefore, when the garbage truck's image acquisition device captures images of the garbage bin, the camera needs to maintain a fixed distance of D from the bin. Thus, under the same conditions, the relationship between the pixel distance between edge points of the target location in the captured image and the actual measured value of the object is fixed; they are positively correlated. Therefore, as long as the geometric dimensions of the measured object and the pixel dimensions of the object output by the computer are obtained, the ratio between the two is called the pixel equivalent value. For example... Figure 6 In the coordinate system shown, point O is the center of the trash can. Using the center as the origin, 18 straight lines are generated at angles of 0°, 10°, 20°, 30°, 40°, 50°, 60°, 70°, 80°, 90°, 100°, 110°, 120°, 130°, 140°, 150°, 160°, and 170°. The intersection points of these lines with the edge contours are calculated, yielding 36 pairs of distances between edge points. Since trash is an irregular object, the pixel distance between the trash edge M and the trash can edge G is needed to ensure accuracy. The trash edge M is calculated, and a straight line is drawn through M intersecting the trash can edge at point G. The coordinates of M(x1, y1) and G(x2, y2) are then determined. The pixel distance d between M and G can be calculated using the formula for the distance between two points.

[0130]

[0131] The precise physical size of the calibration object is determined as R, and the pixel equivalent is:

[0132]

[0133] a is obtained using the above method. 1, a2…a 35 ,a 36 The pixel distance.

[0134] For step S4, the process of picking up the trash can, as follows: Figure 7 and Figure 8As shown, the main principle is as follows: the mechanical right arm 2 is fixed on the first slide rail by the first slider 3 and on the second slide rail by the second slider 4; the mechanical left arm 1 is fixed on the first slide rail by the third slider 5 and on the second slide rail by the fourth slider 8; the right end of the telescopic motor 7 is fixed on the mechanical right arm, and the left end of the telescopic motor is fixed on the mechanical left arm; when the garbage can is picked up, the mechanical right arm remains stationary, and the telescopic motor retracts, causing the mechanical left arm to slide towards the mechanical right arm. When the mechanical left arm and the mechanical right arm pick up the garbage can, the pressure sensor 6 on the inner side of the mechanical left arm and the mechanical right arm feeds back the pressure to the microcontroller. When the pressure reaches a certain level, the telescopic motor stops moving, and the garbage can picking action is completed. If the feedback pressure is 0, it is determined whether the garbage can has been picked up. The position of the garbage can is determined again by the camera, and the garbage can picking action is repeated.

[0135] During the process of gripping trash cans, because the robotic arm is made of rigid material, it can cause some damage when gripping trash cans made of fragile, easily deformable, or rigid materials. This could result in the trash can breaking, getting scratches, or deforming. Therefore, pressure sensors are installed on the left and right arms of the robotic arm. The pressure data fed back from these sensors to the microcontroller is used to control the position of the robotic arm, thereby reducing the damage caused to the trash can.

[0136] 1. How to handle trash cans made of fragile materials

[0137] For trash cans made of fragile materials, glass is a common choice. Glass is a rigid yet fragile material, easily scratched and broken. By scanning the QR code on the trash can, we can learn its information and determine that it is made of a fragile material. We then reduce the clamping speed, and based on feedback from the pressure sensor, stop the telescopic motor's movement when the pressure reaches a preset value, thus preventing damage to the fragile trash can.

[0138] 2. Methods for handling easily deformable trash cans

[0139] For easily deformable trash cans, plastic is a common material. This type of trash can is prone to deformation, damaging its original structure. When the QR code on a trash can indicates it's made of plastic, the pressure sensor's feedback may change due to the trash can's deformation. Therefore, when handling plastic trash cans, the width of the trash can should be measured beforehand. This measurement, obtained upon QR code recognition, allows for precise control of the gripping width, preventing damage to the easily deformable trash can.

[0140] 3. Methods for handling trash cans made of rigid materials.

[0141] For trash cans made of rigid materials, excessive gripping force may damage the robotic arm or scratch the surface of the trash can. Therefore, when gripping a rigid trash can, it is necessary to control the gripping force of the robotic arm to avoid excessive force that could damage the arm, or insufficient force that would prevent it from gripping the trash can. By recognizing the trash can's rigidity through QR code information, the width of the trash can is obtained, allowing for control of the gripping width and preventing damage to the robotic arm from excessive force.

[0142] For step S4, the process of raising the trash can, such as Figure 8 and Figure 9 As shown, the main principle is as follows: the right end of the robotic arm platform 19 is fixed to the third slide rail 22 via the fifth slider 20, and the left end of the robotic arm platform is fixed to the fourth slide rail 23 via the sixth slider 21; the stepper motor 9 is connected to the bottom of the lead screw 11 via the first coupling 10, and the lead screw is fixed to the robotic arm platform via the nut 12. The lifting and lowering of the robotic arm platform is controlled by the rotation of the stepper motor.

[0143] During the lifting process, the trash can needs to be raised to a certain height. If it's raised too high or too low, the trash can won't tip into the garbage truck. Therefore, a limit switch is installed at the top of the third sliding rail. Figure 10 As shown, when the trash can lifting device starts to move, the robotic arm platform touches the limit switch 24 at the top of the third slide rail, which will return a signal to the microcontroller. When the microcontroller receives the signal, it will stop the movement of the stepper motor, thereby stopping the movement of the robotic arm platform.

[0144] For step S4, the process of emptying the trash can, as follows: Figure 8 and Figure 9 As shown, the main principle is as follows: the servo motor 18 is fixed to the right end of the robotic arm platform and connected to the stainless steel rod 14 through the second coupling 13. The other end of the stainless steel rod is fixed to the left end of the robotic arm platform through the retainer 17. The right end of the stainless steel rod is fixed to the first slide rail and the second slide rail through the first connector 15, and the left end of the stainless steel rod is fixed to the first slide rail and the second slide rail through the second connector 16. When the garbage can is tilted, the servo motor controls the rotation angle of the stainless steel rod, and controls the rotation of the robotic arm through the first connector and the second connector to complete the garbage can tilting action.

[0145] In addition, for the control method of the weight of the trash can and the tilting angle, the present invention adopts a fuzzy PID control algorithm for the robotic arm motion based on gravity compensation and rotation angle.

[0146] The control performance of the fuzzy PID control algorithm depends on its control rules, and the number of control rules has an exponential relationship with the number of controller inputs. During system operation, the inputs are error and the rate of change of error. The control principle of the fuzzy PID algorithm is as follows: Figure 11 As shown.

[0147] The input quantities are error and error rate of change. In the gravity compensation control process of the robotic arm, the membership function is selected as the fuzzy linguistic variable. Attention should be paid to the influence of the shape and distribution of the function curve on the control performance.

[0148] Substitute the fuzzy-processed variables into the following formula to calculate the controller's input value:

[0149]

[0150] In the formula, i(t) and o(t) represent the set value and the actual output value, respectively, and the calculated results e(t) and e c (t) represents the error and error rate, respectively, where t represents time; the proportionality coefficient K of the deviation is... P Integral coefficient K i and differential coefficient K d Adjustments are made to combine and form the control quantity; K p The proportional coefficient reflects the proportional relationship between the controller's output and input deviations. Increasing the proportional coefficient reduces the system's stability error, thereby improving the system's stable state. The integral coefficient is used to eliminate steady-state error; over time, the steady-state error gradually decreases until it reaches zero. The derivative coefficient is used to improve the controller's operational stability. By setting and adjusting the operating parameters of the fuzzy PID controller, the discrete control law of the controller is derived as follows:

[0151]

[0152] In the formula, u(t) represents the PID output result;

[0153] Due to the influence of the suspended robotic arm's working state and posture, the data input to the controller exhibits a dynamic change pattern, requiring the controller's operating parameters to change accordingly. Therefore, it is necessary to create fuzzy rules and adjust the operating parameters of the PID controller. The adjustment rules for the PID controller's operating parameters are as follows: If the input error value e(t) is greater than the set threshold, increase the proportional coefficient K upwards. p The value of is reduced, while the integral coefficient K is decreased. i and differential coefficient K d The specific value of K improves the system's response speed and avoids overshoot, and effectively suppresses differential oversaturation caused by the rate of change of error; if the input error value e(t) is (close to) the set threshold, K is not adjusted. P and K iThe value of K is reduced. d The parameters balance control accuracy and stability while ensuring response speed; when the input error value e(t) is less than the set threshold, K is reduced. p While increasing the value of K i The parameter K is determined by considering the rate of change of error to eliminate the static error of the system while reducing oscillations. d The adjustment direction is determined; the adjusted parameters are substituted to obtain the output result of the fuzzy PID controller; finally, the value output by the fuzzy PID controller is converted into a precise quantity that can control the actuator. The defuzzification process is represented as follows:

[0154]

[0155] Where: u i δ represents the output of the fuzzy PID controller. i Representing fuzzy variable values, in the process of solving the gravity compensation amount of the robotic arm, the calculated load torque and rotation angle of the robotic arm are imported into the controller as input quantities. Considering the working stability of the robotic arm, the gravity compensation control quantity u is obtained. con for:

[0156]

[0157] Among them, M o (F) represents the torque vector, and θ represents the angle of rotation of the robotic arm.

[0158] In addition, the present invention also provides a garbage bin recycling and dumping system for garbage collection vehicles, comprising:

[0159] The distance judgment module is used to determine the distance between the garbage truck and the garbage bin through the ultrasonic module, and to change the speed of the garbage truck to maintain a preset distance between the garbage truck and the garbage bin.

[0160] The image recognition and judgment module is used to perform image recognition on the trash can and determine its position in the image. At the same time, it adjusts the position of the garbage collection vehicle so that the trash can is placed in the center of the robotic arm.

[0161] The garbage capacity detection module uses the Canney edge detector to detect the garbage capacity in the garbage bin and determine whether the corresponding garbage bin needs to be emptied; if it does not need to be emptied, it is put back into the garbage bin; if it needs to be emptied, it proceeds to the next step.

[0162] The trash can tipping module is used to sequentially grip, lift, and tip trash cans using a robotic arm.

[0163] The garbage bin recycling and emptying method proposed in this invention refers to the recycling of garbage bins in places such as classrooms, libraries, and factories using garbage collection trucks. This solves the problem of needing to manually collect garbage bins. The garbage bin recycling and emptying method proposed in this invention has a high degree of automation. It can identify the content of garbage bins to determine whether they need to be emptied, which can reduce workload. Different gripping methods are applied for garbage bins of different materials to reduce damage to the garbage bins. By using fuzzy PID control to control the rotation of the robotic arm, unnecessary energy consumption is reduced, thereby improving the working efficiency and safety of the robotic arm.

[0164] The above description is merely a detailed explanation of preferred embodiments and principles of the present invention. For those skilled in the art, there may be changes in specific implementation methods based on the ideas provided by the present invention, and these changes should also be considered within the scope of protection of the present invention.

Claims

1. A bin recovery tipping method for a refuse collection vehicle, characterised in that, Comprise the following steps: S1, determine the distance between the garbage collection vehicle and the garbage can through the ultrasonic module, and change the speed of the garbage collection vehicle, so that the garbage collection vehicle keeps a predetermined distance from the garbage can; S2, image recognition is performed on the garbage can, and the position of the garbage can in the image is determined, and the position of the garbage collection vehicle is adjusted so that the garbage can is placed in the central position of the mechanical arm; S3, the garbage capacity in the garbage can is detected by using the Canny edge detection sub, and it is judged whether the corresponding garbage can needs to be emptied; If not, return to the garbage can, if need to dump then the next step; S4, the garbage can is clamped, lifted and dumped in sequence by the mechanical arm; Step S3 comprises the following steps: S31, the collected image is preprocessed by Gaussian filter denoising, gray scale transformation RGB and three channels to single channel; S32, the Canny edge detection sub edge detection algorithm is used to extract the edge of the target garbage can image, the pixel distance between the center coordinates and the target edge is positioned, and the pixel equivalent is obtained through the accurate physical size of the calibration object; S33, the least square method is used for curve fitting of the pixel equivalent, and the garbage height value is obtained, and finally the garbage estimated volume is obtained; Step S32 comprises the following steps: S321, the original image is smoothed by a Gaussian filter, and the two-dimensional Gaussian function is: Where sigma is a space constant, and G(x, y) represents the Gaussian function; (x,y) = G(x,y) * f(x,y); f s (x,y) = G(x,y) * f(x,y); f s (x,y) = G(x,y) * f(x,y); f S322, calculate the gradient amplitude image and angle image: where M s (x,y) is represented as a gradient magnitude image, and a(x,y) is represented as a gradient direction, is a gradient image, S323, non-maximum suppression is applied to the gradient image, specifically: Find the direction d closest to a(x,y) k Let K denote the value of at one or both of the neighbors of (x,y) N (x,y) = 0; otherwise, let g N (x,y) = K; S324, use double threshold processing and connectivity analysis to detect and connect edges, specifically: S3241, in g NH (x,y) in the next unvisited edge pixel p; strong pixel image g NH (x,y) = g N (x,y) ≥ T H , T H is a high threshold; S3242, g NL (x, y) in which all the weak pixel points connected to p with 8-connected are recorded as effective edge pixels; the weak pixel image g NL (x, y) = g N (x, y) ≥ T L ; T L is a low threshold value; S3243, if g NH If all non-pixels in (x, y) have been visited, go to next step, otherwise return to step S3241. S3244, g NL All pixels in (x, y) that are not marked as valid edge pixels are set to 0.

2. The trash can recycling tipping method for a recycling truck according to claim 1, characterized in that, Step S1 comprises the following steps: S11, when the ultrasonic module on the garbage collection vehicle identifies a garbage can within 1m in front, feedback signal is given to the single-chip microcomputer, and the running speed of the garbage collection vehicle is reduced; if the current garbage collection vehicle speed is 1m / s, the speed of the garbage collection vehicle is reduced to 0.1m / s, and when the garbage can is detected to be 0.3m away from the garbage collection vehicle, the movement of the garbage collection vehicle is stopped.

3. The trash can recycling tipping method for a recycling truck according to claim 1, wherein, Step S2 comprises the following steps: S21, the image is photographed and saved by the camera, the image is corrected by using the image correction function, and the two-dimensional code on the garbage can is identified by using the two-dimensional code identification function, so that the garbage can material and serial number information are obtained; S22, a rectangular frame representing the position of the garbage can is drawn in the image by using the draw rectangle function, and the position of the garbage can is compared with the pre-set middle region of the image, and the position of the garbage collection vehicle is changed, so that the rectangular frame drawn according to the garbage can appears in the middle region of the image.

4. The trash can recycling tipping method for a recycling truck according to claim 3, characterized in that, Step S22 comprises the following steps: S221, when the garbage can appears in the upper left corner of the camera internal image, the garbage collection vehicle turns left in place, so that the garbage can approaches the camera internal centerline, until the garbage can appears in the centerline region of the camera internal image; when the garbage can appears in the centerline region of the camera internal image, the garbage collection vehicle moves backward until the garbage can appears in the middle region of the camera internal image; S222, when the garbage can appears in the right upper corner of the camera internal image, the garbage collection vehicle turns right in place, so that the garbage can approaches the camera internal center line, until the garbage can appears in the center line area of the camera internal image; when the garbage can appears in the center line area of the camera internal image, the garbage collection vehicle moves backward, until the garbage can appears in the middle area of the camera internal image; S223, when the garbage can appears in the left lower corner of the camera internal image, the garbage collection vehicle turns left in place, so that the garbage can approaches the camera internal center line, until the garbage can appears in the center line area of the camera internal image; When the garbage can appears in the center line area of the camera internal image, the garbage collection vehicle moves forward, until the garbage can appears in the middle area of the camera internal image; S224, when the garbage can appears in the right lower corner of the camera internal image, the garbage collection vehicle turns right in place, so that the garbage can approaches the camera internal center line, until the garbage can appears in the center line area of the camera internal image; When the garbage can appears in the center line area of the camera internal image, the garbage collection vehicle moves forward, until the garbage can appears in the middle area of the camera internal image.

5. The trash can recycling tipping method for a recycling truck according to claim 1, wherein, Step S33 includes the following steps: S331, set data set S = {(x1, y1), (x2, y2), … (x n ,y n )}, find a function f(x) = ax + b, so that the results of f(x) are close to the experimental results y: Q = (ax1+ b - y1) 2 + (ax2+ b - y2) 2 +... + (ax n + b - y n ) 2 wherein Q is a bias, is the fitted value; S332, the derivative of Q is solved, and the values of a and b are solved when Q is the minimum: S333, after the values of a and b are solved, the relationship formula of the data is obtained by fitting the pixel distance between the target position edge points of the image data and the actual height, the mean value is taken as the matching result value, and the height of the garbage can garbage edge distance from the cylinder wall edge is obtained from the fitting function, and the mean value is taken as the final estimated target edge height; Because the actual height and the bottom area of the garbage can are fixed, the estimated volume is obtained by subtracting the target edge height from the actual height of the garbage can, and finally the volume formula of the cylinder is used to obtain the estimated volume; V=S×h Wherein, S is the bottom area of the garbage can, and h is the height of the garbage can garbage.

6. The trash can recycling tipping method for a recycling truck according to claim 1, wherein, Step S4 includes the following steps: S41, the fuzzy PID control mechanical arm movement method based on gravity compensation and rotation angle, specifically: The input quantity is error and error change rate, and the fuzzy language variable selects the membership function in the gravity compensation control process of the mechanical arm; the variable after fuzzy processing is substituted into the following formula to calculate the input value of the controller: where i(t) and o(t) represent the set value and the actual output value, respectively, and the calculation results e(t) and e c (t) represent the error and the error rate, respectively, and t represents time; The proportional coefficient K P , integral coefficient K i and differential coefficient K d of the deviation are adjusted and combined to constitute the control quantity; K p reflects the proportional relationship between the output and input deviation of the controller; the integral coefficient is used to eliminate the steady-state error, which gradually decreases over time and finally reaches 0; the differential coefficient is used to improve the operation stability of the controller; through the setting and adjustment of the working parameters of the fuzzy PID controller, the discrete control law of the controller is obtained as follows: In the formula, u(t) represents the PID output result; The fuzzy rule is created, and the running parameters of the PID controller are adjusted. The adjustment rule of the running parameters of the PID controller is as follows: if the input error value e(t) is greater than the set threshold value, the proportional coefficient K p is increased, the integral coefficient K i and the differential coefficient K d are decreased; if the input error value e(t) is the set threshold value, the values of K P and K i are not adjusted, and the K d parameter is decreased; when the input error value e(t) is less than the set threshold value, the value of K p is decreased, and the K i parameter is increased, the static error of the system is eliminated while the oscillation is reduced, the adjustment direction of the parameter K d is determined in consideration of the error change rate; the adjusted parameters are substituted into the fuzzy PID controller to obtain the output result of the fuzzy PID controller; finally, the value output by the fuzzy PID controller is converted into an accurate quantity that can control the execution element, and the defuzzification process is represented as: wherein: u i represents the output result of the fuzzy PID controller, δ i represents the fuzzy variable value, in the solving process of the gravity compensation amount of the mechanical arm, the load torque calculation result and the rotation angle of the mechanical arm are introduced into the controller as the input quantity, and the gravity compensation control amount u is obtained under the consideration of the working stability of the mechanical arm con is: where M o (F) represents a torque vector, and θ represents an angle of rotation of the robot arm.

7. A bin collection tipping system for a refuse collection vehicle for implementing the method for a refuse collection vehicle according to any one of claims 1 to 6, characterised in that, The garbage can recycling and dumping system for the garbage collection vehicle comprises: A distance judgment module is configured to judge the distance between the garbage collection vehicle and the garbage can through the ultrasonic module, and change the speed of the garbage collection vehicle, so that the garbage collection vehicle and the garbage can maintain a predetermined distance; An image recognition judgment module is configured to recognize the image of the garbage can, judge the position of the garbage can in the image, and adjust the position of the garbage collection vehicle, so that the garbage can is placed in the central position of the mechanical arm; A garbage capacity detection module is configured to detect the garbage capacity in the garbage can by using the Canny edge detection sub-module, and judge whether the corresponding garbage can needs to be dumped; if not, the garbage can is returned; if yes, the next step is performed; A garbage can dumping module is configured to sequentially clamp, lift and dump the garbage can by the mechanical arm.

Citation Information

Patent Citations

  • A self-dumping road sweeper and a self-dumping method for garbage.

    CN113818386B

  • Operation system and method of unmanned feeding garbage truck and garbage truck

    CN110789888A

  • Intelligent control mechanical arm for environmental sanitation vehicle based on image processing and control method

    CN111645047A