Path planning method, self-moving device, electronic device, and storage medium
By determining the distance between the self-moving device and the area boundary, and following the working path or planned movement path, the problem of wheel marks caused by the self-moving device traveling in a straight line is solved, achieving the effects of lawn cleanliness and aesthetics as well as energy saving.
Patent Information
- Application Number
- CN202410973452.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-18
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-07-18
AI Technical Summary
When the self-moving device is low on power, it travels directly along a straight path between the stopping point and the target point, leaving extra tire tracks in working environments such as lawns, affecting cleanliness, aesthetics, and work efficiency.
When the target distance between the self-moving device and the area boundary is greater than a preset threshold, it moves towards the area boundary along the working path; when the target distance is less than the preset threshold, it plans a moving path based on the target location point, the device location point, and the area boundary to avoid the wheel tracks exceeding the working area.
It reduces wheel marks left by self-propelled mobile equipment on working environments such as lawns, ensuring a clean and aesthetically pleasing working environment while saving energy consumption and improving work efficiency.
Smart Images

Figure CN118938900B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of self-moving devices, and in particular to a path planning method, a self-moving device, an electronic device, and a storage medium. BACKGROUND
[0002] With the continuous progress of science and technology and the rapid development of artificial intelligence, using self-moving devices (for example, lawn mowers, cleaning machines, cruise machines, etc.) to perform work can greatly improve work efficiency.
[0003] In related technologies, a self-moving device often performs a work task according to a pre-planned work path. The work path is often neat and regular, and the self-moving device walking along the work path will leave neat and beautiful wheel marks on the work environment such as a lawn. Such neat and beautiful wheel marks will not damage the overall aesthetics of the work environment such as a lawn. When a sudden situation (such as insufficient power) occurs, causing the self-moving device to need to stop the current work task and move from the stop position point to the target position point, the self-moving device often directly travels along the straight line path between the stop position point and the target position point, causing the work environment such as a lawn to leave redundant wheel marks, which damages the neatness and aesthetics of the originally neat and regular work environment such as a lawn, and makes it difficult to ensure the work effect of the self-moving device. Taking a lawn mower as an example, the lawn mower usually works in a target work area. In order to facilitate charging, the area boundary line of the target work area is provided with a charging station. When the lawn mower needs to move to the charging station for charging due to insufficient power while performing a mowing task, in order to save power, the lawn mower often directly travels along the straight line path between the stop position point and the charging station, causing wheel marks to be left on the lawn, affecting the overall aesthetics of the lawn and the mowing effect of the lawn mower. SUMMARY
[0004] In view of the above, it is necessary to provide a path planning method, a self-moving device, an electronic device, and a storage medium, which can solve the technical problem that the work environment such as a lawn leaves redundant wheel marks due to the self-moving device directly traveling along the straight line path between the stop position point and the target position point, which damages the neatness and aesthetics of the work environment such as a lawn and affects the work effect of the self-moving device.
[0005] In one aspect, the application provides a path planning method applied to a self-moving device, the self-moving device having a corresponding working path in a working area, the method comprising: in response to a moving instruction, if a target distance between the self-moving device and a region boundary of the working area is greater than or equal to a preset threshold, moving the self-moving device towards the region boundary according to the working path until the target distance is less than the preset threshold, and when the target distance is less than the preset threshold, planning a moving path of the self-moving device from a device position point of the self-moving device to a target position point based on the target position point and the region boundary, wherein the target position point is located on the region boundary.
[0006] In another aspect, the application provides a path planning method applied to an electronic device, the electronic device being in communication connection with a self-moving device, the self-moving device having a corresponding working path in a working area, the method comprising: in response to a moving instruction, if a target distance between the self-moving device and a region boundary of the working area is greater than or equal to a preset threshold, controlling the self-moving device to move towards the region boundary according to the working path until the target distance is less than the preset threshold, and when the target distance is less than the preset threshold, planning a moving path of the self-moving device from a device position point of the self-moving device to a target position point based on the target position point and the region boundary, wherein the target position point is located on the region boundary.
[0007] In another aspect, the application provides a self-moving device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to enable the self-moving device to implement the path planning method.
[0008] In another aspect, the application provides an electronic device, comprising: a storage device, a processing device, and a computer program stored in the storage device and executable on the processing device, wherein the processing device executes the computer program to enable the electronic device to implement the path planning method.
[0009] In another aspect, the application provides a computer readable storage medium, the computer readable storage medium storing a computer program, the computer program being executable on a processor in a self-moving device to implement the path planning method, or being executable on a processing device in an electronic device to implement the path planning method.
[0010] In the path planning method of the embodiment, when the target distance between the self-moving device and the region boundary is greater than the preset threshold, it means that the self-moving device is far away from the region boundary, and the self-moving device moves along the working path towards the region boundary, so that the wheel marks of the self-moving device are all on the working path, avoiding leaving extra wheel marks in other areas except the working path, and ensuring the neatness and beauty of the work environment such as lawn. When the target distance between the self-moving device and the region boundary is less than the preset threshold, it means that the self-moving device is close to the region boundary, and based on the target position point, the device position point and the region boundary, a moving path leaving fewer wheel marks in the working area can be planned. BRIEF DESCRIPTION OF DRAWINGS
[0011] Figure 1 is a flowchart of the path planning method provided by an embodiment of the present application.
[0012] Figure 2 is a schematic diagram of a working area, a region boundary and a working path provided by an embodiment of the present application.
[0013] Figure 3 is a schematic diagram of a working area, a region boundary and a working path provided by another embodiment of the present application.
[0014] Figure 4 is a schematic diagram of a moving path provided by an embodiment of the present application.
[0015] Figure 5 is a schematic diagram of a moving path provided by another embodiment of the present application.
[0016] Figure 6 is a flowchart of the path planning method provided by another embodiment of the present application.
[0017] Figure 7 is a structural schematic diagram of a self-moving device provided by an embodiment of the present application.
[0018] Figure 8 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be described in detail below with reference to the drawings and specific embodiments.
[0020] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone, where A and B can be singular or plural. The terms "first," "second," "third," "fourth," etc. (if present) in the specification, claims, and drawings of this application are used to distinguish similar objects, not to describe a specific order or sequence.
[0021] In the embodiments of this application, the terms "exemplary" or "for example" are used to indicate that something is an example, illustration, or description. Any embodiment or design that is described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or advantageous than other embodiments or design. Specifically, the use of the terms "exemplary" or "for example" is intended to present the relevant concepts in a specific manner.
[0022] This application provides a path planning method that can reduce energy consumption and the impact on the working environment, such as lawns, thereby ensuring the operational effectiveness of self-moving equipment.
[0023] The path planning method provided in this application can be applied to one or more self-moving devices, or it can be applied to one or more electronic devices. Self-moving devices can be lawnmowers, cleaning robots, de-icing robots, and cruise robots, etc. Electronic devices can be computers, tablets, mobile phones, servers, cloud servers, personal digital assistants (PDAs), game consoles, interactive network television (IPTV), smart wearable devices, etc. This application does not limit the types of self-moving devices and electronic devices.
[0024] To more clearly illustrate the path planning method provided in the embodiments of this application, the path planning methods applied to self-mobile devices and electronic devices will be described below respectively.
[0025] like Figure 1 The diagram shown is a flowchart of a path planning method provided in one embodiment of this application. Depending on different needs, the order of the steps in this flowchart can be adjusted according to actual requirements, and some steps can be omitted. The method is applied to a self-moving device, which has a corresponding working path within its working area.
[0026] S11, in response to the movement command, the self-moving device determines whether the target distance between the self-moving device and the area boundary of the working area is less than a preset threshold.
[0027] In some embodiments of the present application, the working area can be determined by map information. The working path can be the path along which the self - moving device performs work tasks. The working path can be regular. After the self - moving device performs work tasks along the working path in the working area, regular wheel marks will be left in the working area. The neat and regular wheel marks will not damage the overall aesthetic of the working environment such as the lawn. For example, after a lawn mowing robot mows the lawn along a zigzag path, multiple parallel wheel marks will be covered in the lawn. Such multiple parallel wheel marks can bring a good visual effect to the user.
[0028] The working path can be planned based on the map information of the working area according to various algorithms. Among them, various algorithms can be machine learning algorithms such as convolutional neural networks, positioning algorithms, navigation algorithms, etc. The working path can have a corresponding direction and shape. For example, the working path can be a spiral path with a direction from the inside to the outside or from the outside to the inside. To meet different working requirements, there can also be various variants of the spiral path. For example, the spiral path can have turning points, forming a shape similar to the Chinese character '回' (hui). Or, the spiral path can also be a continuous spiral shape without turning points.
[0029] The area boundary can be the boundary of the working area determined by map information. For example, if the self - moving device is a lawn mower, the area boundary can be the actual boundary of the lawn in the mowing map, or it can not be the actual boundary of the lawn but a custom boundary. The area boundary can be a range formed by multiple area position points. The area boundary of the working area can have a corresponding shape. For example, the boundary of the working area can be circular or rectangular. The present application does not limit the shape of the area boundary. Each boundary position point has a corresponding coordinate. The boundary position points can be obtained by user input, or the self - moving device can determine the boundary position points constituting the area boundary according to the pre - planned boundary in the mowing map. For example, the self - moving device can determine all the position points whose distance from the pre - planned boundary in the mowing map is less than or equal to a preset distance threshold as boundary position points, where the preset distance threshold can be custom - set, and the present application does not limit this. If the area boundary includes multiple sides, each side can be a range formed by multiple area position points.
[0030] As Figure 2 shown, it is a schematic diagram of the working area, area boundary and working path provided by an embodiment of the present application. As Figure 3 shown, it is a schematic diagram of the working area, area boundary and working path provided by another embodiment of the present application. Figure 2 The working path shown is a spiral path similar to the Chinese character '回' (hui), with a direction from the inside to the outside (refer to the arrow direction in Figure 2 ). Figure 3The working path shown is a continuous spiral path without fold points, and the direction is from outside to inside (as indicated by the arrow in Figure 3 ). Figure 2 The region boundary in Figure 3 is indicated by a dashed line. Figure 2 The region boundary in Figure 3 is rectangular. For ease of description, Figure 2 The dashed line indicating the region boundary in Figure 3 may actually be a region range formed by multiple boundary points. For example, Figure 2 The rectangular region boundary shown in Figure 3 may have each side formed by multiple boundary points.
[0031] In some embodiments of the present application, the self-moving device can stop performing the working task in response to the moving instruction. For example, if the self-moving device is a mower, the mower can stop the mowing task in response to the moving instruction. If the self-moving device is a cleaning machine, the cleaning machine can stop performing the cleaning task in response to the moving instruction.
[0032] The moving instruction can be an instruction to control or instruct the self-moving device to move to a target position point, which can be located on the region boundary. In some embodiments, the target position point can be the location (coordinates) of a charging station, the location of a maintenance point or a cleaning point, the location of a safe docking point, the location of a storage point, or the location of a task handover point, and the present application does not limit the target position point. In other embodiments, if the self-moving device is a mower, the target position point can be the intersection position of the connecting path between the charging station and the working region boundary on the boundary, and the mower can reach the charging station along the connecting path after reaching the intersection position. The coordinates of the target position point can be input by a user.
[0033] The moving instruction can be triggered in various ways, and the present application does not limit the triggering method of the moving instruction. For example, if the target position point is the location or coordinates of a charging station, the self-moving device can receive a moving instruction from an external device to control the self-moving device to move to the charging station; or if the internal power is detected to be less than a preset configuration value, the self-moving device can automatically generate and trigger a moving instruction to control the self-moving device to move to the charging station, wherein the preset configuration value can be customized, and the present application does not limit the preset configuration value; or the self-moving device can trigger a moving instruction to control the self-moving device to move to the charging station at a planned time point. For example, if the target position point is the location of a maintenance point, the self-moving device can automatically trigger a moving instruction to control the self-moving device to move to the location of the maintenance point when an internal fault is detected.
[0034] In some embodiments of the present application, the target distance can be the distance between the self-moving device and the boundary position point closest to the self-moving device. The self-moving device can calculate the target distance according to the coordinates of the self-moving device and the coordinates of the boundary position point closest to the self-moving device. During movement, the coordinates of the self-moving device change, so the target distance can be calculated multiple times. The target distance can be a Euclidean distance, a Manhattan distance, a Chebyshev distance, or the like, which is not limited in the present application. For example, the self-moving device can obtain the coordinates of the self-moving device by using a real-time kinematic (RTK) technology.
[0035] The self-moving device can calculate the target distance in real time or periodically, which is not limited in the present application. The preset threshold can be set by the user, which is not limited in the present application. For example, the preset threshold can be 0.5 m, 1 m, 1.5 m, or the like.
[0036] In some embodiments of the present application, if the target distance is greater than or equal to the preset threshold, step S12 is performed, and if the target distance is less than the preset threshold, step S13 is performed.
[0037] In the present embodiment, by determining the distance between the self-moving device and the boundary position point closest to the self-moving device as the target distance, and comparing the target distance with the preset threshold, the proximity of the self-moving device to the area boundary can be accurately determined.
[0038] S12, the self-moving device moves towards the area boundary according to the working path until the target distance is less than the preset threshold.
[0039] In some embodiments of the present application, the self-moving device can move towards the area boundary along the working path. For example, taking a lawn mower as an example, if the mowing path of the lawn mower is a spiral path, and the shortest distance between the lawn mower and the area boundary is less than the preset threshold, the lawn mower can move along the spiral path from the inside to the outside towards the area boundary.
[0040] In the embodiment, if the target distance between the mobile device and the region boundary is greater than or equal to the preset threshold, it means that the mobile device is far away from the region boundary, and the mobile device moves along the working path towards the region boundary, so that the wheel marks of the mobile device are all on the working path, thereby avoiding leaving extra wheel marks outside the working path, and ensuring the neatness and beauty of the working environment such as lawn. If the mobile device is a mower, the mower moves along the mowing path, so that the wheel marks of the mower are all on the mowing path, thereby avoiding leaving extra wheel marks on the lawn, and ensuring the beauty of the lawn.
[0041] S13, the mobile device plans a moving path of the mobile device from the device position point to the target position point based on the target position point, the device position point of the mobile device and the region boundary.
[0042] In some embodiments of the present application, the device position point is the coordinate of the mobile device when the target distance is less than the preset threshold. The mobile device can obtain the device position point of the mobile device when the target distance is less than the preset threshold in various ways. The moving path includes a first moving path and a second moving path, the first moving path can be a path from the device position point to the region boundary, and the second moving path can be a path from the region boundary to the target position point.
[0043] In some embodiments of the present application, the first moving path can be the shortest path from the device position point to the target boundary position point, and the second moving path can be a path along the region boundary from the target boundary position point to the target position point.
[0044] The target boundary position point can be the boundary position point corresponding to the device position point when the target distance is calculated, that is, the boundary position point corresponding to the target distance or the first moving path. Since the straight line path between two points is the shortest, the mobile device can determine the straight line path from the device position point to the target boundary position point as the first moving path.
[0045] If there are multiple paths along the region boundary from the target boundary position point to the target position point, the second moving path can be the shortest path among the multiple paths along the region boundary from the target boundary position point to the target position point, or the second moving path can be any one of the multiple paths along the region boundary from the target boundary position point to the target position point.
[0046] For example, if the region boundary is in the shape of a closed loop (such as a rectangle or a circle), the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Alternatively, the mobile device can determine the second movement path as an optional one of the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point.
[0047] For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 4 For example, as shown in FIG. 3, which is a schematic diagram of a movement path provided by another embodiment of the present application, the mobile device can determine the second movement path as an optional one of the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 5 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 4 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 2 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 4 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 5 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 3 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 5 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 4 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 5 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 4 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point. Figure 5 For example, as shown in FIG. 2, which is a schematic diagram of a movement path provided by an embodiment of the present application, the mobile device can determine the shortest path as the second movement path from the path along the clockwise direction of the region boundary from the target boundary position point to the target position point and the path along the counterclockwise direction of the region boundary from the target boundary position point to the target position point.
[0048] In some embodiments of the present application, after the movement path is planned, the mobile device can move from the device position point to the target boundary position point according to the first movement path, and move from the target boundary position point to the target position point according to the second movement path.
[0049] In the embodiment, considering the characteristics that the inner circle path is short and the outer circle path is long in the spiral path, when the target distance is less than the preset threshold, representing that the self-moving device is close to the region boundary, by determining the shortest path from the device position point to the region boundary as the first moving path, and determining the path along the region boundary from the target boundary position point to the target position point as the second moving path, when the self-moving device travels along the first moving path and the second moving path, the self-moving device does not need to move along the outer circle path, so not only the energy consumption of the self-moving device can be reduced, but also the influence of the wheel marks of the self-moving device on the aesthetics of the work environment such as lawn can be reduced, thereby ensuring the work effect of the self-moving device. If the self-moving device is a mower, the target position point is the position of the charging station, considering the characteristics that the inner circle path is short and the outer circle path is long in the spiral mowing path, by determining the shortest path from the device position point to the region boundary as the first moving path, and determining the path along the region boundary from the target boundary position point to the target position point as the second moving path, when the mower travels along the first moving path and the second moving path, the mower does not need to move along the outer circle of the mowing path, so not only the power consumption of the mower can be reduced, but also the influence of the wheel marks of the mower on the aesthetics of the lawn can be reduced, thereby ensuring the work effect of the mower.
[0050] In other embodiments of the present application, if the self-moving device moves to the target position point for charging, maintenance, cleaning and the like, after completing the corresponding charging, maintenance, cleaning and the like, the self-moving device can re-execute the work task. For example, when the work path is a spiral path and the target position point is the position of the charging station, if the spiral path is in the direction from outside to inside, the self-moving device that has completed charging can move to a stop position point according to the moving path and the spiral path, and the self-moving device starts from the stop position point and continues to execute the work task according to the direction of the spiral path. Or, if the spiral path is in the direction from inside to outside, the self-moving device that has completed charging can move from the target position point to the end point of the spiral path, and start from the end point and continue to execute the work task according to the reverse direction of the spiral path.
[0051] In the embodiment, if the spiral path is in the outward direction, moving along the first moving path, the second moving path and the spiral path is equivalent to moving to the stop position point according to the original path, which not only can reduce the energy consumption, but also can reduce the impact on the neatness of the work environment such as lawn. If the spiral path is in the inward direction, the mobile device can move from the target position point to the end point of the spiral path along the boundary of the region according to the shortest path, and perform the work task from the end point, which can reduce the moving time, thereby improving the work efficiency. If the mobile device is a lawn mower, moving from the target position point to the end point of the spiral path along the boundary of the region according to the shortest path, and performing the mowing task from the end point, which can reduce the moving time, thereby improving the work efficiency of the lawn mower. After the lawn mower starts the mowing task from the stop position point or the end point of the spiral path, the outer circle indentation generated by the lawn mower along the work path will cover the wheel indentation on the shortest path between the device position point and the boundary of the region, thereby further reducing the impact on the overall appearance of the lawn.
[0052] In the path planning method of the embodiment, when the target distance between the mobile device and the boundary of the region is greater than the preset threshold, it means that the mobile device is far away from the boundary of the region, and the mobile device moves along the work path towards the boundary of the region, so that the wheel indentation of the mobile device is all on the work path, avoiding leaving redundant wheel indentation in other areas except the work path, and ensuring the neatness and beauty of the work environment such as lawn. When the target distance between the mobile device and the boundary of the region is less than the preset threshold, it means that the mobile device is close to the boundary of the region, and based on the target position point, the device position point and the boundary of the region, a moving path that leaves less wheel indentation in the work area can be planned, thereby reducing the energy (such as power) consumption of the mobile device. When the mobile device moves along the moving path, the damage of the wheel indentation of the mobile device to the work environment such as lawn can be reduced, thereby reducing the impact on the overall appearance of the work environment such as lawn, and ensuring the work effect of the mobile device. If the mobile device is a lawn mower and the target position point is the position of the charging station, based on the position of the charging station, the device position point of the lawn mower and the boundary of the region, a moving path that leaves less wheel indentation in the work area can be planned for the lawn mower. When the lawn mower moves along the moving path, not only can the power of the lawn mower be saved, avoiding the situation that the power of the lawn mower is consumed halfway due to too long path, causing the lawn mower to be unable to move to the charging station, but also the damage of the wheel indentation of the lawn mower to the lawn can be reduced, thereby reducing the impact on the overall appearance of the lawn. In addition, the outer circle indentation generated by the lawn mower along the work path in the subsequent mowing will cover the wheel indentation on the shortest path between the device position point and the boundary of the region, thereby further reducing the impact on the overall appearance of the lawn.
[0053] As Figure 6Fig. 6 is a flowchart of a path planning method according to another embodiment of the present application. The order of the steps in the flowchart can be adjusted according to actual requirements, and some steps can be omitted according to different requirements. The method is applied to an electronic device, which can be connected to a self-moving device through wired communication and / or wireless communication. The self-moving device has a corresponding working path in a working area.
[0054] In S21, the electronic device determines whether a target distance between the self-moving device and the area boundary of the working area is less than a preset threshold value in response to a moving instruction.
[0055] In some embodiments of the present application, the moving instruction can be an instruction for controlling or ordering the self-moving device to move to a target position point, and the target position point can be located at the area boundary. The electronic device can receive the moving instruction sent from the self-moving device and control the self-moving device to stop performing the working task, or the electronic device can receive the power information sent from the self-moving device, compare the received power information with a preset configuration value, and if the power information is lower than the preset configuration value, generate and send the moving instruction to the self-moving device to control the self-moving device to stop performing the working task.
[0056] The preset configuration value can be set by the user, and the present application does not limit the preset configuration value. The triggering mode of the moving instruction is only an example, and the actual application is not limited thereto.
[0057] The descriptions of the working area, the working path, the area boundary, the moving instruction, the target position point, and the preset threshold value can refer to the descriptions of steps S11-S12, and the present application will not be described again.
[0058] In some embodiments of the present application, the target distance can be the distance between the self-moving device and the boundary position point closest to the self-moving device. The self-moving device can calculate the target distance according to the coordinates of the self-moving device and the coordinates of the boundary position point closest to the self-moving device. Since the coordinates of the self-moving device will change during the movement, the calculation of the target distance can be performed multiple times. The target distance can be Euclidean distance, Manhattan distance, Chebyshev distance, etc., and the present application does not limit the target distance. For example, the self-moving device can obtain the coordinates of the self-moving device by using the real-time kinematic (RTK) technology.
[0059] The electronic device can receive the coordinate information transmitted in real time or at a timing from the self-moving device as the coordinate of the self-moving device. The electronic device can calculate the target distance in real time or at a timing, which is not limited in the present application.
[0060] In some embodiments of the present application, if the target distance is greater than or equal to the preset threshold, step S22 is performed, and if the target distance is less than the preset threshold, step S23 is performed.
[0061] In the present embodiment, the electronic device determines the distance between the self-moving device and the boundary position point closest to the self-moving device as the target distance, and compares the target distance with the preset threshold, which can accurately determine the proximity of the self-moving device to the region boundary.
[0062] S22, the electronic device controls the self-moving device to move towards the region boundary along the working path until the target distance is less than the preset threshold.
[0063] In some embodiments of the present application, the electronic device can control the self-moving device to move towards the region boundary along the working path. For example, taking a lawn mower as an example, if the mowing path of the lawn mower is a spiral path, and the shortest distance between the lawn mower and the region boundary is less than the preset threshold, the electronic device can control the lawn mower to move along the spiral path from the inside to the outside towards the region boundary.
[0064] In the present embodiment, if the target distance between the self-moving device and the region boundary is greater than or equal to the preset threshold, it means that the self-moving device is far away from the region boundary, and at this time the electronic device controls the self-moving device to move towards the region boundary along the working path, which can make the wheel marks of the self-moving device all be in the working path, thereby avoiding leaving extra wheel marks in other areas except the working path, and ensuring the neatness and beauty of the work environment such as lawn. If the self-moving device is a lawn mower, controlling the lawn mower to move along the mowing path can make the wheel marks of the lawn mower all be in the mowing path, avoiding leaving extra wheel marks on the lawn, thereby ensuring the beauty of the lawn.
[0065] S23, the electronic device plans a moving path for the self-moving device to move from the device position point to the target position point based on the target position point, the device position point of the self-moving device, and the region boundary.
[0066] In some embodiments of the present application, the device position point is the coordinate of the self-moving device when the target distance is less than the preset threshold. The electronic device can obtain the device position point of the self-moving device when the target distance is less than the preset threshold in various ways. The moving path includes a first moving path and a second moving path, the first moving path can be a path from the device position point to the region boundary, and the second moving path can be a path from the region boundary to the target position point.
[0067] In some embodiments of the present application, the first movement path can be the shortest path from the device location point to the target boundary location point, and the second movement path can be the path along the region boundary from the target boundary location point to the target location point.
[0068] The target boundary location point can be the boundary location point corresponding to the device location point when the target distance is calculated, or the boundary location point corresponding to the first movement path or the target distance. Since the straight line path is the shortest among paths between two points, the electronic device can determine the straight line path from the device location point to the target boundary location point as the first movement path.
[0069] If there are multiple paths along the region boundary from the target boundary location point to the target location point, the second movement path can be the shortest path among the multiple paths along the region boundary from the target boundary location point to the target location point, or the second movement path can be any one of the multiple paths along the region boundary from the target boundary location point to the target location point.
[0070] For example, if the region boundary is in the shape of a closed loop (such as a rectangle or a circle), the electronic device can determine the shortest path from the target boundary location point to the target location point along the region boundary in the clockwise direction and the shortest path from the target boundary location point to the target location point along the region boundary in the counterclockwise direction as the second movement path. Alternatively, the electronic device can determine any one of the path from the target boundary location point to the target location point along the region boundary in the clockwise direction and the path from the target boundary location point to the target location point along the region boundary in the counterclockwise direction as the second movement path.
[0071] In some embodiments of the present application, after the movement paths are planned, the electronic device controls the self-moving device to move from the device location point to the target boundary location point according to the first movement path, and controls the self-moving device to move from the target boundary location point to the target location point according to the second movement path.
[0072] In the embodiment, considering the characteristics that the inner circle path is short and the outer circle path is long in the spiral path, when the target distance is less than the preset threshold, representing that the self-moving device is close to the region boundary, the shortest path from the device position point to the region boundary is determined as the first moving path, and the path along the region boundary from the target boundary position point to the target position point is determined as the second moving path, and the self-moving device is controlled to travel along the first moving path and the second moving path, so that the self-moving device does not need to move along the outer circle path, thereby not only reducing the energy consumption of the self-moving device, but also reducing the influence of the wheel marks of the self-moving device on the aesthetics of the work environment such as lawn, thereby ensuring the work effect of the self-moving device. If the self-moving device is a mower, the target position point is the position of the charging station, considering the characteristics that the inner circle path is short and the outer circle path is long in the spiral mowing path, by determining the shortest path from the device position point to the region boundary as the first moving path, and determining the path along the region boundary from the target boundary position point to the target position point as the second moving path, when the mower is controlled to travel along the first moving path and the second moving path, the mower does not need to move along the outer circle of the mowing path, thereby not only reducing the power consumption of the mower, but also reducing the influence of the wheel marks of the mower on the aesthetics of the lawn, thereby ensuring the work effect of the mower.
[0073] In other embodiments of the present application, if the self-moving device moves to the target position point for charging, maintenance, cleaning and the like, after completing the corresponding charging, maintenance, cleaning and the like, the electronic device can control the self-moving device to re-execute the work task. For example, the work path is a spiral path, the target position point is the position of the charging station, if the spiral path is in the direction from outside to inside, the electronic device controls the self-moving device that has completed charging to move to the stop position point according to the moving path and the spiral path, and controls the self-moving device to start from the stop position point and continue to execute the work task according to the direction of the spiral path. Or, if the spiral path is in the direction from inside to outside, the electronic device controls the self-moving device that has completed charging to move from the target position point to the end point of the spiral path, and controls the self-moving device to start from the end point and continue to execute the work task according to the reverse direction of the spiral path.
[0074] In the embodiment, if the spiral path is in the outward direction, controlling the self-moving device to move along the first moving path, the second moving path and the spiral path is equivalent to controlling the self-moving device to move to the stop position point according to the original path. Not only can the energy consumption be reduced, but also the influence on the neatness of the work environment such as lawn can be reduced. If the spiral path is in the inward direction, the electronic device can control the self-moving device to move along the region boundary, from the target position point to the end point of the spiral path according to the shortest path, and perform the work task from the end point. The moving time can be reduced, and thus the work efficiency can be improved. If the self-moving device is a lawn mower, the electronic device controls the lawn mower to move along the region boundary, from the target position point to the end point of the spiral path according to the shortest path, and perform the mowing task from the end point. The moving time can be reduced, and thus the work efficiency of the lawn mower can be improved. After the lawn mower starts the mowing task from the stop position point or the end point of the spiral path, the outer circle indentation generated by the lawn mower along the work path can cover the wheel indentation on the shortest path between the device position point and the region boundary, and thus the influence on the overall appearance of the lawn can be further reduced.
[0075] In the path planning method of the embodiment, when the target distance between the self-moving device and the region boundary is greater than the preset threshold, it means that the self-moving device is far away from the region boundary. The self-moving device moves along the work path towards the region boundary, so that the wheel indentation of the self-moving device is all on the work path, and no extra wheel indentation is left on other areas except the work path, thereby ensuring the neatness and beauty of the work environment such as lawn. When the target distance between the self-moving device and the region boundary is less than the preset threshold, it means that the self-moving device is close to the region boundary. Based on the target position point, the device position point and the region boundary, a moving path with less wheel indentation in the work area can be planned, thereby reducing the energy (such as power) consumption of the self-moving device. When the self-moving device is controlled to move along the moving path, the damage of the wheel indentation of the self-moving device to the work environment such as lawn can be reduced, thereby reducing the influence on the overall appearance of the work environment such as lawn, and ensuring the work effect of the self-moving device. If the self-moving device is a lawn mower and the target position point is the position of a charging station, based on the position of the charging station, the device position point of the lawn mower and the region boundary, a moving path with less wheel indentation in the work area can be planned for the lawn mower. When the lawn mower is controlled to move along the moving path, not only the power of the lawn mower can be saved, and the situation that the lawn mower cannot move to the charging station due to the power consumption of the lawn mower during the journey because the path is too long can be avoided, but also the damage of the wheel indentation of the lawn mower to the lawn can be reduced, thereby reducing the influence on the overall appearance of the lawn. In addition, the outer circle indentation generated by the lawn mower along the work path in the subsequent mowing process can cover the wheel indentation on the shortest path between the device position point and the region boundary, and thus the influence on the overall appearance of the lawn can be further reduced.
[0076] For example, as shown in FIG. 1, it is a structural schematic diagram of a self-moving device provided by an embodiment of the present application. Figure 7 Figure 7 In the embodiment, the self-moving device 1 includes a body, and a memory 11, a processor 12, a power supply 13, a sensor 14, a working mechanism 15, a communication module 16, a positioning module 17, a driving wheel 18 and a bus 19 arranged on the body. The processor 12 is coupled to the memory 11, the power supply 13, the sensor 14, the working mechanism 15, the communication module 16, the positioning module 17 and the driving wheel 18 through the bus 19 respectively.
[0077] The memory 11 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The random access memory can be directly read and written by the processor 12, and can be used to store executable programs (such as machine instructions) of an operating system or other programs running in the background, and can also be used to store data of users and applications, etc. The random access memory can include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0078] The non-volatile memory can also store executable programs and store data of users and applications, etc., which can be loaded into the random access memory in advance for direct reading and writing by the processor 12. The non-volatile memory can include a magnetic disk storage device, a flash memory.
[0079] The memory 11 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 12. The one or more computer programs include a plurality of instructions, which when executed by the processor 103, can implement a path planning method executed on the self-moving device 1.
[0080] In other embodiments, the self-moving device 1 further includes an external memory interface for connecting an external memory to expand the storage capacity of the self-moving device 1.
[0081] The processor 12 can include one or more processing units, for example: the processor 12 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors.
[0082] The processor 12 provides computing and control capabilities, for example, the processor 12 is used to execute a computer program stored in the memory 11 to implement the path planning method described above.
[0083] The power supply 13 is used to supply power for the self-moving device. In an embodiment of the present application, the power supply 13 can include any one or more of the following types of power supply devices: a battery, a fuel generator, a solar power module, a wind power module, etc.
[0084] The sensor 14 is used to obtain information for the self-moving device 1, such as obtaining environmental information for the self-moving device 1 and movement information of the self-moving device 1. In an embodiment of the present application, the sensor 14 can include one or more of the following types of sensors: a laser radar, a camera, an infrared sensor, an encoder, etc.
[0085] The working mechanism 15 is used to perform corresponding work tasks, for example, mowing, deicing, cruising, cleaning, and spraying pesticides, etc. In some embodiments of the present application, the working mechanism 15 can include a motor, a transmission mechanism, and a cutter head, etc. When the self-moving device is a mower, the motor can drive the cutter head to rotate through the transmission mechanism to realize the mowing function. The motor can also control the movement of the blade to adjust the mowing height and the mowing area.
[0086] The communication module 16 is used to realize the communication between the self-moving device and other devices. In an embodiment of the present application, the communication module 16 can interact with other devices based on wired communication and / or wireless communication. The above-mentioned wireless communication can include one or a combination of the following communication modes: Bluetooth communication, Wi-Fi communication, Near Field Communication (NFC), etc.
[0087] The positioning module 17 is configured to determine the position of the self-moving device. In some embodiments of the present application, the positioning module 17 can include one or more of a Global Positioning System (GPS), an inertial navigation system, a Real-time kinematic (RTK) carrier phase differential system, and the like.
[0088] The driving wheel 18 is configured to enable the self-moving device to move. In some embodiments of the present application, the driving wheel 18 can enable the self-moving device to move according to the control of the processor 12. In some embodiments of the present application, the driving wheel 18 can include a left driving wheel and a right driving wheel.
[0089] The bus 19 is configured to provide a communication channel between the memory 11, the processor 12, the power supply 13, the sensor 14, the working mechanism 15, the communication module 16, the positioning module 17, and the driving wheel 18 in the self-moving device 1.
[0090] In other embodiments of the present application, the self-moving device 1 can further include an anti-collision part and a steering assembly, etc. The anti-collision part can be configured to prevent the driving wheel 18 from colliding with an obstacle in front of the self-moving device. The steering assembly can be configured to enable the driving wheel 18 to adjust the driving direction.
[0091] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the self-moving device 1. In other embodiments of the present application, the self-moving device 1 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0092] As shown in FIG. 2, an embodiment of the present application provides a structure schematic diagram of an electronic device. Figure 8 As shown in FIG. 2, an embodiment of the present application provides a structure schematic diagram of an electronic device. Figure 8 In the embodiment, the electronic device 2 can include a communication module 21, a storage device 22, a processing device 23, an Input / Output (I / O) interface 24, and a bus 25. The processing device 23 is coupled to the communication module 21, the storage device 22, and the I / O interface 24 through the bus 25.
[0093] The communication module 21 can include a wired communication module and / or a wireless communication module. The wired communication module can provide one or more of the following wired communication solutions: universal serial bus (USB), Controller Area Network (CAN) bus, etc. The wireless communication module can provide one or more of the following wireless communication solutions: wireless fidelity (Wi-Fi), Bluetooth (BT), mobile communication network, frequency modulation (FM), near field communication (NFC), infrared (IR) technology, etc.
[0094] The storage device 22 can include one or more random access memories (RAMs) and one or more non-volatile memories (NVMs). The random access memory can be directly readable and writable by the processing device 23, and can be used to store executable programs (e.g., machine instructions) of programs that are currently running or other programs, and can also be used to store data of users and applications, etc. The random access memory can include static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0095] The non-volatile memory can also store executable programs and store data of users and applications, etc., and can be loaded into the random access memory in advance for direct reading and writing by the processing device 23. The non-volatile memory can include a magnetic disk storage device, a flash memory.
[0096] The storage device 22 is configured to store one or more computer programs. The one or more computer programs are configured to be executed by the processing device 23. The one or more computer programs include a plurality of instructions that, when executed by the processing device 23, implement the path planning method executed on the electronic device 2.
[0097] In other embodiments, asFigure 8 The electronic device 2 shown also includes an external memory interface for connecting an external memory, to extend the storage capability of the electronic device 2.
[0098] The processing device 23 can include one or more processing units, for example: the processing device 23 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units can be independent devices, or can be integrated in one or more processors.
[0099] The processing device 23 provides computing and control capabilities, for example, the processing device 23 is configured to execute a computer program stored in the storage device 22 to implement the path planning method described above.
[0100] The input / output interface 24 is configured to provide a channel for user input or output, for example, the input / output interface 24 can be configured to connect various input / output devices, such as a mouse, a keyboard, a touch device, a display screen, etc., so that the user can input information, or make the information visualized.
[0101] The bus 25 is configured to provide a communication channel between the communication module 21, the storage device 22, the processing device 23, and the input / output interface 24 in the electronic device 2.
[0102] It can be understood that the structure shown in the embodiments of the present application does not constitute a specific limitation on the electronic device 2. In other embodiments of the present application, the electronic device 2 can include more or fewer components than shown, or combine certain components, or split certain components, or different component arrangements. The components shown can be implemented in hardware, software, or a combination of software and hardware.
[0103] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores a computer program. The computer program includes program instructions, and the method implemented by the program instructions can refer to the method in the above-mentioned embodiments of the present application.
[0104] The computer readable storage medium can be an internal storage of the self-moving device or the electronic device, such as a hard disk or a memory of the self-moving device or the electronic device. The computer readable storage medium can also be an external storage of the self-moving device or the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like.
[0105] In some embodiments, the computer readable storage medium can include a program storage area and a data storage area. The program storage area can store an operating system, an application required by at least one function, and the like. The data storage area can store data created according to the use of the self-moving device or the electronic device, and the like.
[0106] In the above embodiments, the description of each embodiment has its own focus. The parts not described in detail or recorded in a certain embodiment can be referred to the relevant description of other embodiments.
[0107] Those skilled in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be realized by electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solutions. The skilled person can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0108] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit the same. Although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalent ones. Such modifications or replacements do not make the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A path planning method applied to self-moving devices, characterized in that, The self-moving device has a corresponding working path within the working area, and the method includes: In response to a movement command, if the target distance between the self-moving device and the boundary of the work area is greater than or equal to a preset threshold, the self-moving device moves toward the boundary of the area according to the work path until the target distance is less than the preset threshold; after the self-moving device performs a work task along the work path in the work area, it will leave wheel tracks in the work area. When the target distance is less than the preset threshold, a movement path is planned for the self-moving device to move from the device location point to the target location point based on the target location point, the device location point of the self-moving device, and the area boundary, wherein the target location point is located at the area boundary.
2. The path planning method as described in claim 1, characterized in that, The movement path includes a first movement path and a second movement path. The first movement path is a path from the device location point to the boundary of the area, and the second movement path is a path from the boundary of the area to the target location point.
3. The path planning method as described in claim 2, characterized in that, The region boundary includes multiple boundary location points. The first movement path is the shortest path from the device location point to the target boundary location point. The second movement path is a path along the region boundary from the target boundary location point to the target location point. The target boundary location point is the boundary location point among the multiple boundary location points that corresponds to the target distance.
4. The path planning method as described in claim 3, characterized in that, The method further includes: Based on the first movement path, move from the device location point to the target boundary location point; Based on the second movement path, move from the target boundary location point to the target location point.
5. The path planning method according to any one of claims 1 to 4, characterized in that, The target distance is the distance between the self-moving device and the nearest boundary point on the boundary of the region.
6. The path planning method according to any one of claims 1 to 4, characterized in that, The working path is a spiral path.
7. The path planning method as described in claim 6, characterized in that, The target location is the location of the charging station, and the method further includes: If the spiral path is from the outside to the inside, the self-mobile device that has completed charging at the target location point moves to the stop location point where it stops performing the work task according to the movement path and the spiral path, and the self-mobile device starts from the stop location point and performs the work task according to the direction of the spiral path; If the spiral path is in the direction of inward to outward, the self-moving device that has completed charging at the target location point moves from the target location point to the end point of the spiral path, and from the end point, performs the work task in the opposite direction of the spiral path.
8. A path planning method applied to electronic devices, characterized in that, The electronic device is communicatively connected to a self-moving device, which has a corresponding working path within its working area. The method includes: In response to a movement command, if the target distance between the self-moving device and the boundary of the work area is greater than or equal to a preset threshold, the self-moving device is controlled to move toward the boundary of the area according to the work path until the target distance is less than the preset threshold; after the self-moving device performs a work task along the work path in the work area, it will leave wheel tracks in the work area. When the target distance is less than the preset threshold, a movement path is planned for the self-moving device to move from the device location point to the target location point based on the target location point, the device location point of the self-moving device, and the area boundary, wherein the target location point is located at the area boundary.
9. A self-moving device, characterized in that, The self-moving device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it causes the self-moving device to implement the path planning method as described in any one of claims 1 to 7.
10. An electronic device, characterized in that, The electronic device includes: a storage device, a processing device, and a computer program stored on the storage device and executable on the processing device, wherein when the processing device executes the computer program, the electronic device implements the path planning method as described in claim 8.
11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor in a self-moving device, implements the path planning method as described in any one of claims 1 to 7, or when executed by a processing device in an electronic device, implements the path planning method as described in claim 8.
Citation Information
Patent Citations
Original path return method for intelligent lawn mower
CN109588100A
Movement control method and control system of garden robot and computer equipment
CN118034274A