Mowing robot navigation method, device and equipment and storage medium
By using map data and collision sensors to calculate the path in the single-chip lawn mowing robot, it can continue mowing around obstacles. This solves the problem of difficulty in path adjustment when the single-chip lawn mowing robot encounters obstacles, and improves the reliability and reliability of lawn mowing. flexibility.
Patent Information
- Application Number
- CN202410612472.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-16
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-16
AI Technical Summary
Due to insufficient computing power during the mowing process, the single-chip lawn mowing robot is difficult to flexibly adjust its path when encountering obstacles, resulting in insufficient lawn mowing reliability and flexibility.
By using map data and collision sensor feedback in the microcontroller lawn mowing robot, the Manhattan distance and walking distance are calculated, the initial boundary point and the target point are determined, and the lawn is continued mowing around obstacles along the boundary points of the preset boundary data.
The reliability and flexibility of the single-chip lawn mowing robot are improved during the mowing process, and it can flexibly adjust the path according to obstacles to ensure the completion of the mowing task.
Smart Images

Figure CN118525660A
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a lawn mowing robot navigation method, device, equipment and storage medium. Background Art
[0002] At present, many manufacturers' lawn mowers use Linux (an operating system) as the main control, which is basically a small computer with fast computing speed, multi-process and multi-threaded processing, dozens of G (Gigabyte, a computer storage unit), and can run many existing algorithm libraries. At the same time, it is equipped with multiple cameras and even laser radars, and the cost of the whole machine is very expensive. The main components of the lawn mower robot based on the single-chip microcomputer are single-chip microcomputer, ultrasound, camera, collision sensor, motor, high-precision GNSS (Global Navigation Satellite System) positioning module, etc. Compared with the lawn mower robot with Linux as the main control, the computing speed is lower, the storage space is lower, generally only tens of megabytes, and it cannot run complex algorithms, and cannot run image recognition libraries such as opencv (cross-platform computer vision library). Therefore, it is very limited in the realization of functions, but there is a relatively large advantage in price. Furthermore, during the mowing process of the single-chip mowing robot, due to its limited computing power, when mowing according to the pre-set mowing route, if it encounters an obstacle on the route, it usually directly triggers an alarm to remind the staff to resolve the obstacle; in this way, although the single-chip mowing robot has a cost advantage, the reliability and flexibility of the mowing process still has a lot of room for improvement.
[0003] It can be seen that how to improve the flexibility of the single-chip lawn mowing robot in the face of obstacles during the lawn mowing process is a problem to be solved in this field. Summary of the invention
[0004] In view of this, the purpose of the present invention is to provide a lawn mower robot navigation method, device, equipment and storage medium, the path of the single-chip lawn mower robot when mowing can be flexibly changed according to obstacles, and the reliability of the single-chip lawn mower robot during mowing is improved. The specific scheme is as follows:
[0005] In a first aspect, the present application provides a lawn mowing robot navigation method, which is applied to a lawn mowing robot based on a single chip microcomputer, comprising:
[0006] Mowing the target lawn according to a preset mowing path, if it is determined that the preset mowing path corresponding to the current position of the robot is blocked by an obstacle and cannot be passed, then determining points corresponding to the mowed area and a number of to-be-mowed points corresponding to the unmowed area according to the map data of the target lawn, and determining the initial boundary point closest to the current position from the preset boundary data; the preset boundary data is used to limit the activity boundary of the mowing robot in the target lawn;
[0007] Calculating the Manhattan distance between the initial boundary point and the plurality of points to be mowed to obtain a first distance, and calculating the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of points to be mowed to obtain a second distance;
[0008] The first distance and the second distance are calculated by a preset target point calculation formula, so as to determine a target point from the to-be-mowed points according to corresponding calculation results;
[0009] From the initial boundary point position, along the boundary point position corresponding to the preset boundary data to the target point position, so as to continue mowing the target lawn.
[0010] Optionally, mowing the target lawn according to a preset mowing path includes:
[0011] After mowing a point in the map data corresponding to the target lawn is completed according to the preset mowing path, the point in the map data is marked as a mowed area;
[0012] A preset mowing path is regenerated according to the mowed area and the corresponding unmowed area in the map data, so as to mow the target lawn based on the regenerated preset mowing path.
[0013] Optionally, determining that the preset mowing path corresponding to the current position of the user is blocked by an obstacle and cannot be passed includes:
[0014] Acquiring feedback data from its own collision sensor in real time during the process of moving along the preset mowing path;
[0015] If the feedback data indicates that a collision has occurred, it is determined that the preset mowing path corresponding to the current position of the vehicle is blocked by an obstacle and cannot be passed.
[0016] Optionally, the calculating the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of to-be-mowed points to obtain the second distance includes:
[0017] Calculating the clockwise walking distance and the counterclockwise walking distance from the initial boundary point to the to-be-mowed point along the boundary point of the preset boundary data in the clockwise and counterclockwise directions respectively;
[0018] The smallest walking distance between the clockwise walking distance and the counterclockwise walking distance is determined as the second distance from the initial boundary point to the point to be mowed.
[0019] Optionally, the moving from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point so as to continue mowing the target lawn includes:
[0020] Moving from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, and determining whether the obstacle blocks the movement;
[0021] If so, the target point is moved along the boundary point corresponding to the preset boundary data in a counterclockwise or clockwise direction to continue mowing the target lawn.
[0022] Optionally, the moving from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point includes:
[0023] If the obstacle blocks the passage from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, an alarm operation is triggered to remind relevant personnel to handle the situation.
[0024] Optionally, the method further includes:
[0025] During the mowing process, determining whether a proportion of points marked as mowed areas in the map data to all points in the map data is greater than a preset threshold;
[0026] If so, the operation of mowing the target lawn according to the preset mowing path is terminated.
[0027] In a second aspect, the present application provides a lawn mowing robot navigation device, which is applied to a lawn mowing robot based on a single chip microcomputer, comprising:
[0028] a point statistics module, for mowing a target lawn according to a preset mowing path, and if it is determined that the preset mowing path corresponding to the current position of the robot is blocked by an obstacle and cannot be passed, then the points corresponding to the mowed area and a number of to-be-mowed points corresponding to the unmowed area are determined according to the map data of the target lawn, and the initial boundary point closest to the current position is determined from the preset boundary data; the preset boundary data is used to limit the activity boundary of the mowing robot in the target lawn;
[0029] a distance calculation module, configured to calculate the Manhattan distance between the initial boundary point and the plurality of to-be-mowed points to obtain a first distance, and to calculate the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of to-be-mowed points to obtain a second distance;
[0030] a point determination module, configured to calculate the first distance and the second distance by using a preset target point calculation formula, so as to determine a target point from the to-be-mowed points according to corresponding calculation results;
[0031] The moving module is used to move from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point so as to continue mowing the target lawn.
[0032] In a third aspect, the present application provides an electronic device, including:
[0033] Memory, used to store computer programs;
[0034] A processor is used to execute the computer program to implement the lawn mowing robot navigation method as described above.
[0035] In a fourth aspect, the present application provides a computer-readable storage medium for storing a computer program, wherein the computer program, when executed by a processor, implements the lawn mowing robot navigation method as described above.
[0036] It can be seen that the mowing robot based on the single-chip microcomputer in the present application can mow the target lawn according to the preset mowing path. If it is determined that the preset mowing path corresponding to the current position of the robot is blocked by an obstacle and cannot be passed, the point corresponding to the mowed area and the several to-be-mowed points corresponding to the unmowed area are determined according to the map data of the target lawn, and the initial boundary point closest to the current position is determined from the preset boundary data; the preset boundary data is used to limit the activity boundary of the mowing robot in the target lawn; then the Manhattan distance between the initial boundary point and the several to-be-mowed points is calculated to obtain a first distance, and the walking distance from the initial boundary point along the boundary point of the preset boundary data to the several to-be-mowed points is calculated to obtain a second distance; the first distance and the second distance are calculated by the preset target point calculation formula to determine the target point from the to-be-mowed points according to the corresponding calculation results; then, the target lawn can be continued to be mowed from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point. In this way, when the microcontroller-based lawn mower robot encounters an obstacle during the mowing process and is unable to follow the pre-set mowing path, it can determine the area of the lawn that has not been mowed, and obtain a suitable target point through a pre-set calculation formula, and try to bypass the obstacle along the boundary point corresponding to the pre-set boundary data to reach the calculated target point; in this way, the obstacle can be bypassed, and the mowing path can be flexibly changed according to the obstacle, thereby improving the reliability of the microcontroller lawn mower robot during the mowing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0038] Figure 1 A flow chart of a lawn mowing robot navigation method disclosed in this application;
[0039] Figure 2 A flowchart of a specific lawn mowing robot navigation method disclosed in this application;
[0040] Figure 3 A schematic diagram of a specific arcuate path disclosed in this application;
[0041] Figure 4 A schematic diagram of a specific Manhattan distance calculation method disclosed in this application;
[0042] Figure 5A specific schematic diagram of travel distance disclosed in this application;
[0043] Figure 6 A schematic diagram of map elements corresponding to a specific lawn mowing task disclosed in this application;
[0044] Figure 7 This is a schematic structural diagram of a lawn mowing robot navigation device disclosed in this application;
[0045] Figure 8 This is a structural diagram of an electronic device disclosed in this application. DETAILED DESCRIPTION
[0046] 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 only 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 ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] See also Figure 1 As shown, an embodiment of the present invention discloses a lawn mowing robot navigation method, which is applied to a lawn mowing robot based on a single chip microcomputer, comprising:
[0048] Step S11, mowing the target lawn according to a preset mowing path. If it is determined that the preset mowing path corresponding to the current position is blocked by an obstacle and cannot be passed, then determining points corresponding to the mowed area and a number of to-be-mowed points corresponding to the unmowed area according to the map data of the target lawn, and determining the initial boundary point closest to the current position from the preset boundary data; the preset boundary data is used to limit the activity boundary of the mowing robot in the target lawn.
[0049] In this embodiment, the mowing robot based on the single-chip microcomputer first mows the target lawn according to the preset mowing path. If there are no obstacles in the path, the mowing task can be completed directly; if there are obstacles in the path and it is impossible to move along the preset mowing path, the single-chip microcomputer mowing robot can try to bypass the obstacle. Of course, if it is finally determined that the obstacle cannot be bypassed, it can choose to prompt the staff to handle it. Specifically, the single-chip microcomputer mowing robot cannot run the image recognition library, so it cannot judge whether it can bypass the obstacle through the image; if it is determined that the next mowing path corresponding to the current position is blocked by an obstacle and cannot be passed, the single-chip microcomputer mowing robot can mark the points of the mowed area and the points to be mowed in the unmowed area in the map data corresponding to the target lawn according to the mowing path that has been traveled. In addition, the preset boundary data is data used to limit the activity boundary of the single-chip microcomputer mowing robot on the target lawn. It can be understood that the single-chip microcomputer mowing robot has a certain width, so the actual mowing range is wider than its own center point; and the preset boundary data is constructed based on the center point of the single-chip microcomputer mowing robot, so the boundary point corresponding to the preset boundary data is completely in the map data of the target lawn.
[0050] In a specific embodiment, mowing the target lawn according to a preset mowing path may include: after mowing a point in map data corresponding to the target lawn according to the preset mowing path, marking the point in the map data as a mowed area; regenerating the preset mowing path according to the mowed area and the corresponding unmowed area in the map data, so as to mow the target lawn based on the regenerated preset mowing path. Specifically, when the single-chip microcomputer mowing robot mows the target lawn according to a preset mowing path, it moves in the target lawn according to the preset mowing path, and during the moving process, it marks the path that has been traveled in the map data of the target lawn, that is, the points where mowing is completed in the map data are marked as mowed areas; further, the single-chip microcomputer mowing robot can regenerate the mowing path according to the mowed areas and the corresponding unmowed areas in the map data, so as to subsequently mow according to the generated mowing path; for example, the single-chip microcomputer mowing robot can mow the target lawn according to a preset bow-shaped mowing path, or mow according to a U-shaped mowing path, and during the mowing process, the travel distance and angle can be controlled at the corners of the path to maintain the mowing path in real time.
[0051] In a specific embodiment, the determination that the preset mowing path corresponding to the current position of the robot is blocked by an obstacle and cannot be passed may include: obtaining feedback data of its own collision sensor in real time during the process of moving along the preset mowing path; if the feedback data indicates that a collision has occurred, determining that the preset mowing path corresponding to the current position of the robot is blocked by an obstacle and cannot be passed. Specifically, when the single-chip mowing robot moves along the preset mowing path, if a collision is detected by its own collision sensor, it can be determined that the preset mowing path for the next step corresponding to the current position of the robot is blocked by an obstacle and cannot be passed. In a specific embodiment, the single-chip mowing robot can also combine ultrasound and a camera to determine whether an obstacle is currently encountered.
[0052] Step S12: Calculate the Manhattan distance between the initial boundary point and the plurality of to-be-mowed points to obtain a first distance, and calculate the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of to-be-mowed points to obtain a second distance.
[0053] In this embodiment, when the single-chip mowing robot cannot follow the preset mowing path due to obstacles, it can determine the initial boundary point closest to the current position; then the Manhattan distance between the initial boundary point and the point to be mowed in the unmowed area can be calculated, so as to obtain the first distance; correspondingly, the walking distance from the initial boundary point along the boundary point to the point to be mowed can also be calculated to obtain the second distance.
[0054] In a specific embodiment, the calculation of the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of points to be mowed to obtain the second distance may include: respectively calculating the clockwise walking distance and the counterclockwise walking distance from the initial boundary point along the boundary points of the preset boundary data in the clockwise and counterclockwise directions to the points to be mowed; and determining the smallest walking distance between the clockwise walking distance and the counterclockwise walking distance as the second distance from the initial boundary point to the points to be mowed. Specifically, since the lawn is closed, the boundary point corresponding to the preset boundary data is also a closed area, and the walking distance from the initial boundary point to another point may include two paths, clockwise and counterclockwise. In the present application, only the distance with the smaller travel distance in the two paths is calculated, that is, the second distance is obtained.
[0055] Step S13: calculating the first distance and the second distance using a preset target point calculation formula, so as to determine a target point from the points to be mowed according to corresponding calculation results.
[0056] Furthermore, through the above steps, the first distance and the second distance between the single-chip mowing robot and the point to be mowed can be obtained, and then the first distance and the second distance can be calculated by a preset target point calculation formula to obtain a calculation result; the calculation result can represent a comprehensive evaluation of the distance between the current position and the point to be mowed, and a target point can be determined based on the calculation result.
[0057] In a specific embodiment, it may also include: during the mowing process, determining whether the proportion of the points marked as mowed areas in the map data to all the points in the map data is greater than a preset threshold; if so, terminating the operation of mowing the target lawn according to the preset mowing path. Specifically, it is understandable that during the mowing process, the mowed areas and unmowed areas in the map data are updated in real time, so that the mowing can be determined to be completed in time when the proportion of the mowed areas to all the points in the map data is greater than a preset threshold; in this way, even if an obstacle is encountered during the mowing process, the single-chip mowing robot can also determine the proportion of the mowed areas and choose to directly terminate the mowing when it is determined that the mowing is completed, and the obstacle does not affect the completion of the mowing task.
[0058] Step S14: moving from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point, so as to continue mowing the target lawn.
[0059] Furthermore, the above steps can determine the current position of the single-chip microcomputer lawn mower robot when it encounters an obstacle, the nearest initial boundary point, and the corresponding target point; then the single-chip microcomputer lawn mower robot can move from the current position to the initial boundary point, and then reach the target point along the boundary point of the preset boundary data to continue mowing. In a specific embodiment, the movement from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point to continue mowing the target lawn can include: moving from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, and determining whether the movement is blocked by the obstacle and cannot pass; if so, moving counterclockwise or clockwise along the boundary point corresponding to the preset boundary data to the target point to continue mowing the target lawn. Specifically, during the actual movement process, the single-chip microcomputer robot can move along the path corresponding to the calculated target point, that is, from the initial boundary point, move clockwise or counterclockwise along the boundary point of the preset boundary data to the target point; further, if this still cannot avoid obstacles, you can try to move from another direction, that is, move counterclockwise or clockwise along the boundary point to the target point.
[0060] In another specific embodiment, the process from the initial boundary point to the target point along the boundary point corresponding to the preset boundary data may include: if the robot is blocked by the obstacle and cannot pass through during the process from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, an alarm operation is triggered to remind relevant personnel to handle it. Specifically, if the robot is blocked by an obstacle and cannot pass through during the process from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, it means that the obstacle cannot be avoided and relevant personnel need to be reminded to handle it, and a corresponding alarm operation can be triggered. In a specific embodiment, when there is an obstacle in the target lawn that blocks the next mowing path of the single-chip microcomputer mowing robot, there is a deviation between the position of the obstacle in the target lawn and the position in the preset boundary data. For example, the width of the single-chip microcomputer robot is 50 cm, and the width of a rectangular area in the lawn is one meter (recorded as 0 to 100 cm). It can be understood that the boundary data corresponding to the single-chip microcomputer mowing robot should be 25 cm and 75 cm; and there is an obstacle located between 30 and 50 cm in the rectangular area. At this time, the single-chip microcomputer robot has only one way to pass through the rectangular area; in actual scenarios, the single-chip microcomputer mowing robot cannot determine whether it can bypass the obstacle through images. When it contacts the obstacle, it can first determine the boundary point closest to its current position based on the preset boundary data, determine a point to be mowed, and then go to the point to be mowed along the boundary point. In this way, when the single-chip microcomputer mowing robot is blocked by an obstacle during the mowing process, it can try to avoid the obstacle based on the boundary point.
[0061] It should be pointed out that the mowing robot based on the single-chip microcomputer can mow the target lawn according to a preset mowing path. The preset mowing path here can be a complete mowing path for the target lawn input by the staff. In the subsequent mowing process, the mowed areas and unmowed areas in the map data of the target lawn are updated and maintained in real time.
[0062] It can be seen that when the microcontroller-based lawn mower robot in the present application encounters an obstacle during the mowing process and is unable to move along the pre-set mowing path, it can determine the area of the lawn that has not yet been mowed, and obtain a suitable target point through a pre-set calculation formula, and try to bypass the obstacle along the boundary point corresponding to the pre-set boundary data to reach the calculated target point; in this way, obstacles can be bypassed, and the path during mowing can be flexibly changed according to the obstacles. Even if it cannot support graphics libraries such as OpenCV, it can try to solve the problem of the mowing path being blocked by obstacles, thereby improving the reliability of the microcontroller lawn mower robot during the mowing process.
[0063] like Figure 2 As shown, the embodiment of the present application discloses a lawn mowing robot navigation method, which is applied to a lawn mowing robot based on a single chip microcomputer, comprising:
[0064] In the embodiment of the present application, the mowing robot based on the single-chip microcomputer can mow the target lawn according to the preset arc-shaped mowing path. During the mowing process, if the current position and the historical trajectory are known, it can trace back from the current position along the historical trajectory to check whether there is an adjacent uncut area on the path point on the historical trajectory. If there is an uncut point, it can be stored in the target point list; then the point closest to the current position can be selected as the target point; then A* (a path finding and graph traversal algorithm) is used to plan from the current position to the target point, and then the arc-shaped search is re-performed to continue mowing. Figure 3 Shown is a schematic diagram of the arcuate path.
[0065] Furthermore, during the mowing process, if the pre-planned path is blocked by an obstacle, that is, the signal obtained from the collision sensor indicates that the planned path has failed to move, the proportion of the area of the mowed area at the current moment to the total lawn area can be determined first; if the proportion is greater than a preset threshold (such as 95%), it can be determined that the mowing is completed and the mowing is ended; and after the mowing is completed, the trimming mode can be entered. Correspondingly, if the proportion of the area of the mowed area at the current moment to the total lawn area is less than the preset threshold, the point set corresponding to the unmowed area at the current moment, that is, the candidate target point set, can be determined based on the map data corresponding to the target lawn; if the target point set is not empty, each candidate point can be scored so as to determine a target point based on the score, and then the single-chip mowing robot can go to the target point along the boundary point of the preset boundary data to avoid obstacles and continue mowing, and after avoiding obstacles, it can mow according to the pre-set mowing path.
[0066] In a specific embodiment, when the pre-planned path is blocked by an obstacle, if there are uncut points in the map data of the target lawn, the Manhattan distance between all uncut points p(x, y) and the current position of the robot r(x0, y0) can be calculated and normalized to obtain a first score S1, such as Figure 4 As shown in the figure, d1 and d2 are used to calculate the Manhattan distance; accordingly, the mowing robot can calculate the nearest boundary point pt to its current position, and then calculate the distance to the unmowed points outside pt. In actual operation, the machine first plans to go to the nearest boundary point, and then follows this nearest boundary point (clockwise / counterclockwise) to the target boundary point, and counts the total distance of the waypoints passed, as shown in the figure below. Figure 5 As shown, the total travel distance is then normalized to obtain a second score S2; Figure 5The figure shows a schematic diagram of the path waypoints. Further, the total score y = -k*logx {x=(s1+s2) / 2); 0<x<1.0} can be calculated; to improve the calculation resolution, k = 100 is taken. Then the target point with the highest score is selected. The following Table 1 shows the common values of -k*logx {x; 0<x<1.0}.
[0067] Table 1
[0068]
[0069] Further, after determining the final target point according to the total score y, A* can be used to search for the nearest initial boundary point from the point to the point to obtain the first path; then from the initial boundary point to the nearest target boundary point of the target point, along the boundary as the second path; and then splice the two paths to obtain the final path. The single-chip mower robot can try to avoid obstacles based on this final path, go to the target point, and continue mowing after reaching the target point.
[0070] In a specific embodiment, as Figure 6 The figure shows the map elements corresponding to the mowing task of the mower robot. Before the mower officially works, relevant personnel can first remotely control the machine to go around the lawn for one week to generate boundary data and store it in the memory; and the charging pile coordinates, connection paths, return charging paths, etc. can be set. After that, the mower robot comes out of the charging pile, obtains the current positioning of the machine by acquiring high-precision GNSS data to generate a grid map, that is, map data; then it can reach the lawn map along the return charging path, after completing one lawn map, reach another lawn map along the connection path, and after all are completed, return to the charging pile along the connection path and the return charging path. The bow-shaped path planning and obstacle avoidance and other behaviors are only executed during mowing. During mowing, the ultrasonic, camera, and collision sensor data can be obtained in real time. After being triggered, the current walking will end, the grid value of the grid map will be updated, and the obstacle avoidance strategy will be used to avoid obstacles, and then the bow-shaped planning or supplementary mowing planning will start again from the current position of the machine.
[0071] It can be seen that when the microcontroller-based lawn mower robot in the present application encounters an obstacle during the mowing process and is unable to follow the pre-set mowing path, it can determine the area of the lawn that has not been mowed, and determine whether to end mowing or try to avoid the obstacle to continue mowing based on the area of the mowed area and the area of the unmowed area; if it continues mowing, the points in the unmowed area can be calculated using a pre-set calculation formula to obtain a suitable target point, and try to bypass the obstacle to reach the calculated target point along the boundary points corresponding to the pre-set boundary data; in this way, obstacles can be bypassed, and the path during mowing can be flexibly changed according to the obstacles. Even if it cannot support graphics libraries such as opencv, it can try to solve the problem of the mowing path being blocked by obstacles, thereby improving the reliability of the microcontroller lawn mower robot during the mowing process.
[0072] like Figure 7 As shown, the embodiment of the present application discloses a lawn mowing robot navigation device, which is applied to a lawn mowing robot based on a single chip microcomputer, including:
[0073] The point counting module 11 is used to mow the target lawn according to a preset mowing path. If it is determined that the preset mowing path corresponding to the current position is blocked by an obstacle and cannot be passed, the point corresponding to the mowed area and the several to-be-mowed points corresponding to the unmowed area are determined according to the map data of the target lawn, and the initial boundary point closest to the current position is determined from the preset boundary data; the preset boundary data is used to limit the activity boundary of the mowing robot in the target lawn;
[0074] The distance calculation module 12 is used to calculate the Manhattan distance between the initial boundary point and the plurality of the to-be-mowed points to obtain a first distance, and calculate the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of the to-be-mowed points to obtain a second distance;
[0075] A point determination module 13, configured to calculate the first distance and the second distance by using a preset target point calculation formula, so as to determine a target point from the points to be mowed according to corresponding calculation results;
[0076] The moving module 14 is used to move from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point so as to continue mowing the target lawn.
[0077] It can be seen that when the microcontroller-based lawn mower robot in the present application encounters an obstacle during the mowing process and is unable to follow the pre-set mowing path, it can determine the area of the lawn that has not been mowed, and obtain a suitable target point through a pre-set calculation formula, and try to bypass the obstacle along the boundary point corresponding to the pre-set boundary data to reach the calculated target point; in this way, the obstacle can be bypassed, and the mowing path can be flexibly changed according to the obstacle, thereby improving the reliability of the microcontroller lawn mower robot during the mowing process.
[0078] In a specific embodiment, the point statistics module 11 may include:
[0079] A point marking unit, configured to mark a point in the map data as a mowed area after mowing a point in the map data corresponding to the target lawn is completed according to a preset mowing path;
[0080] A path generating unit is used to regenerate a preset mowing path according to the mowed area and the corresponding unmowed area in the map data, so as to mow the target lawn based on the regenerated preset mowing path.
[0081] In another specific embodiment, the point statistics module 11 may include:
[0082] A feedback data acquisition unit, used for acquiring feedback data of its own collision sensor in real time during the process of moving along the preset mowing path;
[0083] The obstacle determination unit is used to determine that the preset mowing path corresponding to the current position of the unit is blocked by an obstacle and cannot be passed when the feedback data indicates that a collision has occurred.
[0084] In a specific embodiment, the distance calculation module 12 may include:
[0085] A walking distance calculation unit, used to respectively calculate the clockwise walking distance and the counterclockwise walking distance from the initial boundary point along the boundary point of the preset boundary data in the clockwise and counterclockwise directions to the to-be-mowed point;
[0086] The second distance determining unit is used to determine the smallest walking distance between the clockwise walking distance and the counterclockwise walking distance as the second distance from the initial boundary point to the point to be mowed.
[0087] In a specific embodiment, the mobile module 14 may include:
[0088] A first moving unit is used to move from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, and determine whether it is blocked by the obstacle and cannot pass during the movement;
[0089] The second moving unit is used to move counterclockwise or clockwise along the boundary point corresponding to the preset boundary data to the target point when the obstacle blocks the movement so as to continue mowing the target lawn.
[0090] In another specific embodiment, the mobile module 14 may include:
[0091] The alarm unit is used to trigger an alarm operation to remind relevant personnel to handle the situation when the obstacle blocks the passage in the process of moving from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, so as to remind relevant personnel to handle the situation.
[0092] In a specific embodiment, the device may further include:
[0093] A point ratio determination module, used for determining whether the ratio of points marked as mowed areas in the map data to all points in the map data is greater than a preset threshold during the mowing process;
[0094] The mowing termination module is used to terminate the operation of mowing the target lawn according to the preset mowing path when the proportion of the points marked as mowed areas in the map data to all the points in the map data is greater than a preset threshold.
[0095] Furthermore, the present application also discloses an electronic device. Figure 8 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content in the diagram cannot be regarded as any limitation on the scope of use of the present application.
[0096] Figure 8 The present invention provides a schematic diagram of the structure of an electronic device 20 provided in an embodiment of the present application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the robot mowing navigation method disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0097] In this embodiment, the power supply 23 is used to provide working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0098] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0099] The operating system 221 is used to manage and control the hardware devices and computer programs 222 on the electronic device 20, and can be Windows Server, Netware, Unix, Linux, etc. In addition to the computer program that can be used to complete the lawn mowing robot navigation method performed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include computer programs that can be used to complete other specific tasks.
[0100] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned disclosed lawn mowing robot navigation method. The specific steps of the method can refer to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0101] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0102] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0103] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0104] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0105] The technical solution provided by the present application is introduced in detail above. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technicians in this field, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A lawn mowing robot navigation method, characterized in that: Applied to MCU-based lawn mowing robots, including: Mowing the target lawn according to a preset mowing path, if it is determined that the preset mowing path corresponding to the current position of the robot is blocked by an obstacle and cannot be passed, then determining points corresponding to the mowed area and a number of to-be-mowed points corresponding to the unmowed area according to the map data of the target lawn, and determining the initial boundary point closest to the current position from the preset boundary data; the preset boundary data is used to limit the activity boundary of the mowing robot in the target lawn; Calculating the Manhattan distance between the initial boundary point and the plurality of points to be mowed to obtain a first distance, and calculating the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of points to be mowed to obtain a second distance; The first distance and the second distance are calculated by a preset target point calculation formula, so as to determine a target point from the to-be-mowed points according to corresponding calculation results; From the initial boundary point position, along the boundary point position corresponding to the preset boundary data to the target point position, so as to continue mowing the target lawn.
2. The lawn mowing robot navigation method according to claim 1, characterized in that: The step of mowing the target lawn according to the preset mowing path includes: After mowing a point in the map data corresponding to the target lawn is completed according to the preset mowing path, the point in the map data is marked as a mowed area; A preset mowing path is regenerated according to the mowed area and the corresponding unmowed area in the map data, so as to mow the target lawn based on the regenerated preset mowing path.
3. The lawn mowing robot navigation method according to claim 1, characterized in that: The determining that the preset mowing path corresponding to the current position of the user is blocked by an obstacle and cannot be passed includes: Acquiring feedback data from its own collision sensor in real time during the process of moving along the preset mowing path; If the feedback data indicates that a collision has occurred, it is determined that the preset mowing path corresponding to the current position of the vehicle is blocked by an obstacle and cannot be passed.
4. The lawn mowing robot navigation method according to claim 1, characterized in that: The calculating of the walking distance from the initial boundary point along the boundary point of the preset boundary data to the plurality of to-be-mowed points to obtain the second distance includes: Calculating the clockwise walking distance and the counterclockwise walking distance from the initial boundary point to the to-be-mowed point along the boundary point of the preset boundary data in the clockwise and counterclockwise directions respectively; The smallest walking distance between the clockwise walking distance and the counterclockwise walking distance is determined as the second distance from the initial boundary point to the point to be mowed.
5. The lawn mowing robot navigation method according to claim 1, characterized in that: The method of moving from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point so as to continue mowing the target lawn includes: Moving from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, and determining whether the obstacle blocks the movement; If so, the target point is moved along the boundary point corresponding to the preset boundary data in a counterclockwise or clockwise direction to continue mowing the target lawn.
6. The robot lawn mower navigation method according to claim 5, characterized in that: The step of moving from the initial boundary point to the target point along the boundary point corresponding to the preset boundary data includes: If the obstacle blocks the passage from the initial boundary point to the target point in a clockwise or counterclockwise direction along the boundary point corresponding to the preset boundary data, an alarm operation is triggered to remind relevant personnel to handle the situation.
7. The lawn mowing robot navigation method according to any one of claims 1 to 6, characterized in that: Also includes: During the mowing process, determining whether a proportion of points marked as mowed areas in the map data to all points in the map data is greater than a preset threshold; If so, the operation of mowing the target lawn according to the preset mowing path is terminated.
8. A lawn mowing robot navigation device, characterized in that: Applied to MCU-based lawn mowing robots, including: a point statistics module, for mowing a target lawn according to a preset mowing path, and if it is determined that the preset mowing path corresponding to the current position of the robot is blocked by an obstacle and cannot be passed, then the points corresponding to the mowed area and a number of to-be-mowed points corresponding to the unmowed area are determined according to the map data of the target lawn, and the initial boundary point closest to the current position is determined from the preset boundary data; the preset boundary data is used to limit the activity boundary of the mowing robot in the target lawn; a distance calculation module, configured to calculate the Manhattan distance between the initial boundary point and the plurality of to-be-mowed points to obtain a first distance, and to calculate the walking distance from the initial boundary point along the boundary points of the preset boundary data to the plurality of to-be-mowed points to obtain a second distance; a point determination module, configured to calculate the first distance and the second distance by using a preset target point calculation formula, so as to determine a target point from the to-be-mowed points according to corresponding calculation results; The moving module is used to move from the initial boundary point along the boundary point corresponding to the preset boundary data to the target point so as to continue mowing the target lawn.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the lawn mowing robot navigation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: Used to store a computer program, which, when executed by a processor, implements the lawn mowing robot navigation method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Path planning method for mowing robot and mowing robot
CN113625701A
Mowing robot control method, chip and mowing robot
CN114545948A
Mowing control method and system of mower and readable storage medium
CN115454054A
Working method of mowing device
CN115708442A
Agricultural mower robot and thereby method of driving guidance
KR1020100118454A
Cited By
Mapping method and device, equipment and storage medium
CN120656141A
