Photovoltaic field weeding robot path planning method and device and related equipment
Through the division of grid maps and cattle cultivation method planning, the problem of low and low path planning efficiency of the photovoltaic field weeding robot navigation is solved, and the completion of more efficient weeding tasks.
Patent Information
- Application Number
- CN202411487721.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-28
AI Technical Summary
Photovoltaic field weeding robots have high complexity in navigation and obstacle avoidance, resulting in low path planning efficiency and difficulty in effectively completing weeding tasks.
By obtaining the grid map of the optical field, it is divided into universal and universal areas, further dividing the accessible area as a sub -area, extracting the internal rectangle and based on the cattle cultivation method. The sub -area sequence is connected to these paths to form a complete target path.
It reduces the complexity of navigation, improves the efficiency of path planning, ensures that weeding robots can effectively avoid obstacles and improve weedy efficiency.
Smart Images

Figure CN119376391A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of weeding robots, and in particular to a path planning method, a device and related equipment for a photovoltaic field weeding robot. Background Art
[0002] With the advancement of science and technology, the robotics industry has also developed rapidly. Nowadays, sweeping robots, shopping guide robots, service delivery robots, etc. can be seen everywhere in daily life. At the same time, robots are playing an increasingly important role in petrochemical, border defense, agriculture and other scenarios. Having a scene-based intelligent path planning and control system is a key link in the intelligence of robots. Especially in the photovoltaic weeding operation scenario, the planning method based on the full coverage path is more important. The full coverage path refers to traversing all points in the space in a given area while avoiding obstacles.
[0003] Among them, the photovoltaic field environment is complex, and there are many areas that need to be weeded. When performing tasks across regions, it is easy for paths to be connected in obstacles. When the weeding robot is actually operating, the navigation and obstacle avoidance requirements of the weeding robot are high, and the weeding efficiency is low. Summary of the invention
[0004] In view of this, the present invention provides a path planning method, device and related equipment for a photovoltaic field weeding robot to reduce navigation complexity and improve path planning efficiency.
[0005] In a first aspect, the present invention provides a path planning method for a photovoltaic field weeding robot, which includes: obtaining a grid map of the photovoltaic field, and dividing the grid map into regions to obtain an inaccessible region including obstacles and a passable region excluding obstacles; dividing the passable region into one or more sub-regions based on the inaccessible region; extracting the inscribed rectangle of the sub-region to obtain an inscribed rectangular region; performing path planning in each inscribed rectangular region based on a cow-tillage covering method to obtain a target sub-path; and connecting each target sub-path based on the region sequence of each sub-region to obtain a target path of the weeding robot.
[0006] In this implementation, the present application divides the non-obstacle area by using the obstacle area, extracts the inscribed rectangle in each divided sub-area, and performs path planning in the inscribed rectangle to generate the target sub-path. Among them, the inscribed rectangle is a regular shape, and path planning based on the ox-ploughing covering method in the inscribed rectangle can ensure the regularity of the path and reduce the complexity of navigation; the target sub-paths of each sub-area are connected to obtain a complete target path, which can improve the efficiency of path planning.
[0007] In an optional implementation, after dividing the passable area into one or more sub-areas based on the impassable area, the method includes: determining an area order of each sub-area based on the position of the weeding robot.
[0008] In this implementation, the order of the sub-areas can be confirmed according to the position of the weeding robot, the moving path of the weeding robot between the sub-areas can be reduced, and the completion efficiency of subsequent weeding tasks can be improved.
[0009] In an optional embodiment, determining the area order of each sub-area based on the position of the weeding robot includes: obtaining first position information of the weeding robot; obtaining center of mass position information of each sub-area; calculating the distance between the first position information and the center of mass position information, and sorting the sub-areas according to the distance to determine the area order of the sub-areas.
[0010] In this implementation, the centroid position information of the sub-region is used to represent the position of the sub-region, and the distance between the centroid position information and the first position information is calculated, which can improve the rationality of the region sequence.
[0011] In an optional embodiment, path planning is performed in each inscribed rectangular area based on the ox-plowing covering method to obtain the target sub-path, including: taking the sub-area with the closest distance as the initial area; obtaining the boundary position information of the four boundary points of the inscribed rectangular area in the initial area; calculating the distance between the first position information and the boundary position information, and taking the boundary point corresponding to the boundary position information with the smallest distance as the path starting point; performing path planning from the path starting point based on the ox-plowing covering method to obtain multiple spaced straight line segments; when the number of spaced straight line segments is an even number, completing the path planning to obtain the target sub-path of the sub-area; when the number of spaced straight line segments is an odd number, continuing to plan an spaced straight line segment based on the ox-plowing covering method to complete the path planning to obtain the target sub-path of the sub-area; generating the initial path sequence of the target sub-path of the initial area.
[0012] In this implementation, since the connected areas of the traversable areas of the photovoltaic field are on the same side, after completing the path planning in each inscribed rectangular area using the ox-ploughing covering method, this application further considers whether the number of planned straight line segments is an even number. When the number of straight line segments is an even number, it means that the initial position and the end position are on the same side, and the path planning in the sub-area is completed directly; when the number of straight line segments is an odd number, it means that the initial position and the end position are not on the same side, and then continue to plan an interval straight line segment in the sub-area to complete the path planning in the sub-area. This method can ensure that the starting position and the end position of the weeding robot are on the same side of the current sub-area, which is convenient for moving to the next sub-area and improving the weeding efficiency.
[0013] In an optional embodiment, path planning is performed in each inscribed rectangular area based on the ox-plowing covering method to obtain the target sub-path, including: when the inscribed rectangular area is a non-initial area, path planning is performed in the inscribed rectangular area according to the initial path sequence based on the ox-plowing covering method to obtain the target sub-path of the inscribed rectangular area.
[0014] In this implementation, after the path planning method for the initial area is determined, it is applied to subsequent sub-areas, and the starting and ending positions of all areas are located on the same side, which can ensure that the routes between areas are connected normally.
[0015] In an optional implementation, multiple target points are determined from the target path; coordinate information and angle information of the target points are obtained; and the weeding robot is controlled to move according to the angle information of the current target point and the coordinate information of the next target point, so that the weeding robot completes the photovoltaic field weeding task.
[0016] In this implementation, an angle value is assigned to each target point, which facilitates the weeding robot to move to the next target point according to the planned path, thereby improving the weeding efficiency.
[0017] In a second aspect, the present invention provides a path planning device for a photovoltaic field weeding robot, which includes: a processing module for acquiring a grid map of the photovoltaic field and dividing the grid map into regions to obtain an inaccessible region including obstacles and a passable region not including obstacles; a division module for dividing the passable region into one or more sub-regions based on the inaccessible region; an extraction module for extracting the inscribed rectangle of the sub-region to obtain an inscribed rectangular region; a first planning module for performing path planning in each inscribed rectangular region based on a cow-plowing covering method to obtain a target sub-path; and a second planning module for connecting each target sub-path based on the region sequence of each sub-region to obtain the target path of the weeding robot.
[0018] In a third aspect, the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the photovoltaic field weeding robot path planning method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0019] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the photovoltaic field weeding robot path planning method of the first aspect or any corresponding embodiment thereof.
[0020] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the path planning method for a photovoltaic field weeding robot according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0022] Figure 1 is a flow chart of a path planning method for a photovoltaic field weeding robot according to an embodiment of the present invention;
[0023] Figure 2 is a schematic diagram of a first grid map according to an embodiment of the present invention;
[0024] Figure 3 is a flow chart of another path planning method for a photovoltaic field weeding robot according to an embodiment of the present invention;
[0025] Figure 4 is a schematic diagram of a second grid map according to an embodiment of the present invention;
[0026] Figure 5 is a schematic diagram of a third grid map according to an embodiment of the present invention;
[0027] Figure 6 is a schematic diagram of a fourth grid map according to an embodiment of the present invention;
[0028] Figure 7 is a flow chart of a photovoltaic field weeding robot control method according to an embodiment of the present invention;
[0029] Figure 8 is a structural block diagram of a path planning device for a photovoltaic field weeding robot according to an embodiment of the present invention;
[0030] Fig. 9 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0031] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.
[0032] Current path planning methods mainly include four types of methods, namely: random collision method, unit decomposition method, biological inspiration method and template method.
[0033] Among them, the random collision method is a time-for-space algorithm. The robot uses infrared to walk in a straight line based on the initial direction, detects obstacles, rotates a certain angle, and repeats the above process. Although this method can fully cover the space, it is relatively inefficient and has a large number of repeated paths, especially when switching between different scenes, which consumes a lot of time.
[0034] Among them, the unit decomposition method is to divide the given workspace into several non-overlapping subspaces. Based on the subspaces, the robot uses round trips to cover, thereby achieving full coverage of the entire area. Its representative methods include the trapezoidal unit method, the ox-ploughing unit decomposition method, the line scanning segmentation method, etc. This method has a better effect on the given space planning. At the same time, if the shape of the area is irregular, long-distance routes between areas will appear on obstacles, which has high requirements for navigation.
[0035] Among them, the bio-inspiration method uses a neural network model to plan paths. Each grid in the grid map corresponds to a neuron, and a shunting equation is proposed to calculate the degree of stimulation or inhibition of the surrounding neurons on the current neuron. When the robot is in a grid, it will calculate the activity value of the surrounding neurons and select the grid with the largest activity value as the next step. This method applies neural networks to the full coverage path method, providing a new way to solve the problem.
[0036] Among them, the template method is based on the prior knowledge of the two-dimensional environment map. The robot moves in the map according to the predefined template, and finally achieves full coverage of the map. This method is simple in principle, consumes little computing resources, and can handle dynamic obstacles. At the same time, this method has poor applicability and low intelligence.
[0037] Based on the above, the present application proposes a path planning method for a photovoltaic field weeding robot, which can reduce navigation complexity and improve path planning efficiency.
[0038] According to an embodiment of the present invention, an embodiment of a path planning method for a photovoltaic field weeding robot is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0039] In this embodiment, a path planning method for a photovoltaic field weeding robot is provided. Figure 1 is a flow chart of a path planning method for a photovoltaic field weeding robot according to an embodiment of the present invention. It should be noted that if there are substantially the same results, this embodiment is not based on Figure 1 The process sequence shown is limited. Figure 1 As shown, the process includes the following steps:
[0040] Step S101 : acquiring a grid map of a photovoltaic field, and dividing the grid map into regions to obtain an inaccessible region including obstacles and a accessible region excluding obstacles.
[0041] Obtain a raster map of the photovoltaic field that needs to be weeded and convert the raster map into an image.
[0042] The grid map is divided into regions according to whether the grid in the grid map is an obstacle. The grid map is divided into an inaccessible region including obstacles and a accessible region excluding obstacles.
[0043] See also Figure 2 , Figure 2 is a schematic diagram of a first grid map according to an embodiment of the present invention. Figure 2 As shown, the white area is the passable area and the black area is the impassable area.
[0044] Furthermore, the traversable area of the grid map is preprocessed.
[0045] The edge detection algorithm is used to detect the edge of the passable area of the grid map and obtain all edge contours in the grid map. Among them, the edge detection algorithm includes Canny algorithm, Sobel algorithm, Laplace algorithm, etc.
[0046] Exemplarily, the edge detection algorithm is the Canny edge detection algorithm of OpenCV.
[0047] The straight line detection algorithm is used to detect straight lines in the passable area of the grid map, and the angle-straight line distance histogram about the straight line direction is obtained. Among them, the straight line detection algorithm includes Hough straight line detection algorithm, LSD algorithm, FLD algorithm, LSWMS algorithm, LSM algorithm, etc.
[0048] Exemplarily, the line detection algorithm is the Hough line detection algorithm of OpenCV. Specifically, the direction range [0, pi] of the line is divided into 36 intervals, and an angle-line distance histogram about the line direction is obtained. The interval with the largest line distance is obtained, and the line distance and angle in the interval are weighted to obtain the average direction of the interval.
[0049] In one implementation, the grid map is rotated based on the average orientation so that the longest side of the traversable area in the grid map is aligned with the X-axis.
[0050] In another implementation, the grid map is rotated based on a preset angle.
[0051] Step S102: dividing the passable area into one or more sub-areas based on the impassable area.
[0052] According to the obstacles in the impassable area, the traversable area is divided into one or more sub-areas of a continuous and complete area.
[0053] Specifically, the grid map is scanned from top to bottom using a scan line, and when the scan line is divided into at least two parts by obstacles in the impassable area, the traversable area is divided into sub-areas; or when the scan line is connected again, the traversable area is divided into sub-areas.
[0054] Step S103: extract the inscribed rectangle of the sub-region to obtain the inscribed rectangular region.
[0055] For each sub-region, the maximum inscribed rectangle of the sub-region is calculated to obtain the inscribed rectangular area. Specifically, the inscribed rectangular area of the sub-region is obtained using OpenCV.
[0056] The present application utilizes the inscribed rectangular area to divide the regular passable area, which facilitates subsequent path planning and improves the efficiency of path planning and robot weeding.
[0057] Step S104, performing path planning in each inscribed rectangular area based on the cow-ploughing covering method to obtain a target sub-path.
[0058] For each inscribed rectangular area, the path planning is performed using the ox-ploughing covering method to obtain the interval straight line segments.
[0059] Specifically, an initial position is set in advance, and starting from the initial position, ox-plowing movement is preferentially performed along the X-axis direction. The planning is completed when the four adjacent grids above, below, left and right of the current position are not uncovered.
[0060] For example, the coordinate origin of the grid map is located in the upper right corner, the left direction is the X axis, and the downward direction is the Y axis. The coordinates (m, n) represent the mth row and nth column grid. Starting from the initial position, the robot performs ox-ploughing-style movement, and the X axis direction is given priority. If the robot's current position has no coverage on the left and right adjacent grids, it randomly selects a grid to move; if only one of the left and right adjacent grids is not covered, it moves to the uncovered grid; if neither of the left and right adjacent grids is uncovered, it determines the coverage of the upper and lower adjacent grids and determines the next moving target. By analogy, multiple interval straight line segments are planned to obtain the target subpath.
[0061] The initial position may be a preset position or may be selected according to the position of the robot.
[0062] Step S105 , connecting each target sub-path based on the area sequence of each sub-region to obtain the target path of the weeding robot.
[0063] In order to enable the weeding robot to form a complete weeding path, each sub-region is connected to each target sub-path in region order to form a completed target path.
[0064] The photovoltaic field weeding robot path planning method provided in this embodiment divides the non-obstacle area by using the obstacle area, extracts the inscribed rectangle in each divided sub-area, and performs path planning in the inscribed rectangle to generate a target sub-path. The inscribed rectangle is a regular shape, and path planning based on the ox-plowing covering method in the inscribed rectangle can ensure the regularity of the path and reduce the complexity of navigation; the target sub-paths of each sub-area are connected to obtain a complete target path, which can improve the efficiency of path planning.
[0065] In this embodiment, a path planning method for a photovoltaic field weeding robot is provided. Figure 3 is a flow chart of another photovoltaic field weeding robot path planning method according to an embodiment of the present invention. It should be noted that if there are substantially the same results, this embodiment is not based on Figure 3 The process sequence shown is limited. Figure 3 As shown, the process includes the following steps:
[0066] Step S301 : acquiring a grid map of a photovoltaic field, and dividing the grid map into regions to obtain an inaccessible region including obstacles and a accessible region excluding obstacles.
[0067] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0068] Step S302: dividing the passable area into one or more sub-areas based on the impassable area.
[0069] According to the obstacles in the impassable area, the traversable area is divided into one or more sub-areas of a continuous and complete area.
[0070] See also Figure 4 , Figure 4 is a schematic diagram of a second grid map according to an embodiment of the present invention. Figure 4 As shown in , the scan line divides the traversable area in the grid map into multiple sub-areas. However, multiple sub-areas include multiple small-area areas. Further, the smallest area units are merged to obtain new sub-areas. Please refer to Figure 5 , Figure 5 is a schematic diagram of a third grid map according to an embodiment of the present invention, wherein the traversable area is divided into three sub-areas.
[0071] Step S303: determining the area order of each sub-area based on the position of the weeding robot.
[0072] For the entire photovoltaic field, the weeding path of the weeding robot is a complete path, that is, the weeding robot weeds each sub-area at a time. The present application plans a weeding order for each sub-area based on the position of the weeding robot, that is, the area order of each sub-area.
[0073] The present application confirms the order of the sub-areas according to the position of the weeding robot, which can reduce the movement path of the weeding robot between the sub-areas and improve the completion efficiency of subsequent weeding tasks.
[0074] Specifically, the above step S303 includes:
[0075] Step S3031, obtaining the first position information of the weeding robot.
[0076] Specifically, based on the positioning device of the weeding robot, the first position information of the weeding robot is obtained, wherein the first position information includes the horizontal coordinate and the vertical coordinate of the weeding robot relative to the grid map coordinate system.
[0077] In a specific implementation method, the position information of the weeding robot is obtained by the positioning device of the weeding robot as the horizontal coordinate and the vertical coordinate in the robot coordinate system, and based on the conversion relationship between the robot coordinate system and the grid map coordinate system, the horizontal coordinate and the vertical coordinate in the robot coordinate system are converted into the horizontal coordinate and the vertical coordinate in the grid map coordinate system.
[0078] Step S3032, obtaining the centroid position information of each sub-region.
[0079] Step S3033, calculating the distance between the first position information and the centroid position information, and sorting the sub-regions according to the distance to determine the region order of the sub-regions.
[0080] The first position information and the centroid position information of each sub-region are respectively used as a set of data, and the distance between the first position information and the centroid position information is calculated to obtain multiple distance information. The multiple distance information are sorted from small to large, and the region order of the multiple sub-regions is determined according to the sorting.
[0081] Specifically, the sub-region closest to the weeding robot is taken as the initial region, which is sorted in sequence, and the sub-region farthest from the weeding robot is taken as the end region.
[0082] For example, please participate Figure 5 , the order of the regions calculated from the top to the bottom of the three sub-regions is the first sub-region, the second sub-region and the third sub-region.
[0083] The centroid position information of the sub-region is used to represent the position of the sub-region, and the distance between the centroid position information and the first position information is calculated, which can improve the rationality of the region sequence.
[0084] Step S304: extract the inscribed rectangle of the sub-region to obtain the inscribed rectangular region.
[0085] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.
[0086] For example, see Figure 6 , Figure 6 is a schematic diagram of a fourth grid map according to an embodiment of the present invention. For a first sub-region, an inscribed rectangle of the first sub-region is obtained to obtain a first inscribed rectangular region.
[0087] Step S305 , performing path planning in each inscribed rectangular area based on the ox-ploughing covering method to obtain a target sub-path.
[0088] Specifically, the above step S305 includes:
[0089] Step S3051: taking the sub-region with the closest distance as the initial region.
[0090] Specifically, the sub-area closest to the weeding robot is used as the initial weeding area of the weeding robot.
[0091] Step S3052, when the sub-region is an initial region, path planning is performed in the inscribed rectangular region of the sub-region based on the ox-ploughing covering method to obtain a target sub-path, and an initial path sequence of the target sub-path of the initial region is generated.
[0092] When the sub-area is the initial area, path exploration is performed based on the ox-plowing covering method.
[0093] First, determine the path starting point in the initial area.
[0094] In one implementation, a path starting point of the initial area is determined based on the position information of the robot.
[0095] Specifically, the boundary position information of the four boundary points of the inscribed rectangular area in the initial area is obtained, the distance between the first position information and the boundary position information of the weeding robot is calculated, and the boundary point corresponding to the boundary position information with the smallest distance is used as the path starting point.
[0096] For example, see Figure 6 ,like Figure 6 As shown, the coordinates of the four vertices of the inscribed rectangular area are obtained as the boundary position information, the distance between the first position information of the weeding robot and the four vertex coordinates is calculated, and the vertex corresponding to the vertex coordinate with the smallest distance is used as the path starting point.
[0097] In one implementation, a preset position is used as the starting point of the path.
[0098] Specifically, see Figure 5 and Figure 6 ,like Figure 5 As shown, the right side of the traversable area is the connected area, the initial area is the first inscribed rectangular area of the first sub-area, and in order to improve the weeding work efficiency, the path starting point of the weeding robot is set to the right side of the first inscribed rectangular area of the first sub-area. At the same time, the first sub-area is located in the uppermost area of the three sub-areas, so the path starting point of the weeding robot is set to the upper right corner of the first inscribed rectangular area of the first sub-area.
[0099] Furthermore, path planning is performed from the starting point of the path based on the ox-plowing covering method. Starting from the starting point of the path, ox-plowing movement is preferentially performed along the X-axis direction in the order from right to left and from top to bottom, and the target point is determined according to the preset distance and preset interval. The four adjacent grids above, below, left and right of the current position are not uncovered, and multiple interval straight line segments are obtained.
[0100] When the number of interval straight line segments is an even number, the path planning is completed and the target subpath of the subregion is obtained.
[0101] When the number of interval straight line segments is an odd number, continue to use the ox-plowing covering method in the sub-area where the initial area is located to plan an interval straight line segment to complete the path planning until it is impossible to move forward and reaches the end of the path, thus obtaining the target sub-path of the sub-area.
[0102] Furthermore, an initial path sequence of the target subpaths in the initial area is generated, wherein the initial path sequence includes the starting point of the initial path, the path traversal sequence, and the path length of each interval straight line segment.
[0103] Step S3053, when the sub-region is a non-initial region, path planning is performed in the inscribed rectangular region of the sub-region according to the initial path sequence based on the ox-ploughing covering method to obtain a target sub-path of the sub-region.
[0104] When the sub-region is a non-initial region, synchronous planning is performed based on the path planning method of the initial region to obtain the target sub-path of the inscribed rectangular region.
[0105] Exemplarily, referring to the path planning of the initial area, the upper right corner of the inscribed rectangular area of the non-initial area is used as the starting point of the path, and starting from the starting point of the path, ox-plowing movement is preferentially performed along the X-axis direction in the order from right to left and from top to bottom, and the target point is determined according to the preset distance and preset interval to obtain the target sub-path of the sub-area.
[0106] Similarly, when the number of interval straight line segments is an even number, the path planning is completed to obtain the target sub-path of the sub-region. When the number of interval straight line segments is an odd number, the ox-ploughing covering method is continued to be used in the sub-region where the region is located to plan an interval straight line segment, and the path planning is completed until it is impossible to move forward and reaches the end of the path, and the target sub-path of the sub-region is obtained.
[0107] Step S306 , connecting each target sub-path based on the area sequence of each sub-region to obtain the target path of the weeding robot.
[0108] The path starting points and path end points of the target sub-paths in the adjacent area order are connected in sequence according to the area order to obtain the complete target path of the weeding robot.
[0109] Exemplarily, the end point of the path in the first sub-area is connected to the start point of the path in the second sub-area, and the end point of the path in the second sub-area is connected to the start point of the path in the third sub-area.
[0110] In one implementation, each target sub-path is connected based on the shortest path between each set of path endpoints and path start points.
[0111] In another implementation, during the weeding process of the weeding robot, the robot moves from the end point of the previous target sub-path to the start point of the next target sub-path in the order of regions according to the obstacle avoidance method.
[0112] Furthermore, multiple target points are obtained in the target path, and angle information is assigned to the target points, wherein, if the current target point is not the end point of the target path, the angle information of the current target point is the tangent of the next target point position and the current target position; if the current target point is the end point of the target path, the angle information of the current target point is the angle information of the starting point of the target path.
[0113] When controlling the weeding robot to perform weeding tasks, the coordinate information and angle information of the target point are obtained, and the weeding robot is controlled to move according to the angle information of the current target point and the coordinate information of the next target point, so that the weeding robot completes the photovoltaic field weeding task.
[0114] The photovoltaic field weeding robot path planning method provided in this embodiment, because the connected areas of the traversable areas of the photovoltaic field are on the same side, this application uses the ox-plowing covering method to complete the path planning in each inscribed rectangular area, and further considers whether the number of planned straight line segments is an even number. When the number of straight line segments is an even number, it means that the initial position and the end position are on the same side, and the path planning in the sub-area is directly completed; when the number of straight line segments is an odd number, it means that the initial position and the end position are not on the same side, then continue to plan an interval straight line segment in the sub-area to complete the path planning in the sub-area. This method can ensure that the starting position and the end position of the weeding robot are on the same side of the current sub-area, which is convenient for moving to the next sub-area and improving the weeding efficiency. After determining the path planning method for the initial area, it is applied to subsequent sub-areas, and the starting position and the end position of all areas are on the same side, which can ensure that the routes between areas are connected normally.
[0115] In this embodiment, a control method of a photovoltaic field weeding robot is provided, which is applied to a weeding robot. In one implementation, the control frequency of the weeding robot is 20 Hz, the weeding speed is 0.5 m / s, and the forward sight distance of the control point is 2 m. Figure 7 is a flow chart of a photovoltaic field weeding robot control method according to an embodiment of the present invention. It should be noted that if there are substantially the same results, this embodiment is not based on Figure 7 The process sequence shown is limited. Figure 7 As shown, the process includes the following steps:
[0116] Step S701, read target path information and task point information.
[0117] The target path information includes information of multiple target points, and each target point information includes coordinate information and angle information of the target point.
[0118] The task point information is a pre-set operation point, which serves as a special marking position in the weeding process to complete a specific task. The task point can be pre-set manually, and the specific task is not limited here.
[0119] Step S702, obtaining the next target point of the current path of the robot.
[0120] Step S703, determining whether the next target point is the end point of the target path.
[0121] When the next target point is the end point of the target path, step S704 is executed; when the next target point is not the end point of the target path, step S705 is executed.
[0122] Step S704, controlling the weeding robot to move to the next target point and ending the weeding task.
[0123] The angle information of the current target point and the target point information of the next target point are obtained, and the weeding robot is controlled to adjust its position according to the angle information of the current target point and move to the next target point to end the weeding task.
[0124] Step S705, determining whether the next target point is a task point.
[0125] When the next target point is a task point, execute step S706; when the next target point is not a task point, execute step S707.
[0126] Step S706, controlling the weeding robot to move to the task point and perform the task at the task point.
[0127] The angle information of the current target point and the target point information of the task point are obtained, and the weeding robot is controlled to adjust the posture according to the angle information of the current target point, and move to the task point to perform the task of the task point. Step S702 is continued.
[0128] Step S707, determining whether the next target point is a broken line segment point.
[0129] When the angle difference between the current target point and the previous target point is greater than a preset value, the current target point is determined to be a broken line segment point. Exemplarily, the preset value is 60 degrees.
[0130] When the next target point is a broken line segment point, execute step S708; when the next target point is not a broken line segment point, execute step S709.
[0131] Step S708, controlling the weeding robot to move to the broken line segment point and rotate.
[0132] The angle information of the current target point and the target point information of the broken line segment point are obtained, and the weeding robot is controlled to adjust the posture according to the angle information of the current target point, move the broken line segment point, and rotate the weeding robot according to the angle information of the broken line segment point. Execute step S702.
[0133] Step S709, determining whether the distance between the next target point and the weeding robot is less than a threshold.
[0134] When the distance between the next target point and the weeding robot is less than the threshold, the weeding robot is controlled to move to the next target point and step S702 is continued; when the distance between the next target point and the weeding robot is greater than or equal to the threshold, the target path is updated to obtain a new next target point. For example, the threshold is 2 meters.
[0135] Specifically, the closest distance between the robot and the target path is checked every 0.5 seconds, and the target path is updated to ensure that the robot continues to walk along the closest path.
[0136] At the same time, during the movement of the weeding robot, abnormal behavior in the target path is detected. When there is an abnormal situation in the target path that affects the weeding of the weeding robot, the weeding robot is manually controlled to avoid it and move it to a safe path, and the weeding robot continues to be controlled by the above-mentioned automatic method to perform the weeding task.
[0137] The method provided in this embodiment realizes precise control of the weeding path by identifying the end point, task point, and broken line segment point during the weeding process of the weeding robot, and performing different processing on different position points, so as to ensure the weeding task of the weeding robot.
[0138] In this embodiment, a photovoltaic field weeding robot path planning device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0139] This embodiment provides a path planning device for a photovoltaic field weeding robot. Figure 8 As shown, including:
[0140] The processing module 801 is used to obtain a grid map of the photovoltaic field and divide the grid map into regions to obtain an inaccessible region including obstacles and a accessible region not including obstacles.
[0141] The division module 802 is used to divide the passable area into one or more sub-areas based on the impassable area.
[0142] The extraction module 803 is used to extract the inscribed rectangle of the sub-region to obtain the inscribed rectangular region.
[0143] The first planning module 804 is used to perform path planning in each inscribed rectangular area based on the ox-ploughing covering method to obtain a target sub-path.
[0144] The second planning module 805 is used to connect each target sub-path based on the area sequence of each sub-area to obtain the target path of the weeding robot.
[0145] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0146] The photovoltaic field weeding robot path planning device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0147] The embodiment of the present invention also provides a computer device having the above Fig. 9 The path planning device of the photovoltaic field weeding robot is shown.
[0148] See also Fig. 9 , Fig. 9 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Fig. 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Fig. 9 A processor 10 is taken as an example.
[0149] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0150] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0151] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0152] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.
[0153] The computer device also includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Fig. 9 The example of connecting through bus is taken in the following.
[0154] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a track pad, a touch pad, an indicator bar, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED) and a tactile feedback device (e.g., a vibration motor), etc. The above-mentioned display device includes but is not limited to a liquid crystal display, a light emitting diode, a display and a plasma display. In some optional embodiments, the display device can be a touch screen.
[0155] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0156] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0157] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A path planning method for a photovoltaic field weeding robot, characterized in that: The method comprises: Acquire a grid map of the photovoltaic field, and divide the grid map into regions to obtain an inaccessible region including obstacles and a accessible region excluding obstacles; Dividing the passable area into one or more sub-areas based on the impassable area; Extracting the inscribed rectangle of the sub-region to obtain an inscribed rectangular region; Performing path planning in each of the inscribed rectangular areas based on the ox-ploughing covering method to obtain a target sub-path in the sub-area; Each of the target sub-paths is connected sequentially based on the area of each of the sub-areas to obtain a target path of the weeding robot.
2. The path planning method for a photovoltaic field weeding robot according to claim 1, characterized in that: The step of dividing the passable area into one or more sub-areas based on the impassable area includes: The area order of each of the sub-areas is determined based on the position of the weeding robot.
3. The path planning method for a photovoltaic field weeding robot according to claim 2, characterized in that: Determining the area order of each sub-area based on the position of the weeding robot comprises: Acquiring first position information of the weeding robot; Obtaining centroid position information of each sub-region; The distance between the first position information and the centroid position information is calculated, and the sub-regions are sorted according to the distance to determine the region order of the sub-regions.
4. The path planning method for a photovoltaic field weeding robot according to claim 3, characterized in that: The path planning is performed in each of the inscribed rectangular areas based on the ox-ploughing covering method to obtain the target sub-path of the sub-area, including: Taking the sub-region closest to the initial region as the initial region; Acquire boundary position information of four boundary points of the inscribed rectangular area in the initial area; Calculating the distance between the first position information and the boundary position information, and taking the boundary point corresponding to the boundary position information with the smallest distance as the starting point of the path; Based on the ox-ploughing covering method, path planning is performed from the starting point of the path to obtain a plurality of spaced straight line segments; When the number of the interval straight line segments is an even number, the path planning is completed to obtain the target sub-path of the sub-area; when the number of the interval straight line segments is an odd number, an interval straight line segment is continuously planned based on the ox-ploughing covering method to complete the path planning and obtain the target sub-path of the sub-area; An initial path sequence of the target sub-paths of the initial region is generated.
5. The path planning method for a photovoltaic field weeding robot according to claim 4, characterized in that: The path planning is performed in each of the inscribed rectangular areas based on the ox-ploughing covering method to obtain the target sub-path of the sub-area, including: When the inscribed rectangular area is a non-initial area, path planning is performed in the inscribed rectangular area according to the initial path sequence based on the ox-ploughing covering method to obtain the target sub-path of the sub-area.
6. The photovoltaic field weeding robot path planning method according to claim 1, characterized in that: The method further comprises: determining a plurality of target points from the target path; Obtaining coordinate information and angle information of the target point; The weeding robot is controlled to move according to the angle information of the current target point and the coordinate information of the next target point, so that the weeding robot completes the weeding task of the photovoltaic field.
7. A path planning device for a photovoltaic field weeding robot, characterized in that: The device comprises: A processing module, used for acquiring a grid map of the photovoltaic field, and dividing the grid map into regions to obtain an inaccessible region including obstacles and a accessible region excluding obstacles; A division module, configured to divide the passable area into one or more sub-areas based on the impassable area; An extraction module, used for extracting the inscribed rectangle of the sub-region to obtain an inscribed rectangular region; A first planning module is used to perform path planning in each of the inscribed rectangular areas based on a cow-ploughing covering method to obtain a target sub-path; The second planning module is used to connect each of the target sub-paths based on the area sequence of each of the sub-areas to obtain a target path of the weeding robot.
8. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the path planning method for the photovoltaic field weeding robot according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the path planning method for a photovoltaic field weeding robot according to any one of claims 1 to 6.
10. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions are used to enable a computer to execute the path planning method for a photovoltaic field weeding robot according to any one of claims 1 to 6.