Charging method, self-moving device and computer readable storage medium
By planning and predicting the movement trajectory and calculating the recharging success rate during the recharging process of the self-moving equipment, the problems of pile failure and equipment damage caused by external factors are solved, and safe and efficient recharging of the equipment is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ECOFLOW INC
- Filing Date
- 2023-05-05
- Publication Date
- 2026-07-21
AI Technical Summary
During the recharging process, external factors can cause deviations in the movement trajectory of the mobile device, leading to failure to recharge. Furthermore, the recharging process may have a trigger delay, potentially damaging the device.
When the mobile device enters the preset area, the system plans and predicts the movement trajectory and calculates the offset distance. The system calculates the recharge success rate by the ratio of the actual transmission speed to the predicted speed within the detection cycle. The system controls the device to exit and re-execute the recharge operation when the success rate is lower than the preset probability.
It improves the lifespan of self-moving and charging devices, avoids collision damage caused by failed recharging, and enhances the accuracy and safety of recharging.
Smart Images

Figure CN116719314B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of equipment control technology, and in particular to a recharge method, a self-moving device, and a computer-readable storage medium. Background Technology
[0002] When a self-propelled mobile device (WPM) attempts to recharge, its movement trajectory needs to be planned to ensure accurate docking at a charging station. However, during the recharge process, the actual movement trajectory may deviate from the planned trajectory due to external factors such as obstacles, the size of the device itself, and its available angles, causing the WPM to fail to dock. To compensate for this, multiple recharge attempts are typically used. After each failed attempt, the WPM is controlled to move a certain distance before attempting to recharge again.
[0003] However, the current recharging solution has a trigger delay issue, which may damage the self-moving device and the charging device, reducing their lifespan. Summary of the Invention
[0004] This invention provides a recharging method, a self-moving device, and a computer-readable storage medium, aiming to solve the problems of recharging trigger delay, damage to self-moving devices and charging devices, and reduced lifespan of self-moving devices and charging devices.
[0005] In a first aspect, embodiments of the present invention provide a recharging method, comprising:
[0006] When the self-moving device enters the preset area, based on the current location information of the self-moving device and the location information of the charging device, a predicted movement trajectory of the self-moving device from its current location to the charging device and the predicted speed corresponding to each trajectory point in the predicted movement trajectory are planned.
[0007] Based on the predicted speed corresponding to the current position, the self-moving device is driven to move towards the charging device;
[0008] In each detection cycle, the offset distance of the self-moving device relative to the charging device is calculated, and the target trajectory point closest to the self-moving device is determined;
[0009] The actual transmission speed corresponding to the current detection cycle is calculated based on the offset distance;
[0010] Based on the actual delivery speed and the predicted speed corresponding to the target trajectory point, the recharging success rate of the self-mobile device is calculated.
[0011] When the recharging success rate is less than a preset probability, the self-moving device is controlled to exit the preset area and the recharging operation is re-executed.
[0012] Secondly, embodiments of the present invention also provide a self-moving device, the self-moving device including a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the recharging method as described above.
[0013] Thirdly, embodiments of the present invention also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to implement the recharge method as described above.
[0014] This invention provides a recharging method, a self-moving device, and a computer-readable storage medium. The recharging method, when the self-moving device enters a preset area, calculates the actual transmission speed corresponding to the current detection cycle based on the offset distance of the self-moving device relative to the charging device in each detection cycle. Simultaneously, it obtains the predicted speed of the self-moving device in the current detection cycle by detecting the target trajectory point that is closest to the predicted movement trajectory of the self-moving device. By comparing the actual transmission speed and the predicted speed, the recharging success rate of the self-moving device in each current detection cycle is calculated. If the recharging success rate is less than a preset probability, the self-moving device is controlled to exit the preset area and re-execute the recharging operation. This achieves prediction of the recharging result of the self-moving device, which can trigger the self-moving device to re-execute the recharging operation in advance, avoiding damage caused by collisions between the self-moving device and the charging device due to failed recharging, thereby improving the service life of both the self-moving device and the charging device. Attached Figure Description
[0015] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart illustrating a first embodiment of a recharge method provided in this application.
[0017] Figure 2 This is a schematic diagram of the structure of a secondary recharge trigger range provided in an embodiment of this application;
[0018] Figure 3 A schematic diagram illustrating the measurement of the deviation distance between a self-moving device and a charging device, provided as an embodiment of this application;
[0019] Figure 4 This is a flowchart illustrating a second embodiment of a recharge method provided in this application.
[0020] Figure 5 This is a schematic block diagram of the structure of a self-moving device provided in an embodiment of this application.
[0021] The realization of the purpose, functional features and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0022] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.
[0024] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0025] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a first embodiment of a recharge method provided in this application.
[0026] like Figure 1 As shown, the recharge method includes steps S101 to S106.
[0027] Step S101: When the self-moving device enters the preset area, based on the current location information of the self-moving device and the location information of the charging device, plan the predicted movement trajectory of the self-moving device from its current location to the charging device and the predicted speed corresponding to each trajectory point in the predicted movement trajectory.
[0028] In this application embodiment, the self-moving device may include self-moving lawnmowers, self-moving sprinklers, sweeping robots, and other electronic devices with self-moving functions.
[0029] In one embodiment, such as Figure 2As shown, a preset area can be set based on the charging device, which can also be understood as the trigger range for secondary recharging. When the mobile device moves into the preset area, the recharging method provided in this application embodiment will be applied to determine whether the mobile device needs to trigger secondary recharging. When the mobile device is outside the preset area, secondary recharging data calculation is unnecessary to avoid unnecessary data calculation and reduce data processing volume. Simultaneously, shorter path planning allows for more accurate predicted movement trajectories.
[0030] The meaning of "secondary recharging" is that the self-mobile device performs a recharging operation again. The "second" in the above-mentioned secondary recharging is a figurative expression and does not mean that the self-mobile device performs a recharging operation again.
[0031] In one embodiment, the installation position of the charging device and the direction of the charging interface are generally fixed, so the posture of the self-moving device and the charging device are generally the same. Therefore, in order to ensure that the self-moving device can more accurately connect to the charging device for charging, the self-moving device can be driven to move to the coarse return charging point first, and then move from the coarse return charging point to the fine return charging point.
[0032] In one embodiment, such as Figure 2 As shown, before entering the preset area, the self-moving device can use the coarse recharge point as the moving target, drive the self-moving device to move to the coarse recharge point first, and then adjust the pose of the self-moving device to improve the recharge accuracy of the self-moving device.
[0033] The process involves the self-moving device first moving to the coarse recharge point to determine its direction of movement. Then, it moves in a relatively straight line towards the fine recharge point or the end of the recharge path (i.e., the charging device). During this movement, the self-moving device undergoes further position and posture adjustments to avoid large-arc movement paths and large-angle position and posture adjustments. This results in more accurate position and posture adjustments and route planning for the self-moving device, thereby improving the recharge success rate.
[0034] In one embodiment, Figure 2 The area within the dashed line is a preset area where the mobile device will trigger a second charging detection within this area. Figure 2 In the scenario shown, it is assumed that the charging equipment includes a charging pad and a charging station. Controlling the mobile device to return to the charging equipment can be understood as controlling the mobile device to return to the location of the charging station. The aforementioned preset area can be understood as the condition for determining whether the mobile device is located on the charging pad. After the mobile device arrives at the return point, using the current location data or the detected distance information to the charging station, it is determined whether the mobile device is within the trigger range for a second return charge, thus determining whether the mobile device is located on the charging pad.
[0035] In one specific embodiment, determining whether the self-moving device is located on the charging pad may include the following two conditions: the self-moving device reaches a pre-set recharge point, and the distance between the self-moving device and the charging device is less than a preset distance (i.e., the self-moving device is located within a preset area). When the above two conditions are met, the preparatory switch for secondary recharge is turned on; when the above two conditions fail, the preparatory switch for secondary recharge is turned off.
[0036] Among them, the pre-switch is in the state of not entering Figure 2 The device is turned off when the virtual coil (i.e., the preset area) is in use, and turned on when it enters the preset area. Once turned on, it begins detecting whether a second recharge is needed, that is, it begins executing the recharge method provided in this embodiment to determine whether the self-moving device needs to be controlled for a second recharge. This is done to prevent false triggering and to reduce the complexity of the loop process. It should be understood that the aforementioned pre-switch can be understood as a virtual switch used to control whether the self-moving device performs a second recharge detection.
[0037] For example, taking a lawnmower as an example, if the lawnmower reaches the preset recharge point and the depth distance between the lawnmower and the charging station returned by the depth camera is less than 40cm, or if the positioning module detects that the distance between the self-moving device and the end point of the recharge path is 1.2m (40cm and 1.2m are just examples; in actual application scenarios, they can be determined based on the actual dimensions of the lawnmower and the charging station), it can be considered that the lawnmower is located on the charging station and the distance between the lawnmower and the charging station is relatively close. The recharge method provided in this application can then be applied to determine whether it is necessary to control the lawnmower to perform a second recharge.
[0038] In one embodiment, the self-moving device is controlled to move toward a first charging point; when the self-moving device moves to the first charging point, it is determined that the self-moving device has entered a preset area.
[0039] The first recharge point can be the boundary of the preset area or any location point within the preset area.
[0040] Specifically, the self-moving device can determine its location and navigate using satellite positioning, inertial odometry, or other types of positioning modules. When the self-moving device detects that its location overlaps with the first recharging point, it can determine that the self-moving device has entered the preset area.
[0041] In one embodiment, when the distance between the self-moving device and the charging device is detected to be less than a preset distance threshold, it is determined that the self-moving device has entered a preset area.
[0042] In one embodiment, the distance between the self-moving device and the charging device can be detected and calculated in real time using sensors. The distance between the boundary of the preset area and the end point of the recharge path can be used as a preset distance threshold. When the distance between the self-moving device and the charging device is detected to be less than the preset distance threshold, it indicates that the self-moving device has entered the preset area.
[0043] In one embodiment, the sensor used to detect the distance between the self-moving device and the charging device may be a camera device or a ranging sensor, etc.
[0044] In one embodiment, one or more camera devices can be installed above or to the side of the charging pad, with the camera devices facing the side of the charging pad. When the self-moving device moves toward the charging device, the camera devices can take pictures of the relative positions of the self-moving device and the charging device. Based on data such as the focal length, pixel size, resolution of the camera devices and the distance between the camera devices and the charging pad, the actual distance between the self-moving device and the charging device in the picture can be calculated.
[0045] In one embodiment, standard dimensions can be marked on the charging pad, and a camera device can be used to capture the corresponding standard dimensions at the front end of the self-moving device to calculate the relative distance between the self-moving device and the charging device.
[0046] In one embodiment, a ranging sensor can be installed on the self-moving device or the charging device. When the self-moving device moves toward the charging device, the distance between the self-moving device and the charging device is calculated based on obstacle information, wave propagation time, and propagation speed fed back by the wave emitted by the ranging sensor.
[0047] In one embodiment, the ranging sensor may include an ultrasonic ranging sensor, a laser ranging sensor, and an infrared ranging sensor, etc.
[0048] When ultrasound encounters impurities or interfaces, it will produce significant reflections, forming echoes. When it encounters moving objects, it can produce the Doppler effect.
[0049] When a laser sensor is working, a laser diode first emits a laser pulse at the target. After being reflected by the target, the laser light is scattered in all directions, and some of the scattered light returns to the sensor receiver. This scattered light is then received by the optical system and imaged onto an avalanche photodiode. By recording and processing the time elapsed from the emission of the light pulse to its return and reception, the target distance can be determined. The avalanche photodiode is an optical sensor with internal amplification capabilities, enabling it to detect extremely weak light signals.
[0050] Among them, the infrared ranging sensor uses the principle that the intensity of the reflection of infrared signals varies depending on the distance to the obstacle to detect the distance of the obstacle.
[0051] In this embodiment, since the location and orientation of the charging device are fixed, when the self-moving device moves within a preset area, a predicted movement trajectory of the self-moving device from its current location to the charging device can be planned based on the location information of the self-moving device and the charging device. This predicted movement trajectory includes multiple trajectory points and the predicted speed corresponding to each trajectory point.
[0052] In one embodiment, when the self-moving device moves to a preset area, the current position and attitude information of the self-moving device can be substituted into a pre-set motion model to calculate a predicted movement trajectory and calculate the predicted velocity at each trajectory point on the predicted movement trajectory, thereby forming a binary vector space of velocity.
[0053] In one embodiment, the predicted velocity includes linear velocity V and angular velocity W.
[0054] In one embodiment, the motion model can be a two-wheel differential speed model. Self-moving devices can use a two-wheel differential speed model to perform trajectory calculation (also known as trajectory prediction).
[0055] Step S102: Based on the predicted speed corresponding to the current position, drive the self-moving device to move towards the charging device;
[0056] After planning the predicted movement trajectory, the self-moving device can be controlled based on the predicted speed corresponding to the current location.
[0057] Step S103: In each detection cycle, calculate the offset distance of the self-moving device relative to the charging device, and determine the target trajectory point closest to the self-moving device;
[0058] In one embodiment, the offset distance of the self-moving device relative to the charging device is calculated based on the location information of the self-moving device in the current detection cycle and the location information of the charging device.
[0059] In one specific embodiment, such as Figure 3 As shown, when the secondary recharge preparation switch is turned on, the self-moving device can calculate the offset distance d between the self-moving device and the charging device.
[0060] In one embodiment, the relative pose between the mobile device and the charging device can be acquired by an image acquisition device (such as a depth camera), and the offset distance can be calculated based on data such as the focal length, resolution, pixel size, and depth of the image acquisition device.
[0061] In one embodiment, during each detection cycle, the distance between each trajectory point and the current location of the self-moving device can be calculated, and the trajectory point closest to the self-moving device can be selected as the target trajectory point.
[0062] Step S104: Calculate the actual transmission speed corresponding to the current detection cycle based on the offset distance;
[0063] In one embodiment, the self-moving device can use the offset distance of each detection cycle as input to the control algorithm to calculate the actual transmission speed to be transmitted in the current detection cycle.
[0064] In one embodiment, the control algorithm can be a PID (Proportion Integral Derivative) algorithm. In the control of a closed-loop system, the PID algorithm performs system control according to the proportional (P), integral (I), and derivative (D) of the deviation, and can automatically and accurately correct the control system.
[0065] In other embodiments, the control algorithm described above may also be other algorithms, such as the PI algorithm, PD algorithm, etc.
[0066] Step S105: Calculate the recharging success rate of the self-mobile device based on the actual delivery speed and the predicted speed corresponding to the target trajectory point;
[0067] In one embodiment, the ratio of the actual delivery speed to the predicted speed corresponding to the target trajectory point is calculated to obtain the recharging success rate of the self-moving device.
[0068] In one embodiment, during the i-th detection period, the trajectory point in the predicted movement trajectory that is closest to the current position of the self-moving device can be found. Based on this trajectory point, the corresponding predicted velocity v' is extracted from the binary vector space of velocity, and the actual transmission velocity v of the self-moving device at the current position is calculated to obtain the velocity confidence pi = v / v' at the current position. i is a positive integer.
[0069] In one embodiment, a confidence level can be obtained for each detection cycle. During the recharging process of the self-moving device, a comprehensive confidence level p corresponding to the current detection cycle can be returned. For example, in the i-th detection cycle, p = p1 * p2 * ... * pi. This p value represents the recharging success rate of the self-moving device successfully reaching the charging station.
[0070] Step S106: When the recharging success rate is less than the preset probability, control the self-moving device to exit the preset area and re-execute the recharging operation.
[0071] Furthermore, when the recharge success rate is greater than a preset probability, the self-moving device is driven to move toward the charging device based on the actual sending speed corresponding to the current detection cycle.
[0072] In one embodiment, the recharging success rate of a self-moving device at its current location is calculated in each detection cycle. When the recharging success rate is less than a preset probability, the self-moving device is more likely to fail to connect to the charging station. If the self-moving device continues to move towards the charging station, it is highly likely that it will not successfully connect to the station and may collide with the charging station, causing damage. Therefore, when the recharging success rate is less than the preset probability, a second recharging is triggered, abandoning the current movement trajectory of the self-moving device to avoid collision with the charging station. Simultaneously, the self-moving device is driven out of the preset area and returned to the recharging point, and its predicted movement trajectory is replanned. This allows the self-moving device to recharge according to the replanned predicted movement trajectory, thereby improving the recharging success rate of the self-moving device.
[0073] In one embodiment, the secondary charging is not triggered when the mobile device enters the preset area. Instead, when the mobile device enters the preset area, the secondary charging preparation switch is triggered. That is, at this time, the charging success rate of the mobile device needs to be determined based on the actual movement route and the predicted route of the mobile device. The secondary charging will only be triggered when the calculated charging success rate is less than the preset probability.
[0074] This invention provides a recharging method. When a self-moving device enters a preset area, the method calculates the actual transmission speed corresponding to the current detection cycle based on the offset distance of the self-moving device relative to the charging device in each detection cycle. Simultaneously, it obtains the predicted speed of the self-moving device in the current detection cycle by detecting the target trajectory point that is closest to the predicted movement trajectory of the self-moving device. By comparing the actual transmission speed and the predicted speed, the recharging success rate of the self-moving device in each current detection cycle is calculated. If the recharging success rate is less than a preset probability, the self-moving device is controlled to exit the preset area and the recharging operation is re-executed. This method achieves prediction of the recharging result of the self-moving device, allowing for early triggering of the recharging operation and avoiding damage caused by collisions between the self-moving device and the charging device due to failed recharging, thereby improving the service life of both the self-moving device and the charging device.
[0075] Please refer to Figure 4 , Figure 4 This is a flowchart illustrating a second embodiment of a recharge method provided in this application.
[0076] like Figure 4 As shown, in this embodiment, based on the above... Figure 1 The method further includes, in the embodiment shown, the following:
[0077] Step S201: When the self-moving device moves to the charging device but fails to charge, if the self-moving device is detected to be slipping, the self-moving device is controlled to exit the preset area and the recharging operation is re-executed.
[0078] In one embodiment, when the recharge success rate calculated based on the current predicted movement trajectory is greater than a preset probability, the self-moving device is driven to move towards the charging device. However, if the self-moving device moves according to the predicted movement trajectory but fails to charge successfully, there may be other influencing factors that prevent the self-moving device from charging normally.
[0079] In one embodiment, if the self-mobile device comes into contact with the charging device but does not display a charging success or charging status, it is determined that the self-mobile device has not been successfully charged.
[0080] In one embodiment, when the self-mobile device moves to the charging device but fails to charge, it is necessary to detect whether the self-mobile device is slipping.
[0081] When a mobile device moves to a charging station, it may continue moving, but the charging station may obstruct its path, causing it to slip. Therefore, when a mobile device moves to a charging station but fails to charge, it's necessary to detect whether the device is slipping to determine if it has actually come into contact with the charging station.
[0082] When the self-moving device does not slip, it means that the self-moving device can still move normally and has not come into contact with the charging device. However, when the self-moving device slips, it means that the self-moving device has come into contact with the charging device and is still bumping against it. In this case, to prevent the self-moving device from continuing to collide with the charging device, you can control the self-moving device to leave the preset area and re-execute the recharging operation for a second charging.
[0083] In one embodiment, when the self-mobile device moves to the charging device but fails to charge, a first type of positioning data and a second type of positioning data of the self-mobile device are acquired; the first type of positioning data includes satellite positioning data and / or depth data of the self-mobile device; the second type of positioning data includes odometer data of the self-mobile device; if it is determined based on the first type of positioning data and the second type of positioning data that the self-mobile device is in a slipping state, the self-mobile device is controlled to exit the preset area and the recharging operation is re-executed.
[0084] In one embodiment, the first type of positioning data includes satellite positioning data and / or depth data of the self-moving device, such as the current positioning information of the self-moving device and / or the relative distance information between the self-moving device and the charging device detected by the sensor device.
[0085] In one embodiment, the second type of positioning data includes odometer data of the self-moving device, which may be odometer data of the drive wheel of the self-moving device, to determine whether the drive wheel of the self-moving device is moving or rotating.
[0086] In one embodiment, the criterion for determining whether the self-moving device is slipping, based on the first type of positioning data and the second type of positioning data, may be:
[0087]
[0088] Among them, e static This indicates the second type of location data, e dynamic This represents the first type of positioning data, where i is the current frame data, i-1 is the previous frame data, and d... c d represents the relative distance information detected by the sensor device between the mobile device and the charging device. r This represents satellite positioning data from the mobile device. dynamic It can represent the change in relative distance information between two adjacent frames, or it can represent the change in satellite positioning data between two adjacent frames. `tol` is a preset error threshold. When `e`... static and e dynamic When the absolute value of the difference is greater than tol, it indicates that there is a significant discrepancy between the first type of positioning data and the second type of positioning data, confirming that the self-moving device has slipped.
[0089] In one embodiment, if the self-moving device does not slip, both the first and second types of positioning data will remain essentially unchanged after the self-moving device comes into contact with the charging device. However, if the self-moving device slips, the first type of positioning data will remain essentially unchanged or change only slightly, while the second type of positioning data will continue to increase. This allows for the determination of whether the self-moving device has slipped.
[0090] In one embodiment, when it is determined that the self-moving device has slipped, a second recharging is triggered, driving the self-moving device away from the charging device and out of the preset area, controlling the self-moving device to move to the recharging point, and replanning the recharging route of the self-moving device.
[0091] In this embodiment, the secondary charging trigger function is closed-loop by adding a slip detection function. The self-device's charging success rate determination and slip detection occur within the same loop when the secondary charging switch is turned on; they are ORed, meaning that either condition being met will trigger secondary charging. However, slip detection can only be executed after the self-device has moved to the charging device. At this point, the charging success rate meets the charging requirements. When slip detection is triggered, the self-device and charging device have already collided and come into contact, potentially causing damage to both. Therefore, slip detection is designed to prevent continuous collisions between the self-device and charging device, thus avoiding increased damage.
[0092] Please see Figure 5 , Figure 5 This is a schematic block diagram of the structure of a self-moving device provided in an embodiment of this application.
[0093] See Figure 5 The self-moving device includes a processor 401, a memory 402, and a network interface 403 connected via a data bus. The memory 402 may include a non-volatile storage medium and internal memory.
[0094] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions that, when executed, cause the processor 401 to perform any charge-back method.
[0095] Processor 401 provides computing and control capabilities to support the operation of the entire computer device.
[0096] The internal memory provides an environment for the execution of computer programs in non-volatile storage media. When the computer program is executed by the processor 401, the processor 401 can execute any recharge method.
[0097] This network interface 403 is used for network communication, such as sending assigned tasks. Those skilled in the art will understand that... Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0098] It should be understood that processor 401 can be a Central Processing Unit (CPU), but it can also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among these, the general-purpose processor can be a microprocessor or any conventional processor.
[0099] In one embodiment, the processor 401 is configured to run a computer program stored in memory to perform the following steps:
[0100] When the self-moving device enters the preset area, based on the current location information of the self-moving device and the location information of the charging device, a predicted movement trajectory of the self-moving device from its current location to the charging device and the predicted speed corresponding to each trajectory point in the predicted movement trajectory are planned.
[0101] Based on the predicted speed corresponding to the current position, the self-moving device is driven to move towards the charging device;
[0102] In each detection cycle, the offset distance of the self-moving device relative to the charging device is calculated, and the target trajectory point closest to the self-moving device is determined;
[0103] The actual transmission speed corresponding to the current detection cycle is calculated based on the offset distance;
[0104] Based on the actual delivery speed and the predicted speed corresponding to the target trajectory point, the recharging success rate of the self-mobile device is calculated.
[0105] When the recharging success rate is less than a preset probability, the self-moving device is controlled to exit the preset area and the recharging operation is re-executed.
[0106] In one embodiment, when the processor 401 calculates the recharging success rate of the self-moving device based on the actual sending speed and the predicted speed corresponding to the target trajectory point, it is configured to:
[0107] The ratio of the actual delivery speed to the predicted speed corresponding to the target trajectory point is calculated to obtain the recharging success rate of the self-moving device.
[0108] In one embodiment, when performing the calculation of the offset distance between the self-moving device and the charging device, the processor 401 is configured to:
[0109] Based on the location information of the self-moving device in the current detection cycle and the location information of the charging device, the offset distance of the self-moving device relative to the charging device is calculated.
[0110] In one embodiment, before implementing the step of planning a predicted movement trajectory for the self-moving device to move from its current location to the charging device based on the current location information of the self-moving device and the location information of the charging device, and the predicted speed corresponding to each trajectory point in the predicted movement trajectory, the processor 401 is further configured to implement:
[0111] Control the self-moving device to move towards the first recharge point;
[0112] When the self-moving device moves to the first recharge point, it is determined that the self-moving device has entered a preset area.
[0113] In one embodiment, before implementing the step of planning a predicted movement trajectory for the self-moving device to move from its current location to the charging device based on the current location information of the self-moving device and the location information of the charging device, and the predicted speed corresponding to each trajectory point in the predicted movement trajectory, the processor 401 is further configured to implement:
[0114] When the distance between the self-moving device and the charging device is detected to be less than a preset distance threshold, it is determined that the self-moving device has entered a preset area.
[0115] In one embodiment, after calculating the recharging success rate of the self-moving device based on the actual transmission speed and the predicted speed corresponding to the target trajectory point, the processor 401 is further configured to:
[0116] When the recharge success rate is greater than the preset probability, the self-moving device is driven to move toward the charging device based on the actual sending speed corresponding to the current detection cycle.
[0117] In one embodiment, when the processor 401 runs a computer program stored in the memory, it is also configured to:
[0118] If the self-mobile device moves to the charging device but fails to charge, and if the self-mobile device is detected to be slipping, the self-mobile device is controlled to exit the preset area and the recharging operation is re-executed.
[0119] In one embodiment, when the processor 401 implements the step of controlling the self-mobile device to exit the preset area and re-execute the recharging operation when it detects that the self-mobile device is slipping after moving to the charging device but failing to charge, the processor 401 is configured to:
[0120] When the self-mobile device moves to the charging device but fails to charge, a first type of positioning data and a second type of positioning data of the self-mobile device are acquired; the first type of positioning data includes the satellite positioning data and / or depth data of the self-mobile device; the second type of positioning data includes the odometer data of the self-mobile device.
[0121] If it is determined based on the first type of positioning data and the second type of positioning data that the self-moving device is in a slipping state, then the self-moving device is controlled to exit the preset area and the recharging operation is re-executed.
[0122] The embodiments of this application also provide a computer-readable storage medium storing a computer program, the computer program including program instructions, and a processor executing the program instructions to implement any of the recharge methods provided in the embodiments of this application.
[0123] The computer-readable storage medium can be an internal storage unit of the computer device described in the foregoing embodiments, such as the hard disk or memory of the computer device. The computer-readable storage medium can also be an external storage device of the computer device, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., provided on the computer device.
[0124] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A recharge method, characterized in that, include: When the self-moving device enters the preset area, based on the current location information of the self-moving device and the location information of the charging device, a predicted movement trajectory of the self-moving device from its current location to the charging device and the predicted speed corresponding to each trajectory point in the predicted movement trajectory are planned. Based on the predicted speed corresponding to the current position, the self-moving device is driven to move towards the charging device; In each detection cycle, based on the position information of the self-moving device in the current detection cycle and the position information of the charging device, or based on the relative pose between the self-moving device and the charging device, the offset distance of the self-moving device relative to the charging device is calculated, and the target trajectory point closest to the self-moving device is determined. Based on the offset distance as the input of the closed-loop control algorithm, the actual transmission speed corresponding to the current detection cycle is calculated; Based on the actual delivery speed and the predicted speed corresponding to the target trajectory point, the recharging success rate of the self-mobile device is calculated. When the recharging success rate is less than a preset probability, the self-moving device is controlled to exit the preset area and the recharging operation is re-executed.
2. The method according to claim 1, characterized in that, The calculation of the recharging success rate of the self-mobile device based on the actual delivery speed and the predicted speed corresponding to the target trajectory point includes: The ratio of the actual delivery speed to the predicted speed corresponding to the target trajectory point is calculated to obtain the recharging success rate of the self-moving device.
3. The method according to claim 1, characterized in that, The calculation of the offset distance of the self-moving device relative to the charging device includes: Based on the location information of the self-moving device in the current detection cycle and the location information of the charging device, the offset distance of the self-moving device relative to the charging device is calculated.
4. The method according to claim 1, characterized in that, Before planning the predicted movement trajectory of the self-moving device from its current location to the charging device and the predicted speed corresponding to each trajectory point in the predicted movement trajectory based on the current location information of the self-moving device and the location information of the charging device, the method further includes: Control the self-moving device to move towards the first recharge point; When the self-moving device moves to the first recharge point, it is determined that the self-moving device has entered a preset area.
5. The method according to claim 1, characterized in that, Before planning the predicted movement trajectory of the self-moving device from its current location to the charging device and the predicted speed corresponding to each trajectory point in the predicted movement trajectory based on the current location information of the self-moving device and the location information of the charging device, the method further includes: When the distance between the self-moving device and the charging device is detected to be less than a preset distance threshold, it is determined that the self-moving device has entered a preset area.
6. The method according to claim 1, characterized in that, After calculating the recharging success rate of the self-mobile device based on the actual delivery speed and the predicted speed corresponding to the target trajectory point, the method further includes: When the recharge success rate is greater than the preset probability, the self-moving device is driven to move toward the charging device based on the actual sending speed corresponding to the current detection cycle.
7. The method according to any one of claims 1 to 6, characterized in that, The method further includes: If the self-mobile device moves to the charging device but fails to charge, and if the self-mobile device is detected to be slipping, the self-mobile device is controlled to exit the preset area and the recharging operation is re-executed.
8. The method according to claim 7, characterized in that, When the self-mobile device moves to the charging device but fails to charge, if the self-mobile device is detected to be slipping, the self-mobile device is controlled to exit the preset area and the recharging operation is re-executed, including: When the self-mobile device moves to the charging device but fails to charge, a first type of positioning data and a second type of positioning data of the self-mobile device are acquired; the first type of positioning data includes the satellite positioning data and / or depth data of the self-mobile device; the second type of positioning data includes the odometer data of the self-mobile device. If it is determined based on the first type of positioning data and the second type of positioning data that the self-moving device is in a slipping state, then the self-moving device is controlled to exit the preset area and the recharging operation is re-executed.
9. A self-moving device, characterized in that, The self-moving device includes a processor, a memory, and a computer program stored in the memory and executable by the processor, wherein when the computer program is executed by the processor, it implements the recharge method as described in any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, causes the processor to perform the steps of the recharge method as described in any one of claims 1 to 8.