Methods and devices for driving self-moving equipment, storage media and electronic devices
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DREAM INNOVATION TECH (SUZHOU) CO LTD
- Filing Date
- 2022-09-21
- Publication Date
- 2026-06-30
AI Technical Summary
Existing self-moving devices, such as robotic vacuum cleaners, cannot effectively plan their routes when driving in areas where they cannot detect obstacles, leading to collisions and damage.
When a collision occurs with a self-moving device, it switches to a second driving mode that reduces speed, acquires pose information, fits the collision curve of the obstacle, and adjusts the driving direction until point cloud data or obstacle contours are recognized, thus achieving a closed curve.
Effective route planning reduces collision damage to mobile devices in areas where they cannot detect obstacles, thus improving the cleaning efficiency and safety of mobile devices.
Smart Images

Figure CN117806299B_ABST
Abstract
Description
[Technical Field]
[0001] This invention relates to the field of communications, and more specifically, to a method and apparatus for driving a self-moving device, a storage medium, and an electronic device. [Background Technology]
[0002] With the development of technology, more and more people are starting to use smart devices for cleaning in their daily lives, such as robot vacuum cleaners. Robot vacuum cleaners can move autonomously to different areas to perform cleaning tasks in different areas.
[0003] Existing self-moving devices (such as robotic vacuum cleaners) generally use sensors such as Position Sensitive Detectors (PSD), infrared sensors, and Laser Docking Sensors (LDS) to detect obstacles. However, these sensors all have blind spots. Usually, these sensors are located on the top or side of the self-moving device, which makes it impossible to detect obstacles that are close at hand and low, such as low T-shaped railings or low protruding obstacles. Obstacles that self-moving devices cannot detect, such as glass doors and windows, will affect the movement of the self-moving device.
[0004] Existing technologies can only mitigate damage from collisions by installing mechanical impact plates on self-moving devices, but cannot fundamentally solve this problem.
[0005] There is currently no effective solution to the problems in existing technologies, such as the inability of self-moving devices to plan routes when driving in areas where obstacles cannot be detected. [Summary of the Invention]
[0006] This invention provides a driving and driving device for a self-moving device, a storage medium, and an electronic device to at least solve the problem in the prior art where self-moving devices cannot plan driving routes when driving in areas where obstacles cannot be detected.
[0007] According to one aspect of the present invention, a driving method for a self-moving device is provided, comprising: during the driving of the self-moving device in a first driving mode, when a collision event occurs in the self-moving device and the self-moving device does not identify point cloud data representing an obstacle within a preset range, controlling the self-moving device to drive in a second driving mode, wherein a first driving speed corresponding to the first driving mode is greater than a second driving speed corresponding to the second driving mode; acquiring pose information of the self-moving device at the time of the collision event during the driving of the self-moving device in the second driving mode, and determining a collision curve of the self-moving device based on the pose information; adjusting the driving direction of the self-moving device according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device identifies the point cloud data within a preset range.
[0008] In one exemplary embodiment, acquiring the pose information of the self-mobile device when a collision event occurs during the driving of the second driving mode, and determining the collision curve of the self-mobile device based on the pose information, includes: continuously acquiring multiple pose information of the self-mobile device when the collision event occurs during the driving of the self-mobile device in the second driving mode; determining the position coordinates of multiple collision points of the self-mobile device when the collision event occurs based on the position coordinates of the self-mobile device indicated by the multiple pose information and the device orientation; and performing curve fitting on the position coordinates of the multiple collision points to obtain the collision curve of the self-mobile device.
[0009] In an exemplary embodiment, after adjusting the driving direction of the self-moving device according to the collision curve until a first preset condition is met, the method further includes: determining a first preset distance according to the collision curve when the self-moving device is performing the next round of cleaning; controlling the self-moving device to drive at a third driving speed when it reaches the target position, wherein the third driving speed is less than the first driving speed, and wherein the closest distance between the target position and the collision curve is less than the first preset distance; determining whether the self-moving device has experienced another collision event at any position on the collision curve; and determining whether to adjust the first preset distance based on the result of whether another collision event has occurred.
[0010] In an exemplary embodiment, determining a first preset distance based on the collision curve includes: setting the first preset distance to a first preset value when the shape and area of the collision curve satisfy a second preset condition, wherein the second preset condition includes: the shape of the collision curve is a regular shape, and the area of the collision curve is greater than a preset area threshold; and setting the first preset distance to a second preset value when the shape and area of the collision curve do not satisfy the second preset condition, wherein the second preset value is greater than the first preset value.
[0011] In one exemplary embodiment, determining whether to adjust the first preset distance based on whether a collision event occurs again includes: if the self-moving device experiences another collision event at any position on the collision curve, adjusting the first preset distance to a second preset distance, wherein the second preset distance is less than the first preset distance.
[0012] In one exemplary embodiment, determining whether to adjust the first preset distance based on whether a collision event occurs again includes: if the self-moving device does not experience another collision event at any position on the collision curve, controlling the self-moving device to travel at the first driving speed.
[0013] In an exemplary embodiment, after controlling the self-moving device to travel at the first driving speed when no further collision event occurs at any position of the collision curve, the method further includes: controlling the self-moving device to delete the collision curve when the number of cleaning operations performed by the self-moving device exceeds a third preset value and no further collision event occurs at any position of the collision curve, the method further includes: controlling the self-moving device to delete the collision curve when the number of cleaning operations performed by the self-moving device exceeds a third preset value and no further collision event occurs at any position of the collision curve.
[0014] According to another aspect of the present invention, a driving device for a self-moving device is also provided. The device includes: a control module, configured to control the self-moving device to drive in a second driving mode when a collision event occurs and the self-moving device does not identify point cloud data representing an obstacle within a preset range during the self-moving device's driving in a first driving mode, wherein a first driving speed corresponding to the first driving mode is greater than a second driving speed corresponding to the second driving mode; an acquisition module, configured to acquire pose information of the self-moving device at the time of the collision event during the self-moving device's driving in the second driving mode, and determine a collision curve of the self-moving device based on the pose information; and an adjustment module, configured to adjust the driving direction of the self-moving device according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device identifies the point cloud data within a preset range.
[0015] According to another aspect of the present invention, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, wherein the computer program is configured to execute the above-described driving method of the self-moving device when it is run.
[0016] According to another aspect of the present invention, an electronic device is also provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the driving method of the self-moving device through the computer program.
[0017] In this embodiment of the invention, when a self-moving device is traveling in a first driving mode, and a collision event occurs, and the self-moving device does not detect point cloud data representing the obstacle within a preset range, the device is controlled to travel in a second driving mode. The first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode. The device's pose information at the time of the collision event is acquired, and a collision curve is determined based on the pose information. The device's driving direction is adjusted according to the collision curve until a first preset condition is met. The first preset condition includes at least one of the following: the collision curve is a closed curve; the self-moving device detects the point cloud data within a preset range; that is, the device travels in the second driving mode until it travels a full circle along the obstacle or detects the point cloud data and can then travel by referring to the point cloud data. This technical solution solves the problem in the prior art where self-moving devices cannot plan driving routes in areas where obstacles cannot be detected. It achieves the technical effect of enabling self-moving devices to plan driving routes even in areas with undetectable obstacles, thereby reducing damage caused by collisions. [Attached Image Description]
[0018] The accompanying drawings, which are included to provide a further understanding of the invention and form part of this invention, illustrate exemplary embodiments of the invention and, together with the description thereof, serve to explain the invention and do not constitute an undue limitation thereof. In the drawings:
[0019] Figure 1 This is a hardware structure block diagram of a sweeping robot, which is an optional self-moving device driving method according to an embodiment of the present invention.
[0020] Figure 2 This is a flowchart of an optional self-moving device driving method according to an embodiment of the present invention;
[0021] Figure 3 This is a flowchart illustrating an optional driving method for a self-moving device according to an embodiment of the present invention;
[0022] Figure 4 This is a structural block diagram of an optional self-moving device's driving mechanism according to an embodiment of the present invention.
Detailed Implementation Methods
[0023] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0025] The methods and embodiments provided in this invention can be executed in a robotic vacuum cleaner or a similar computing device. Taking its operation on a robotic vacuum cleaner as an example, Figure 1 This is a hardware structure block diagram of a sweeping robot using a self-moving device driving method according to an embodiment of the present invention. Figure 1 As shown, a robotic vacuum cleaner may include one or more ( Figure 1 Only one is shown in the image. A processor 102 (which may include, but is not limited to, a microprocessor (MPU) or a programmable logic device (PLD)) and a memory 104 for storing data are also shown. In one exemplary embodiment, the aforementioned sweeping robot may further include a transmission device 106 for communication functions and an input / output device 108. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned robotic vacuum cleaner. For example, the robotic vacuum cleaner may also include components that are larger than... Figure 1 The more or fewer components shown, or having the same Figure 1 Equivalent functions or ratios shown Figure 1 The functions shown have more different configurations.
[0026] The memory 104 can be used to store computer programs, such as application software programs and modules, like the computer program corresponding to the driving method of the self-moving device in this embodiment of the invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, thereby implementing the above-described method. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the robot vacuum cleaner via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0027] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the robot vacuum cleaner's communication provider. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module used for wireless communication with the Internet.
[0028] This embodiment provides a method for driving a self-moving device. Figure 2 This is a flowchart of a driving method for a self-moving device according to an embodiment of the present invention, the process including the following steps:
[0029] Step S202: During the process of the self-moving device driving in the first driving mode, if the self-moving device experiences a collision with a barrier and the self-moving device does not identify point cloud data for representing obstacles within a preset range, the self-moving device is controlled to drive in the second driving mode, wherein the first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode.
[0030] It should be noted that the impact plate in the above-mentioned impact plate incident is a mechanical impact plate, which is a device installed on the self-moving device to reduce the damage caused to the self-moving device when it collides with another device.
[0031] It should be noted that the aforementioned mechanical impact plate can be installed around the self-moving device, at the bottom of the self-moving device, or at other locations on the self-moving device; this application does not impose any restrictions on this.
[0032] It should be noted that the first pose, first velocity, and first position information of the self-moving device at the first moment can be obtained by setting a sensor on the mechanical impact plate of the self-moving device. When the sensor detects data, the time data and the position data detected by the sensor are recorded. The sensor is used to sense the collision event of the self-moving device, so it can be a pressure sensor or other sensors. This application does not limit the types of sensors used.
[0033] Step S204: Obtain the pose information of the self-moving device when a collision event occurs during the driving process of the second driving mode, and determine the collision curve of the self-moving device based on the pose information.
[0034] Understandably, the location of the collision point can be roughly determined by the collected pose data. That is, the location of the collision point can be determined based on the position coordinates and orientation of the self-moving device contained in the pose data, which are also the edge contour coordinates of the obstacle. By performing curve fitting on the determined edge contour coordinates of the obstacle, a collision curve can be obtained to indicate the contour of the obstacle. At this time, the self-moving device is controlled to slow down and continuously collect pose data and position information to determine the position coordinates of multiple collision points, thereby gradually extending the collision curve.
[0035] Step S206: Adjust the driving direction of the self-moving device according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device recognizes the point cloud data within a preset range.
[0036] If the collision curve forms a closed curve, it means that the autonomous device has traveled around the obstacle once, and the device can be controlled to move away from the obstacle; or the autonomous device has identified the surrounding point cloud data, and can therefore travel along the edge based on the point cloud data, thus avoiding further collisions, and the device can be controlled to travel based on the point cloud data.
[0037] Through the above steps, during the process of the self-moving device driving in the first driving mode, if a collision event occurs and the self-moving device does not identify point cloud data representing the obstacle within a preset range, the self-moving device is controlled to drive in the second driving mode, wherein the first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode; the pose information of the self-moving device at the time of the collision event during the second driving mode is obtained, and the collision curve of the self-moving device is determined based on the pose information; the driving direction of the self-moving device is adjusted according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, the self-moving device identifies the point cloud data within a preset range; that is, driving in the second driving mode until the self-moving device travels one full circle along the obstacle or the self-moving device detects the point cloud data and can drive with reference to the point cloud data. By adopting the above technical solution, when a collision occurs, the self-moving device is controlled to enter a second driving mode to reduce speed and continuously detect the position data of the collision point to fit the contour curve of the obstacle. When the preset conditions are met, the self-moving device can avoid colliding with the obstacle again. This solves the problem in the prior art that the self-moving device cannot plan a driving route when driving in areas where obstacles cannot be detected. It achieves the technical effect of enabling the self-moving device to plan a driving route in areas where obstacles cannot be detected, thereby reducing the damage caused by collisions to the self-moving device.
[0038] Optionally, the above-mentioned acquisition step S204: acquiring the pose information of the self-moving device when a collision event occurs during the driving process of the second driving mode, and determining the collision curve of the self-moving device based on the pose information, can be achieved through the following steps, specifically including: continuously acquiring multiple pose information of the self-moving device when the collision event occurs during the driving process of the self-moving device in the second driving mode; determining the position coordinates of multiple collision points of the self-moving device when the collision event occurs based on the position coordinates of the self-moving device indicated by the multiple pose information and the device orientation; and performing curve fitting on the position coordinates of the multiple collision points to obtain the collision curve of the self-moving device.
[0039] After controlling the self-moving device to drive in the second driving mode, the self-moving device is controlled to drive at the second driving speed. During the driving process of the self-moving device in the second driving mode, since the self-moving device cannot recognize point cloud data, it is unable to plan a route or accurately avoid obstacles. Therefore, collision events will continue to occur. The self-moving device continuously acquires multiple pose information of the collision events that occur during this process, that is, it acquires the pose data of the self-moving device at the time of each collision event. While moving at the second speed, the position coordinates of multiple collision points of the collision events are calculated in real time using the acquired multiple pose information. Finally, the collision curve is obtained by curve fitting based on the calculated multiple position coordinates.
[0040] The above scheme continuously acquires multiple pose information of collision events that occur during the process of the self-moving device traveling at the second driving speed, thereby determining the position coordinates of multiple collision points. Curve fitting is then performed on the position coordinates of these multiple collision points to obtain a collision curve used to describe the outline of the obstacle.
[0041] It should be noted that reducing the speed of the self-moving device to the second driving speed is not limited to reducing the moving speed of the self-moving device, but may also include reducing the control speed of the self-moving device, such as the speed at which the self-moving device controls itself to perform adjustment operations such as steering.
[0042] Based on the above steps, the method further includes adjusting the driving direction of the self-moving device according to the collision curve until the first preset condition is met, and then: when the self-moving device is performing the next round of cleaning, determining a first preset distance according to the collision curve; when the self-moving device reaches the target position, controlling the self-moving device to drive at a third driving speed, wherein the third driving speed is less than the first driving speed, and wherein the closest distance between the target position and the collision curve is less than the first preset distance; determining whether the self-moving device has experienced another collision event at any position on the collision curve; and determining whether to adjust the first preset distance based on the result of whether another collision event has occurred.
[0043] After completing the current cleaning cycle, when performing the next cleaning cycle, the self-moving device first determines a first preset distance based on the obtained collision curve. When the self-moving device travels to the target position during the cleaning process, it is controlled to travel at a third speed, which is less than the first speed. The target position is any location that is less than the first preset distance from the collision curve. That is, when the self-moving device is close to the location of the collision curve and the closest distance to the collision curve is less than the first preset distance, the self-moving device is controlled to slow down. It is determined whether the self-moving device will experience another collision with the obstacle at any position on the collision curve during its travel, i.e., whether the obstacle is still at that position. Based on the result of whether another collision with the obstacle occurs, it is determined whether the first preset distance should be adjusted.
[0044] The above scheme controls the self-moving device to slow down when it moves to any position where the distance to the collision curve is less than a first preset distance, so as to avoid collisions at high speeds that could damage the self-moving device. It also determines whether the obstacle is still in the same position, thereby probing whether the obstacle is a fixed obstacle.
[0045] Optionally, the above determination step is performed: determining a first preset distance based on the collision curve includes the following steps: if the shape and area of the collision curve meet a second preset condition, the first preset distance is set to a first preset value, wherein the second preset condition includes: the shape of the collision curve is a regular shape, and the area of the collision curve is greater than a preset area threshold; if the shape and area of the collision curve do not meet the second preset condition, the first preset distance is set to a second preset value, wherein the second preset value is greater than the first preset value.
[0046] The first preset distance is determined by the following steps: First, determine whether the shape and area of the collision curve meet the third preset condition. If the third preset condition is met, i.e., the shape of the collision curve is regular and the area of the collision curve is greater than the preset area threshold, then the obstacle is considered unlikely to move in the short term, such as a glass door or a thick baseboard. In this case, the first preset distance is set to the first preset value. The first preset value is smaller, which can reduce the frequency of the self-moving device approaching and reduce the frequency of re-collision. If the collision curve does not meet the third preset condition, i.e., the shape of the collision curve is irregular or the area of the collision curve is too small, then the obstacle is considered to move frequently, such as a chair leg or a low toy. In this case, the first preset distance is set to the second preset value. The second preset value is greater than the first preset value, which increases the number of times the self-moving device approaches and prevents the self-moving device from not approaching the area in time after the small obstacle moves, resulting in missed scanning.
[0047] The size and shape of the obstacle's outline curve are used to make a preliminary judgment on the likelihood that the obstacle is a fixed obstacle. If the likelihood of it being a fixed obstacle is high, the first preset value is set to a smaller value to reduce the frequency of the mobile device approaching, thereby making it easier to determine whether the obstacle is a fixed obstacle.
[0048] In one exemplary embodiment, determining whether to adjust the first preset distance based on whether a collision event occurs again includes: if the self-moving device experiences another collision event at any position on the collision curve, adjusting the first preset distance to a second preset distance, wherein the second preset distance is less than the first preset distance.
[0049] If the self-moving device experiences another collision with the obstacle at any point on the collision curve, it is assumed that the obstacle still exists in the area. The first preset distance is then adjusted to a second preset distance, which is smaller than the first preset distance. In other words, after another collision, the first preset distance is reduced. The reduction can be a fixed value, such as a pre-set fixed difference X, making the difference between the first and second preset distances X. Alternatively, it can be a random difference. The self-moving device can also calculate this difference in real time by considering factors such as the shape and size of the collision curve and the number of collisions.
[0050] If the self-moving device collides with the board again at any position on the collision curve, the value of the first preset distance is gradually reduced, so that the probe is made in a smaller range during the next approach. In the process of gradually reducing the probe range, multiple probes are made in the area where the collision curve is located.
[0051] Optionally, based on the above steps: after adjusting the first preset distance to the second preset distance, the method further includes: when the self-moving device is performing the next round of cleaning, when the self-moving device travels to the second target position, controlling the self-moving device to travel at the third travel speed, wherein the closest distance between the second target position and the collision curve is less than the second preset distance; when the self-moving device experiences another collision with a panel at any position on the collision curve, adjusting the second preset distance to the third preset distance, wherein the third preset distance is less than the second preset distance; when the third preset distance is less than a fourth preset value, when the self-moving device is performing the next round of cleaning, controlling the self-moving device to travel according to the collision curve.
[0052] During the next round of cleaning, when the self-moving device moves to the second target position where the closest distance to the collision curve is less than the second preset distance, the self-moving device is controlled to reduce its speed to the third driving speed. If the self-moving device still experiences a collision at any position on the collision curve, the second preset distance is adjusted to the third preset distance, which is less than the second preset distance; that is, the value of the preset distance is reduced whenever a collision occurs. If the third preset distance is less than the fourth preset value, the self-moving device is controlled to travel according to the collision curve during the next round of cleaning.
[0053] For example, during the first cleaning cycle, the self-moving device identifies a low obstacle's collision point coordinates as (100, 100). During the second cleaning cycle, the outer edge of the device avoids a circle centered at (100, 100) with a radius of 100mm. If a collision still occurs at that point during the second cleaning cycle, the device avoids a circle centered at (100, 100) with a radius of 80mm during the third cleaning cycle, and so on. If the radius decreases to 40mm, it indicates that the self-moving device has already experienced multiple collisions in the area corresponding to the collision curve. Therefore, the obstacle corresponding to the collision curve is considered fixed and unlikely to move for an extended period. The deceleration distance setting is then canceled, and during the next cleaning cycle, the self-moving device is directly controlled to travel along the collision curve. In other words, the self-moving device recognizes the obstacle corresponding to the collision curve as a fixed obstacle, records it on the map, and travels around the obstacle during the next cleaning cycle.
[0054] Optionally, the above determination step can be performed: determining whether to adjust the first preset distance based on whether a collision event occurs again can be achieved through the following scheme: if the self-moving device does not experience a collision event again at any position on the collision curve, control the self-moving device to travel at the first driving speed.
[0055] If the self-moving device does not experience another collision with the obstacle at any point on the collision curve, it is considered that the obstacle has been temporarily removed. The self-moving device is then controlled to travel at the first driving speed, i.e., without slowing down, and travels at a normal speed.
[0056] For example, after determining that there is a contour curve in the target area, the self-moving device will slow down in advance and approach the area during the next cleaning. If the self-moving device does not collide with the obstacle again in the target area, it is considered that the obstacle has been removed. In this case, the self-moving device does not need to slow down and can adjust to normal speed.
[0057] Based on the above steps, after controlling the self-moving device to travel at the first driving speed when no further collision event occurs at any position of the collision curve, the method further includes: controlling the self-moving device to delete the collision curve when the number of cleaning operations performed by the self-moving device exceeds a third preset value and no further collision event occurs at any position of the collision curve.
[0058] If, during multiple cleaning processes after the self-moving device has fitted the collision curve, no further collision events occur at any position on the collision curve, it is considered that the obstacle was only temporarily present in the area and has now been removed. In this case, the self-moving device is controlled to delete the collision curve, and it can then drive normally in the area during subsequent cleaning processes.
[0059] For example, if the self-moving device does not collide with the obstacle again in the area where the contour curve is located during multiple (e.g., 3) cleaning processes after the contour curve is identified, it is considered that the obstacle corresponding to the previously identified contour curve was only temporary and has been removed. In this case, the contour curve recorded by the self-moving device has become useless, and the self-moving device can be controlled to delete the contour curve. In subsequent cleaning processes, there is no need to slow down in advance when driving in this area.
[0060] Obviously, the embodiments described above are only some embodiments of the present invention, and not all embodiments. In order to better understand the driving method of the self-moving device described above, the above process will be described in conjunction with optional embodiments below, but it is not intended to limit the technical solutions of the embodiments of the present invention.
[0061] This embodiment provides a driving method for a self-moving device, which is a flowchart illustrating an optional driving method for a self-moving device according to an embodiment of the present invention. Figure 3 As shown, the specific steps are as follows:
[0062] Step S302: If there is no point cloud data around the machine (equivalent to the self-moving device mentioned above) and the machine collides (equivalent to the collision event mentioned above), then control the machine to enter the collision adaptive mode.
[0063] Step S304: Record the machine's pose at the moment of collision (equivalent to the first time mentioned above) and the collision position of the collision point relative to the center of the machine (equivalent to the first position information mentioned above) on the map;
[0064] Step S306: Reduce the machine's control speed, continue to test collisions with the crash plate, and simultaneously track the collision curve, adjusting the forward direction in real time based on the collision curve.
[0065] Step S308: Determine whether the conditions are met. The conditions include: the machine's motion trajectory is closed, i.e., the collision curve is closed, or the machine has recognized that the point cloud data can be used for edge driving. If the conditions are met, proceed to step S310; otherwise, continue to step S306.
[0066] Step S310: Control the machine to exit the collision plate adaptive mode;
[0067] Step S312: During the reuse cleaning, when the machine reaches the pose distance x recorded in the previous collision adaptive mode, it slows down in advance to avoid violent collisions.
[0068] Step S314: Determine whether the machine has collided again. If so, proceed to step S316; otherwise, proceed to step S320.
[0069] Step S316: Decrease the value of X and determine whether X is less than a preset threshold; if it is less than the threshold, proceed to step S318; if it is not less than the threshold, return to step S312.
[0070] Step S318: Control the machine to clean along the historical trajectory, that is, control the machine to clean along the collision curve;
[0071] Step S320: Determine whether the number of cleaning cycles exceeds the threshold. If yes, proceed to step S322; otherwise, return to step S312.
[0072] Through the above steps, when preset conditions are met, the machine is controlled to enter the collision adaptive mode. By slowing down and recording all collision data, the positions of all collision points are recorded, and a collision curve corresponding to the obstacle is fitted. During the next cleaning, the machine slows down in advance when approaching the collision curve and moves closer to it. After multiple trials, it is determined whether the obstacle continues to exist in the area. If so, the collision curve is fixed and recorded, and the machine is controlled to clean according to the curve; otherwise, the collision curve is deleted. By adopting the above solution, the problem in the prior art that the self-moving device cannot plan a driving route when driving in areas where obstacles cannot be detected is solved. The solution achieves the technical effect of enabling the self-moving device to plan a driving route in areas where obstacles cannot be detected, thereby reducing the damage caused by collisions to the self-moving device.
[0073] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0074] This embodiment also provides a driving device for a self-moving device, which is used to implement the above embodiments and preferred embodiments; details already described will not be repeated. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, hardware implementation, or a combination of software and hardware, is also possible and contemplated.
[0075] Figure 4 This is a structural block diagram of an optional self-moving device according to an embodiment of the present invention, the device comprising:
[0076] Control module 42 is used to control the self-moving device to drive in a second driving mode when the self-moving device is driving in a first driving mode and a collision event occurs with the self-moving device, and the self-moving device does not identify point cloud data for representing obstacles within a preset range. The first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode.
[0077] It should be noted that the impact plate in the above-mentioned impact plate incident is a mechanical impact plate, which is a device installed on the self-moving device to reduce the damage caused to the self-moving device when it collides with another device.
[0078] It should be noted that the aforementioned mechanical impact plate can be installed around the self-moving device, at the bottom of the self-moving device, or at other locations on the self-moving device; this application does not impose any restrictions on this.
[0079] It should be noted that the first pose, first velocity, and first position information of the self-moving device at the first moment can be obtained by setting a sensor on the mechanical impact plate of the self-moving device. When the sensor detects data, the time data and the position data detected by the sensor are recorded. The sensor is used to sense the collision event of the self-moving device, so it can be a pressure sensor or other sensors. This application does not limit the types of sensors used.
[0080] The acquisition module 44 is used to acquire the pose information of the self-moving device when a collision event occurs during the driving process of the second driving mode, and to determine the collision curve of the self-moving device based on the pose information.
[0081] Understandably, the location of the collision point can be roughly determined by the collected pose data. That is, the location of the collision point can be determined based on the position coordinates and orientation of the self-moving device contained in the pose data, which are also the edge contour coordinates of the obstacle. By performing curve fitting on the determined edge contour coordinates of the obstacle, a collision curve can be obtained to indicate the contour of the obstacle. At this time, the self-moving device is controlled to slow down and continuously collect pose data and position information to determine the position coordinates of multiple collision points, thereby gradually extending the collision curve.
[0082] The adjustment module 46 is used to adjust the driving direction of the self-moving device according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device recognizes the point cloud data within a preset range.
[0083] If the collision curve forms a closed curve, it means that the autonomous device has traveled around the obstacle once, and the device can be controlled to move away from the obstacle; or the autonomous device has identified the surrounding point cloud data, and can therefore travel along the edge based on the point cloud data, thus avoiding further collisions, and the device can be controlled to travel based on the point cloud data.
[0084] Using the above-described device, when the self-moving device is traveling in a first driving mode, and a collision event occurs, and the self-moving device does not detect point cloud data representing the obstacle within a preset range, the device is controlled to travel in a second driving mode, wherein the first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode; the device acquires the pose information of the self-moving device at the time of the collision event during the second driving mode, and determines the collision curve of the self-moving device based on the pose information; the device adjusts its driving direction according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, the self-moving device detects the point cloud data within a preset range; that is, the device travels in the second driving mode until it travels one full circle along the obstacle or the device detects the point cloud data and can travel by referring to the point cloud data. By adopting the above technical solution, when a collision occurs, the self-moving device is controlled to enter a second driving mode to reduce speed and continuously detect the position data of the collision point to fit the contour curve of the obstacle. When the preset conditions are met, the self-moving device can avoid colliding with the obstacle again. This solves the problem in the prior art that the self-moving device cannot plan a driving route when driving in areas where obstacles cannot be detected. It achieves the technical effect of enabling the self-moving device to plan a driving route in areas where obstacles cannot be detected, thereby reducing the damage caused by collisions to the self-moving device.
[0085] The acquisition module 44 is further configured to continuously acquire multiple pose information of the self-moving device during the process of the self-moving device driving in the second driving mode, when the self-moving device is involved in the collision event with the board; determine the position coordinates of multiple collision points of the self-moving device involved in the collision event with the board based on the position coordinates of the self-moving device indicated by the multiple pose information and the device orientation; and perform curve fitting on the position coordinates of the multiple collision points to obtain the collision curve of the self-moving device.
[0086] After controlling the self-moving device to drive in the second driving mode, the self-moving device is controlled to drive at the second driving speed. During the driving process of the self-moving device in the second driving mode, since the self-moving device cannot recognize point cloud data, it is unable to plan a route or accurately avoid obstacles. Therefore, collision events will continue to occur. The self-moving device continuously acquires multiple pose information of the collision events that occur during this process, that is, it acquires the pose data of the self-moving device at the time of each collision event. While moving at the second speed, the position coordinates of multiple collision points of the collision events are calculated in real time using the acquired multiple pose information. Finally, the collision curve is obtained by curve fitting based on the calculated multiple position coordinates.
[0087] The above scheme continuously acquires multiple pose information of collision events that occur during the process of the self-moving device traveling at the second driving speed, thereby determining the position coordinates of multiple collision points. Curve fitting is then performed on the position coordinates of these multiple collision points to obtain a collision curve used to describe the outline of the obstacle.
[0088] It should be noted that reducing the speed of the self-moving device to the second driving speed is not limited to reducing the moving speed of the self-moving device, but may also include reducing the control speed of the self-moving device, such as the speed at which the self-moving device controls itself to perform adjustment operations such as steering.
[0089] Based on the above steps, the adjustment module 46 is further configured to adjust the driving direction of the self-moving device according to the collision curve until the first preset condition is met, and then, in the case of the self-moving device performing the next round of cleaning, determine a first preset distance according to the collision curve; when the self-moving device reaches the target position, control the self-moving device to drive at a third driving speed, wherein the third driving speed is less than the first driving speed, and wherein the closest distance between the target position and the collision curve is less than the first preset distance; determine whether the self-moving device has experienced another collision event at any position on the collision curve; and determine whether to adjust the first preset distance based on the result of whether another collision event has occurred.
[0090] After completing the current cleaning cycle, when performing the next cleaning cycle, the self-moving device first determines a first preset distance based on the obtained collision curve. When the self-moving device travels to the target position during the cleaning process, it is controlled to travel at a third speed, which is less than the first speed. The target position is any location that is less than the first preset distance from the collision curve. That is, when the self-moving device is close to the location of the collision curve and the closest distance to the collision curve is less than the first preset distance, the self-moving device is controlled to slow down. It is determined whether the self-moving device will experience another collision with the obstacle at any position on the collision curve during its travel, i.e., whether the obstacle is still at that position. Based on the result of whether another collision with the obstacle occurs, it is determined whether the first preset distance should be adjusted.
[0091] The above scheme controls the self-moving device to slow down when it moves to any position where the distance to the collision curve is less than a first preset distance, so as to avoid collisions at high speeds that could damage the self-moving device. It also determines whether the obstacle is still in the same position, thereby probing whether the obstacle is a fixed obstacle.
[0092] Optionally, the adjustment module 46 is further configured to set the first preset distance to a first preset value when the shape and area of the collision curve meet the second preset conditions, wherein the second preset conditions include: the shape of the collision curve is a regular shape and the area of the collision curve is greater than a preset area threshold; and to set the first preset distance to a second preset value when the shape and area of the collision curve do not meet the second preset conditions, wherein the second preset value is greater than the first preset value.
[0093] The first preset distance is determined by the following steps: First, determine whether the shape and area of the collision curve meet the third preset condition. If the third preset condition is met, i.e., the shape of the collision curve is regular and the area of the collision curve is greater than the preset area threshold, then the obstacle is considered unlikely to move in the short term, such as a glass door or a thick baseboard. In this case, the first preset distance is set to the first preset value. The first preset value is smaller, which can reduce the frequency of the self-moving device approaching and reduce the frequency of re-collision. If the collision curve does not meet the third preset condition, i.e., the shape of the collision curve is irregular or the area of the collision curve is too small, then the obstacle is considered to move frequently, such as a chair leg or a low toy. In this case, the first preset distance is set to the second preset value. The second preset value is greater than the first preset value, which increases the number of times the self-moving device approaches and prevents the self-moving device from not approaching the area in time after the small obstacle moves, resulting in missed scanning.
[0094] The size and shape of the obstacle's outline curve are used to make a preliminary judgment on the likelihood that the obstacle is a fixed obstacle. If the likelihood of it being a fixed obstacle is high, the first preset value is set to a smaller value to reduce the frequency of the mobile device approaching, thereby making it easier to determine whether the obstacle is a fixed obstacle.
[0095] In an exemplary embodiment, the adjustment module 46 is further configured to adjust the first preset distance to a second preset distance if the self-moving device experiences another collision with the plate at any position on the collision curve, wherein the second preset distance is less than the first preset distance.
[0096] If the self-moving device experiences another collision with the obstacle at any point on the collision curve, it is assumed that the obstacle still exists in the area. The first preset distance is then adjusted to a second preset distance, which is smaller than the first preset distance. In other words, after another collision, the first preset distance is reduced. The reduction can be a fixed value, such as a pre-set fixed difference X, making the difference between the first and second preset distances X. Alternatively, it can be a random difference. The self-moving device can also calculate this difference in real time by considering factors such as the shape and size of the collision curve and the number of collisions.
[0097] If the self-moving device collides with the board again at any position on the collision curve, the value of the first preset distance is gradually reduced, so that the probe is made in a smaller range during the next approach. In the process of gradually reducing the probe range, multiple probes are made in the area where the collision curve is located.
[0098] Optionally, the adjustment module 46 is further configured to, after adjusting the first preset distance to the second preset distance, when the self-moving device is performing the next round of cleaning, control the self-moving device to travel at the third driving speed when it reaches the second target position, wherein the closest distance between the second target position and the collision curve is less than the second preset distance; if the self-moving device experiences another collision with a panel at any position on the collision curve, adjust the second preset distance to the third preset distance, wherein the third preset distance is less than the second preset distance; and if the third preset distance is less than a fourth preset value, control the self-moving device to travel according to the collision curve when performing the next round of cleaning.
[0099] During the next round of cleaning, when the self-moving device moves to the second target position where the closest distance to the collision curve is less than the second preset distance, the self-moving device is controlled to reduce its speed to the third driving speed. If the self-moving device still experiences a collision at any position on the collision curve, the second preset distance is adjusted to the third preset distance, which is less than the second preset distance; that is, the value of the preset distance is reduced whenever a collision occurs. If the third preset distance is less than the fourth preset value, the self-moving device is controlled to travel according to the collision curve during the next round of cleaning.
[0100] For example, during the first cleaning cycle, the self-moving device identifies a low obstacle's collision point coordinates as (100, 100). During the second cleaning cycle, the outer edge of the device avoids a circle centered at (100, 100) with a radius of 100mm. If a collision still occurs at that point during the second cleaning cycle, the device avoids a circle centered at (100, 100) with a radius of 80mm during the third cleaning cycle, and so on. If the radius decreases to 40mm, it indicates that the self-moving device has already experienced multiple collisions in the area corresponding to the collision curve. Therefore, the obstacle corresponding to the collision curve is considered fixed and unlikely to move for an extended period. The deceleration distance setting is then canceled, and during the next cleaning cycle, the self-moving device is directly controlled to travel along the collision curve. In other words, the self-moving device recognizes the obstacle corresponding to the collision curve as a fixed obstacle, records it on the map, and travels around the obstacle during the next cleaning cycle.
[0101] Optionally, the control module 42 is further configured to control the self-moving device to travel at the first speed if the self-moving device does not experience another collision with the plate at any position on the collision curve.
[0102] If the self-moving device does not experience another collision with the obstacle at any point on the collision curve, it is considered that the obstacle has been temporarily removed. The self-moving device is then controlled to travel at the first speed, i.e., without slowing down, and travels at a normal speed.
[0103] For example, after determining that there is a contour curve in the target area, the self-moving device will slow down in advance and approach the area during the next cleaning. If the self-moving device does not collide with the obstacle again in the target area, it is considered that the obstacle has been removed. In this case, the self-moving device does not need to slow down and can adjust to normal speed.
[0104] Based on the above steps, the control module 42 is further configured to, when the self-moving device does not experience another collision event at any position on the collision curve, control the self-moving device to drive at the first driving speed, and when the number of cleaning operations performed by the self-moving device exceeds a third preset value, and the self-moving device does not experience another collision event at any position on the collision curve, control the self-moving device to delete the collision curve.
[0105] If, during multiple cleaning processes after the self-moving device has fitted the collision curve, no further collision events occur at any position on the collision curve, it is considered that the obstacle was only temporarily present in the area and has now been removed. In this case, the self-moving device is controlled to delete the collision curve, and it can then drive normally in the area during subsequent cleaning processes.
[0106] For example, if the self-moving device does not collide with the obstacle again in the area where the contour curve is located during multiple (e.g., 3) cleaning processes after the contour curve is identified, it is considered that the obstacle corresponding to the previously identified contour curve was only temporary and has been removed. In this case, the contour curve recorded by the self-moving device has become useless, and the self-moving device can be controlled to delete the contour curve. In subsequent cleaning processes, there is no need to slow down in advance when driving in this area.
[0107] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to perform the steps in any of the above method embodiments when executed.
[0108] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0109] S1, during the process of the self-moving device driving in the first driving mode, if the self-moving device experiences a collision with a barrier and the self-moving device does not identify point cloud data for representing obstacles within a preset range, the self-moving device is controlled to drive in the second driving mode, wherein the first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode.
[0110] S2, acquire the pose information of the self-moving device when a collision event occurs during the driving process of the second driving mode, and determine the collision curve of the self-moving device based on the pose information;
[0111] S3, adjust the driving direction of the self-moving device according to the collision curve until the first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device recognizes the point cloud data within a preset range.
[0112] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0113] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0114] Embodiments of the present invention also provide an electronic device including a memory and a processor, the memory storing a computer program and the processor being configured to run the computer program to perform the steps in any of the above method embodiments.
[0115] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0116] S1, during the process of the self-moving device driving in the first driving mode, if the self-moving device experiences a collision with a barrier and the self-moving device does not identify point cloud data for representing obstacles within a preset range, the self-moving device is controlled to drive in the second driving mode, wherein the first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode.
[0117] S2, acquire the pose information of the self-moving device when a collision event occurs during the driving process of the second driving mode, and determine the collision curve of the self-moving device based on the pose information;
[0118] S3, adjust the driving direction of the self-moving device according to the collision curve until the first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device recognizes the point cloud data within a preset range.
[0119] In one exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor and the input / output device is connected to the processor.
[0120] Specific examples in this embodiment can be found in the examples described in the above embodiments and exemplary implementations, and will not be repeated here.
[0121] It is obvious to those skilled in the art that the modules or steps of the present invention described above can be implemented using general-purpose computing devices. They can be centralized on a single computing device or distributed across a network of multiple computing devices. They can be implemented using computer-executable program code, and thus can be stored in a storage device for execution by a computing device. In some cases, the steps shown or described can be performed in a different order than those described herein, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0122] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for driving a self-moving device, characterized in that, include: During the process of the self-moving device driving in the first driving mode, if the self-moving device experiences a collision with a barrier and the self-moving device does not identify point cloud data representing the obstacle within a preset range, the self-moving device is controlled to drive in the second driving mode, wherein the first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode. The pose information of the self-moving device when a collision event occurs during the driving process of the second driving mode is obtained, and the collision curve of the self-moving device is determined based on the pose information. The self-moving device adjusts its driving direction according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device identifies the point cloud data within a preset range.
2. The method for driving a self-moving device according to claim 1, characterized in that, Acquiring the pose information of the self-moving device at the time of a collision event during its travel in the second driving mode, and determining the collision curve of the self-moving device based on the pose information, includes: During the process of the self-mobile device driving in the second driving mode, multiple pose information of the self-mobile device when the collision event with the board occurs is continuously acquired; Based on the position coordinates of the self-moving device indicated by the multiple pose information and the device orientation, determine the position coordinates of multiple collision points where the self-moving device experiences the collision with the board; Curve fitting is performed on the position coordinates of the multiple collision points to obtain the collision curve of the self-moving device.
3. The method for driving a self-moving device according to claim 1, characterized in that, The method further includes adjusting the driving direction of the self-moving device according to the collision curve until a first preset condition is met, and then: When the self-moving device performs the next round of cleaning, a first preset distance is determined based on the collision curve; When the self-moving device reaches the target location, the self-moving device is controlled to travel at a third driving speed, wherein the third driving speed is less than the first driving speed, and the closest distance between the target location and the collision curve is less than the first preset distance; Determine whether the self-moving device experiences another collision with the plate at any position on the collision curve; Whether to adjust the first preset distance depends on whether a collision with the board occurs again.
4. The method for driving a self-moving device according to claim 3, characterized in that, Determining the first preset distance based on the collision curve includes: If the shape and area of the collision curve meet the second preset conditions, the first preset distance is set to the first preset value. The second preset conditions include: the shape of the collision curve is a regular shape, and the area of the collision curve is greater than a preset area threshold. If the shape and area of the collision curve do not meet the second preset condition, the first preset distance is set to a second preset value, wherein the second preset value is greater than the first preset value.
5. The method for driving a self-moving device according to claim 3, characterized in that, Determining whether to adjust the first preset distance based on whether a collision event occurs again includes: If the self-moving device experiences another collision with the board at any position on the collision curve, the first preset distance is adjusted to a second preset distance, wherein the second preset distance is less than the first preset distance.
6. The method for driving a self-moving device according to claim 3, characterized in that, Determining whether to adjust the first preset distance based on whether a collision event occurs again includes: If the self-moving device does not experience another collision with the board at any point on the collision curve, the self-moving device is controlled to travel at the first driving speed.
7. The method for driving a self-moving device according to claim 6, characterized in that, If the self-moving device does not experience another collision with the board at any point on the collision curve, after controlling the self-moving device to travel at the first driving speed, the method further includes: If the number of times the self-moving device performs cleaning exceeds a third preset value, and the self-moving device does not experience another collision event at any position on the collision curve, the self-moving device is controlled to delete the collision curve.
8. A driving device for a self-moving device, characterized in that, include: The control module is used to control the self-moving device to drive in a second driving mode when the self-moving device is driving in a first driving mode and a collision event occurs with the self-moving device, and the self-moving device does not identify point cloud data for representing obstacles within a preset range. The first driving speed corresponding to the first driving mode is greater than the second driving speed corresponding to the second driving mode. The acquisition module is used to acquire the pose information of the self-moving device when a collision event occurs during the driving process of the second driving mode, and to determine the collision curve of the self-moving device based on the pose information. An adjustment module is used to adjust the driving direction of the self-moving device according to the collision curve until a first preset condition is met, wherein the first preset condition includes at least one of the following: the collision curve is a closed curve, and the self-moving device recognizes the point cloud data within a preset range.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, wherein the computer program is configured to execute the method described in any one of claims 1 to 7 when it is run.
10. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to run the computer program to perform the method as described in any one of claims 1 to 7.