An intelligent garbage sorting car based on Raspberry Pi
By designing a Raspberry Pi-based intelligent garbage sorting cart, combined with visual recognition, precise movement and grabbing modules, the existing garbage sorting robot has been solved, and efficient and intelligent Garbage sorting and disposal.
Patent Information
- Application Number
- CN202310289964.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-23
- Publication Date
- 2025-02-07
- Estimated Expiration
- 2043-03-23
AI Technical Summary
The existing garbage sorting robots have poor flexibility and low intelligence, so they cannot effectively deal with multiple types of garbage.
A smart garbage sorting car based on Raspberry Pi is designed, including visual modules, underlying modules and grabbing modules. The visual module uses a camera and a Raspberry Pi for garbage identification and classification. The underlying module uses a McNum wheel and a microcontroller to achieve accurate movement. The grab module uses a robotic arm to pick up and distribute garbage.
It realizes the rapid and effective classification and treatment of garbage, improves the flexibility and intelligence of garbage sorting, improves production efficiency and saves costs.
Smart Images

Figure CN116198876B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of garbage disposal, and in particular to an intelligent garbage sorting vehicle based on Raspberry Pi. Background Art
[0002] The improvement of living standards has led to an increasing number of types of garbage. The accumulation of garbage not only affects the appearance of the city, but also causes environmental pollution. Unreasonable disposal methods will not only cause waste of resources, but may also cause environmental pollution.
[0003] At present, garbage classification, identification and processing are still mainly done manually, which not only has high labor costs but also has limited sorting speed. Although some simple garbage sorting devices have appeared.
[0004] However, the current garbage sorting equipment needs to transport the garbage to the sorting robot via a conveyor belt, and the robot will then identify and grab the garbage. This not only has poor flexibility but also has a low level of intelligence. Summary of the invention
[0005] The present application provides a Raspberry Pi-based intelligent garbage sorting vehicle, which can solve the problems of poor flexibility and low intelligence level of existing garbage sorting robots.
[0006] The technical solution of the present application is an intelligent garbage sorting vehicle based on Raspberry Pi, comprising: a visual module, a bottom layer module and a grabbing module connected in sequence;
[0007] The visual module includes: a camera for acquiring a long-range image of garbage and an image of a garbage bin, and a Raspberry Pi for determining a target location of garbage and a category of garbage based on the long-range image of garbage, and for determining a location of the garbage bin based on the image of the garbage bin;
[0008] The bottom layer module includes: a trolley chassis that moves via Mecanum wheels, and a single chip microcomputer and an encoder arranged on the trolley chassis;
[0009] The single chip microcomputer is used to drive the encoder to determine the set moving speed and the initial rotation direction of the Mecanum wheel according to the garbage target position, and is also used to drive the Mecanum wheel to move to the garbage target position and the garbage bin position corresponding to the garbage category according to the set moving speed and the initial rotation direction based on the PID control logic, and is also used to send a control command when the garbage target position is reached;
[0010] The grabbing module includes: a mechanical arm, and a motor for driving the mechanical arm to grab garbage at a garbage target position according to a control command and for driving the mechanical arm to deliver the garbage to a garbage bin at a garbage bin position.
[0011] Optionally, the Raspberry Pi stores a target detection model for detecting garbage obtained by training based on YOLO3, and the target detection model is set with a detection threshold;
[0012] In addition, the Raspberry Pi is also used to input a plurality of garbage perspective images into the target detection model. The target detection model determines the garbage perspective images containing the garbage target positions and correspondingly determines the garbage detection information including the confidence level, the rectangular box where the garbage is located, the detection number and the garbage category and the corresponding garbage target positions in the garbage perspective images containing the garbage target positions whose confidence level is greater than the detection threshold.
[0013] Optionally, the camera is also used to continuously acquire garbage process images during the process of the Mecanum wheel moving toward the garbage target location;
[0014] And, the Raspberry Pi is further used to input a plurality of garbage process images to the target detection model according to the time sequence, and the target detection model determines the garbage process image containing the garbage target position and correspondingly determines the garbage detection information including the confidence level, the rectangular box where the garbage is located, the detection number and the garbage category in the garbage process image containing the garbage target position, which has a confidence level greater than the detection threshold;
[0015] And, the bottom layer module also includes: a yaw sensor;
[0016] Furthermore, the single chip microcomputer is further used to drive the yaw sensor to continuously determine the real-time yaw angle of the trolley chassis corresponding to the garbage target position according to the timing, and is also used to drive the encoder to determine the set moving speed and real-time rotation direction of the Mecanum wheel according to the garbage detection information from the garbage vision image and the garbage detection information from the garbage process image and the real-time yaw angle, and is also used to drive the Mecanum wheel to move to the garbage target position according to the set moving speed and real-time rotation direction based on the PID control logic, and send a control command when the garbage target position is reached.
[0017] Optionally, the single chip microcomputer is provided with a center determination principle for confirming whether the rectangular frame where the garbage is located is at the geometric center of the garbage perspective image or at the geometric center of the garbage process image;
[0018] Furthermore, the single chip microcomputer is further used to determine the initial moving direction to the garbage target position based on the center determination principle and according to the garbage detection information from the garbage distant view image, and is further used to continuously correct the initial moving direction based on the center determination principle and according to the garbage detection information from the garbage process image and the real-time yaw angle to obtain the real-time moving direction;
[0019] Furthermore, the single chip microcomputer is used to drive the yaw sensor to continuously determine the real-time yaw angle of the trolley chassis corresponding to the garbage target position according to the timing, and is also used to drive the encoder to determine the set moving speed and real-time rotation direction of the Mecanum wheel according to the initial moving direction and the real-time moving direction.
[0020] Optionally, the single chip microcomputer is STM32;
[0021] And, the yaw sensor is MPU6050.
[0022] Optionally, the Raspberry Pi is provided with OpenCV;
[0023] The Raspberry Pi determines the color of each trash can according to the trash can image through OpenCV, and is also used to determine the trash can position of each trash can according to the color of each trash can;
[0024] Furthermore, the motor is also used to drive the robotic arm to deliver the garbage to a garbage bin that is located at the garbage bin position and is used to receive the corresponding garbage category according to a control command.
[0025] Optionally, the Open CV converts the trash can image in the RGB space into the HSV space, and detects the trash can image in the HSV space according to a preset HSV boundary to obtain a mask;
[0026] The Open CV performs an erosion operation and a Gaussian filter process on the mask in sequence to obtain a denoised mask. The Open CV confirms the outline of the trash can according to the denoised mask and performs a visualization process, and outputs the color of the trash can accordingly.
[0027] Optionally, the PID control logic is set based on parameters including proportion P, integral I and differential D;
[0028] Furthermore, the single chip microcomputer is used to measure the actual moving speed of the Mecanum wheel in real time and compare the preset moving speed and the actual moving speed of the Mecanum wheel based on the PID control logic to obtain a comparison result, and is used to continuously adjust the actual moving speed of the Mecanum wheel through the encoder according to the comparison result until the actual moving speed of the Mecanum wheel reaches the preset moving speed.
[0029] Beneficial effects:
[0030] The present application uses a visual module to identify and classify garbage and a garbage bin, and then, through the cooperation of a single-chip microcomputer and an encoder, continuously drives the Mecanum wheel to move toward the garbage and the garbage bin corresponding to the garbage classification in turn, and drives the robotic arm to pick up and release the garbage during the process. In summary, the present application can quickly and effectively classify and process the garbage, and has a very high flexibility, so that a large amount of garbage sorting work can be completed when the garbage is delivered, thereby meeting the requirements of garbage from production to delivery, transportation, and processing, and having a high level of intelligence, thereby improving production efficiency and saving costs. Therefore, it can solve the problems of poor flexibility and low level of intelligence of existing garbage sorting robots. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the technical solution of the present application, the drawings required for use in the embodiments are briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0032] Figure 1 This is a schematic diagram of the structure of an intelligent garbage sorting vehicle based on Raspberry Pi in an embodiment of the present application;
[0033] Figure 2 A garbage perspective image, a garbage bin image, or a garbage process image including a garbage target location output by the garbage detection model in the embodiment of the present application;
[0034] Figure 3 The garbage detection information output by the garbage detection model in the embodiment of the present application;
[0035] Figure 4 This is an original schematic diagram of an object to be detected for color determination based on Open CV in an embodiment of the present application;
[0036] Figure 5 This is a schematic diagram of adjusting six slide rails in an embodiment of the present application;
[0037] Figure 6 A schematic diagram of a mask of an object to be detected for color determination based on Open CV in an embodiment of the present application;
[0038] Figure 7 This is a schematic diagram of the motion principle of the Mecanum wheel in the embodiment of the present application;
[0039] Figure 8 This is a schematic diagram of the PID control logic in an embodiment of the present application;
[0040] Fig. 9 A distant view image of garbage captured by a camera in an embodiment of the present application;
[0041] Fig.10The image of the trash can captured by the camera in the embodiment of the present application;
[0042] In the figure, 1- vision module; 11- camera; 12- Raspberry Pi
[0043] 2-bottom layer module; 21-Mecanum wheel; 22-single chip microcomputer; 23-encoder; 24-yaw sensor; 3-grasping module; 31-robotic arm; 32-motor. DETAILED DESCRIPTION
[0044] The following embodiments are described in detail, and examples thereof are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following embodiments do not represent all implementations consistent with the present application. They are only examples of systems and methods consistent with some aspects of the present application as detailed in the claims.
[0045] This application provides a smart garbage sorting car based on Raspberry Pi, such as Figure 1 As shown, Figure 1 This is a structural diagram of an intelligent garbage sorting cart based on Raspberry Pi in an embodiment of the present application. The cart includes: a visual module 1, a bottom module 2 and a grasping module 3 which are connected in sequence.
[0046] The visual module 1 includes: a camera 11 and a Raspberry Pi 12 .
[0047] Specifically, the camera 11 and the Raspberry Pi 12 jointly perform two processes, including garbage detection and target tracking.
[0048] For garbage detection, garbage images are taken in advance and labeled to create a training set. The garbage detection model is trained using the YOLO3 algorithm. The garbage monitoring model can be used to detect whether there is garbage in the image and to determine the location of the garbage accordingly. For target tracking, the target garbage in the field of view is located, and the coordinates in the lens are determined. The posture of the car is adjusted according to the comparison between the coordinates and the coordinates of the center of the lens for tracking.
[0049] The camera 11 is used to obtain the long-range image of the garbage and the image of the garbage bin, and is also used to continuously obtain the process image of the garbage when the Mecanum wheel moves toward the target location of the garbage.
[0050] Specifically, the camera 11 acquires each frame of the garbage perspective image or the garbage can image in front of the robot in real time and transmits each frame of the garbage perspective image or the garbage can image to the Raspberry Pi 12 .
[0051] The Raspberry Pi 12 stores a target detection model for detecting garbage that is trained based on YOLO3, and the target detection model is set with a detection threshold.
[0052] Raspberry Pi 12 is used to input a plurality of garbage perspective images into the target detection model. The target detection model determines the garbage perspective images containing the garbage target positions and correspondingly determines the garbage detection information including the confidence level, the rectangular box where the garbage is located, the detection number and the garbage category and the corresponding garbage target positions in the garbage perspective images containing the garbage target positions whose confidence level is greater than the detection threshold.
[0053] Specifically, the object detection model can determine whether there is garbage in front of the car and calculate the location of the garbage in the image. Figure 2 and Figure 3 As shown, Figure 2 The garbage distant view image, garbage bin image or garbage process image containing the garbage target location output by the garbage detection model in the embodiment of the present application is Figure 3 It is the garbage detection information output by the garbage detection model in the embodiment of the present application.
[0054] Probability represents the confidence of the inferred result. The confidence is inferred by detecting the threshold threshold. If probability>threshold, it is determined that the inference is correct and there is indeed garbage there.
[0055] xmin, ymin, xmax, and ymax represent the rectangular box information of the garbage location in the image.
[0056] id indicates the detection number, and class indicates the garbage category.
[0057] For target tracking, the Raspberry Pi 12 is also used to input a number of garbage process images into the target detection model according to the time sequence. The target detection model determines the garbage process image containing the garbage target position and correspondingly determines the garbage detection information including the confidence level, the rectangular box where the garbage is located, the detection number and the garbage category in the garbage process image containing the garbage target position whose confidence level is greater than the detection threshold.
[0058] The Raspberry Pi 12 is also provided with OpenCV, and the Raspberry Pi 12 determines the color of each trash can according to the trash can image through OpenCV, and is also used to determine the trash can position of each trash can according to the color of each trash can.
[0059] Among them, Open CV converts the trash can image in the RGB space to the HSV space, and detects the trash can image in the HSV space according to the preset HSV boundary to obtain a mask.
[0060] Open CV performs corrosion operations and Gaussian filtering on the mask in sequence to obtain a denoised mask. OpenCV confirms the outline of the trash can based on the denoised mask and performs visualization, and outputs the color of the trash can accordingly.
[0061] Specifically, in color detection and tracking, two levels are used to design how to identify garbage dumping areas.
[0062] In the color detection stage, OpenCV is used to perform single color detection to identify the corresponding garbage dumping area. Color tracking is used to track the garbage dumping area.
[0063] Color recognition of garbage sorting areas
[0064] Since the recyclable, kitchen waste, hazardous, and other garbage dumping areas are calibrated with blue, green, red, black and gray colors respectively, we use OpenCV to perform single color detection to identify garbage dumping areas of different colors. Each frame of the image is stored in RGB by default, so color detection is performed through the following four steps:
[0065] Step 1: Read the frame image and convert it to HSV space:
[0066] like Figure 4 As shown, Figure 4 This is the original schematic diagram of the object to be detected based on Open CV for color determination in the embodiment of the present application. Each frame of image read by the camera 11 is in RGB space. Since the image acquired in the natural environment is easily affected by natural lighting, occlusion and shadow, that is, it is sensitive to brightness, and the three components of the RGB space are closely related to brightness, that is, as long as the brightness changes, the three components will change accordingly. There is no more intuitive way to express it. To address this problem, we convert it to HSV space, Hue (hue), Saturation (saturation, color purity), to facilitate color comparison.
[0067] Step 2: Set HSV boundaries to detect specific colors and generate masks:
[0068] You need to set the target HSV value, and then set a suitable range to eliminate other values. Figure 5 As shown, Figure 5 The following is a schematic diagram of the adjustment of the six slide rails in the embodiment of the present application. To achieve the above purpose, six track bars are created to control the lower and upper limits of HSV accordingly. The program will read the values from the track bar and use it to generate a mask, such as Figure 6 As shown, Figure 6The cv::inRange() function only returns a binary mask, in which white pixels (255) represent pixels within the upper and lower limits, and black pixels (0) represent pixels outside the range.
[0069] Step 3: Apply morphological erosion operation to remove noise on the mask:
[0070] Before color segmentation, it is necessary to use corrosion operation and Gaussian filtering in morphological transformation to eliminate noise.
[0071] The erosion operation is for the white part (highlight part), not the black part. Erosion means that the highlight part of the original image is eroded, and the "area is eaten away", and the effect image has a smaller highlight area than the original image.
[0072] Gaussian filtering is to smooth the image, or blur the image. A template (or convolution, mask) is used to scan each pixel in the image, and the weighted average gray value of the pixels in the neighborhood determined by the template is used to replace the value of the central pixel of the template to eliminate noise.
[0073] Step 4: Detect the color area and obtain its concentrated area:
[0074] OpenCV provides a function to find the white contours in the mask. Since the garbage dump area is rectangular. cv::boundingRect returns the rectangular location of the white area in the mask. From this, it can be drawn using cv::rectangle() for visualization.
[0075] When the Mecanum wheel 21 moves toward the trash can, there is a color tracking process, which is similar to target tracking. The vehicle body is continuously moved so that the "geometric center" of the monochrome plate in the corresponding garbage storage area is located in the target area. The principle is applied to the principle of determining the geometric center, which will not be repeated here.
[0076] The bottom module 2 includes: a trolley chassis provided with a Mecanum wheel 21 , a single chip computer 22 , an encoder 23 and a yaw sensor 24 .
[0077] Specifically, Figure 7 As shown, Figure 7 This is a schematic diagram of the movement principle of the Mecanum wheel in the embodiment of the present application. The moving direction of the Mecanum wheel is related to the rotation direction of the wheel. When all four wheels of the Mecanum wheel turn forward, the trolley generates a force to move forward, and then moves forward; when the rotation direction of the wheels on one diagonal line all turns forward, and the other direction all turns backward, the trolley will generate a force to move in the left and right directions, and thus move left and right.
[0078] The single chip computer 22 is provided with a center determination principle for confirming whether the rectangular frame where the garbage is located is at the geometric center of the garbage perspective image or at the geometric center of the garbage process image.
[0079] In the stage of processing the garbage perspective image, the single chip microcomputer 22 is used to determine the initial moving direction to the garbage target position based on the center determination principle and according to the garbage detection information from the garbage perspective image, and to drive the encoder 23 to determine the set moving speed and the initial rotation direction of the Mecanum wheel according to the initial moving direction, and is also used to drive the Mecanum wheel to move to the garbage target position according to the set moving speed and the initial rotation direction based on the PID control logic, and is also used to send a control command when the garbage target position is reached.
[0080] In the garbage process image processing stage, the single chip microcomputer 22 is used to drive the yaw sensor 24 to continuously determine the real-time yaw angle of the trolley chassis corresponding to the garbage target position according to the timing, and is also used to continuously correct the initial moving direction based on the center determination principle and according to the garbage detection information and the real-time yaw angle derived from the garbage process image to obtain the real-time moving direction, and is also used to drive the encoder 23 to determine the set moving speed and real-time rotation direction of the Mecanum wheel according to the initial moving direction and the real-time moving direction, and is also used to drive the Mecanum wheel to move to the garbage target position according to the set moving speed and real-time rotation direction based on the PID control logic, and send a control command when the garbage target position is reached.
[0081] Among them, Figure 8 As shown, Figure 8 This is a schematic diagram of the PID control logic in an embodiment of the present application. The PID control logic is set based on parameters including proportion P, integration I and differentiation D.
[0082] The number of pulses (pulses) output by the encoder within (50ms) is obtained by using a non-contact incremental encoder, and the movement speed of the four wheels of the vehicle carrier is calculated by the known number of pulses per wheel revolution (cycle_Pulse) and the wheel diameter (diameter) through the formula moto_vel = (π*diameter*(pulses / cycle_Pulses)) / dt.
[0083] The single chip microcomputer 22 compares the actual speed with the set speed and adjusts the three parameters of P, I and D to make the actual speed close to the target speed, thereby realizing the speed regulation function.
[0084] Furthermore, the single chip computer 22 is used to measure the actual moving speed of the Mecanum wheel in real time and compare the preset moving speed and the actual moving speed of the Mecanum wheel based on the PID control logic to obtain a comparison result, and to continuously adjust the actual moving speed of the Mecanum wheel through the encoder 23 according to the comparison result until the actual moving speed of the Mecanum wheel reaches the preset moving speed.
[0085] The grasping module 3 includes a mechanical arm 31 and a motor 32 .
[0086] The motor 32 is used to drive the robot arm 31 to grab garbage at the garbage target position according to the control command and to drive the robot arm 31 to deliver the garbage to a garbage bin that is located at the garbage bin position and is used to receive the corresponding garbage category.
[0087] In some embodiments, the single chip microcomputer 22 is STM32, and the yaw sensor 24 is MPU6050.
[0088] Working principle:
[0089] (I) The process of moving to the garbage target location:
[0090] like Fig. 9 As shown, Fig. 9 For the garbage perspective image captured by the camera in the embodiment of the present application, the camera 11 captures and transmits a number of garbage perspective images, the Raspberry Pi 12 inputs a number of garbage perspective images into the target detection model, and the target detection model outputs a garbage perspective picture containing garbage and outputs garbage detection information accordingly.
[0091] The single chip microcomputer 22 confirms the initial moving direction to the garbage target location based on the garbage perspective picture including the garbage target location and the corresponding garbage detection information. The single chip microcomputer 22 drives the encoder 23 to determine the set moving speed and the initial wheel rotation direction of the Mecanum wheel according to the initial moving direction. The single chip microcomputer 22 drives the Mecanum wheel 21 to move according to the set moving speed and the initial wheel rotation direction.
[0092] In the process of the Mecanum wheel 21 continuously moving toward the garbage target location, since the Mecanum wheel 21 cannot directly reach the set moving speed at the initial stage of operation, it is necessary to regulate based on the PID control logic until the actual moving speed reaches the preset moving speed.
[0093] As the Mecanum wheel 21 continuously moves toward the garbage target location, the camera 11 continuously acquires and transmits a number of garbage process images, and the Raspberry Pi 12 inputs a number of garbage process images into the target detection model according to the time sequence, and the target detection model determines the garbage detection information.
[0094] The single chip microcomputer 22 drives the yaw sensor 24 to continuously determine the real-time yaw angle of the trolley chassis corresponding to the garbage target position according to the timing, and continuously corrects the initial moving direction according to the garbage detection information and the real-time yaw angle from the garbage process image to obtain the real-time moving direction.
[0095] The single chip microcomputer 22 drives the encoder 23 to determine the set moving speed and real-time rotation direction of the Mecanum wheel according to the actual moving direction, and the single chip microcomputer 22 drives the Mecanum wheel 21 to move according to the set moving speed and real-time rotation direction.
[0096] (II) Garbage collection process:
[0097] When the target garbage position is reached, the single chip microcomputer 22 sends a control command for picking up the garbage to the motor 32, and the motor 32 drives the mechanical arm 31 to pick up the garbage.
[0098] (III) The process of moving to the trash can:
[0099] like Fig.10 As shown, Fig.10 For the trash can image captured by the camera in the embodiment of the present application, the camera 11 captures and transmits several trash can images, and the Raspberry Pi 12 determines the color of the trash can based on open CV, and determines the trash can position of the throwable trash can corresponding to the trash category.
[0100] The single chip microcomputer 22 drives the Mecanum wheel to move to the trash bin position according to the set moving speed and the initial wheel rotation direction based on the PID control logic.
[0101] When the Mecanum wheel 21 is continuously moving toward the trash can, the single chip microcomputer 22 can control the Mecanum wheel 21 to follow the trash can to adjust the moving route, and the process can be compared to the adjustment process in "(I) Moving process toward the trash target location".
[0102] (IV) The process of throwing garbage:
[0103] When the trash can is reached, the single chip microcomputer 22 sends a control command for throwing trash to the motor 32, and the motor 32 drives the mechanical arm 31 to throw the trash to the trash can.
[0104] The above detailed description of the embodiments of the present application is only a preferred embodiment of the present application and cannot be considered to limit the scope of implementation of the present application. All equivalent changes and improvements made within the scope of the present application should still fall within the scope of the patent coverage of the present application.
Claims
1. An intelligent garbage sorting trolley based on Raspberry Pi, characterized in that: include: The visual module, the underlying module and the grasping module are connected in sequence; The visual module includes: a camera for acquiring a long-range image of garbage and an image of a garbage bin, and a Raspberry Pi for determining a target location of garbage and a category of garbage based on the long-range image of garbage, and for determining a location of the garbage bin based on the image of the garbage bin; The bottom layer module includes: a trolley chassis that moves via Mecanum wheels, and a single-chip microcomputer and an encoder arranged on the trolley chassis; The single chip microcomputer is used to drive the encoder to determine the set moving speed and the initial rotation direction of the Mecanum wheel according to the garbage target position, and is also used to drive the Mecanum wheel to move to the garbage target position and the garbage bin position corresponding to the garbage category according to the set moving speed and the initial rotation direction based on the PID control logic, and is also used to send a control command when the garbage target position is reached; The grabbing module includes: a mechanical arm, and a motor for driving the mechanical arm to grab garbage at a garbage target position according to a control command and for driving the mechanical arm to deliver the garbage to a garbage bin at a garbage bin position; The Raspberry Pi stores a target detection model for detecting garbage obtained by training based on YOLO3, and the target detection model is set with a detection threshold; And, the Raspberry Pi is further used to input a plurality of garbage perspective images into the target detection model, the target detection model determines the garbage perspective images containing the garbage target positions and correspondingly determines the garbage detection information including the confidence level, the rectangular box where the garbage is located, the detection number and the garbage category and the corresponding garbage target positions in the garbage perspective images containing the garbage target positions whose confidence level is greater than the detection threshold; The camera is also used to continuously acquire garbage process images during the process of the Mecanum wheel moving toward the garbage target location; And, the Raspberry Pi is further used to input a plurality of garbage process images to the target detection model according to the time sequence, and the target detection model determines the garbage process image containing the garbage target position and correspondingly determines the garbage detection information including the confidence level, the rectangular box where the garbage is located, the detection number and the garbage category in the garbage process image containing the garbage target position, which has a confidence level greater than the detection threshold; And, the bottom layer module also includes: a yaw sensor; Furthermore, the single chip microcomputer is further used to drive the yaw sensor to continuously determine the real-time yaw angle of the trolley chassis corresponding to the garbage target position according to the time sequence, and is further used to drive the encoder to determine the set moving speed and real-time rotation direction of the Mecanum wheel according to the garbage detection information from the garbage vision image and the garbage detection information from the garbage process image and the real-time yaw angle, and is further used to drive the Mecanum wheel to move to the garbage target position according to the set moving speed and real-time rotation direction based on the PID control logic, and send a control command when the garbage target position is reached; The single chip microcomputer is provided with a center determination principle for confirming whether the rectangular frame where the garbage is located is at the geometric center of the garbage perspective image or at the geometric center of the garbage process image; Furthermore, the single chip microcomputer is further used to determine the initial moving direction to the garbage target position based on the center determination principle and according to the garbage detection information from the garbage distant view image, and is further used to continuously correct the initial moving direction based on the center determination principle and according to the garbage detection information from the garbage process image and the real-time yaw angle to obtain the real-time moving direction; Furthermore, the single chip microcomputer is used to drive the yaw sensor to continuously determine the real-time yaw angle of the trolley chassis corresponding to the garbage target position according to the time sequence, and is also used to drive the encoder to determine the set moving speed and real-time rotation direction of the Mecanum wheel according to the initial moving direction and the real-time moving direction; The Raspberry Pi is provided with OpenCV; The Raspberry Pi determines the color of each trash can according to the trash can image through OpenCV, and is also used to determine the trash can position of each trash can according to the color of each trash can; Furthermore, the motor is used to drive the robotic arm to deliver the garbage to a garbage bin located at the garbage bin position and used to receive the corresponding garbage category according to a control command.
2. The intelligent garbage sorting vehicle based on Raspberry Pi according to claim 1 is characterized in that: The single chip microcomputer is STM32; And, the yaw sensor is MPU6050.
3. The intelligent garbage sorting vehicle based on Raspberry Pi according to claim 1 is characterized in that: The Open CV converts the trash can image in the RGB space into the HSV space, and detects the trash can image in the HSV space according to a preset HSV boundary to obtain a mask; The Open CV performs an erosion operation and a Gaussian filter process on the mask in sequence to obtain a denoised mask. The Open CV confirms the outline of the trash can according to the denoised mask and performs a visualization process, and outputs the color of the trash can accordingly.
4. The intelligent garbage sorting vehicle based on Raspberry Pi according to claim 1 is characterized in that: The PID control logic is set based on parameters including proportional P, integral I and differential D; Furthermore, the single chip microcomputer is used to measure the actual moving speed of the Mecanum wheel in real time and compare the preset moving speed and the actual moving speed of the Mecanum wheel based on the PID control logic to obtain a comparison result, and is used to continuously adjust the actual moving speed of the Mecanum wheel through the encoder according to the comparison result until the actual moving speed of the Mecanum wheel reaches the preset moving speed.
Citation Information
Patent Citations
Intelligent garbage recovery system
CN106081408A
Garbage classifying and sorting method, system and device based on machine vision and medium
CN115447924A