Mobile robot escape method and mobile robot
By acquiring cached data from multiple laser beams, using the center difference algorithm and weighted processing to determine the global escape direction, and combining it with a phased microstepping algorithm, the problem of mobile robots escaping from noisy and dynamic environments was solved, improving stability and success rate.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-31
- Publication Date
- 2026-03-31
AI Technical Summary
Existing methods for mobile robots to escape obstacles have low stability and success rate in noisy and dynamic environments, and cannot effectively avoid path planning errors caused by noise interference in single-frame data and changes in obstacles.
By acquiring laser buffer data from multiple laser beams, the distance change rate is calculated using the center difference algorithm. Combined with weighted processing and a phased microstepping algorithm, the global escape direction is determined and the mobile robot is controlled to escape from its predicament.
It improves the success rate and stability of mobile robots in escaping from difficult situations, reduces sensitivity to noise in single-frame data and changes in obstacles, and ensures a safe and effective escape process.
Smart Images

Figure CN121764112A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of mobile robot technology, and in particular to a method for a mobile robot to escape from a difficult situation and a mobile robot. Background Technology
[0002] With the continuous development of robotics technology, mobile robots have been widely used in various fields such as service, warehousing, and cleaning. However, in these application scenarios, mobile robots often face narrow, congested environments or complex dynamic obstacles. For example, a mobile robot may be surrounded by multiple static obstacles, stuck in a dead end or narrow gap, unable to escape using conventional path planning algorithms; as obstacles move, the data from the LiDAR will change drastically, leading to misjudgments and path planning errors; due to reflection, inaccurate ranging, and other reasons, single-frame LiDAR data may be severely affected by noise interference, resulting in unstable orientation estimation and making it difficult for the mobile robot to escape.
[0003] Existing methods for mobile robot obstacle avoidance include using the maximum gap method to find the maximum gap in laser scanning as the escape direction, but this is easily affected by noise in single-frame data, leading to unstable direction determination; using the gradient field / potential field method to construct a potential field to calculate the optimal escape path, but the potential field gradient flattens when approaching obstacles, causing the escape path to oscillate or get trapped in local minima; and using random rotation and forward movement, but the robot path is unpredictable and the timing is uncontrollable. All of these existing robot obstacle avoidance methods cannot work stably and effectively in noisy or dynamic environments, resulting in a low success rate for mobile robot obstacle avoidance. Summary of the Invention
[0004] Based on this, in order to solve the problems existing in the above-mentioned robot escape methods, a mobile robot escape method and a mobile robot are provided.
[0005] Firstly, this application provides a method for a mobile robot to escape from a difficult situation, including:
[0006] Acquire laser buffer data for several laser beams from the mobile robot; the laser buffer data for each laser beam includes multiple frames of laser buffer data;
[0007] Based on the central difference algorithm, the laser buffer data of each laser beam is processed to obtain the distance change rate of each laser beam;
[0008] Based on the rate of change of each distance, the escape trend data of each laser beam is obtained;
[0009] The current global escape direction is obtained by weighting the escape trend data.
[0010] Based on the current global escape direction and the preset phased micro-step algorithm, the mobile robot is controlled to move in order to extricate itself from the predicament.
[0011] In one embodiment, before controlling the mobile robot to move according to the current global escape direction and a preset phased micro-step algorithm, the steps include:
[0012] When the change between the current global escape direction and the previous global escape direction is greater than the first hysteresis threshold, the current global escape direction is identified as the target global escape direction.
[0013] When the change between the current global escape direction and the previous global escape direction is less than the first hysteresis threshold, the previous global escape direction is identified as the target global escape direction.
[0014] Based on the current global escape direction and the preset phased micro-step algorithm, the steps for controlling the mobile robot to move include:
[0015] The mobile robot is controlled to move based on the target's global escape direction and a preset phased micro-step algorithm.
[0016] In one embodiment, before controlling the mobile robot to move based on the current global escape direction and a preset phased micro-step algorithm, the following steps are included:
[0017] When the change between the current global escape direction and the previous global escape direction is greater than the first hysteresis threshold, the current global escape direction and the previous global escape direction are weighted to obtain the target global escape direction.
[0018] In one embodiment, before controlling the mobile robot to move based on the current global escape direction and a preset phased micro-step algorithm, the following steps are included:
[0019] When the change between the current global escape direction and the previous global escape direction is greater than the second hysteresis threshold, the current global escape direction is verified. If the verification fails, a rollback operation is performed and the current global escape direction is reacquired. If the verification succeeds, the current global escape direction is confirmed as the target global escape direction.
[0020] In one embodiment, prior to the step of obtaining escape trend data for each laser beam based on each distance change rate, the method includes:
[0021] Based on a preset filtering algorithm, the rate of change of each distance is filtered to obtain the rate of change of each target distance.
[0022] The steps for obtaining the escape trend data of each laser beam based on the rate of change of distance include:
[0023] Based on the rate of change of distance to each target, the escape trend data of each laser beam is obtained.
[0024] In one embodiment, the preset filtering algorithm is:
[0025]
[0026] in, It is the rate of change of the original distance of the corresponding laser beam. It is the rate of change of the target distance after the corresponding laser beam has been filtered. These are the low-pass filter coefficients, with values ranging from 1 to 2. .
[0027] In one embodiment, the steps for controlling the mobile robot to move based on the current global escape direction and a preset phased micro-step algorithm include:
[0028] Based on the current global escape direction, control the mobile robot to turn.
[0029] When the obstacle distance in the current direction of the mobile robot is greater than the first distance threshold, control the mobile robot to move a preset distance along the current global escape direction;
[0030] The value of the preset distance is determined based on the size of the mobile robot and its movement speed, and satisfies the following condition: preset distance ≤ obstacle distance in the current direction minus the first distance threshold.
[0031] In one embodiment, after the step of controlling the mobile robot to move a preset distance along the current global escape direction when the obstacle distance in the current direction of the mobile robot is greater than a first distance threshold, the method includes:
[0032] After the mobile robot moves a preset distance, if the obstacle distance in the current direction of the mobile robot is less than the second distance threshold, the mobile robot is controlled to perform a backtracking operation and reacquire the current global escape direction; the first distance threshold is less than the second distance threshold.
[0033] In one embodiment, the laser buffer data includes the distance values of the corresponding frames; the center difference algorithm is as follows:
[0034]
[0035] in, This represents the distance value of the i-th laser beam in the current frame. This represents the distance value of the i-th laser beam in the previous frame. It is the time interval between two consecutive frames.
[0036] In one embodiment, the step of obtaining escape trend data for each laser beam based on the rate of change of distance includes:
[0037] When the rate of change of distance is greater than or equal to the rate of change threshold, the current forward direction of the mobile robot is identified as the escape trend data of the corresponding laser beam.
[0038] When the rate of change of distance is less than the rate of change threshold, the opposite direction of the current forward direction of the mobile robot is identified as the escape trend data of the corresponding laser beam.
[0039] In one embodiment, the step of weighting the escape trend data to obtain the current global escape direction includes:
[0040] Based on a preset weighting algorithm, the escape trend data are weighted to obtain the weighted data of each laser beam;
[0041] The weighted data of each laser beam are averaged to obtain the current global escape direction.
[0042] In one embodiment, the preset weighting algorithm is:
[0043]
[0044]
[0045] in, Is the corresponding laser beam in Weighted data along the axis, Is the corresponding laser beam in Weighted data along the axis, It is the rate of change of distance of the corresponding laser beam. It's the confidence level. It is the distance weighting coefficient. It is the angle value of the corresponding laser beam.
[0046] Secondly, embodiments of this application also provide a mobile robot, including a robot body and a processing device; the processing device is disposed on the robot body and is used to execute the steps of the mobile robot escape method described above.
[0047] One of the above technical solutions has the following advantages and beneficial effects:
[0048] In the aforementioned method for escaping a mobile robot's predicament, laser buffer data of several laser beams from the mobile robot is acquired. Each laser beam's buffer data includes multiple frames of buffer data. Based on a central difference algorithm, the buffer data of each laser beam is processed to obtain the distance change rate of each beam. Escape trend data for each laser beam is obtained based on these distance change rates. The escape trend data is then weighted to obtain the current global escape direction. Based on the current global escape direction and a preset phased micro-step algorithm, the mobile robot is controlled to move, thus escaping the predicament. This application calculates the distance change rate of each laser beam, performs escape trend and enhancement processing on the distance change rate, and calculates the optimal escape direction for the mobile robot. Through a phased micro-step execution mechanism, the mobile robot's movement is controlled, ensuring that the mobile robot can safely and effectively escape from complex environments, thereby improving the success rate and stability of the mobile robot's escape. Attached Figure Description
[0049] Figure 1 This is a schematic diagram illustrating the application environment of the mobile robot escape method in the embodiments of this application;
[0050] Figure 2 This is a schematic diagram of the first process of the mobile robot getting out of trouble in the embodiments of this application;
[0051] Figure 3 This is a flowchart illustrating the global escape direction hysteresis processing steps in an embodiment of this application.
[0052] Figure 4 This is a flowchart illustrating the phased micro-step processing steps in an embodiment of this application.
[0053] Figure 5 This is a flowchart illustrating the distance change rate processing steps in an embodiment of this application;
[0054] Figure 6 This is a flowchart illustrating the weighted processing steps for escape trend data in an embodiment of this application. Detailed Implementation
[0055] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0056] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application 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 for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover 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.
[0057] In addition, the term "multiple" should mean two or more.
[0058] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0059] The mobile robot escape method provided in this application can be applied to, for example... Figure 1 The application environment shown is as follows. The mobile robot includes a robot body 20 and a processing device 10. The processing device 10 is mounted on the robot body 20, which is equipped with a moving mechanism (such as rollers or tracks) to drive the robot body 20 to move. The processing device 10 includes a processor 102 and a memory 104. The processor 102 is connected to the memory 104, which stores data such as laser cache data, distance change rate, escape trend data, and the current global escape direction. The processor 102 is used to acquire laser cache data for several laser beams of the mobile robot; the laser cache data for each laser beam includes multiple frames of laser cache data; based on the central difference algorithm, the laser cache data of each laser beam is processed to obtain the distance change rate of each laser beam; based on each distance change rate, the escape trend data of each laser beam is obtained; the escape trend data is weighted to obtain the current global escape direction; based on the current global escape direction and a preset phased micro-step algorithm, the mobile robot is controlled to move to escape from obstacles.
[0060] In one embodiment, such as Figure 2 As shown, a method for a mobile robot to escape from trouble is also provided, which is applied to... Figure 1 Taking the aforementioned processor as an example, the process includes the following steps:
[0061] Step S210: Obtain laser cache data of several laser beams of the mobile robot; the laser cache data of each laser beam includes multiple frames of laser cache data.
[0062] The mobile robot can be, but is not limited to, service robots, warehousing and logistics robots, and cleaning robots. The mobile robot is equipped with a LiDAR module, which outputs a laser beam. When the laser beam encounters an obstacle, it is reflected, and the robot receives the reflected laser data. The laser data can be cached in a buffer to provide a continuous time series of data.
[0063] For example, a double-ended queue (deque) can be used to obtain multiple frames of laser cache data. By using a fixed-length cache, the impact of insufficient real-time scanning data or noise in single-frame data on the escape result can be avoided. This cache provides continuous time-series data, enabling the robot to infer the dynamic changes of obstacles based on the time variation trend of multiple frames of laser cache data. This allows for the formulation of a reasonable escape strategy. By using time trends to replace traditional geometric single-frame judgments, the influence of noise in single-frame laser data on the escape direction is avoided, thus improving the robustness of the mobile robot in escaping obstacles.
[0064] Step S220: Based on the central difference algorithm, process the laser buffer data of each laser beam to obtain the distance change rate of each laser beam.
[0065] Among them, the central difference algorithm is used to estimate the distance change of the laser beam at each angle of the mobile robot.
[0066] By inputting the laser buffer data of each laser beam into the center difference algorithm for processing, the distance change rate of each laser beam is obtained, thereby accurately capturing the change trend of each laser beam over time and inferring the trend of obstacles moving away or closer.
[0067] For example, by utilizing multi-frame laser buffer data from lidar and calculating the distance change rate of each laser beam, the dynamic trend of obstacles can be determined, thereby deriving a safe escape direction. This avoids the error and noise problems associated with relying on single-frame data in traditional methods, significantly improving the stability and robustness of escape.
[0068] Step S230: Obtain the escape trend data of each laser beam based on the rate of change of each distance.
[0069] By analyzing the distance change rate of each laser beam, the trend of each laser beam is mapped to a safe escape direction, thereby obtaining escape trend data for each laser beam. This allows for the determination of whether obstacles in the space are being squeezed, effectively preventing the mobile robot from mistakenly moving towards obstacles and ensuring that the mobile robot can escape in a safe direction.
[0070] For example, by analyzing the rate of change of distance of each laser beam, a direction mapping strategy is adopted to keep the direction away from the obstacle unchanged, while mapping the direction of the obstacle toward the obstacle to the opposite direction, thereby effectively preventing the robot from moving toward the obstacle and ensuring that the robot can choose a safe escape path.
[0071] Step S240: Weight the escape trend data to obtain the current global escape direction.
[0072] By weighting the escape trend data of each laser beam, the contribution of each beam to the escape vector is calculated, thereby obtaining the current global escape direction and ensuring that the mobile robot selects the best escape path.
[0073] For example, weighting is set based on the distance, confidence level and trend intensity of the laser beam. The escape trend data is weighted by the preset weighting to obtain the current global escape direction. The information of each laser beam is effectively fused to generate a stable and continuous escape vector.
[0074] Step S250: Based on the current global escape direction and the preset phased micro-step algorithm, control the mobile robot to move in order to extricate the mobile robot from its predicament.
[0075] The preset phased microstep algorithm is obtained based on the system preset.
[0076] Based on the current global escape direction and the preset phased micro-step algorithm, the mobile robot is controlled to execute a phased micro-step mechanism to avoid the mobile robot directly performing large movements according to the escape vector, thereby avoiding collisions, ensuring that the mobile robot can safely escape under any circumstances, and avoiding the instability caused by a large one-time movement.
[0077] By employing a phased, micro-step execution method, collisions or failures caused by excessively large movements in the mobile robot are avoided. This phased, micro-step execution ensures the mobile robot can safely and controllably escape from complex environments through precise steering, advancing a certain distance, and verifying the escape effect, thus improving the stability, robustness, and adaptability of the mobile robot's escape capabilities. It should be noted that this application does not rely on traditional map building and SLAM technologies, making it suitable for inexpensive robots without map and SLAM capabilities, exhibiting broad applicability and economic efficiency; furthermore, it is applicable to various LiDAR resolutions and different types of mobile robot chassis, demonstrating strong versatility.
[0078] In the above embodiments, laser buffer data of several laser beams of the mobile robot is acquired; the laser buffer data of each laser beam includes multiple frames of laser buffer data; based on the central difference algorithm, the laser buffer data of each laser beam is processed to obtain the distance change rate of each laser beam; according to each distance change rate, the escape trend data of each laser beam is obtained; the escape trend data is weighted to obtain the current global escape direction; according to the current global escape direction and the preset phased micro-step algorithm, the mobile robot is controlled to move to escape from trouble. This application calculates the distance change rate of each laser beam, performs escape trend and enhancement processing on the distance change rate, calculates the optimal escape direction of the mobile robot, and controls the movement of the mobile robot through a phased micro-step execution mechanism, ensuring that the mobile robot can safely and effectively escape from trouble in complex environments, thereby improving the success rate and stability of the mobile robot's escape from trouble.
[0079] In one embodiment, such as Figure 3 As shown, before the steps for controlling the mobile robot to move, based on the current global escape direction and the preset phased micro-step algorithm, the following steps are included:
[0080] Step S310: When the change between the current global escape direction and the previous global escape direction is greater than the first hysteresis threshold, the current global escape direction is confirmed as the target global escape direction.
[0081] The first hysteresis threshold is preset by the system and is determined based on the magnitude of the distance change rate or the time interval. For example, the change in the global escape direction is considered significant enough to warrant an update only when it exceeds the set first hysteresis threshold. The first hysteresis threshold ensures that the system can maintain the current escape direction when faced with small fluctuations, avoiding over-adjustment.
[0082] After each calculation of the current global escape direction, the processor compares the current global escape direction with the previously calculated global escape direction. Based on the comparison result, if the change between the current global escape direction and the previous global escape direction is greater than the first hysteresis threshold, it is considered that there is a valid trend change. In this case, the current global escape direction is confirmed as the target global escape direction, and the escape direction is updated according to the new trend.
[0083] Step S320: When the change between the current global escape direction and the previous global escape direction is less than the first hysteresis threshold, the previous global escape direction is identified as the target global escape direction.
[0084] If the change between the current global escape direction and the previous global escape direction is less than the first hysteresis threshold, it is determined that the current escape direction of the mobile robot has not changed significantly. The previous global escape direction is then identified as the target global escape direction to maintain the previous escape direction without adjustment, until there is enough data change to support the direction update.
[0085] In the above embodiments, by introducing a hysteresis mechanism, the global escape direction can be prevented from changing drastically due to instantaneous data fluctuations, thereby improving the stability of the global escape direction.
[0086] In one example, the steps for controlling the mobile robot to move according to the current global escape direction and the preset phased microstepping algorithm include: controlling the mobile robot to move according to the target global escape direction and the preset phased microstepping algorithm.
[0087] Based on the target's global escape direction and a preset phased micro-stepping algorithm, the mobile robot is controlled to execute a phased micro-stepping mechanism. This avoids the mobile robot from directly performing large movements according to the escape vector, thereby avoiding collisions and ensuring that the mobile robot can safely and effectively escape from complex environments, thus improving the success rate and stability of the mobile robot's escape from trouble.
[0088] In one embodiment, before controlling the mobile robot to move according to the current global escape direction and the preset phased microstep algorithm, the method further includes: when the change value between the current global escape direction and the previous global escape direction is greater than a first hysteresis threshold, weighting the current global escape direction and the previous global escape direction to obtain the target global escape direction.
[0089] When the change between the current global escape direction and the previous global escape direction exceeds the first hysteresis threshold, in order to avoid a sharp change in the escape direction, the hysteresis mechanism introduces a smoothing strategy. That is, by weighting the current global escape direction and the previous global escape direction, the current global escape direction is weighted and processed in a weighted average manner to reduce the direction jump caused by instantaneous data fluctuations and ensure the smoothness of the escape path.
[0090] In one embodiment, before controlling the mobile robot to move based on the current global escape direction and a preset phased micro-stepping algorithm, the following steps are included:
[0091] When the change between the current global escape direction and the previous global escape direction is greater than the second hysteresis threshold, the current global escape direction is verified. If the verification fails, a rollback operation is performed and the current global escape direction is reacquired. If the verification succeeds, the current global escape direction is confirmed as the target global escape direction.
[0092] The second hysteresis threshold is greater than the first hysteresis threshold.
[0093] For example, if the change between the current global escape direction and the previous global escape direction exceeds the second hysteresis threshold, it is determined that the escape direction has been reversed, and the stability of the current global escape direction is verified. Based on the verification result, if the new escape direction fails to provide a significant escape effect, the verification is deemed a failure, and a rollback operation is performed to reacquire the current global escape direction. This avoids escape failures caused by misleading adjustments and ensures that erroneous direction decisions are not made due to fluctuations in a single data point. If the verification is successful, the current global escape direction is confirmed as the target global escape direction, thereby further improving the success rate and stability of the mobile robot's escape from obstacles.
[0094] In one embodiment, before the step of obtaining the escape trend data of each laser beam based on each distance change rate, the method includes: filtering each distance change rate based on a preset filtering algorithm to obtain the distance change rate of each target.
[0095] The preset filtering algorithm can be derived from a time-based low-pass filtering algorithm. This preset filtering algorithm is used to further smooth the trend vector and suppress interference from laser reflection or noise on the results.
[0096] To further smooth the laser cache data and reduce short-term fluctuations, a preset filtering algorithm is used to filter the rate of change of each distance, thereby effectively suppressing the interference of laser reflection or environmental noise on the escape path calculation and enhancing system stability.
[0097] For example, the preset filtering algorithm is: .
[0098] in, It is the rate of change of the original distance of the corresponding laser beam. It is the rate of change of the target distance after the corresponding laser beam has been filtered. These are the low-pass filter coefficients, with values ranging from 1 to 2. .
[0099] In one example, the step of obtaining the escape trend data of each laser beam based on the rate of change of each distance includes: obtaining the escape trend data of each laser beam based on the rate of change of each target distance.
[0100] By analyzing the rate of change of the target distance of each laser beam, the trend of each laser beam is mapped to a safe escape direction, thereby obtaining the escape trend data of each laser beam. This allows for the determination of whether obstacles in the space are being squeezed, effectively avoiding abnormal changes in the laser buffer data caused by reflection or other factors, and preventing the mobile robot from mistakenly moving towards obstacles, ensuring that the mobile robot can escape in a safe direction.
[0101] In one embodiment, such as Figure 4As shown, the steps for controlling the mobile robot to move, based on the current global escape direction and the preset phased micro-step algorithm, include:
[0102] Step S410: Control the mobile robot to turn according to the current global escape direction.
[0103] Precise steering is performed based on the current global escape direction, adjusting to the corresponding escape direction to achieve steering control of the mobile robot.
[0104] Step S420: When the obstacle distance in the current direction of the mobile robot is greater than the first distance threshold, control the mobile robot to move a preset distance along the current global escape direction.
[0105] The value of the preset distance is determined based on the size of the mobile robot and its movement speed, and satisfies the following condition: preset distance ≤ obstacle distance in the current direction minus the first distance threshold.
[0106] For example, the first distance threshold and the preset distance are obtained according to the system preset. When the obstacle distance in the current direction of the mobile robot is greater than the first distance threshold, it is determined that there is no obstacle in front, and the mobile robot is controlled to move a preset distance along the current global escape direction to achieve forward control of the mobile robot.
[0107] In the above embodiments, by controlling the mobile robot to perform micro-movements in stages, it is ensured that the mobile robot can safely escape from any situation and avoid the instability caused by a large one-time movement.
[0108] In one embodiment, after the step of controlling the mobile robot to move a preset distance along the current global escape direction when the obstacle distance in the current direction of the mobile robot is greater than a first distance threshold, the method includes:
[0109] After the mobile robot moves a preset distance, if the obstacle distance in the current direction of the mobile robot is less than the second distance threshold, the mobile robot is controlled to perform a backtracking operation and reacquire the current global escape direction; the first distance threshold is less than the second distance threshold.
[0110] After the mobile robot moves a preset distance, it checks whether the obstacle distance in the current direction of the mobile robot is less than the second distance threshold. If the obstacle distance in the current direction of the mobile robot is less than the second distance threshold, it is determined that the mobile robot's escape effect after moving forward is not obvious. Then, the mobile robot is controlled to perform a backtracking operation and reacquire the current global escape direction. Through the phased micro-step execution and verification mechanism, it is ensured that the mobile robot's escape route is controllable and safe, avoiding the mobile robot from performing too large movements that may cause collisions or failures, thereby improving the success rate and stability of the mobile robot's escape.
[0111] It should be noted that during the escape process, the mobile robot continuously performs safety verifications to ensure that it does not move towards obstacles with each step. After executing step S420, the mobile robot checks the second distance threshold ahead and determines whether the escape was successful. If moving forward fails to improve the environment, the mobile robot will perform a backtracking operation and reacquire the current global escape direction, ensuring that the mobile robot can perform escape tasks in real time and effectively in dynamic and complex environments, demonstrating the stability, robustness, and adaptability of the mobile robot's escape capabilities.
[0112] In one embodiment, the laser buffer data includes the distance values of the corresponding frames; the center difference algorithm is as follows:
[0113] .
[0114] in, This represents the distance value of the i-th laser beam in the current frame. This represents the distance value of the i-th laser beam in the previous frame. It is the time interval between two consecutive frames.
[0115] In the above embodiments, by inputting the laser buffer data of each laser beam into the central difference algorithm for processing, the distance change rate of each laser beam is obtained, thereby accurately capturing the change trend of each laser beam over time, and thus deriving a safe escape direction, improving the stability and robustness of escaping in the first few days of movement.
[0116] In one embodiment, such as Figure 5 As shown, the steps for obtaining the escape trend data of each laser beam based on the rate of change of each distance include:
[0117] Step S510: When the distance change rate is greater than or equal to the change rate threshold, the current forward direction of the mobile robot is confirmed as the escape trend data of the corresponding laser beam.
[0118] The rate of change threshold can be set to 0. For example, the distance change rate is... ,exist When this occurs, it indicates that obstacles in that direction are moving away, and the current direction is becoming open. Therefore, the current direction of movement of the mobile robot is identified as the escape trend data of the corresponding laser beam, i.e., maintaining the current direction of movement at an angle of... .
[0119] Step S520: When the rate of change of distance is less than the rate of change threshold, the opposite direction of the current forward direction of the mobile robot is identified as the escape trend data of the corresponding laser beam.
[0120] exist When an obstacle is approaching in that direction, the robot needs to avoid it, and the escape direction is set to... Moving in the opposite direction, the opposite direction of the mobile robot's current forward direction is identified as the escape trend data of the corresponding laser beam.
[0121] In the above embodiments, the distance variation rate of each laser beam is... By analyzing the trend of each laser beam and mapping it to a safe escape direction, the problem of the mobile robot mistakenly moving towards obstacles is effectively avoided, ensuring that the mobile robot can escape in a safe direction, thus improving the success rate of the mobile robot's escape.
[0122] In one embodiment, such as Figure 6 As shown, the steps for weighting the escape trend data to obtain the current global escape direction include:
[0123] Step S610: Based on the preset weighting algorithm, perform weighting processing on each escape trend data to obtain the weighted data of each laser beam.
[0124] For example, the preset weighting algorithm is:
[0125] ;
[0126] .
[0127] in, Is the corresponding laser beam in Weighted data along the axis, Is the corresponding laser beam in Weighted data along the axis, It is the rate of change of distance of the corresponding laser beam. It's the confidence level. It is the distance weighting coefficient. It is the angle value of the corresponding laser beam.
[0128] By inputting the escape trend data into a preset weighting algorithm for processing, the weighted data of each laser beam is obtained, and the contribution of the weighted data of the corresponding laser beam to the escape vector is determined.
[0129] Step S620: Average the weighted data of each laser beam to obtain the current global escape direction.
[0130] By averaging the weighted data of each laser beam, the current global escape direction can be obtained, ensuring that the robot selects the best escape path and improving the success rate of the mobile robot's escape from trouble.
[0131] It should be understood that, although Figures 2 to 6The steps in the flowchart are shown sequentially as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order in which these steps are executed, and they can be performed in other orders. Figures 2 to 6 At least some of the steps in the process may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least some of the sub-steps or stages of other steps.
[0132] In one embodiment, a mobile robot escape device is provided, comprising:
[0133] The data acquisition unit is used to acquire laser buffer data of several laser beams of the mobile robot; the laser buffer data of each laser beam includes multiple frames of laser buffer data.
[0134] The rate of change calculation unit is used to process the laser buffer data of each laser beam based on the central difference algorithm to obtain the distance change rate of each laser beam.
[0135] The escape trend calculation unit is used to obtain the escape trend data of each laser beam based on the rate of change of each distance.
[0136] The weighted processing unit is used to perform weighted processing on each escape trend data to obtain the current global escape direction.
[0137] The phased microstepping execution unit is used to control the mobile robot to move according to the current global escape direction and the preset phased microstepping algorithm in order to help the mobile robot get out of trouble.
[0138] Specific limitations regarding the mobile robot obstacle avoidance device can be found in the limitations of the mobile robot obstacle avoidance method described above, and will not be repeated here. Each module in the aforementioned mobile robot obstacle avoidance device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the mobile robot in hardware form or independent of it, or stored in the memory of the mobile robot in software form, so that the processor can call and execute the corresponding operations of each module.
[0139] In one embodiment, this application also provides a mobile robot, including a robot body and a processing device; the processing device is disposed on the robot body and is used to perform the steps of the mobile robot escape method described above.
[0140] For detailed descriptions of the robot body and processing equipment, please refer to the descriptions in the above embodiments; they will not be repeated here.
[0141] The processing device is mounted on the robot body and acquires laser buffer data for several laser beams of the mobile robot. Each laser beam's buffer data includes multiple frames of buffer data. Based on a central difference algorithm, the buffer data of each laser beam is processed to obtain the distance change rate of each laser beam. Based on each distance change rate, escape trend data for each laser beam is obtained. The escape trend data is weighted to obtain the current global escape direction. Based on the current global escape direction and a preset phased micro-step algorithm, the mobile robot is controlled to move to escape from difficult situations. This application calculates the distance change rate of each laser beam, performs escape trend and enhancement processing on the distance change rate, and calculates the optimal escape direction for the mobile robot. Through a phased micro-step execution mechanism, the mobile robot's movement is controlled, ensuring that the mobile robot can safely and effectively escape from difficult environments, thus improving the success rate and stability of the mobile robot's escape from difficult situations.
[0142] In one embodiment, a computer storage medium is also provided, on which a computer program is stored, which, when executed by a processor, implements the steps of any of the above-described mobile robot escape methods.
[0143] For example, when a computer program is executed by a processor, it performs the following steps:
[0144] The system acquires laser buffer data for several laser beams from the mobile robot; the laser buffer data for each laser beam includes multiple frames of laser buffer data; based on the central difference algorithm, the laser buffer data for each laser beam is processed to obtain the distance change rate of each laser beam; based on each distance change rate, the escape trend data for each laser beam is obtained; the escape trend data is weighted to obtain the current global escape direction; based on the current global escape direction and a preset phased micro-step algorithm, the system controls the mobile robot to move in order to extricate the robot from its predicament.
[0145] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the division operations described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), direct memory bus RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0146] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0147] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for a mobile robot to escape from a difficult situation, characterized in that, include: Acquire laser buffer data for several laser beams from the mobile robot; the laser buffer data for each laser beam includes multiple frames of laser buffer data; Based on the central difference algorithm, the laser buffer data of each laser beam is processed to obtain the distance change rate of each laser beam; Based on the distance change rate, the escape trend data of each laser beam is obtained; The current global escape direction is obtained by weighting the escape trend data. Based on the current global escape direction and the preset phased micro-step algorithm, the mobile robot is controlled to move in order to extricate itself from the predicament.
2. The method for mobile robot extrication according to claim 1, characterized in that, Before the step of controlling the mobile robot to move according to the current global escape direction and the preset phased micro-step algorithm, the following steps are included: When the change between the current global escape direction and the previous global escape direction is greater than the first hysteresis threshold, the current global escape direction is identified as the target global escape direction. When the change between the current global escape direction and the previous global escape direction is less than the first hysteresis threshold, the previous global escape direction is identified as the target global escape direction. The step of controlling the mobile robot to move according to the current global escape direction and the preset phased micro-step algorithm includes: The mobile robot is controlled to move according to the target's global escape direction and a preset phased micro-step algorithm.
3. The method for mobile robot extrication according to claim 2, characterized in that, Before the step of controlling the mobile robot to move according to the current global escape direction and the preset phased micro-step algorithm, the method further includes: When the change between the current global escape direction and the previous global escape direction is greater than the first hysteresis threshold, the current global escape direction and the previous global escape direction are weighted to obtain the target global escape direction.
4. The method for mobile robot extrication according to claim 2, characterized in that, Before the step of controlling the mobile robot to move according to the current global escape direction and the preset phased micro-step algorithm, the method further includes: When the change between the current global escape direction and the previous global escape direction is greater than the second hysteresis threshold, the current global escape direction is verified. If the verification fails, a rollback operation is performed and the current global escape direction is reacquired. If the verification succeeds, the current global escape direction is confirmed as the target global escape direction.
5. The method for mobile robot extrication according to claim 1, characterized in that, Before the step of obtaining the escape trend data of each laser beam based on the respective distance change rate, the following steps are included: Based on a preset filtering algorithm, the distance change rate is filtered to obtain the distance change rate of each target. The step of obtaining the escape trend data of each laser beam based on the respective distance change rate includes: Based on the rate of change of the distance to each target, the escape trend data of each laser beam is obtained.
6. The method for mobile robot extrication according to claim 5, characterized in that, The preset filtering algorithm is as follows: in, It is the rate of change of the original distance of the corresponding laser beam. It is the rate of change of the target distance after the corresponding laser beam has been filtered. These are the low-pass filter coefficients, with values ranging from 1 to 2. .
7. The method for mobile robot extrication according to claim 1, characterized in that, The step of controlling the mobile robot to move according to the current global escape direction and the preset phased micro-step algorithm includes: Based on the current global escape direction, control the mobile robot to turn. When the obstacle distance in the current direction of the mobile robot is greater than a first distance threshold, control the mobile robot to move a preset distance along the current global escape direction; The value of the preset distance is determined based on the size of the mobile robot and its movement speed, and satisfies the following condition: preset distance ≤ obstacle distance in the current direction minus the first distance threshold.
8. The method for mobile robot extrication according to claim 7, characterized in that, After the step of controlling the mobile robot to move a preset distance along the current global escape direction when the obstacle distance in the current direction of the mobile robot is greater than a first distance threshold, the following steps are included: After the mobile robot moves a preset distance, if the obstacle distance in the current direction of the mobile robot is less than the second distance threshold, the mobile robot is controlled to perform a backtracking operation and reacquire the current global escape direction; the first distance threshold is less than the second distance threshold.
9. The method for a mobile robot to escape from trouble according to claim 1, characterized in that, The laser buffer data includes the distance values of the corresponding frames; the center difference algorithm is as follows: in, This represents the distance value of the i-th laser beam in the current frame. This represents the distance value of the i-th laser beam in the previous frame. It is the time interval between two consecutive frames.
10. The method for a mobile robot to escape from trouble according to claim 1, characterized in that, The step of obtaining the escape trend data of each laser beam based on the respective distance change rate includes: When the rate of change of distance is greater than or equal to the rate of change threshold, the current forward direction of the mobile robot is identified as the escape trend data of the corresponding laser beam; When the rate of change of distance is less than the rate of change threshold, the opposite direction of the mobile robot's current forward direction is identified as the escape trend data of the corresponding laser beam.
11. The method for a mobile robot to escape from trouble according to any one of claims 1 to 10, characterized in that, The step of weighting the escape trend data to obtain the current global escape direction includes: Based on a preset weighting algorithm, the escape trend data are weighted to obtain the weighted data of each laser beam. The weighted data of each laser beam are averaged to obtain the current global escape direction.
12. The method for escaping a mobile robot from a difficult situation according to claim 11, characterized in that, The preset weighting algorithm is as follows: in, Is the corresponding laser beam in Weighted data along the axis, Is the corresponding laser beam in Weighted data along the axis, It is the rate of change of distance of the corresponding laser beam. It's the confidence level. It is the distance weighting coefficient. It is the angle value of the corresponding laser beam.
13. A mobile robot, characterized in that, It includes a robot body and a processing device; the processing device is disposed on the robot body and is used to perform the steps of the mobile robot escape method according to any one of claims 1 to 12.