Breeding house manure cleaning robot based on laser radar sensor and control method thereof

By using a pigsty cleaning robot based on lidar sensors and visual image recognition, the problems of high cost and untimely manual manure cleaning have been solved, achieving efficient and automated pigsty manure cleaning and ensuring the healthy growth of pigs.

CN120949760APending Publication Date: 2025-11-14GUANGDONG MODERN AGRI EQUIP RES INST +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510903700.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Current methods of cleaning manure in pigsties mainly rely on manual labor, which leads to high costs or untimely cleaning, and cannot effectively control the spread of pathogens in pigsties.

Method used

A pig manure cleaning robot based on lidar sensors, combined with path planning and visual image recognition technology, is used to automatically identify and clean pig manure. The method includes system self-inspection, path planning, lidar sensor and visual image judgment of pig manure.

Benefits of technology

It has achieved efficient and automated manure removal in pigsties, reducing labor costs, improving manure removal efficiency, and reducing the risk of pigs contracting diseases.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120949760A_ABST
    Figure CN120949760A_ABST
Patent Text Reader

Abstract

The invention relates to a breeding house manure cleaning robot based on a laser radar sensor and a control method thereof, and the method comprises the following steps: turning on a robot power supply, and enabling the robot to enter a standby state; the robot is controlled to carry out system self-inspection, alarm reminding is carried out on abnormal hardware equipment, and initialization is carried out; a hog house map is loaded, the hog house map is a pre-established map containing static obstacles in the hog house, and the starting working position and the stopping working position of the robot are marked in the hog house map; performing path planning through a classical path planning algorithm to obtain a running path; and the robot is controlled to move along the running path, whether pig manure exists or not is judged based on the laser radar sensor and the visual image in the moving process, and pig manure cleaning operation is conducted when the pig manure exists. The pig manure in the pig house is judged through the combination of the laser radar sensor and the visual image, the pig manure pig house can be accurately found and cleaned, the manure cleaning time can be greatly saved, and the manure cleaning efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of intelligent pigsty manure removal, and in particular to a pigsty manure removal robot based on a lidar sensor and its control method. Background Technology

[0002] Pig feces contain a large number of pathogens such as bacteria, viruses, and parasite eggs. If not cleaned promptly, these pathogens will multiply and spread rapidly in the pigsty. For example, common bacteria such as E. coli and Salmonella can proliferate rapidly in suitable environments, easily causing pigs to contract diseases such as diarrhea and enteritis. Timely removal of feces can effectively reduce the number of pathogens in the pigsty, reduce the chances of pigs coming into contact with and becoming infected with diseases, and thus ensure the healthy growth of pigs.

[0003] Current methods of manure removal often require manual labor. The problem with this method is that manual removal of pig manure is typically done periodically. If the cycle is short, the labor costs are high; however, if the cycle is long, timely removal of pig manure becomes impossible.

[0004] Therefore, if manure removal robots can be installed in pigsties, the efficiency of manure removal can be greatly improved, saving costs. Summary of the Invention

[0005] The purpose of this invention is to at least address one of the shortcomings of the prior art by providing a livestock shed manure cleaning robot based on a lidar sensor and its control method.

[0006] To achieve the above objectives, the present invention adopts the following technical solution: Specifically, a control method for a livestock shed manure cleaning robot based on lidar sensors is proposed, including the following: Turn on the robot's power to put it into standby mode; The robot is controlled to perform a system self-check, issue alarms for abnormal hardware devices, and initialize the system after the self-check finds no abnormalities. Load the pigsty map, which is a pre-built map containing static obstacles in the pigsty, and mark the robot's starting and ending working positions in the pigsty map; The operation path is obtained by path planning based on the pigsty map, the starting work position, and the ending work position. The robot is controlled to move along the running path, and during the movement, it determines whether there is pig manure based on lidar sensors and visual images. If pig manure is present, it performs a pig manure cleaning operation.

[0007] Furthermore, specifically, the robot is controlled to perform system self-checks and issue alarms for abnormal hardware devices, including... Control the robot to perform self-check on internal hardware devices. The internal hardware devices include the operating conditions of motors, the zero degrees of sensors, and whether the communication lines are unobstructed. In case of abnormalities, give an alarm to inform the operator to perform maintenance and adjustment.

[0008] Furthermore, specifically, perform path planning based on the pigsty map, the starting working position, and the ending working position to obtain the running path, including: Abstract the pigsty map into a weighted directed graph G=(V, E), where: The node set V represents the passable positions in the pigsty, the edge set E represents the feasible paths between nodes, and the weight is the moving cost, and the moving cost includes distance and time. The starting working position is s, and the ending working position is t; Define the distance array d[v] to represent the shortest distance from s to each node v. Initially, d[s]=0, and for other d[v]=∞; Define the predecessor array π[v] to record the previous node of v in the path. Initially, π[v] is None. Define the priority queue Q to represent the nodes to be processed, arranged in ascending order of d[v]. Initially, Q={s}; Perform the following iterative process: Take out the current node u with the minimum distance from Q, and perform the following operations on all its neighbors v: For each neighbor v of u, check whether the path can be shortened through u, that is, judge whether there is the following situation: If d[u]+w(u,v)<d[v], then update d[v] and π[v]. Add v to Q; The termination condition of the above iterative process is: When Q is empty or t is processed, that is, t is output from Q, the iteration ends. At this time, d[t] is the shortest path length; Trace back the predecessor nodes from t to obtain the complete path, that is, the running path: path=[t,π[t],π[π[t]],…,s]path=[t,π[t],π[π[t]],…,s].

[0009] Furthermore, specifically, judge whether there is pig manure based on the lidar sensor and the visual image, including: Obtain the position information of the robot on the running path, obtain the distance data measured by the lidar sensor from the ground based on the position information, subtract the height value of the pre-established ground model at the position information from the distance data and take the absolute value to obtain the first value, and judge whether the first value is greater than the first threshold. If it is greater than the first value, then make the following judgment: A visual image is acquired and image recognition is performed to determine whether pig manure exists. If the image recognition result indicates that pig manure exists, the location information is determined to contain pig manure. If the image recognition result indicates that pig manure does not exist, the location information is marked as an abnormal location.

[0010] Furthermore, the method also includes, After the robot finishes moving along its path, it outputs all abnormal locations and informs staff to check these locations.

[0011] Furthermore, specifically, the pre-built ground model includes, When the pigsty is clean and free of pigs, the robot is controlled to run along the running path once and the scanning data of the LiDAR sensor at different positions on the running path is recorded. Based on the scanning data, a pre-established ground model is obtained by fitting. The height value of the LiDAR sensor above the standard pigsty ground can be read at any position on the running path through the pre-established ground model.

[0012] Furthermore, specifically, acquiring visual images and performing image recognition to determine the presence of pig manure includes, Acquire the visual images captured by the robot; The visual image is preprocessed to obtain a denoised, normalized, and grayscaled image to be detected; The feature extraction results are obtained by extracting color features, texture features, and shape features from the image to be detected. The feature extraction results are input into a pre-trained SVM model, and the presence of pig manure is determined by the output of the pre-trained SVM model.

[0013] Furthermore, specifically, the method also includes executing the following obstacle avoidance strategy while the robot moves along the running path; The robot obtains the positive distance between itself and objects in its direction of travel in real time. When the positive distance is less than a second threshold, a local obstacle avoidance path is generated based on the Dynamic Window Method (DWA) to avoid obstacles.

[0014] This invention also proposes a livestock shed manure cleaning robot based on lidar sensors, comprising the following: The power module is used to control the power supply of the robot, enabling it to enter or exit standby mode. The self-test initialization module is used to control the robot to perform system self-tests, provide alarms for abnormal hardware devices, and perform initialization after the self-test is completed without any abnormalities. The map loading module is used to load a pigsty map, which is a pre-built map containing static obstacles in the pigsty, and the starting and ending working positions of the robot are marked in the pigsty map. The path planning module is used to plan the running path based on the pigsty map, the starting work position, and the ending work position using the classic path planning algorithm. The pig manure cleaning module is used to control the robot to move along the running path, and to determine whether there is pig manure based on the visual images collected by the lidar sensor and vision camera during the movement. If pig manure is present, the module will perform a pig manure cleaning operation.

[0015] The beneficial effects of this invention are as follows: This invention proposes a pigsty manure removal robot based on a lidar sensor and its control method. First, after the robot is powered on, it performs a self-check to ensure the hardware is in good working order. Then, it loads a map of the target pigsty and performs path planning to obtain the operating path. As the robot travels along the path, it uses the lidar sensor and visual images to determine the presence of pig manure. If pig manure is present, it performs a cleaning operation. This invention, by combining lidar sensors and visual images for pig manure detection, can accurately locate and clean pigsties with manure, significantly saving cleaning time and improving cleaning efficiency. Attached Figure Description

[0016] The above and other features of this disclosure will become more apparent from the detailed description of the embodiments illustrated in conjunction with the accompanying drawings. In the accompanying drawings, the same reference numerals denote the same or similar elements. Obviously, the drawings described below are merely some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained from these drawings without any creative effort. In the drawings: Figure 1 The flowchart shown is a control method for a livestock shed manure cleaning robot based on a lidar sensor according to the present invention. Detailed Implementation

[0017] The following will provide a clear and complete description of the concept, specific structure, and technical effects of the present invention in conjunction with embodiments and accompanying drawings, so as to fully understand the purpose, solution, and effects of the present invention. It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. The same reference numerals used throughout the accompanying drawings indicate the same or similar parts.

[0018] Example 1, referring to Figure 1 This invention proposes a control method for a livestock shed manure cleaning robot based on a lidar sensor, comprising the following: Step 110: Turn on the robot's power to put it into standby mode; Step 120: Control the robot to perform a system self-check, issue alarms for abnormal hardware devices, and initialize after the self-check is normal; Step 130: Load the pigsty map. The pigsty map is a pre-built map containing static obstacles in the pigsty, and the robot's starting and ending working positions are marked on the pigsty map. Step 140: Based on the pigsty map, the starting work position, and the ending work position, a path is planned to obtain the running path; Step 150: Control the robot to move along the running path, and determine whether there is pig manure based on the lidar sensor and visual image during the movement. If there is pig manure, perform the pig manure cleaning operation.

[0019] In addition, the procedure for cleaning pig manure is as follows. The robot autonomously moves along a pre-planned path to the pigpen area that needs cleaning, based on a preset cleaning plan or received operating instructions. During the movement, the robot uses sensors to perceive its surrounding environment in real time and avoid obstacles such as pigs, feed troughs, and waterers.

[0020] Scraper descends and adheres to the ground Once the robot reaches the designated position, the scraper mechanism is slowly lowered, ensuring the bottom surface of the scraper is in close contact with the pigsty floor to effectively remove manure. The descent height of the scraper can usually be adjusted according to the actual conditions of the pigsty floor to accommodate different levels of flatness and manure thickness.

[0021] Start cleaning up the feces The robot performs the cleaning action according to the planned path, pushing the feces to the designated collection area. During the cleaning process, the robot automatically adjusts the scraper's speed and force based on the distribution of feces and the cleaning effect to improve cleaning efficiency and quality.

[0022] transporting feces Once the amount of feces collected in the area reaches a certain level, the robot transmits the information to the conveying system, which then starts the system to transport the feces to the designated feces treatment area.

[0023] Complete cleaning and return to standby area

[0024] Check the cleaning effect After cleaning up feces in one area, the robot uses sensors to inspect the cleaned ground to determine if any feces remain. If a significant amount of feces is found, the robot will clean the area again until the set cleanliness standard is met.

[0025] In the first embodiment of the present invention, after the robot is powered on, it first performs a self-check to ensure that the hardware is in good operating condition. Then, it loads the pigsty map of the target working pigsty and performs path planning to obtain the operation path. During the process of the robot traveling along the operation path, it determines whether there is pig manure based on the lidar sensor and visual images, and performs pig manure cleaning operations when there is pig manure. The present invention combines the lidar sensor and visual images to judge pig manure in the pigsty, can accurately find the pig manure in the pigsty and clean it, can greatly save the manure cleaning time, and improve the manure cleaning efficiency.

[0026] As a preferred embodiment of the present invention, specifically, the robot is controlled to perform a system self-check, and an alarm reminder is given to abnormal hardware devices, including, Controlling the robot to perform self-check on the internal hardware devices. The internal hardware devices include the operation status of the motor, the zero degree of the sensor, and whether the communication line is unobstructed. When there is an abnormality, an alarm is given to inform the operator to perform maintenance and adjustment.

[0027] As a preferred embodiment of the present invention, specifically, path planning is performed based on the pigsty map, the starting working position, and the ending working position to obtain the operation path, including, Abstracting the pigsty map into a weighted directed graph G=(V, E), where: The node set V represents the passable positions in the pigsty, the edge set E represents the feasible paths between nodes, the weight is the movement cost, and the movement cost includes distance and time. The starting working position is s, and the ending working position is t; Define the distance array d[v] to represent the shortest distance from s to each node v. Initially, d[s]=0, and other d[v]=∞, that is ; Define the predecessor array π[v] to represent the previous node of v in the recorded path. Initially, π[v] is None, Define the priority queue Q to represent the nodes to be processed, arranged in ascending order of d[v]. Initially, Q={s}; Perform the following iterative process, Take out the current node u with the smallest distance from Q, and perform the following operations on all its neighbors v: For each neighbor v of u, check whether the path can be shortened through u, that is, judge whether there is the following situation, If d[u]+w(u,v)<d[v], then update d[v] and π[v], Add v to Q; The above iterative process can be represented by the following formula:

[0028]

[0029] Add v to Q.

[0030] The termination condition for the above iterative process is: The iteration ends when Q is empty or t is processed (i.e., t is output from Q). At this time, d[t] is the shortest path length. By tracing the predecessor node from t in reverse, the complete path, i.e., the execution path, is obtained: path=[t,π[t],π[π[t]],…,s] path=[t,π[t],π[π[t]],…,s].

[0031] In this preferred embodiment, an accurate running path can be obtained through the above method.

[0032] In a preferred embodiment of the present invention, specifically, determining the presence of pig manure based on a lidar sensor and visual images includes, The robot acquires its position information along its running path. Based on this position information, it acquires distance data between the robot and the ground measured by a lidar sensor. The difference between this distance data and the height value of the pre-established ground model at the position information is calculated, and the absolute value is taken to obtain a first value. The robot then determines whether this first value is greater than a first threshold. If it is greater than the first value, the following two judgments are made:

[0033] Building a ground model In the absence of pig manure, a robot is run once in the pigsty to record LiDAR scan data at different locations. Based on this data, a model of the pigsty floor is fitted. This model can be a two-dimensional plane or a three-dimensional curved surface, depending on the actual shape of the pigsty floor.

[0034] Real-time height comparison During the manure removal process, the robot acquires real-time LiDAR scan data of its current location and calculates the distance between the LiDAR and the ground. This distance is compared with the pre-stored height value of the ground model at that location. If the actual distance is greater than the height value of the ground model and exceeds a certain threshold (this threshold can be determined based on the typical height of pig manure and the robot's measurement error), then it is determined that there may be pig manure at that location, and the next round of image recognition is performed.

[0035] A visual image is acquired and image recognition is performed to determine whether pig manure exists. If the image recognition result indicates that pig manure exists, the location information is determined to contain pig manure. If the image recognition result indicates that pig manure does not exist, the location information is marked as an abnormal location.

[0036] In this preferred embodiment, the lidar sensor first determines whether there are any abnormally raised areas on the ground (of course, it may be a depression, i.e., a defect in the ground; if it is a depression, the subsequent image recognition result will indicate that there is no pig manure and will mark it as an abnormal location). Then, the visual image recognition result is used for further confirmation. The double judgment method ensures that the pig manure identification result is accurate. Moreover, the lidar sensor has relatively low computing power and can quickly make the first judgment. When an abnormality is detected in the first judgment, image recognition is then performed, which can significantly save manure cleaning time and improve manure cleaning efficiency.

[0037] In a preferred embodiment of the present invention, the method further includes, After the robot finishes moving along its path, it outputs all abnormal locations and informs staff to check these locations.

[0038] In this preferred embodiment, the abnormal locations with ground defects are communicated to the staff for corresponding investigation, ensuring the stability of pig farming in the pigsty.

[0039] In a preferred embodiment of the present invention, specifically, the pre-established ground model includes, In a preferred embodiment of the present invention, specifically, acquiring a visual image and performing image recognition to determine whether pig manure is present includes, Acquire the visual images captured by the robot; The visual image is preprocessed to obtain a denoised, normalized, and grayscaled image to be detected;

[0040] Grayscale processing Converting color images to grayscale images reduces data volume and simplifies subsequent processing. Common grayscale conversion methods include weighted averaging and maximum value conversion.

[0041] Normalization The pixel values ​​of grayscale images are normalized and mapped to the range of [0, 1] or [-1, 1] to improve the training effect and convergence speed of the model.

[0042] Noise Removal Methods such as mean filtering, median filtering, and Gaussian filtering are used to remove noise from images and improve image quality.

[0043] The feature extraction results are obtained by extracting color features, texture features, and shape features from the image to be detected.

[0044] Color characteristics In the HSV color space, the average hue, saturation, and brightness values ​​of an image are calculated as color features. Pig manure typically has a specific color range, and these color features can help distinguish pig manure from other objects.

[0045] Texture features Texture features of an image, such as contrast, correlation, energy, and entropy, are calculated using the gray-level co-occurrence matrix. The texture of pig manure differs from that of other objects such as the ground and feed, and texture features can effectively reflect this difference.

[0046] Shape features The shape information of objects in an image is obtained through edge detection and contour extraction algorithms, and the shape's feature parameters, such as area, perimeter, aspect ratio, and roundness, are calculated. Pig manure is typically irregular in shape, but these shape features can still provide some basis for identification.

[0047] The feature extraction results are input into a pre-trained SVM model, and the presence of pig manure is determined by the output of the pre-trained SVM model.

[0048] In this preferred embodiment, an SVM model is used for pig manure image detection, which can identify pig manure at the image level. The training process of the SVM model is as follows:

[0049] Select kernel function Choosing the right kernel function is crucial for SVM performance. Commonly used kernel functions include linear kernel functions, polynomial kernel functions, radial basis function (RBF) kernel functions, and sigmoid kernel functions. For non-linearly separable data, the RBF kernel function is usually a better choice.

[0050] Determine model parameters Cross-validation is used to determine the penalty parameter C and kernel function parameters (such as the γ parameter of the RBF kernel function) of the SVM model. By performing multiple cross-validations on the training set, the parameter combination that maximizes the model's accuracy on the validation set is selected.

[0051] Training SVM models The extracted feature vectors and corresponding label data are input into the SVM algorithm for training, resulting in a classification model that can distinguish between pig manure and non-pig manure.

[0052] In a preferred embodiment of the present invention, the method further includes executing the following obstacle avoidance strategy while the robot is moving along the running path. The robot obtains the positive distance between itself and objects in its direction of travel in real time. When the positive distance is less than a second threshold, a local obstacle avoidance path is generated based on the Dynamic Window Method (DWA) to avoid obstacles.

[0053] In this preferred embodiment, considering that there may be interference from dynamic obstacles such as pigs during the operation of the robot, the robot compares the positive distance between itself and objects in its direction of travel with a second threshold (safety threshold) during the manure removal process. The positive distance can be collected by installing a lidar sensor to collect the positive distance. When there is a safety risk, a local obstacle avoidance path is generated based on the mature Dynamic Window Method (DWA) to avoid obstacles.

[0054] Example 2: This invention also proposes a livestock shed manure cleaning robot based on a lidar sensor, comprising the following: The power module is used to control the power supply of the robot, enabling it to enter or exit standby mode. The self-test initialization module is used to control the robot to perform system self-tests, provide alarms for abnormal hardware devices, and perform initialization after the self-test is completed without any abnormalities. The map loading module is used to load a pigsty map, which is a pre-built map containing static obstacles in the pigsty, and the starting and ending working positions of the robot are marked in the pigsty map. The path planning module is used to plan the running path based on the pigsty map, the starting work position, and the ending work position using the classic path planning algorithm. The pig manure cleaning module is used to control the robot to move along the running path, and to determine whether there is pig manure based on the visual images collected by the lidar sensor and vision camera during the movement. If pig manure is present, the module will perform a pig manure cleaning operation.

[0055] In this second embodiment, consistent with the control method of the pigsty manure removal robot based on lidar sensors proposed in this invention, the robot first performs a self-check after being powered on to ensure that the hardware is in good operating condition. Then, a map of the target pigsty is loaded, and path planning is performed to obtain the operating path. While the robot travels along the operating path, it determines the presence of pig manure based on lidar sensors and visual images. If pig manure is present, a manure removal operation is performed. This invention, by combining lidar sensors and visual images to determine pig manure in the pigsty, can accurately locate and clean pigsties with manure, significantly saving cleaning time and improving cleaning efficiency.

[0056] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0057] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or system capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc.

[0058] Although the description of the invention has been quite detailed and particularly of several described embodiments, it is not intended to limit it to any of these details or embodiments or any particular embodiment, but should be considered as providing a broad possible interpretation of the claims by referring to the appended claims and taking into account the prior art, thereby effectively covering the intended scope of the invention. Furthermore, the invention has been described above with respect to embodiments foreseeable by the inventors in order to provide a useful description, and non-substantial modifications to the invention that have not yet been foreseen may still represent equivalent modifications.

[0059] The above description is merely a preferred embodiment of the present invention. The present invention is not limited to the above-described embodiments. Any embodiment that achieves the technical effects of the present invention using the same means should fall within the protection scope of the present invention. Within the protection scope of the present invention, various modifications and variations can be made to the technical solutions and / or implementation methods.

Claims

1. A control method for a livestock shed manure cleaning robot based on a lidar sensor, characterized in that, The following are included: Turn on the robot power supply to make it enter the standby state; Control the robot to perform a system self-check, give an alarm reminder for abnormal hardware devices, and perform initialization after the self-check is normal; Load the pigsty map, which is a pre-established map containing static obstacles in the pigsty, and mark the starting working position and the ending working position of the robot on the pigsty map; Perform path planning based on the pigsty map, the starting working position, and the ending working position to obtain the running path; Control the robot to move along the running path, and during the movement, judge whether there is pig manure based on the lidar sensor and the visual image, and perform pig manure cleaning operation when there is pig manure.

2. The control method for a livestock shed manure removal robot based on a lidar sensor according to claim 1, characterized in that, Specifically, controlling the robot to perform a system self-check and giving an alarm reminder for abnormal hardware devices includes: Control the robot to perform a self-check on the internal hardware devices. The internal hardware devices include the operation of the motor, the zero degree of the sensor, and whether the communication line is unobstructed. When there is an abnormality, give an alarm to inform the operator to perform maintenance and adjustment.

3. The control method for a livestock shed manure removal robot based on a lidar sensor according to claim 1, characterized in that, Specifically, performing path planning based on the pigsty map, the starting working position, and the ending working position to obtain the running path includes: Abstract the pigsty map into a weighted directed graph G=(V, E), where: The node set V represents the passable positions in the pigsty, the edge set E represents the feasible paths between nodes, the weight is the moving cost, and the moving cost includes distance and time. The starting working position is s, and the ending working position is t; Define the distance array d[v] to represent the shortest distance from s to each node v. Initially, d[s]=0, and other d[v]=∞; Define the predecessor array π[v] to represent the previous node of v in the recorded path. Initially, π[v] is None; Define the priority queue Q to represent the nodes to be processed, arranged in ascending order of d[v]. Initially, Q={s}; Perform the following iterative process: Take out the current node u with the smallest distance from Q, and perform the following operations on all its neighbors v: For each neighbor v of u, check whether the path can be shortened through u, that is, judge whether there is the following situation: If d[u]+w(u,v)<d[v], then update d[v] and π[v]; Add v to Q; The termination condition of the above iterative process is: When Q is empty or t is processed (i.e., t is output from Q), the iteration ends. At this time, d[t] is the shortest path length; Trace back the predecessor nodes from t to obtain the complete path, that is, the running path: path=[t,π[t],π[π[t]],…,s]path=[t,π[t],π[π[t]],…,s].

4. The control method for a livestock shed manure removal robot based on a lidar sensor according to claim 1, characterized in that, Specifically, judging whether there is pig manure based on the lidar sensor and the visual image includes: Obtain the position information of the robot on the running path, obtain the distance data measured by the lidar sensor from the ground based on the position information, take the absolute value of the difference between the distance data and the height value of the pre-established ground model at the position information to obtain the first value, and judge whether the first value is greater than the first threshold. If it is greater than the first value, then perform the following judgment: A visual image is acquired and image recognition is performed to determine whether pig manure exists. If the image recognition result indicates that pig manure exists, the location information is determined to contain pig manure. If the image recognition result indicates that pig manure does not exist, the location information is marked as an abnormal location.

5. The control method for a livestock shed manure removal robot based on a lidar sensor according to claim 4, characterized in that, The method also includes, After the robot finishes moving along the running path, it outputs all abnormal locations and informs the staff to check the abnormal locations.

6. The control method for the livestock shed manure removal robot based on a lidar sensor according to claim 4, characterized in that, Specifically, the pre-built ground model includes, When the pigsty is clean and free of pigs, the robot is controlled to run along the running path once and the scanning data of the LiDAR sensor at different positions on the running path is recorded. Based on the scanning data, a pre-established ground model is obtained by fitting. The height value of the LiDAR sensor above the standard pigsty ground can be read at any position on the running path through the pre-established ground model.

7. The control method for a livestock shed manure removal robot based on a lidar sensor according to claim 4, characterized in that, Specifically, acquiring visual images and performing image recognition to determine the presence of pig manure includes, Acquire the visual images captured by the robot; The visual image is preprocessed to obtain a denoised, normalized, and grayscaled image to be detected; The feature extraction results are obtained by extracting color features, texture features, and shape features from the image to be detected. The feature extraction results are input into a pre-trained SVM model, and the presence of pig manure is determined by the output of the pre-trained SVM model.

8. The control method for a livestock shed manure removal robot based on a lidar sensor according to claim 1, characterized in that, Specifically, the method also includes executing the following obstacle avoidance strategy while the robot moves along the running path; The robot obtains the positive distance between itself and objects in its direction of travel in real time. When the positive distance is less than a second threshold, a local obstacle avoidance path is generated based on the Dynamic Window Method (DWA) to avoid obstacles.

9. A livestock shed manure cleaning robot based on a lidar sensor, characterized in that, Including the following: The power module is used to control the power supply of the robot, enabling it to enter or exit standby mode. The self-test initialization module is used to control the robot to perform system self-tests, provide alarms for abnormal hardware devices, and perform initialization after the self-test is completed without any abnormalities. The map loading module is used to load a pigsty map, which is a pre-built map containing static obstacles in the pigsty, and the starting and ending working positions of the robot are marked in the pigsty map. The path planning module is used to plan the running path based on the pigsty map, the starting work position, and the ending work position using the classic path planning algorithm. The pig manure cleaning module is used to control the robot to move along the running path, and to determine whether there is pig manure based on the visual images collected by the lidar sensor and vision camera during the movement. If pig manure is present, the module will perform a pig manure cleaning operation.