Covering path planning method, device and storage medium for manure cleaning robot
The adaptive manure cleaning route is generated through raster map processing, which solves the problems of insufficient route fixation and environmental adaptability of the manure cleaning robot in the existing technology, and realizes efficient and safe manure cleaning operation under the pig house floor.
Patent Information
- Application Number
- CN202110961395.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-20
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-08-20
AI Technical Summary
Existing manure cleaning robot technology requires manual deployment of fixed routes and cannot adapt to changes in the pig house environment, resulting in low automation, low production efficiency, and threats to staff safety.
By obtaining the grid map under the pig house board, performing binarization processing, expansion processing and distance conversion, generating a cost map, detecting straight line collection and determining the manure removal route, realizing adaptive coverage path planning and avoiding manual deployment of routes.
It improves the intelligence of the manure cleaning robot, adapts to different pig house environments and environmental changes, enhances robustness, and improves work efficiency and safety.
Smart Images

Figure CN113721611B
Abstract
Description
Technical Field
[0001] The present invention generally relates to the field of intelligent farming technology. More specifically, the present invention relates to a covering path planning method, device and storage medium for a manure cleaning robot. Background Art
[0002] In the pig house in the pig farming field, the pigs live on the manure-leaking board in the pig house. The feces fall through the mesh holes on the manure-leaking board to the bottom of the manure-leaking board (hereinafter referred to as the bottom of the board). Therefore, the pig feces will accumulate under the board. In order to keep the pig house clean and sanitary and reduce biological pollution, the manure cleaning of the pig house has become an indispensable part of the pig farming field. At present, the manure cleaning work under the board of the pig farm mainly relies on manpower, such as manually flushing the bottom of the board with water; however, due to the small space under the board, it is not conducive to manual operation, the manure cleaning efficiency is low, and due to the poor environment under the board, it is also dangerous for the workers.
[0003] In the fields of industry, agriculture and even daily life, robots can replace people to perform some repetitive labor, and work in places that people cannot enter or dangerous environments, which brings great convenience to production and life activities. Therefore, robot technology has been used more and more widely. Based on the development of robot technology, there are also applications of robots for manure cleaning in the current pig farming industry, which mainly include two technical routes. One technical route is to design a remote-controlled manure cleaning machine and equip the staff with a remote control. The staff uses the remote control to control the manure cleaning machine and observe the working process of the manure cleaning machine. The second technical route is that the manure cleaning robot realizes manure cleaning through autonomous navigation, including using positioning technology (such as laser positioning, visual positioning, etc.) to determine the position of the manure cleaning robot under the pig house board, and then make the manure cleaning robot move along the set manure cleaning route, so as to achieve the purpose of manure cleaning in the pig house.
[0004] The first technical route mentioned above requires manual control and has a low degree of automation. The second technical route mentioned above, although highly automated, requires a fixed route to be set in advance; if the pig house environment within the factory is inconsistent, then it is necessary to deploy manure cleaning routes for pig houses with different environments; for example, when the environment under the pig house board changes, it is necessary to redeploy the manure cleaning route; and deploying manure cleaning routes is cumbersome and time-consuming, which is not conducive to improving production efficiency and promoting technology. Summary of the invention
[0005] The present invention provides a covering path planning method, device and storage medium for a manure cleaning robot, which are at least used to realize the covering path planning of the manure cleaning robot and solve the problems caused by adopting a fixed route.
[0006] According to a first aspect of the present invention, there is provided a covering path planning method for a manure cleaning robot, comprising: obtaining a grid map under a pig house plate; binarizing and dilating the grid map to distinguish between drivable grids and non-drivable grids, and determining the map direction; for the binarized and dilated grid map, performing distance conversion to form a cost map, in which the cost value of each grid is equal to the shortest distance between the grid and the non-drivable grid; in the cost map, detecting a plurality of straight line sets that are perpendicular to the map direction and do not collide with the non-drivable grids, and in each straight line set, finding the straight line with the largest cost value to obtain the route corresponding to each straight line set, thereby obtaining the route set corresponding to all straight line sets; and determining the manure cleaning route according to the route set.
[0007] In an embodiment of the first aspect of the present invention, determining the map direction includes: detecting all straight lines in the binarized raster map, and determining the map direction according to the directions of the detected straight lines.
[0008] In an embodiment of the first aspect of the present invention, determining the map direction according to the directions of the detected straight lines includes: selecting a straight line with the longest length among the detected straight lines, and using its direction as the map direction.
[0009] In an embodiment of the first aspect of the present invention, determining the map direction according to the direction of the detected straight line includes: counting the directions of all the straight lines and taking the direction of the straight line occupying the largest proportion as the map direction.
[0010] In an embodiment of the first aspect of the present invention, detecting all the straight lines therein comprises: detecting the straight lines by a Hough transform method.
[0011] In an embodiment of the first aspect of the present invention, the expansion processing of the grid map includes: in the grid map after the binarization processing, the non-drivable grid is expanded according to the radius of the feces cleaning robot.
[0012] In an embodiment of the first aspect of the present invention, the grayscale value of the drivable grid is 255, and the grayscale value of the non-drivable grid is 0.
[0013] In an embodiment of the first aspect of the present invention, determining the manure cleaning route according to the route set includes: calculating the direction of each route in a "bow" shape according to the route set to obtain the manure cleaning route.
[0014] According to a second aspect of the present invention, there is provided a covering path planning device for a manure cleaning robot, a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus, and the processor is used to execute the method described in any of the above embodiments.
[0015] According to a third aspect of the present invention, a computer storage medium is provided, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the method described in any one of the above embodiments is implemented.
[0016] The technical solution of the present invention, after obtaining the grid map, automatically generates a route covering the drivable area in the cost map through binarization processing, expansion processing, and forming a cost map. In other words, the present invention does not require manual deployment of manure cleaning routes. It can adaptively generate reasonable manure cleaning routes based on the grid map of the environment under the pig house board, covering the area that needs to be cleaned while avoiding obstacles. It has better robustness and greatly improves the intelligence level of the manure cleaning robot. Therefore, the technical solution of the present invention is not only suitable for scenarios where there are multiple types of pig houses in the factory area, but also for scenarios where the pig house environment changes. Moreover, since robots are used to replace manual manure cleaning operations under the pig house boards, it avoids the need for workers to enter the harsh environment under the pig house boards to work, which improves safety while also improving the work efficiency of manure cleaning under the pig house boards. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0018] Figure 1 It is a schematic diagram of the floor plan layout of a building pig house;
[0019] Figure 2 is a schematic diagram of the main process of the coverage path planning method according to an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of a specific process of a coverage path planning method according to an embodiment of the present invention;
[0021] Figure 4A It is a grid map of the units under the pig house slab;
[0022] Figure 4B Yes Figure 4A 's labeled diagram;
[0023] Figure 5 Yes Figure 4A Raster map after binarization and dilation;
[0024] Fig. 6A Yes Figure 5 The cost map obtained after distance conversion;
[0025] Figure 6B is a costmap with a collection of labeled lines;
[0026] Figure 7 This is a schematic diagram of the principle of distance transformation for a simple rectangular shape;
[0027] Fig. 8A It is a grid map with routes marked;
[0028] Figure 8B It is a schematic diagram for calculating the cost value of a straight line in a straight line set X;
[0029] Figure 8C It is a grid map with route directions marked;
[0030] Fig. 9 is a schematic diagram of a specific process flow corresponding to binarization processing and dilation processing according to an embodiment of the present invention;
[0031] Fig.10 is a schematic diagram of determining a map direction according to an embodiment of the present invention;
[0032] Fig.11A It is another grid map of the lower unit of the pig house board;
[0033] Fig. 11B is based on Fig.11A Schematic diagram to determine the map orientation;
[0034] Fig.12 Yes Fig.11A Raster map after binarization and dilation;
[0035] Fig.13 Yes Fig.12 The cost map obtained after distance conversion;
[0036] Fig.14 The present invention is a structural schematic diagram of a covering path planning device for a manure cleaning robot. DETAILED DESCRIPTION
[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0038] In order to facilitate the understanding of the background knowledge of the present invention, Figure 1The plan layout of a building pig house is shown. It should be noted that the building pig house shown here is only an example, and the technical solution of the present invention can be applied not only to building pig houses, but also to bungalow pig houses; in other words, the technical solution of the present invention can be applied to any flat pig house under-board environment.
[0039] like Figure 1 As shown, the first floor of the building pig house includes area A, area B, area C and area D. Area A and area B are arranged opposite to each other for setting up pig houses. Area C and area D are located between area A and area B and are arranged opposite to each other, respectively at the ends of area A and area B. The blank part between area A, area B, area C and area D represents the patio.
[0040] Figure 1 In the figure, A1, A2, A3, A4, A5, A6, A7, A8, A9 represent pig house units, and pig house units A1, A2, A3, A4, A5, A6, A7, A8, A9 are arranged in parallel. Similarly, B1, B2, B3, B4, B5, B6, B7, B8, B9 represent pig house units, and pig house units B1, B2, B3, B4, B5, B6, B7, B8, B9 are arranged in parallel. Since the upper part of the plate is not involved in this article, for the purpose of clarity, A1, A2...A9, B1, B2...B9 are called lower plate units in this article.
[0041] like Figure 1As shown, A11 is the slope of the manure outlet of the pig house in area A, that is, the under-slab entrance of the entire pig house in area A, and of course, the under-slab unit entrance of under-slab unit A1; similarly, B11 is the slope of the manure outlet of area B, that is, the under-slab entrance of the entire pig house in area B, and also the under-slab unit entrance of under-slab unit B1. In the upper part of the pig house, each unit is isolated from the other, while the lower unit is connected, that is, the lower units A1, A2, A3, A4, A5, A6, A7, A8, and A9 are connected. They are connected by channels between adjacent units, such as channel A12 between lower unit A1 and lower unit A2, channel A23 between lower unit A2 and lower unit A3, and similarly, channels A34, A45, A56, A67, A78, and A89, as well as channels B12, B23, B34, B45, B56, B67, B78, and B89 between the lower units of the pig house in area B. Among them, the channel outlet is also the corresponding lower unit inlet. For example, A12 is the lower unit inlet of lower unit A2, and the outlet of channel A23 (corresponding to the part of lower unit A3) is the lower unit inlet of lower unit A3. The manure cleaning robot first passes through the manure outlet slope to enter a sub-board unit, and then passes through the passage between sub-board units to enter the next sub-board unit. For example, the manure cleaning robot first passes through the manure outlet slope A11 to enter sub-board unit A1, then passes through passage A12 between sub-board units A1 and A2 to enter sub-board unit A2, and then passes through passage A23 between sub-board units A2 and A3 to enter sub-board unit A3.
[0042] The above describes the configuration of a building pig house, especially the structural features of the under-slab part. It should be noted that the overlay path planning method of the present invention is applicable to the process of path planning in each under-slab unit of the pig house. The method of how to enter a certain under-slab unit and navigate between multiple under-slab units does not belong to the scope of the present invention, so it will not be repeated here.
[0043] The following will introduce in detail how to implement the coverage path planning method of the manure cleaning robot, where coverage path planning refers to automatically calculating the route in the map so that the route can cover the drivable area on the map.
[0044] Figure 2 The main process of a coverage path planning method according to an embodiment of the present invention is shown. Figure 2As shown, it includes step S1, obtaining the pig house under-board map. The pig house under-board is indoors, and the environment is dim, and the light conditions are very limited. Therefore, it is impossible to use traditional positioning methods, and it is not convenient to use methods such as video recognition. Based on this, the present invention uses laser SLAM technology to construct a map of the pig house under-board unit. Specifically, the map of the under-board unit is obtained by a laser SLAM (Simultaneous localization and mapping) algorithm. For example, by configuring a laser radar on a trolley to obtain point cloud data in the environment of the under-board unit, the SLAM algorithm is combined with the laser radar method to draw the natural contour of the environment in which the under-board unit is located, that is, the map. It should be noted that after the construction of the pig house under-board map is completed, the map can be saved in the form of a raster map. For example, the map can be saved on the storage device of the manure cleaning robot, and the manure cleaning robot directly calls the constructed map when performing a task; for another example, the map is saved in the background system, and the manure cleaning robot downloads the required map from the background system (through the network or interface) when performing a task.
[0045] In step S2, the position of the manure cleaning robot is located. The positioning method includes: using single-line laser radar sensor data to confirm the position of the manure cleaning robot in the environment in which it is located in a pre-built map. In an implementation scenario, a laser radar is used to obtain point cloud data of the surrounding environment at the current position of the manure cleaning robot. The current position of the manure cleaning robot can be determined by matching the point cloud data of the surrounding environment at the current position with the map of the corresponding pig house board lower unit. Specifically, the position of the manure cleaning robot in the map can be obtained by a laser sensor, for example, using three variables (x, y, θ) to represent it, where x and y are the horizontal and vertical axis coordinates in the map coordinate system, and θ is the yaw angle of the manure cleaning robot body. Since laser SLAM technology is a prior art, the details of laser SLAM technology will not be described in detail.
[0046] In step S3, a covering path planning is performed to plan a manure cleaning route. Step S3 will be described in detail below.
[0047] In step S4, according to the robot position obtained in step S2 and the manure cleaning route obtained in step S3, the manure cleaning robot is controlled by using a tracking algorithm, so that the robot moves along the manure cleaning route to complete the manure cleaning operation. The tracking algorithm may adopt a path tracking algorithm such as a pure tracking control algorithm in the prior art. Since the path tracking algorithm and its application method itself do not belong to the scope of the present invention, they are not described in detail here.
[0048] The above introduces the overall technical context of the present invention. The core content of the present invention, namely step S3, is analyzed and explained in detail below. Figure 3The specific flow chart of the covering path planning method is shown.
[0049] like Figure 3 As shown, a covering path planning method for a manure cleaning robot, after obtaining the grid map under the pig house board, first executes step S301, binarizes and expands the grid map, distinguishes between drivable grids and non-drivable grids, and determines the map direction.
[0050] For example, a grid map of the pig house sub-slab unit is Figure 4A As shown, Figure 4B right Figure 4A The wall 101 is marked, including the entire pig house lower plate unit, in which a manure discharge port 102 is provided, and various obstacles such as columns 103 and support columns 104 are also provided. Figure 2 After binarization, the grids corresponding to the wall 101 and its exterior, various obstacles, and feces outlets are all non-drivable grids, and the other grids are drivable grids. For example, in one embodiment, during binarization, the grayscale value of the non-drivable grid can be set to 0, and the grayscale value of the drivable grid can be set to 255. Of course, in other embodiments, the grayscale value of the non-drivable grid can also be set to 255, and the grayscale value of the drivable grid can be set to 0.
[0051] according to Figure 4B The map direction determined in step S301 may be as follows: Figure 4B The direction of the arrow shown in Figure 4B The grid map after expansion is as follows Figure 5 As shown in Figure 1, the non-travelable grid corresponding to the obstacle is expanded. Figure 5 It can be seen that for the non-drivable grid corresponding to the obstacle, the non-drivable grid is expanded outward, and the expansion distance is equal to the radius of the feces cleaning robot, so that the non-drivable area corresponding to the non-drivable grid is expanded. The purpose is also to avoid the collision between the feces cleaning robot and the obstacle.
[0052] Then, step S302 is executed to perform distance conversion on the grid map after binarization and expansion to form a cost map, in which the cost value of each grid is equal to the shortest distance between the grid and the non-travelable grid. Figure 5 After distance conversion, the resulting cost map is as follows Fig. 6A To illustrate the principle of distance conversion, Figure 7 The distance conversion for a simple rectangular shape is shown as an example for explanation.
[0053] like Figure 7The simple rectangular shape shown has seven rows and eight columns in total, and the value of each grid represents the grayscale. For example, the grayscale value of the grid in the outer circle is 0, and the grayscale value of the grid in the other parts is 1. The grid with a grayscale value of 0 can be defined as a non-drivable grid, and the other grids can be defined as drivable grids. When performing distance conversion, the cost value of each grid is equal to the shortest distance between the grid and the non-drivable grid. Based on this, the cost value of the grid in the outer circle, that is, the grid in the first row, the first column, the eighth column, and the seventh row is obviously 0. Among the drivable grids, for example, the cost value of the second row and the second column is 1, indicating that the shortest distance between the grid and the non-drivable grid (the grid in the first row, the first column, the eighth column, and the seventh row) is 1, that is, the distance from the grid in the first row or the first column is 1. For another example, the cost value of the grid in the third row and the third column is 2, which means that the shortest distance between the grid and the non-drivable grid (grids in the first row, the first column, the eighth column, and the seventh row) is 2, that is, the distance from the grid in the first row or the first column is 2. For another example, the cost value of the grid in the fourth row and the fourth column is 3, which means that the shortest distance between the grid and the non-drivable grid (grids in the first row, the first column, the eighth column, and the seventh row) is 3, that is, the distance from the grid in the first row or the first column is 3. For another example, the cost value of the grid in the fourth row and the fifth column is 3, which means that the shortest distance between the grid and the non-drivable grid (grids in the first row, the first column, the eighth column, and the seventh row) is 3, that is, the distance from the grid in the first row is 3 (the distances from the grids in the first column, the eighth column, and the seventh row are all greater than 3).
[0054] According to the above distance conversion method, we can get Fig. 6A The cost map shown. By observing the cost map, it can be seen that the location close to the center of the drivable area (the area corresponding to the drivable grid) has a higher cost value, while the location outside the drivable area has a lower cost value. In this embodiment, the higher the cost value, the larger the grayscale value when displayed as a visualization effect (displayed as white).
[0055] Next, execute step S303 and step S304. In the cost map, detect several straight line sets that are perpendicular to the map direction and do not collide with the non-drivable grids, and in each straight line set, find the straight line with the largest cost value to obtain the route corresponding to each straight line set, thereby obtaining the route set corresponding to all straight line sets.
[0056] Among them, if there is no collision with the non-drivable grid, the cost value of the straight line is not 0; that is, when the cost value is 0, it means that the straight line has collided with the obstacle. Since the map direction is 0°, that is, the horizontal direction, the direction perpendicular to it is 90°, that is, the vertical direction in the figure. Fig. 6A As shown, it includes a set of multiple vertical lines perpendicular to the map direction, see Figure 6B, including at least three vertical straight line sets 61, 62 and 63, wherein the straight line sets 61 and 63 do not collide with obstacles, and the straight line set 62 collides with the grid corresponding to the feces discharge port. Therefore, the selected straight line sets include the straight line sets 61 and 63, and the straight line set 62 is not selected.
[0057] Furthermore, in each set of selected lines, find the line with the largest cost value (or the largest local cost value). The purpose is to find the line in the set of lines that is closest to the center of the set of lines. For example, Fig. 8A The straight lines 81, 82, 83, 84 and 85 in the figure are used as the robot's travel route to avoid collisions between the robot and obstacles as much as possible. Figure 8B Some examples of lines in the line set X are shown. For the sake of simplicity and ease of explanation, only five vertical lines x1, x2, x3, x4 and x5 are included. Only three types of grids are involved. The first type of grid is filled with white, and its cost value is the largest, recorded as 255; the second and third types of grids are filled with grayscale, and the cost values are 200 and 100 respectively. Based on this, the cost value of each line in the line set X can be easily calculated. For example, the cost value of line x1 = 1*200+10*100, the cost value of line x2 = 1*255+9*200+1*100, the cost value of line x3 = 8*255+2*200+1*100, the cost value of line x4 = 1*255+7*200+3*100, and the cost value of line x5 = 2*200+9*100. Obviously, the cost value of line x3 is the largest. Those skilled in the art should be aware that the above examples are for illustration only, and in an actual cost map, the cost value of each grid may be different, and the calculation should be performed according to the actual situation.
[0058] Finally, execute step S305 to determine the manure cleaning route based on the route set. There are two modes for manure cleaning operations, one is the manure cleaning mode, and the other is the stirring mode. In the manure cleaning mode, the route set obtained in step S304 can be directly output as the manure cleaning route. In this mode, the manure cleaning robot will further determine how to travel from each route to the manure discharge port based on the location of the manure discharge port. In the stirring mode, it is also necessary to determine the direction of each route based on the route set obtained in step S304, and finally obtain the manure cleaning route, and then control the robot to travel along the entire manure cleaning route to stir the feces so that the feces can be easily cleaned by subsequent processing processes (such as flushing). Figure 8CAs shown, in this embodiment, the direction of each route is calculated according to the "bow" shape, so that the directions are attached to the routes 81, 82, 83, 84 and 85, and finally the feces cleaning route is formed. The above-mentioned method of further determining how to travel from each route to the feces discharge port according to the position of the feces discharge port and the method of calculating the route according to the "bow" shape are both prior arts, so the present invention will not be described in detail.
[0059] The above describes an embodiment of the coverage path planning method of the present invention, which does not require manual deployment of manure cleaning routes, and can adaptively generate reasonable manure cleaning routes based on the grid map of the environment under the pig house board, covering the area that needs to be cleaned while avoiding obstacles, has better robustness, and greatly improves the intelligence of the manure cleaning robot. The technical solution of the present invention will be further described in conjunction with more embodiments below.
[0060] In one embodiment, further, Fig. 9 The specific process of step S301 is shown. Fig. 9 As shown, step S301 includes: firstly, executing step S3011 to perform binarization processing; in the map after binarization processing, executing step S3012 to detect all straight lines in the map, for example, the Hough transform method can be used to implement straight line detection. After all straight lines are found, executing step S3013 to select the longest straight line, and taking the direction of the straight line (or the slope direction of the straight line) as the map direction. Fig.10 Shown Figure 4A Detected straight lines in the grid map shown. Fig.10 For example, if the detected straight lines L1 and L2 are blocked by obstacles, the straight line L1 is shorter, while the straight line L2 is not blocked by obstacles and has the longest length, the direction of the straight line L2 is taken as the map direction. Fig.10 The direction of the straight line L2 can be defined as 0°, and the map direction is also 0°; in other embodiments, if the direction of the straight line L2 is not 0°, but 5° or 10°, for example, the map direction is also 5° or 10°. Finally, step S3014 is executed to perform expansion processing, that is, in the grid map after binary processing, the non-travelable grid is expanded according to the radius of the manure cleaning robot.
[0061] Among them, this embodiment chooses to determine the map direction in the map after binarization processing, rather than determining the map direction in the map after expansion processing, in order to avoid the possibility that some straight lines may not be detected after the expansion operation. In addition, the purpose of the above-mentioned step S3013 is to determine the map direction, and this step can be replaced by other methods, for example, the directions of all detected straight lines are counted, and the direction of the straight line that occupies the largest proportion is used as the map direction. For example, if it is detected that the straight lines of 0° account for 60% of all straight lines, and the straight lines of other angles account for 40%, then 0° can be used as the map direction.
[0062] In another embodiment, Fig.11A Another grid map of the pig house floor unit is shown, which is different from Fig. 8A The grid map of the pig house sub-slab unit shown, e.g. Fig.11A There are two fecal outlets ( Fig. 8A The number and arrangement of obstacles such as pillars are also related to Fig. 8A Not the same.
[0063] Correspondingly, a covering path planning method includes, first, obtaining a grid map Fig.11A ; then Fig.11A Binarize the grid map, detect all the straight lines in it, and find the longest straight line L3, such as Fig. 11B As shown in FIG. 1 , the direction of the straight line L3 is taken as the map direction.
[0064] Next, the binary map is expanded to obtain Fig.12 The grid map shown in Figure 1 is shown in Figure 2. During the expansion process, the non-travelable grid is expanded according to the radius of the manure cleaning robot. Fig.12 As shown in the figure, the grayscale value of the non-drivable grid is 0, and the grayscale value of the drivable grid is 255, that is, the non-drivable grid is black and the drivable grid is white. Fig.11A and Fig.12 It can be seen that the grids corresponding to obstacles such as manure outlets, support columns, and pillars are all expanded.
[0065] Then, yes Fig.12 Perform distance conversion to obtain the cost map, such as Fig.13 As shown in the figure, the cost value of each grid is equal to the shortest distance between the grid and the non-drivable grid. Observing the cost map, we can see that the cost value is higher near the center of the drivable area (in Fig.13 ), while the cost value is lower at the periphery of the drivable area (in Fig.13 Therefore, the higher the cost value, the greater the grayscale value when it is displayed as a visualization effect.
[0066] Then, in Fig.13 In the cost map shown, a set of straight lines that are perpendicular to the map direction and do not collide with the non-drivable grid are detected, such as Fig.13 In the figure, we can see several vertical white areas. Each white area is composed of multiple parallel straight lines (the straight lines are composed of grids), corresponding to a straight line set. Then, in each straight line set, find the straight line with the largest cost value. For example, we can use Figure 8B The line with the largest cost value is calculated in the corresponding way. Generally speaking, the line with the largest cost value corresponds to the line in the middle of a line set. After finding the line with the largest cost value, it is used as the route corresponding to a line set, and finally, the route set corresponding to all line sets is obtained.
[0067] Finally, the manure cleaning route is determined based on the route set and the manure cleaning operation mode. For example, in the manure cleaning mode, the obtained route set can be directly output as the manure cleaning route. In the mixing mode, it is also necessary to calculate the direction of each route according to the "bow" shape based on the obtained route set, and finally obtain the manure cleaning route.
[0068] The above is a complete description of the technical solution of the method of the present invention. It should be noted that the present invention describes the technical solution of the present invention by taking the cleaning of pig house feces as an example, but the present invention is not limited to the cleaning of feces under the pig house board. According to the disclosure and teaching of the present invention, those skilled in the art can also think that the solution of the present invention can also be applied to the cleaning of feces of other livestock, such as the cleaning of feces of cattle, sheep or horses.
[0069] According to another aspect of the present invention, the present invention also provides Fig.14 The covering path planning device for the manure cleaning robot shown includes a processor, a memory, a communication interface and a communication bus. The processor, the memory and the communication interface communicate with each other through the communication bus, and the processor executes the aforementioned covering path planning method.
[0070] According to another aspect of the present invention, a computer storage medium is also provided, on which a computer program is stored, and when the computer program is executed by a processor, the aforementioned overlay path planning method is implemented. In the present invention, the aforementioned readable storage medium may be any tangible medium containing or storing a program, which may be used by an instruction execution system, an apparatus or a device or used in combination with it. For example, the computer readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described herein may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such computer-readable media.
[0071] According to the above description of this specification, those skilled in the art may also understand that the terms used below, such as "up", "down", "front", "back", "left", "right", "length", "width", "vertical", "horizontal", "inside", "outside", "axial", "circumferential", "center", etc., which indicate the orientation or position relationship, are based on the orientation or position relationship shown in the drawings of this specification, and are only for the purpose of facilitating the explanation of the scheme of the present invention and simplifying the description, rather than explicitly or implicitly indicating that the device or element involved must have the specific orientation, be constructed and operate in a specific orientation. Therefore, the above-mentioned orientation or position relationship terms cannot be understood or interpreted as limitations on the scheme of the present invention.
[0072] In the above description of this specification, unless otherwise clearly specified and limited, the terms "connected" or "connection" and the like should be understood in a broad sense. For example, with respect to the term "connection", it can be a fixed connection, a detachable connection, or an integral one; it can be a mechanical connection or an electrical connection; it can be a direct connection or an indirect connection through an intermediate medium, or it can be the internal connection of two elements or the interaction relationship between two elements. Therefore, unless otherwise clearly defined in this specification, those skilled in the art can understand the specific meanings of the above terms in the present invention according to the specific circumstances.
[0073] In addition, the terms "first" or "second" used in this specification to refer to numbers or ordinals are only used for descriptive purposes and cannot be understood as explicitly or implicitly indicating relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of this specification, the meaning of "plurality" is at least two, such as two, three or more, etc., unless otherwise clearly and specifically defined.
[0074] Although this specification has shown and described a plurality of embodiments of the present invention, it is apparent to those skilled in the art that such embodiments are provided by way of example only. Those skilled in the art will think of many changes, modifications and alternatives without departing from the thought and spirit of the present invention. It should be understood that in the process of practicing the present invention, various alternatives to the embodiments of the present invention described herein may be adopted. The attached claims are intended to define the scope of protection of the present invention, and therefore cover the modular composition, equivalent or alternatives within the scope of these claims.
Claims
1. A covering path planning method for a manure cleaning robot, characterized in that: include: Get the grid map under the pig house board; Binarization and expansion processing are performed on the grid map to distinguish between drivable grids and non-drivable grids, and all straight lines are detected in the binarized grid map, and the map direction is determined according to the directions of the detected straight lines; For the raster map after binarization and expansion, distance conversion is performed to form a cost map, in which the cost value of each raster is equal to the shortest distance between the raster and the non-drivable raster; In the cost map, a plurality of straight line sets which are perpendicular to the map direction and whose cost values are not 0 are detected, and in each straight line set, a straight line with the maximum cost value is found to obtain a route corresponding to each straight line set, thereby obtaining a route set corresponding to all straight line sets; A manure cleaning route is determined according to the route set.
2. The method according to claim 1, characterized in that Determining the map direction according to the direction of the detected straight line includes: The longest straight line is selected from the detected straight lines, and its direction is used as the map direction.
3. The method according to claim 1, characterized in that Determining the map direction according to the direction of the detected straight line includes: The directions of all straight lines are counted, and the direction of the straight line that occupies the largest proportion is taken as the map direction.
4. The method according to claim 1, characterized in that: The detecting of all straight lines therein comprises: Detect straight lines using the Hough transform method.
5. The method according to claim 1, characterized in that The expansion process of the raster map includes: In the binary grid map, the non-travelable grid is expanded according to the radius of the manure cleaning robot.
6. The method according to claim 1, characterized in that The grayscale value of the drivable grid is 255, and the grayscale value of the non-drivable grid is 0.
7. The method according to any one of claims 1 to 6, characterized in that: Determining the manure cleaning route according to the route set includes: According to the route set, the direction of each route is calculated according to the shape of a "bow" to obtain the manure cleaning route.
8. A covering path planning device for a manure cleaning robot, characterized in that: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus, and the processor is used to execute the method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
