Robot disentanglement method, electronic device, and storage medium
Patent Information
- Application Number
- CN202611061734.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-16
- Publication Date
- 2026-09-25
AI Technical Summary
例如,智能割草机可能驶出草坪边界或被花坛包围,扫地机器人可能被线缆缠绕或卡在家具底部,巡检机器人可能陷入凹凸不平的地面或进入狭窄通道
[0017]本申请提出的一个或多个技术方案,至少具有以下技术效果:通过响应于机器人的脱困指令,基于预构建的分层地图,对机器人的当前状态进行静态分类,利用分层地图快速排除出图、碰撞和窄道等显而易见的受困场景,能够在脱困动作执行之前即对部分受困类型作出准确判定;若静态分类识别成功,则将静态分类的结果作为机器人的受困类型,若静态分类识别失败,则控制机器人主动运动,对机器人的当前状态进行动态分类,将动态分类的结果作为受困类型,通过动态分类实现机器人在运动过程中获取周围环境数据,这些数据能够识别出静态分类无法判定的障碍包围、轮子打滑、未定义受困等复杂受困类型,显著拓展了受困类型的识别范围;根据受困类型确定机器人的脱困策略,实现了脱困策略与受困类型的精准匹配,避免了因脱困动作与受困场景不匹配而导致的脱困失败或二次受困;基于脱困策略,控制机器人脱困,确保机器人能够以最适宜的方式脱离当前受困状态。本申请通过静态分类与动态分类相结合的两阶段分类机制,能够准确识别出图、障碍包围、碰撞、打滑、窄道等多种受困场景,克服了传统方法中受困类型识别不准确的技术问题,显著提升了机器人在复杂环境中的受困类型识别精度和自主脱困能力。
Smart Images

Figure CN122807892A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and in particular to a method for robot extrication, electronic equipment, and storage medium. Background Technology
[0002] Robots are widely used in various fields such as industrial logistics, home services, public security, and agricultural operations. Their autonomous operation capabilities directly affect task execution efficiency and user experience. The ability to overcome obstacles is one of the key aspects of achieving fully autonomous operation. During the execution of tasks, robots may encounter various obstacles due to factors such as the complexity of the working environment, limitations of the perception system, and the precision of motion control. These obstacles include going out of bounds on the work map, being surrounded by obstacles, colliding with obstacles, wheel slippage, and getting stuck in narrow passages. For example, a smart lawnmower may go out of bounds or be surrounded by flower beds, a robotic vacuum cleaner may get tangled in cables or stuck under furniture, and an inspection robot may get stuck on uneven ground or enter narrow passages.
[0003] Some robots already possess certain obstacle-avoidance capabilities; however, accurately identifying the robot's trapped state and taking effective obstacle-avoidance measures in complex and ever-changing working environments has always been a technical challenge that urgently needs to be solved in this field.
[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a robot extrication method, electronic device and storage medium that can accurately identify the robot's trapped state and take effective extrication measures in complex and ever-changing working environments.
[0006] To achieve the above objectives, this application proposes a method for robot extrication from difficult situations, the method comprising: In response to the robot's escape command, the robot's current state is statically classified based on a pre-built hierarchical map; If the static classification is successful, the result of the static classification is taken as the type of robot being trapped. If the static classification fails, the robot is controlled to move actively and the current state of the robot is dynamically classified, and the result of the dynamic classification is taken as the type of robot being trapped. Determine the robot's escape strategy based on the type of obstacle it is in; Based on the escape strategy, control the robot to get out of trouble.
[0007] In one embodiment, the pre-built hierarchical map includes a static layer, an obstacle layer, and an expansion layer. The step of statically classifying the robot's current state based on the pre-built hierarchical map includes: Obtain the robot's current pose; Based on the current pose, determine whether the robot is outside the global map boundary in the static layer; If the robot is outside the global map boundary, then the static classification and recognition are considered successful.
[0008] In one embodiment, after determining whether the robot is outside the global map boundary in the static layer based on the current pose, the method further includes: If the robot is within the boundary of the global map, the robot's outline is obtained and projected onto the pre-built layered map. When the fuselage outline overlaps with the obstacle grid of the obstacle layer or the expansion grid of the expansion layer, the static classification and recognition is considered successful.
[0009] In one embodiment, after the steps of obtaining the robot's body outline and projecting the body outline onto a pre-built layered map, the method further includes: Determine the width of the passable area around the robot when the robot's outline does not overlap with the obstacle grid and expansion grid; If the width of the passable area is less than the preset safe width, then the static classification and recognition is considered successful. If the width of the passable area is greater than or equal to the preset safety width, then the static classification recognition is determined to have failed.
[0010] In one embodiment, the steps of controlling the robot to move actively, dynamically classifying the robot's current state, and using the result of the dynamic classification as the type of distress include: Control the robot to rotate in place, acquire information about the robot's surrounding environment, and update the obstacle layer based on the information about the surrounding environment; Once the robot reaches the preset angle, control the robot to stop rotating and determine whether the robot is surrounded by obstacles based on the static layer and the updated obstacle layer. If the robot is surrounded by obstacles, then the result of the dynamic classification is determined; If the robot is not surrounded by obstacles, the result of dynamic classification is determined based on the robot's region identifier, the distance of the robot to the global path in the static layer, and the obstacle channel information in the updated obstacle layer.
[0011] In one embodiment, after the step of controlling the robot to escape from a difficult situation based on an escape strategy, the method further includes: In response to collision signals and / or path planning failure signals, a set of candidate actions is generated; Short-time trajectory prediction is performed on each candidate action in the candidate action set to obtain each predicted trajectory; Obtain the trajectory parameters of each candidate action corresponding to the predicted trajectory; A comprehensive score is given to the candidate actions corresponding to the trajectory parameters that meet the preset parameter conditions; The candidate action that meets the preset scoring conditions is selected as the current action to be executed, and the robot is controlled to execute the current action.
[0012] In one embodiment, after the step of selecting candidate actions whose comprehensive scores meet preset scoring conditions as the current action and controlling the robot to execute the current action, the method further includes: Obtain the robot's actual displacement and actual rotation angle; If the actual displacement is less than the preset displacement threshold, and / or the actual turning angle is less than the preset handover threshold, the overall score of the candidate action corresponding to the currently executed action is reduced, and the steps of generating a set of candidate actions in response to the collision signal and / or path planning failure signal, and subsequent steps are re-executed.
[0013] In one embodiment, after the step of controlling the robot to escape from a difficult situation based on an escape strategy, the method further includes: Determine the first path point in the global path that is closest to the robot; Based on the first path point, search along the global path to determine the first path point located in the obstacle grid as the first obstacle point; Based on the first obstacle point, search along the global path to determine the first path point outside the obstacle grid as the first recovery point, and determine the distance from the first recovery point to the end point of the global path; If the distance from the first recovery point to the end point is greater than or equal to the preset recovery distance, a detour path from the robot to the first recovery point is generated; If the distance from the first recovery point to the end point is less than the preset recovery distance, then the second recovery point is determined based on the obstacle grid where the first obstacle point is located, and a detour path from the robot to the second recovery point is generated.
[0014] Furthermore, to achieve the above objectives, this application proposes a robot extrication device, comprising: The static classification module is used to statically classify the robot's current state based on a pre-built hierarchical map in response to the robot's escape command. The dynamic classification module is used to determine the robot's distress type if the static classification is successful, and to control the robot to move actively if the static classification fails, and to dynamically classify the robot's current state, taking the result of the dynamic classification as the distress type. The strategy determination module is used to determine the robot's escape strategy based on the type of distress. The obstacle avoidance module is used to control the robot to get out of trouble based on the obstacle avoidance strategy.
[0015] In addition, to achieve the above objectives, this application also proposes an electronic device, including: a memory and a processor, the processor being capable of executing the steps of the robot escape method described above.
[0016] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the robot escape method described above.
[0017] The one or more technical solutions proposed in this application have at least the following technical effects: By responding to the robot's escape command, the current state of the robot is statically classified based on a pre-built layered map. The layered map quickly eliminates obvious obstacle scenarios such as map exit, collisions, and narrow passages, enabling accurate determination of some obstacle types before the escape action is executed. If the static classification is successful, the result is used as the robot's obstacle type; if the static classification fails, the robot is controlled to move actively, and its current state is dynamically classified. The result of the dynamic classification is used as the obstacle type. Through dynamic classification, the robot acquires surrounding environmental data during movement. This data can identify complex obstacle types that static classification cannot determine, such as obstacle encirclement, wheel slippage, and undefined obstacles, significantly expanding the range of obstacle type recognition. The robot's escape strategy is determined based on the obstacle type, achieving precise matching between the escape strategy and the obstacle type, avoiding escape failure or secondary trapping due to mismatch between the escape action and the obstacle scenario. Based on the escape strategy, the robot is controlled to escape, ensuring that the robot can escape the current obstacle state in the most appropriate way. This application employs a two-stage classification mechanism that combines static and dynamic classification, enabling accurate identification of various trapped scenarios such as maps, obstacle encirclement, collisions, slippage, and narrow passages. This overcomes the technical problem of inaccurate identification of trapped types in traditional methods, significantly improving the robot's accuracy in identifying trapped types and its ability to autonomously escape from difficult situations in complex environments. Attached Figure Description
[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the robot's obstacle avoidance method according to an embodiment of this application. Figure 1 ; Figure 2 This is a flowchart illustrating the robot's obstacle avoidance method according to an embodiment of this application. Figure 2 ; Figure 3 This is a flowchart illustrating the robot's obstacle avoidance method according to an embodiment of this application. Figure 3 ; Figure 4 This is a schematic diagram of the module structure of the robot escape device according to an embodiment of this application; Figure 5 This is a schematic diagram of the hardware operating environment of the robot escape method in the embodiments of this application.
[0021] The purpose, 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] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.
[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.
[0024] Currently, some robots already possess certain obstacle-avoidance capabilities. However, accurately identifying the robot's trapped state and taking effective obstacle-avoidance measures in complex and ever-changing working environments has always been a technical challenge that urgently needs to be solved in this field.
[0025] This application provides a solution that, in response to a robot's escape command, statically classifies the robot's current state based on a pre-built hierarchical map. The hierarchical map quickly eliminates obvious obstacle scenarios such as map exits, collisions, and narrow passages, enabling accurate determination of some obstacle types before the escape action is executed. If the static classification is successful, the result is taken as the robot's obstacle type; if it fails, the robot is controlled to move actively, and its current state is dynamically classified, with the result taken as the obstacle type. Dynamic classification allows the robot to acquire surrounding environmental data during movement. This data can identify complex obstacle types that static classification cannot determine, such as obstacle encirclement, wheel slippage, and undefined obstacles, significantly expanding the range of obstacle type recognition. An escape strategy is determined based on the obstacle type, achieving precise matching between the strategy and the obstacle type, avoiding escape failure or secondary trapping due to mismatch between the escape action and the obstacle scenario. Based on the escape strategy, the robot is controlled to escape, ensuring it can leave the current obstacle state in the most appropriate way. This application employs a two-stage classification mechanism that combines static and dynamic classification, enabling accurate identification of various trapped scenarios such as maps, obstacle encirclement, collisions, slippage, and narrow passages. This overcomes the technical problem of inaccurate identification of trapped types in traditional methods, significantly improving the robot's accuracy in identifying trapped types and its ability to autonomously escape from difficult situations in complex environments.
[0026] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as an electronic device capable of performing the above functions, a robot's built-in controller, etc. The following description uses a robot's built-in controller as an example to illustrate this embodiment and the subsequent embodiments.
[0027] Based on this, the first aspect of the embodiments of this application provides a method for robot extrication from trouble, referring to... Figure 1 The robot's escape method includes steps S10 to S40: Step S10: In response to the robot's escape command, statically classify the robot's current state based on the pre-built hierarchical map; It should be noted that a robot refers to an intelligent device with autonomous mobility, including but not limited to intelligent lawnmowers, robotic vacuum cleaners, inspection robots, and service robots. An escape command is a control signal that triggers the robot to enter an escape process. This command can be automatically generated by the robot itself when it detects an abnormal state (such as prolonged immobility or frequent triggering of collision sensors), or it can be remotely issued by the upper-level task system or the user.
[0028] Additionally, it's important to note that the pre-built layered map is a grid map constructed by the robot before or during operation. This map contains multiple semantic layers to represent different categories of information in the working environment. Its construction process includes: First, the robot uses Simultaneous Localization and Mapping (SLAM) technology, employing onboard sensors such as LiDAR to collect environmental data and construct a global grid map, i.e., the static layer. Each grid in this global map records the state information of that location, including three states: passable, occupied (obstacles present), and unknown. Then, based on the static layer, the robot continuously subscribes to local obstacle perception data (from LiDAR, monocular cameras, etc.) through its sensor information management module and writes the perceived obstacle grids into the obstacle layer in real time. Simultaneously, the robot also merges persistent obstacle information from the accumulated obstacle map into the obstacle layer, ensuring that the obstacle layer reflects both currently perceived dynamic obstacles and records static obstacles that have persisted throughout historical observations. Next, when the robot's chassis collision sensor (i.e., bumper) is triggered, the system estimates the collision area based on the robot's current pose, current velocity direction, and the specific triggering of left and right collision signals, and writes the corresponding grid into the anomaly layer. When the robot detects a wheel slippage signal, the system writes an anomaly area with a preset radius (e.g., 0.17 meters) centered on the slippage location. When a specified anomaly occurs in the walking motor (e.g., overheating or overcurrent), the system similarly writes an anomaly area with a preset radius near the anomaly location. Finally, after the static layer, obstacle layer, and anomaly layer are updated, the system expands the obstacle and anomaly grids in each layer. Expansion involves marking grids within a preset radius around each obstacle grid as impassable areas, thus forming an expanded layer. The expanded layer provides a safe distance constraint for the robot's body contour, preventing the robot from colliding with obstacles or anomaly areas during movement. In actual operation, the construction and updating of the above-mentioned layered maps are continuous. Before entering the escape process, the layered map has already completed the construction of each layer. Therefore, in step S10, the system directly uses the completed layered map for static classification without waiting for the map to be completed.
[0029] Additionally, it's important to note that static classification refers to the preliminary identification and categorization of the robot's current predicament based on its current pose information and a pre-built layered map, without controlling the robot's active movement. Specifically, static classification uses a static layer to determine if the robot exceeds the global map boundary, an obstacle layer and an expansion layer to determine if the robot's body overlaps with obstacles, and a static layer and an obstacle layer to determine if the robot is in a narrow passage area. Through these three assessments, static classification can quickly identify three types of predicaments with clear boundaries: map-based, collision-based, and narrow passage-based predicaments.
[0030] Understandably, given the complexity and diversity of the obstacle scenarios robots face during actual operations, directly executing preset general obstacle-avoidance actions without first determining the type of obstacle before taking any action may lead to actions that are mismatched with the actual situation, potentially exacerbating the obstacle situation. Therefore, by sequentially performing map-out judgment, collision judgment, and narrow-path judgment in static classification, the environmental information stored in the layered map can be utilized to quickly eliminate obvious obstacle scenarios without requiring active robot movement, thereby improving the efficiency and accuracy of obstacle type identification.
[0031] In one feasible implementation, the pre-built layered map includes a static layer, an obstacle layer, and an expansion layer. Step S10, in response to the robot's escape command, involves statically classifying the robot's current state based on the pre-built layered map, and may include steps S11-S13: S11, Obtain the robot's current pose; It should be noted that the current pose refers to the robot's position and attitude information at the current moment. Specifically, the current pose includes the robot's two-dimensional coordinates (i.e., x-axis and y-axis coordinates) in the global coordinate system and the robot's orientation angle (i.e., yaw angle around the z-axis). The system obtains the robot's current pose through the sensor information management module. The sensor information management module integrates inertial measurement unit (IMU) data and wheel odometry data, and calculates the robot's current pose using fusion positioning algorithms such as Extended Kalman Filter (EKF). The system continuously receives positioning information at a preset control frequency (e.g., 10Hz), and writes the current pose to the historical pose window with a timestamp upon receiving positioning information. In step S11, the system directly reads the current pose from the latest positioning information released by the sensor information management module.
[0032] Understandably, the current pose serves as the spatial reference for all subsequent map-based decisions. Whether determining whether the robot has exceeded the global map boundary or detecting whether the robot's outline overlaps with the obstacle grid, an accurate current pose is essential. If the current pose has a significant error, all pose-based map queries and grid projection operations will be biased, leading to inaccurate static classification results.
[0033] S12, Based on the current pose, determine whether the robot is outside the global map boundary in the static layer; It should be noted that the static layer records the effective area of the global map. Specifically, the effective area in the global map (i.e., the area that has been detected and mapped by sensors) constitutes the working area. The boundary of the global map refers to the outline boundary of this effective area; outside the boundary is an unknown area or space explicitly marked as a non-working area. In step S12, the system spatially compares the position coordinates (x, y) in the current pose obtained in step S11 with the global map boundary recorded in the static layer. The judgment method can be as follows: radiate a ray from the current position coordinates in any direction, and count the number of intersections between the ray and the outline of the global map boundary. If the number of intersections is odd, the current position is inside the boundary; if it is even, the current position is outside the boundary. Alternatively, the system can directly query the status attribute of the grid corresponding to the current position coordinates in the static layer. If the grid is marked as "unknown" or "impassable" and is located outside the map boundary, it is determined that the robot is outside the global map boundary. This judgment only involves coordinate comparison and grid status query, with minimal computational load, and can be completed in milliseconds.
[0034] S13, if the robot is outside the global map boundary, then the static classification and recognition is considered successful.
[0035] It should be noted that when the judgment result of step S12 indicates that the robot is outside the global map boundary, the system can directly determine that the reason for the robot's predicament is "driving out of the work map". At this time, the static classification recognition is successful, and the system will take "out of the map and out of the predicament" as the output result of the static classification. This result is the type of predicament used in subsequent steps. The system will no longer execute subsequent static classification judgment steps (i.e., no longer perform collision detection and narrow passage detection) to avoid unnecessary computational overhead, thus ensuring both classification accuracy and improving classification efficiency.
[0036] In one feasible implementation, after step S12, which determines whether the robot is outside the global map boundary in the static layer based on the current pose, steps S14-S15 are further included: S14. If the robot is within the boundary of the global map, obtain the robot's body outline and project the body outline onto the pre-built layered map. It should be noted that when the judgment result of step S12 indicates that the robot is within the boundary of the global map, it means that the robot is still within the effective working area, and further judgment is needed to determine whether there are other types of trapped situations. At this time, the system obtains the robot's body outline (i.e., footprint). The body outline refers to the vertical projection shape of the robot body on the horizontal plane, which is preset according to the robot's physical dimensions. In this embodiment, the body outline is a rectangular outline, and its specific size parameters are determined according to the actual shape of the robot (for example, for a certain model of lawnmower, its body outline can be set as a rectangular area with a front end of 0.55 meters, a rear end of -0.15 meters, and a left and right width of ±0.25 meters). The system calculates the coordinate positions of all the grids covered by the body outline in the layered map according to the current pose, that is, transforms the body outline from the robot's local coordinate system to the grid coordinate system of the global map, completing the projection operation. This projection operation is the data basis for subsequent collision detection.
[0037] S15, when the fuselage outline overlaps with the obstacle grid of the obstacle layer or the expansion grid of the expansion layer, the static classification and recognition is confirmed to be successful.
[0038] It should be noted that the obstacle layer is used to represent local dynamic obstacles. The data sources for the obstacle layer include: obstacle grids formed by rasterizing 2D point cloud data generated by the robot's onboard LiDAR in real time; obstacle grids formed by mapping obstacle point cloud data output by a monocular camera combined with LiDAR to a 2D grid map after processing; and persistent obstacle information recorded in the cumulative obstacle map. The obstacle data from the above sources are fused and written into the obstacle layer to form obstacle grids, i.e., grids marked as "occupied," indicating that there is an obstacle at that location and the robot cannot pass through.
[0039] Additionally, it should be noted that the expansion layer is a layer formed by expanding the obstacle grid and the abnormal grid on top of the obstacle layer and the abnormal layer. The specific operation of the expansion process is as follows: Centered on each obstacle grid or abnormal grid, all grids within a preset expansion radius are marked as expansion grids. An expansion grid indicates that although there may not be an actual obstacle at that location, it is close to an obstacle, posing a risk of collision for the robot. Therefore, expansion grids are also considered impassable areas. For example, the expansion layer radius can be set to 0.42 meters, meaning that grids within a 0.42-meter radius around each obstacle grid are marked as expansion grids. After the expansion process is completed, the system performs overlap detection in the obstacle layer and the expansion layer, comparing each grid covered by the body contour projected in step S14 with the obstacle grids in the obstacle layer and the expansion grids in the expansion layer. If any grid covered by the robot's outline is marked as an obstacle grid in the obstacle layer or an expansion grid in the expansion layer, then the robot's outline is determined to overlap with either the obstacle grid or the expansion grid. When overlap occurs, it indicates that the robot's body has contacted the obstacle or entered the obstacle's safe expansion range, and the robot is in a collision-trapped state. At this point, the static classification is successful, and the system outputs "bumper collision escape" as the trapped type in subsequent steps, and no further narrow passage detection is performed.
[0040] In one feasible implementation, after step S14, which involves obtaining the robot's body outline and projecting it onto a pre-built layered map, steps S16 to S18 are further included: S16, when the robot body outline does not overlap with the obstacle grid and expansion grid, determine the width of the passable area around the robot; It should be noted that when the judgment result of step S15 is that the robot's outline does not overlap with the obstacle grid and the expansion grid, it means that the robot has not collided with the obstacle and has not entered the safe expansion range of the obstacle. However, the robot may still be unable to pass or turn normally due to the narrow surrounding space, i.e., it is in a narrow passage trap scenario. To determine whether it is a narrow passage trap, it is necessary to further determine the width of the passable area around the robot. This is done by using the robot's current pose as the center and performing ray projection or grid scanning outward on the horizontal plane in multiple directions (e.g., directions evenly distributed within a 360-degree range at 15-degree or 30-degree intervals). For each direction, the system searches forward grid by grid along that direction until it encounters the obstacle grid of the obstacle layer or the expansion grid of the expansion layer, and records the obstacle-free distance in that direction. The system calculates the minimum width of the passable area around the robot based on the obstacle-free distance in each direction, providing a quantifiable basis for determining whether it is a narrow passage trap.
[0041] S17. If the width of the passable area is less than the preset safe width, then the static classification and recognition is confirmed to be successful. It should be noted that the preset safe width is a pre-set threshold parameter, representing the minimum safe width required for the robot to pass normally. This threshold is determined based on the robot's body width and taking into account a certain safety margin. For example, if the robot's body width is 0.5 meters, the preset safe width can be set to 0.55 meters or 0.6 meters after considering the safety margin. If the passable area width is less than the preset safe width, it means that the passable space around the robot is insufficient for the robot to pass normally or complete a turn. Even if the robot has not collided with any obstacles, its movement ability is inhibited due to space constraints, i.e., it is in a narrow passage trapped state. At this time, the static classification recognition is successful, and the system will output "narrow passage escape" as the static classification result, which will be used as the trapped type in subsequent steps.
[0042] S18. If the width of the passable area is greater than or equal to the preset safety width, then the static classification recognition is determined to have failed.
[0043] It should be noted that when the comparison result of step S17 shows that the width of the passable area is greater than or equal to the preset safe width, it indicates that the system has completed all three static classification judgments—the robot is within the global map boundary (judged negative in step S12), the robot's outline does not overlap with the obstacle grid or expansion grid (judged negative in step S15), and the passable area width is sufficient (judged negative in step S17)—and has failed to determine the cause of the entrapment. At this point, static classification cannot output a clear entrapment type. Therefore, the system determines that static classification has failed, no longer outputs the entrapment type, and instead transfers the processing flow to the subsequent dynamic classification steps to identify more complex entrapment scenarios.
[0044] Through the steps S11 to S18 described above, this embodiment of the application implements static classification based on a layered map. First, by acquiring the current pose, a spatial reference is provided for all subsequent judgments. Second, by using the static layer to determine whether the robot has left the map, a "leaving the map and escaping" type is directly output and subsequent judgments are terminated upon determining that the robot has left the map, avoiding unnecessary calculations. Third, by projecting the robot's outline onto the obstacle layer and the expansion layer for collision detection, the overlap between the robot and obstacles can be accurately identified, and a "bumper collision and escaping" type is directly output upon determining a collision. Fourth, by calculating the width of the passable area around the robot when no collision occurs and comparing it with a preset safe width, a narrow passage entrapment scenario is identified and a "narrow passage escaping" type is output. Finally, by determining that static classification recognition fails when none of the aforementioned three scenarios are satisfied, complex scenarios are automatically transferred to dynamic classification processing. The embodiments of this application, through the above three-layer progressive judgment, ensure that obvious trapped scenarios such as image output and collisions can be quickly and accurately identified without the need for the robot to actively move. On the other hand, by setting clear failure conditions, static classification can accurately distinguish between "trapped scenarios that can be clearly determined" and "complex scenarios that need further exploration", thus achieving a balance between processing efficiency and classification depth.
[0045] Step S20: If the static classification is successful, the result of the static classification is taken as the type of the robot's distress. If the static classification fails, the robot is controlled to move actively and the current state of the robot is dynamically classified. The result of the dynamic classification is taken as the type of the robot's distress. It should be noted that the "trapped type" refers to the classification result of the robot's current trapped scenario, used to guide the selection of subsequent escape strategies. In this embodiment, the trapped types include at least escape from a map, escape from obstacle encirclement, escape from bumper collision, escape from wheel slippage, escape from a narrow passage, escape from abnormal walking motor, escape from abnormal cutter head motor, escape from abnormal lifting motor, and undefined escape. When the static classification in step S10 is successful, the system has directly obtained a clear trapped type, namely "escape from a map," "escape from bumper collision," or "escape from a narrow passage." At this time, step S20 directly outputs the trapped type determined by the static classification as the result of the entire classification stage for use in subsequent step S30. When the static classification in step S10 fails, it indicates that the robot's current state does not belong to any of the map-out, collision, or narrow passage scenarios, but the robot is indeed in a trapped state where it cannot move normally. Therefore, step S20 switches the processing flow to dynamic classification.
[0046] Additionally, it's important to note that dynamic classification refers to a method that involves controlling a robot to actively move (such as rotating in place), continuously acquiring environmental perception data during this movement, and then using this data to identify and categorize the robot's predicament. Unlike static classification, which relies solely on the robot's current pose and a pre-built map, dynamic classification obtains more comprehensive environmental information through active movement, enabling it to identify complex predicaments (such as obstacle-encircled scenarios) that require multi-directional environmental perception to detect. This two-stage classification mechanism, combining static and dynamic classification, ensures rapid identification of common predicaments (map loss, collisions, narrow passages) while also expanding its ability to identify complex predicaments.
[0047] In one feasible implementation, refer to Figure 2 Step S20, controlling the robot to move actively, dynamically classifying the robot's current state, and using the result of the dynamic classification as the trapped type, includes steps S21~S24: Step S21: Control the robot to rotate in place, obtain information about the robot's surrounding environment, and update the obstacle layer based on the information about the surrounding environment. It should be noted that the system sends low-speed angular velocity commands (e.g., 0.3 radians / second to 0.5 radians / second) to the robot's chassis drive layer, driving the robot to rotate in place around its central axis. During rotation, sensors such as the robot's lidar continuously collect surrounding environmental data, which is processed to form surrounding environmental information. This information includes the presence or absence of obstacles in various directions, their distance, and orientation. The system continuously receives this environmental data at a predetermined frequency (e.g., 10Hz) during rotation, updating the obstacle layer in real time. Specifically, the update method involves projecting newly perceived obstacle point cloud data into the grid coordinate system of the global map through coordinate transformation, marking the corresponding grid as an obstacle grid. Simultaneously, for dynamic obstacle grids in the historical obstacle layer that have not been re-observed at the current moment, they are processed according to a preset attenuation mechanism, thereby achieving dynamic updates to the obstacle layer and providing a data basis for subsequent obstacle enclosure judgment.
[0048] Step S22: When the robot rotates to a preset angle, control the robot to stop rotating, and determine whether the robot is surrounded by obstacles based on the static layer and the updated obstacle layer. It should be noted that the system continuously accumulates the rotation angle during the robot's rotation. When the accumulated rotation angle reaches a preset angle (e.g., 360 degrees), the system controls the robot to stop rotating. At this point, the obstacle layer has undergone a complete rotational scan and update, containing obstacle distribution information in all directions around the robot. Based on the updated obstacle layer and static layer, the system determines whether the robot is surrounded by obstacles. Centered on the robot's current position, it scans within a 360-degree range according to a preset angle step size (e.g., every 10 or 15 degrees is a detection direction). For each detection direction, the system searches outward from the robot's current position along that direction to find the nearest obstacle grid or expanded grid, recording the obstacle distance in that direction. After the search is complete, the system counts the number of directions in all detection directions where the obstacle distance is less than a preset distance threshold (e.g., 0.5 meters or 0.8 meters, this value is set according to the robot size). If this number exceeds the number of directions corresponding to the preset angle threshold (e.g., if the preset angle threshold is 270 degrees and the angle step size is 10 degrees, then the corresponding number of directions is 27), then the robot is determined to be surrounded by obstacles. In other words, if there are nearby obstacles within a range of more than 270 degrees around the robot, the robot is considered to be surrounded by obstacles.
[0049] Step S23: If the robot is surrounded by obstacles, determine the result of the dynamic classification. It should be noted that when the judgment result of step S22 is that the robot is surrounded by obstacles, the system directly determines the result of dynamic classification as "obstacle-surrounded escape". At this time, dynamic classification and recognition are completed, and the type of entrapment is output as the result of the entire classification stage, for subsequent step S30 to determine the corresponding escape strategy.
[0050] Step S24: If the robot is not surrounded by obstacles, determine the result of dynamic classification based on the robot's region identifier, the distance of the robot to the global path in the static layer, and the obstacle channel information in the updated obstacle layer.
[0051] It should be noted that when the judgment result of step S22 is that the robot is not surrounded by obstacles, it means that although there are obstacles around the robot in some directions, they do not constitute a 360-degree or near-360-degree all-around enclosure. At this point, further judgment is needed based on more information. This is achieved by acquiring three types of auxiliary information: The first type is area identifiers. Area identifiers refer to the numbers or labels corresponding to different areas in the global map, used to distinguish different work areas, restricted areas, and special areas. The global map is divided into multiple areas during the mapping or configuration phase, and each area is assigned a unique area identifier. For example, normal work areas are marked with a specific number, and restricted areas are marked with another number. By querying the area identifier of its current location in the global map, the type of area it is currently in can be determined. The second type is the distance from the robot to the global path. The global path refers to the work path the robot was executing before entering the trapped state; the system stores the path point sequence of this global path in the static layer. The distance from the robot to the global path refers to the shortest distance from the robot's current position to each path point on the global path. Specifically, by traversing each path point on the global path, calculating the Euclidean distance between each path point and the robot's current position, and taking the minimum value as the distance from the robot to the global path. The third category is obstacle and passage information. Obstacle and passage information refers to whether there are passable gaps or passages between obstacles around the robot in the updated obstacle layer. By performing connected component analysis on the obstacle layer, detecting the size and boundaries of the connected component where the robot is located, it is determined whether there are spatial gaps that the robot can pass through.
[0052] Additionally, it should be noted that if the area marker indicates that the robot is currently in a restricted area, it means that the robot is trapped because it entered the restricted area. The system determines the dynamic classification result as either "undefined escape" (indicating that higher-level decision-making or manual intervention is required) or a variant of "out-of-map escape", depending on the actual scenario.
[0053] If the distance from the robot to the global path is greater than the preset distance threshold (e.g., 1.0 meter or 2.0 meter), it means that the robot has deviated far from the original working path, and the obstacle passage information shows that the passable passage around the robot is narrow (e.g., the passable width is less than twice the preset safe width). In this case, the system determines the result of the dynamic classification as "getting out of the narrow passage".
[0054] If the distance from the robot to the global path is less than the preset distance threshold, and the obstacle passage information shows that there is a passable passage in at least one direction around the robot, but the robot still reports that it cannot move normally (e.g. the wheels have speed feedback but the position does not change significantly), then the system determines the result of the dynamic classification as "wheels slipping and getting out of trouble".
[0055] If none of the above conditions are met—that is, the robot is not in a restricted area, is not far from the global path, has a passable passageway nearby, and has no slippage signal—but the robot still cannot move normally, the system determines the dynamic classification result as "undefined escape." If there are no abnormal signals, the system can determine the dynamic classification result as "no escape required," meaning the robot is not actually trapped, and the failure of static classification may be caused by sensor noise or temporary positioning jitter.
[0056] Through steps S21 to S24 described above, this embodiment of the application implements a complete dynamic classification mechanism. First, by controlling the robot to rotate in place and continuously updating the obstacle layer, the system can obtain complete obstacle distribution information within a 360-degree range around the robot, providing a comprehensive environmental data foundation for subsequent judgments. Second, by quantitatively determining the obstacle encirclement state, it can accurately identify complex trapped scenarios where the robot is simultaneously surrounded by obstacles from multiple directions, avoiding the risk of misclassifying the encirclement as other types and taking inappropriate escape strategies. Third, by comprehensively judging three types of auxiliary information—region identifier, distance to the global path, and obstacle passage information—after excluding the encirclement state, it can finely distinguish complex trapped scenarios from multiple dimensions such as region type, path deviation degree, and spatial geometric features. Through the aforementioned progressive dynamic classification process, this application enables the system to accurately identify various complex trapped types even when static classification cannot handle them, significantly expanding the identification range and granularity of trapped types, and providing accurate type basis for subsequent matching of differentiated escape strategies.
[0057] Step S30: Determine the robot's escape strategy based on the type of obstacle. It should be noted that an escape strategy refers to a complete control scheme designed for a specific type of obstacle to help the robot escape its current trapped state. Different types of obstacles have different geometric characteristics, physical causes, and motion constraints, thus requiring different escape strategies. For example, being trapped in a map-related obstacle requires guiding the robot back into the map; being trapped in a collision requires controlling the robot to move away from obstacles; being trapped in a narrow passage requires adjusting the robot's posture to adapt to the confined space; being trapped in a slippage obstacle requires changing the direction of force on the tires to restore traction; and being trapped in a motor malfunction requires prioritizing the handling of electrical abnormalities rather than performing any movement. Based on the type of obstacle determined in step S20, the system selects the strategy corresponding to that type from a set of preset escape strategies. The preset escape strategies correspond one-to-one with the type of obstacle, ensuring that each type of obstacle has its own specific escape solution, avoiding escape failure or secondary trapping due to the use of general escape actions.
[0058] Additionally, it should be noted that the system has preset multiple escape states corresponding to various types of entrapment. An escape state refers to a running state in the node state machine, and each escape state encapsulates the complete escape logic and action sequence corresponding to that entrapment type. Specifically, the preset escape states include: map-out escape state, obstacle-surrounded escape state, bumper collision escape state, wheel slippage escape state, narrow passage escape state, walking motor malfunction escape state, cutter head motor malfunction escape state, lifting motor malfunction escape state, and undefined escape state, each corresponding to a different entrapment type. Based on the entrapment type determined in step S20, the system searches for the escape state corresponding to that entrapment type among the preset multiple escape states and identifies it as the target escape state. For example, if the entrapment type is "obstacle-surrounded escape state," then the target escape state is determined to be the obstacle-surrounded escape state. In step S40, the node state machine switches to this target escape state and executes the corresponding escape logic.
[0059] Each escape state encapsulates a specific escape strategy. Based on the determined target escape state, the system activates the corresponding escape strategy. Different escape strategies have different focuses and specific operations: The map-out escape strategy prioritizes searching for reachable target points within the global map boundary or near the region center. It then generates a path back into the map through path planning and controls the robot to travel along this path until it re-enters the map boundary. The obstacle-surrounded escape strategy uses a flood fill algorithm to search for passable candidate target points outside the obstacle-surrounded area and combines this with a layered cost map for path planning, guiding the robot out of the gaps in the encirclement. The bumper collision escape strategy generates multiple candidate recovery actions after writing the collision area into the anomaly layer. It selects the optimal action through short-term trajectory prediction and comprehensive scoring, and employs a closed-loop reselection mechanism to avoid repeating invalid actions. The wheel slippage escape strategy controls the robot to perform forward or backward movements with periodic angular velocity perturbations, changing the direction and point of force on the tires to restore friction between the tires and the ground. The narrow passage escape strategy controls the robot to slowly retreat along the narrow passage or adjust its posture through arc motion, gradually guiding the robot towards the exit of the narrow passage. The walker motor malfunction escape strategy prioritizes sending a request to clear the overcurrent alarm to the motor drive system or waiting for the motor to cool down. After the alarm is cleared, a backtracking path is generated based on the historical pose window, or the control commands are replayed in reverse based on the historical control command window, causing the robot to exit the malfunctioning area along the trajectory before the malfunction occurred. The cutter head motor malfunction escape strategy and the lifting motor malfunction escape strategy are similar to the walker motor malfunction escape strategy, both prioritizing the handling of electrical malfunctions and performing corresponding safe exit actions after the malfunction is cleared. Undefined escape strategies attempt to escape according to a preset default action sequence (e.g., attempting basic actions such as backward, left turn, and right turn in sequence).
[0060] Through the above steps, this application establishes a precise mapping mechanism between the type of entrapment and the escape strategy. First, by determining the target escape state from multiple preset escape states based on the type of entrapment, a structured transformation from classification results to control states is achieved, avoiding the use of a general, single state to handle all entrapment scenarios, thereby ensuring the clarity and maintainability of the control logic. Second, by activating the corresponding escape strategy based on the target escape state, each type of entrapment can obtain a tailor-made escape plan, ensuring that the selection of escape actions fully considers the specific characteristics of the entrapment scenario, improving the targeting and success rate of escape, and also avoiding the risk of equipment damage caused by using inappropriate actions (such as forcing movement when the motor is abnormal).
[0061] Step S40: Based on the escape strategy, control the robot to escape the obstacle.
[0062] It should be noted that, according to the escape strategy, the robot's escape from the predicament refers to executing the specific action sequence in the escape strategy determined in step S32. The system translates the escape strategy into actual robot control commands, and during the escape process, through continuous environmental perception and action closed-loop optimization, ensures that the robot can dynamically adjust its escape actions in the most appropriate way until it successfully escapes the current predicament or the escape attempt is confirmed to have failed.
[0063] In one feasible implementation, refer to Figure 3 After step S40, which involves controlling the robot to escape from the obstacle based on the escape strategy, steps S41 to S45 are also included: Step S41: In response to a collision signal and / or a path planning failure signal, generate a set of candidate actions; It should be noted that a collision signal refers to the signal generated when the bumper is triggered. This signal contains information about the location of the collision (e.g., left-side collision, right-side collision, or frontal collision). A path planning failure signal is a failure signal generated when the robot attempts to plan a feasible path from the current position to the target position, but the path planner fails to find a valid path within a preset time limit. Reasons for path planning failure typically include: the existence of continuous obstacles between the current and target positions, making it impossible for any path to avoid them; or, although a theoretically feasible path exists, the path search space is too large, causing the planning to time out.
[0064] When the system detects any of the above signals, it triggers the candidate action generation process. The system generates different candidate action sets based on the type of the trigger signal. Specifically, if the trigger signal is a collision signal, the system generates a collision recovery candidate set, including: backward movement (negative linear velocity, zero angular velocity), left turn movement (zero linear velocity, positive angular velocity), right turn movement (zero linear velocity, negative angular velocity), leftward arc movement (negative linear velocity, positive angular velocity, i.e., moving backward and turning left simultaneously), and rightward arc movement (negative linear velocity, negative angular velocity, i.e., moving backward and turning right simultaneously). If the trigger signal is a path planning failure signal, the system generates a path planning failure recovery candidate set, including: forward movement (positive linear velocity, zero angular velocity), backward movement, leftward arc movement, and rightward arc movement. If both a collision signal and a path planning failure signal are detected simultaneously, the system can select the corresponding candidate set according to a preset priority, or generate a union of the two candidate sets.
[0065] The specific values of the linear velocity and angular velocity for each of the above candidate actions are preset according to the robot's kinematic constraints. For example, the linear velocity of the backward movement can be set to -0.15 m / s, the angular velocity of the left and right turns can be set to ±0.40 radians / s, and the linear velocity of the arc movement can be set to -0.10 m / s and the angular velocity to ±0.35 radians / s. The linear velocity of the forward movement can be set to +0.15 m / s, and the linear velocity of the arc movement can be set to +0.10 m / s and the angular velocity to ±0.35 radians / s. The above parameters can be adjusted according to the motion characteristics of different robot models, and this embodiment does not limit this.
[0066] Step S42: Perform short-time trajectory prediction on each candidate action in the candidate action set to obtain each predicted trajectory; It should be noted that short-time trajectory prediction refers to calculating the possible pose sequence of the robot within a preset time range for each candidate action, based on the corresponding linear and angular velocities. For example, starting from the robot's current pose, the prediction time is divided into multiple time frames (e.g., 20 frames, i.e., a total prediction duration of 2.0 seconds) with a preset time step (e.g., 0.1 seconds). Within each time frame, the change in the robot's pose is calculated based on the linear and angular velocities of the candidate action, and this change is superimposed on the pose of the previous time frame to obtain the predicted pose for that time frame. This process is repeated frame by frame until the prediction of all time frames is completed, obtaining the predicted trajectory corresponding to the candidate action. The predicted trajectory consists of a series of predicted pose points, each containing a timestamp, predicted position coordinates, and predicted orientation angle.
[0067] Step S43: Obtain the trajectory parameters of each candidate action corresponding to the predicted trajectory; It should be noted that the system performs statistical analysis on each predicted trajectory obtained in step S42, extracting the trajectory parameters corresponding to that predicted trajectory. The trajectory parameters are multiple indicators used to quantitatively evaluate the execution effect of candidate actions. Specifically, based on the robot's body contour, the system projects the body contour corresponding to the predicted pose of each time frame onto a layered map, statistically analyzes the state information of the grids covered by the body contour within that frame, and calculates the following trajectory parameters: The first metric is the trajectory prediction completion rate. The completion rate refers to the proportion of time frames in the predicted trajectory that were successfully predicted (i.e., prediction did not terminate prematurely due to collision or map deviation) out of the total predicted time frames. If, during the prediction process, the robot's body contour corresponding to the predicted pose in a certain time frame overlaps with an obstacle grid or an inflated grid, or the robot's center point exceeds the global map boundary, then the predicted trajectory terminates prematurely, and prediction will not continue in subsequent time frames. The completion rate reflects the degree to which candidate actions can theoretically be executed safely.
[0068] The second item is the proportion of passable area at the predicted trajectory's endpoint. The endpoint refers to the robot pose corresponding to the last time frame of the predicted trajectory (i.e., the end of the prediction duration). The system projects the robot's silhouette corresponding to this pose onto a layered map and counts the proportion of the number of grids marked as passable (i.e., not belonging to obstacle grids, inflated grids, or off-map areas) within the grids covered by the robot silhouette to the total number of grids covered by the robot silhouette.
[0069] The third aspect is the safety of the robot's center point at the predicted trajectory endpoint. The system determines whether the robot's center point at the predicted trajectory endpoint falls outside the obstacle grid, the expanded grid, or the global map boundary. If the center point falls into any of these areas, the endpoint position is deemed unsafe.
[0070] By quantifying the predicted trajectories of candidate actions into multiple comparable numerical indicators, an objective quantitative basis is provided for subsequent screening and scoring.
[0071] Step S44: Perform a comprehensive score on the candidate actions corresponding to the trajectory parameters that meet the preset parameter conditions; It should be noted that the system first filters candidate actions based on the trajectory parameters obtained in step S43, retaining only those actions that meet preset parameter conditions for the scoring stage. These preset parameter conditions include: the completion rate of the predicted trajectory is greater than or equal to a completion rate threshold (e.g., 0.50); the proportion of passable area within the grid covered by the fuselage outline at the predicted trajectory's terminal position is greater than or equal to a terminal free ratio threshold (e.g., 0.75); and the center point of the fuselage outline at the predicted trajectory's terminal position does not fall outside obstacle grids, inflated grids, or the global map boundary (i.e., the terminal center safety meets the requirements). Only candidate actions that simultaneously meet all three conditions are eligible for subsequent comprehensive scoring.
[0072] Additionally, it's important to note that the comprehensive score is a process of quantitatively evaluating the execution effectiveness of candidate actions across multiple dimensions and summing it into a single total score. It considers several dimensions: the completion rate of the predicted trajectory, the improvement in obstacle occupancy at the terminal position relative to the starting position (i.e., terminal occupancy improvement), the improvement relative to the historical best trajectory (i.e., historical best improvement), the proportion of passable areas at the terminal position (i.e., terminal free ratio), and whether the candidate successfully escaped impassable areas marked by the obstacle layer or expansion layer (i.e., escape from bad zones reward). Weights are assigned to these five dimensions, for example, completion rate with a weight of 30, terminal occupancy improvement with a weight of 40, historical best improvement with a weight of 15, terminal free ratio with a weight of 10, and escape from bad zones reward with a weight of 5. The scores of each dimension are multiplied by their corresponding weights and then summed to obtain the raw score of the candidate action. This raw score is then combined with historical action bias and failed action bias to obtain the final comprehensive score. Historical action bias is a penalty value for actions that have been frequently selected recently but have not produced actual progress; failed action bias is a penalty value for actions that previously resulted in collisions or invalid outcomes. The initial values of the historical action bias and the failed action bias are both zero, and they are dynamically updated during the subsequent closed-loop reselection process.
[0073] Step S45: Select the candidate action whose comprehensive score meets the preset scoring conditions as the current action to be executed, and control the robot to execute the current action.
[0074] It should be noted that after completing the comprehensive scoring in step S44, the system sorts the comprehensive scores of all candidate actions and selects the candidate action that meets the preset scoring conditions (such as the highest comprehensive score) as the current action to be executed. The system then sends the linear velocity and angular velocity commands corresponding to the candidate action to the robot's chassis drive layer, controlling the robot to move at those speeds and angular velocities.
[0075] Through steps S41 to S45 above, this embodiment of the application achieves intelligent generation, quantitative evaluation, and optimal selection of candidate actions. First, by generating differentiated sets of candidate actions based on different types of collision signals or path planning failure signals, the generation of candidate actions can fully consider the triggering reasons, making the spatial distribution of candidate actions more reasonable and increasing the probability of finding effective escape actions. Second, by performing short-term trajectory prediction on each candidate action and extracting multi-dimensional trajectory parameters, the system can pre-evaluate the motion trend and safety of each action before actual execution, thereby avoiding the execution of obviously dangerous actions. Third, by comprehensively scoring the selected candidate actions, the scoring process comprehensively considers multiple dimensions and superimposes historical bias and failure bias, achieving a comprehensive quantitative evaluation of candidate actions and avoiding the one-sidedness of relying on only a single indicator for judgment. Finally, by selecting the candidate action that meets the preset scoring conditions (such as the highest comprehensive score) for execution, it is ensured that each escape attempt uses the optimal action under the current evaluation. This application transforms the selection of escape actions from a fixed mode to a data-driven adaptive mode through the above process, avoiding the problem of repeated failures in specific scenarios due to the use of fixed sequence actions in traditional methods, and significantly improving the rationality of escape action selection.
[0076] In one feasible implementation, after step S45, which selects candidate actions that meet preset scoring conditions as the current action and controls the robot to execute the current action, the implementation further includes steps S46-S47: Step S46: Obtain the robot's actual displacement and actual rotation angle; It should be noted that during step S45, when controlling the robot to execute the current action, the system continuously collects the robot's pose information and calculates the actual displacement and actual rotation angle based on the pose changes. The actual displacement refers to the straight-line distance between the robot's position at the beginning and end of a preset observation window. The actual rotation angle refers to the angular change between the robot's initial and final orientation angles within the same observation window. The duration of the observation window can be preset to, for example, 1.0 second or 2.0 seconds to ensure that the collected motion data is statistically significant.
[0077] Step S47: If the actual displacement is less than the preset displacement threshold and / or the actual turning angle is less than the preset turning threshold, then reduce the comprehensive score of the candidate action corresponding to the currently executed action, and re-execute the step of generating a set of candidate actions in response to the collision signal and / or path planning failure signal, and subsequent steps.
[0078] It should be noted that the preset displacement threshold and preset angle threshold are the minimum motion amounts required to determine whether an action has produced effective progress. If the actual displacement obtained in step S46 is less than the preset displacement threshold (e.g., 0.05 meters or 0.1 meters), it indicates that the robot has hardly moved within the observation window, and the current action has failed to propel the robot forward or backward. If the actual angle is less than the preset angle threshold (e.g., 0.1 radians or 0.15 radians), it indicates that the robot has hardly turned within the observation window, and the current action has failed to effectively change the robot's orientation. Any of the above situations (or both simultaneously) indicates that the current action has not produced effective progress, and a closed-loop reselection mechanism needs to be triggered to lower the comprehensive score of the candidate action corresponding to the current action. Specifically, the system reduces the historical action bias of the candidate action by a preset penalty value (e.g., by 5 points), putting it at a disadvantage in subsequent re-evaluations. Then, it jumps back to step S41 and re-executes the entire process of candidate action set generation, short-term trajectory prediction, trajectory parameter acquisition, comprehensive scoring, and selection of the optimal action. During the re-execution process, because the historical bias of the failed action has been reduced, its overall score will decrease, and the system will tend to select other candidate actions as the new current execution action. If the new candidate action still does not produce effective progress after re-selection, the system will continue to repeat the above penalty and re-selection process until a candidate action produces effective progress or triggers the timeout threshold and retry limit for escape failure.
[0079] In addition, if the currently executed action fails due to another collision in the same direction during execution, the system will further reduce the failure bias of the candidate action by a preset penalty value (e.g., reduce by 10 points), and can temporarily add the forward action to the candidate action set to expand the search space and avoid having no action to choose from due to the candidate set being too small.
[0080] Through steps S46 to S47 above, this embodiment of the application implements a closed-loop reselection mechanism for escape actions. First, by acquiring the robot's actual displacement and actual turning angle within the observation window, precise quantitative feedback is provided for action effectiveness evaluation, avoiding the bias of relying solely on sensor signals for judgment. Second, by reducing the score of the action and re-executing the entire selection process when the actual displacement or turning angle is insufficient, the system gradually eliminates all invalid actions, ultimately converging on actions that can produce effective progress. Through this closed-loop reselection mechanism, this application ensures that the selection of escape actions is no longer a one-time static decision, but an adaptive process of continuous dynamic optimization based on actual execution results, significantly improving the robustness and success rate of the escape system in continuous and complex trapped scenarios.
[0081] In one feasible implementation, after step S40, which involves controlling the robot to escape from a difficult situation based on an escape strategy, steps S48 to S52 are further included: Step S48: Determine the first path point in the global path that is closest to the robot; It should be noted that after the escape maneuver is completed, the robot needs to return to the global path to continue performing any unfinished tasks. The system traverses every path point on the global path, calculates the Euclidean distance between each path point and the robot's current position, and selects the path point with the smallest distance as the first path point. The first path point represents the position on the global path closest to the robot's current position and serves as the starting reference point for subsequent path recovery searches, providing an accurate starting position for subsequent searches along the path direction.
[0082] Step S49: Based on the first path point, search along the global path to determine the first path point located in the obstacle grid as the first obstacle point; It should be noted that the system starts from the first path point determined in step S48 and searches forward point by point along the working direction of the global path (i.e., the robot's normal travel direction). For each path point encountered during the search, the system projects the location coordinates of that path point onto the layered map and checks whether the corresponding grid is marked as an obstacle grid. If the grid corresponding to a path point is marked as an obstacle grid, it means that the location is occupied by an obstacle, and the robot cannot pass through. The system continues to search along the path direction until it finds the first path point occupied by an obstacle grid, and records this point as the first obstacle point. This point is the critical dividing point for determining whether the reference path can be recovered.
[0083] Step S50: Based on the first obstacle point, search along the global path to determine the first path point outside the obstacle grid as the first recovery point, and determine the distance from the first recovery point to the end point of the global path. It should be noted that the system starts from the first obstacle point determined in step S49 and continues searching forward along the operational direction of the global path. For each path point after the first obstacle point, the system also checks whether the corresponding grid cell is marked as an obstacle grid cell. When the system finds the first path point where the grid cell corresponding to that location is no longer marked as an obstacle grid cell, that location is a passable area, and this point is recorded as the first recovery point. The first recovery point represents the first location on the global path to be restored to passability after the obstacle-blocked section. Then, the system calculates the distance between the first recovery point and the end point of the global path. The end point of the global path refers to the last path point of the entire global path. The system calculates the path length (i.e., the sum of the distances between each consecutive path point) from the first recovery point to the end point along the global path, and this distance is recorded as the distance from the first recovery point to the end point. Through this step, the system can determine whether there are enough remaining passable sections on the global path after the obstacle-blocked section, in order to decide whether it is possible to restore the original path.
[0084] Step S51: If the distance from the first recovery point to the end point is greater than or equal to the preset recovery distance, then generate a detour path from the robot to the first recovery point; It should be noted that the preset recovery distance is a pre-set threshold parameter used to determine whether the path segment after the global path is blocked by an obstacle is long enough to support the robot's continued operation. If the distance from the first recovery point determined in step S50 to the end point is greater than or equal to the preset recovery distance (e.g., 0.5 meters or 1.0 meter), it indicates that there is still a sufficient remaining path segment after the obstacle segment in the global path, making it worthwhile for the robot to bypass the obstacle and return to the recovery point to continue operation. At this time, the system uses the first recovery point as the target point for path recovery and generates a detour path from the robot's current position to the target point. Specifically, the system first attempts to generate a detour path using a contour planning algorithm. Contour planning refers to generating a path that can bypass the obstacle area and reach the target point, using the obstacle contour marked in the expansion layer as the boundary. If the contour planning is successful, the generated path is used as the detour path. If contour planning fails (e.g., the obstacle contour is too complex or an effective detour path cannot be formed), the system checks whether the robot's current position is within a passable area (i.e., all grids covered by the robot's contour are passable grids). If so, it searches for the shortest path from the current position to the target point within the passable area. If the robot's current position is not within a passable area, it first uses the Flood Fill algorithm to generate a path leaving the obstacle area from the current position, and then connects to the target point after the robot enters the passable area.
[0085] Step S52: If the distance from the first recovery point to the end point is less than the preset recovery distance, then the second recovery point is determined according to the obstacle grid where the first obstacle point is located, and a detour path from the robot to the second recovery point is generated.
[0086] It should be noted that if the distance from the first recovery point determined in step S50 to the end point is less than the preset recovery distance, it indicates that the remaining path segment after the global path is blocked by the obstacle is too short. Even if the robot bypasses the obstacle and returns to the first recovery point, it will quickly reach the end of the path and cannot continue effective operation. In this case, restoring along the original global path is not very meaningful, and the system needs to find an alternative recovery target point. Specifically, based on the position of the obstacle grid where the first obstacle point is located, a passable target point is searched outside the obstacle area using the Flood Fill algorithm. This target point is located outside the obstacle area and is relatively close to the edge of the obstacle area, and is recorded as the second recovery point. The second recovery point is a temporary alternative target point, and its function is to guide the robot to bypass the dense obstacle area and reach a safe open location. After determining the second recovery point, the system uses the second recovery point as the target point and generates a detour path from the robot's current position to the second recovery point in the same way as in step S51.
[0087] Through steps S48 to S52 above, this embodiment of the application achieves intelligent recovery of the reference path and global path reconstruction after escape from obstacles. First, by accurately locating the first path point closest to the robot and the first obstacle point occupied by an obstacle on the global path, the system can accurately understand where the global path is blocked by obstacles and the specific location of the blocked section, improving search efficiency. Second, by continuing to search forward to determine the first recovery point and calculating its distance to the end of the path, the system can objectively assess whether there are enough remaining work sections after the global path is blocked. This quantitative judgment based on the remaining path length enables the system to scientifically decide whether to "detour back to the original path" or "abandon the original path and find an alternative target," avoiding the limitations of judging solely based on experience or fixed rules. Third, by adopting different processing strategies for the two situations, the system can maintain the continuity of the original work path as much as possible during the path recovery process to reduce the impact on the work process, and actively search for alternative targets when the original path cannot be recovered to avoid the predicament of having no target to go after escape from obstacles. Through the above process, this application enables the robot to intelligently select the optimal recovery method based on the actual occupancy of the global path after it has escaped the obstacle, thereby improving the connection and continuity of the escape process with the normal operation.
[0088] In one feasible embodiment, the method further includes steps A10 to A20: Step A10: Monitor the robot's status information in real time; It should be noted that the system continuously monitors various status information of the robot throughout the entire escape process. This status information includes, but is not limited to: timestamps of positioning data (used to determine if positioning is interrupted), current and temperature of the walking motors (used to determine if the walking motors are overcurrent or overtemperature), current and temperature of the steering motors, current and temperature of the cutter head motors, current and temperature of the lifting motors, battery output current (used to determine if the battery is overcurrent), and timing and counting information for the escape process. The system periodically collects and updates the above status information at a preset frequency (e.g., 10Hz) and compares the collected real-time values with preset thresholds. The timestamps of the positioning data are obtained by monitoring the timestamp field in the latest data packet from the positioning information receiving module; motor current and temperature are obtained through feedback signals from the motor drivers; battery current is obtained through monitoring data from the battery management system; and the escape timing and counting information is maintained internally by the node state machine.
[0089] Step A20: If any of the status information meets any escape failure condition, stop the robot's current action and confirm the error information.
[0090] It should be noted that the escape failure conditions refer to a set of preset threshold conditions used to determine whether the escape process has failed due to an anomaly. The system continuously compares the status information monitored in step A10 with the corresponding escape failure conditions. Escape failure conditions include at least the following: First, if the difference between the timestamp of the positioning data and the current time is greater than the preset allowable interval (e.g., 1.0 second), it indicates that the robot has not received valid positioning data for an extended period, and the positioning function has been interrupted. In this case, the robot cannot obtain its own position, and continuing to perform any position-based escape maneuvers cannot guarantee safety; therefore, the escape attempt is deemed a failure. Second, if any of the following components—the walking motor, steering motor, cutter head motor, lifting motor, or battery—issues an overcurrent or overtemperature alarm, it indicates an abnormality in the electrical system. For walking motor abnormalities, the system determines whether an immediate interruption is necessary based on the type of escape state; for cutter head motor, lifting motor, and battery abnormalities, the system determines whether an interruption is necessary based on the type of currently executed action. If an interruption is confirmed, the escape attempt is deemed a failure. Third, if the escape attempt time exceeds the preset escape timeout threshold (e.g., 300 seconds), it indicates that the robot failed to escape within the specified time, and the escape attempt timeout is deemed a failure. Fourth, if the cumulative number of recovery attempts exceeds the preset action attempt limit (e.g., 15 times), it indicates that the robot has repeatedly attempted different recovery actions without success, and the action attempt limit has been exceeded, resulting in a failure. Fifth, if the cumulative number of path planning failures exceeds the preset planning failure limit (e.g., 4 times), it means the robot has failed multiple attempts to replan the path, and this is considered a planning failure exceeding the limit. Sixth, if the cumulative number of slippage recovery attempts exceeds the preset slippage retry limit (e.g., 5 times), it means the robot has failed multiple attempts to recover while slipping, and this is considered a slippage retry exceeding the limit. Seventh, if the waiting time after motor overheating exceeds the preset overheating waiting time limit (e.g., 60 seconds), it means the motor has not returned to normal after cooling down, and this is considered an overheating waiting timeout failure. Eighth, if the number of consecutive requests to clear the motor overcurrent alarm exceeds the preset overcurrent clearing limit (e.g., 10 times) and the alarm is still not cleared, this is considered an overcurrent clearing exceeding the limit.
[0091] When any of the above-mentioned escape failure conditions are met, the system immediately stops all currently executing actions (by issuing a stop command to the chassis drive layer), switches the node state machine to the error state, and confirms the corresponding error code based on the specific failure condition that was triggered. The error information includes the error state, error code, response message, and heartbeat information. The system packages this information and publishes it to the upper-level task system, providing clear information for subsequent decisions (pausing the task, restarting the escape, or notifying manual takeover).
[0092] Through steps A10 to A20 above, this embodiment of the application achieves abnormal interruption detection and unified state management throughout the entire escape process. First, by real-time monitoring of the robot's positioning timestamp, the current and temperature of each motor and battery, escape time, and the number of various attempts, the system can comprehensively grasp the dynamic changes of key indicators during the escape process, providing multi-dimensional data sources for anomaly judgment. Second, step A20 compares various monitoring information with preset escape failure conditions in real time, and immediately stops the current action and switches to an error state when any condition is met. This ensures that the system can promptly terminate the escape process when an unrecoverable anomaly occurs at any stage, avoiding power consumption and mechanical wear due to continuous ineffective attempts, and preventing safety hazards caused by continued operation in an abnormal state. Simultaneously, the system accurately outputs the cause of failure to the upper-level task system through error codes and response messages, enabling the upper-level system to adopt differentiated follow-up processing strategies based on different error types, achieving information closure and collaborative decision-making between the escape system and the upper-level task system. This application, through the aforementioned anomaly monitoring and status management mechanism, enables the escape process to have clear failure judgment boundaries and a unified status feedback interface when anomalies occur, significantly improving the system's security and maintainability.
[0093] In this embodiment, in response to the robot's escape command, the robot's current state is statically classified based on a pre-built layered map. The layered map quickly eliminates obvious obstacle scenarios such as map exits, collisions, and narrow passages, enabling accurate determination of some obstacle types before the escape action is executed. If the static classification is successful, the result is taken as the robot's obstacle type. If the static classification fails, the robot is controlled to move actively, and its current state is dynamically classified. The result of the dynamic classification is taken as the obstacle type. Dynamic classification allows the robot to acquire surrounding environmental data during movement. This data can identify complex obstacle types that static classification cannot determine, such as obstacle encirclement, wheel slippage, and undefined obstacles, significantly expanding the range of obstacle type recognition. An escape strategy is determined based on the obstacle type, achieving precise matching between the escape strategy and the obstacle type, avoiding escape failure or secondary trapping due to mismatch between the escape action and the obstacle scenario. Based on the escape strategy, the robot is controlled to escape, ensuring that it can leave the current obstacle state in the most suitable way. This application employs a two-stage classification mechanism that combines static and dynamic classification, enabling accurate identification of various trapped scenarios such as maps, obstacle encirclement, collisions, slippage, and narrow passages. This overcomes the technical problem of inaccurate identification of trapped types in traditional methods, significantly improving the robot's accuracy in identifying trapped types and its ability to autonomously escape from difficult situations in complex environments.
[0094] A second aspect of this application provides a robot escape device, referring to... Figure 4The robot escape device includes: The static classification module 10 is used to statically classify the robot's current state based on a pre-built hierarchical map in response to the robot's escape command. The dynamic classification module 20 is used to determine the robot's distress type if the static classification is successful, and to control the robot to move actively if the static classification fails, and to dynamically classify the robot's current state, taking the result of the dynamic classification as the distress type. The strategy determination module 30 is used to determine the robot's escape strategy based on the type of distress. The obstacle escape module 40 is used to control the robot to escape from obstacles based on the obstacle escape strategy.
[0095] The robot escape device provided in this application adopts the robot escape method in the above embodiments. Compared with the prior art, the beneficial effects of the robot escape device provided in this application are the same as the beneficial effects of the robot escape method provided in the above embodiments. Moreover, the other technical features of the robot escape device are the same as the features disclosed in the methods of the above embodiments, and will not be repeated here.
[0096] A third aspect of this application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the robot escape method described in Embodiment 1 above.
[0097] The following is for reference. Figure 5 It shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of this application. Figure 5 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.
[0098] like Figure 5As shown, the electronic device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. The RAM 1004 also stores various programs and data required for the operation of the electronic device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. While electronic devices with various systems are shown in the figures, it should be understood that implementation or possession of all the systems shown is not required. More or fewer systems may be implemented alternatively.
[0099] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.
[0100] The electronic device provided in this application adopts the robot escape method in the above embodiments. Compared with the prior art, the beneficial effects of the electronic device provided in this application are the same as those of the robot escape method provided in the above embodiments. Furthermore, the other technical features of the electronic device are the same as those disclosed in the method of the previous embodiment, and will not be repeated here.
[0101] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.
[0102] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included 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.
[0103] A fourth aspect of this application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the robot escape method in the above embodiments.
[0104] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.
[0105] The aforementioned computer-readable storage medium may be included in an electronic device or may exist independently without being assembled into an electronic device.
[0106] The aforementioned computer-readable storage medium carries one or more programs. When the aforementioned one or more programs are executed by an electronic device, the electronic device causes the electronic device to: respond to the robot's escape command, perform static classification of the robot's current state based on a pre-built hierarchical map; if the static classification is successful, use the static classification result as the robot's trapped type; if the static classification fails, control the robot to move actively, perform dynamic classification of the robot's current state, and use the dynamic classification result as the trapped type; determine the robot's escape strategy based on the trapped type; and control the robot to escape based on the escape strategy.
[0107] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0108] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0109] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.
[0110] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-described robot escape method. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the robot escape method provided in the above embodiments, and will not be repeated here.
[0111] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.
Claims
1. A method for robot extrication from difficult situations, characterized in that, The robot's escape method includes: In response to the robot's escape command, the robot's current state is statically classified based on a pre-built hierarchical map; If the static classification is successful, the result of the static classification is taken as the type of distress for the robot. If the static classification fails, the robot is controlled to move actively, and the current state of the robot is dynamically classified, and the result of the dynamic classification is taken as the type of distress. Determine the robot's escape strategy based on the type of distress; Based on the aforementioned escape strategy, the robot is controlled to escape from the predicament.
2. The robot escape method as described in claim 1, characterized in that, The pre-built hierarchical map includes a static layer, an obstacle layer, and an expansion layer. The step of statically classifying the robot's current state based on the pre-built hierarchical map includes: Obtain the current pose of the robot; Based on the current pose, determine whether the robot is outside the global map boundary in the static layer; If the robot is outside the boundary of the global map, then the static classification and recognition are considered successful.
3. The robot escape method as described in claim 2, characterized in that, After the step of determining whether the robot is outside the global map boundary in the static layer based on the current pose, the method further includes: If the robot is within the boundary of the global map, the robot's body outline is obtained and projected onto the pre-built layered map. When the fuselage outline overlaps with the obstacle grid of the obstacle layer or the expansion grid of the expansion layer, the static classification and recognition are determined to be successful.
4. The robot escape method as described in claim 3, characterized in that, After the steps of obtaining the robot's fuselage outline and projecting the fuselage outline onto the pre-built layered map, the method further includes: When the body outline does not overlap with the obstacle grid and the expansion grid, determine the width of the passable area around the robot; If the width of the passable area is less than the preset safety width, then the static classification and recognition are determined to be successful. If the width of the passable area is greater than or equal to the preset safety width, then the static classification and recognition is determined to have failed.
5. The robot escape method as described in claim 4, characterized in that, The steps of controlling the robot to move actively, dynamically classifying the robot's current state, and using the result of the dynamic classification as the type of distress include: The robot is controlled to rotate in place to acquire information about its surrounding environment, and the obstacle layer is updated based on this information. Once the robot has rotated to a preset angle, the robot is controlled to stop rotating, and based on the static layer and the updated obstacle layer, it is determined whether the robot is surrounded by obstacles. If the robot is surrounded by obstacles, then the result of the dynamic classification is determined; If the robot is not surrounded by obstacles, the result of the dynamic classification is determined based on the robot's region identifier, the distance of the robot to the global path in the static layer, and the obstacle channel information in the updated obstacle layer.
6. The robot escape method as described in claim 1, characterized in that, After the step of controlling the robot to escape from the predicament based on the escape strategy, the method further includes: In response to collision signals and / or path planning failure signals, a set of candidate actions is generated; Short-time trajectory prediction is performed on each candidate action in the candidate action set to obtain each predicted trajectory; Obtain the trajectory parameters of each candidate action corresponding to the predicted trajectory; A comprehensive score is given to the candidate actions corresponding to the trajectory parameters that meet the preset parameter conditions; The candidate actions whose comprehensive scores meet the preset scoring conditions are taken as the current actions to be executed, and the robot is controlled to execute the current actions.
7. The robot escape method as described in claim 6, characterized in that, After the step of selecting the candidate action whose comprehensive score meets the preset scoring conditions as the current action and controlling the robot to execute the current action, the method further includes: Obtain the actual displacement and actual rotation angle of the robot; If the actual displacement is less than a preset displacement threshold, and / or the actual turning angle is less than a preset turning threshold, then the comprehensive score of the candidate action corresponding to the currently executed action is reduced, and the step of generating a set of candidate actions in response to the collision signal and / or path planning failure signal, and subsequent steps are re-executed.
8. The robot escape method according to any one of claims 1 to 7, characterized in that, After the step of controlling the robot to escape from the predicament based on the escape strategy, the method further includes: Determine the first path point in the global path that is closest to the robot; Based on the first path point, a global path search is performed to determine the first path point located in the obstacle grid as the first obstacle point; Based on the first obstacle point, search along the global path to determine the first path point outside the obstacle grid as the first recovery point, and determine the distance from the first recovery point to the end point of the global path; If the distance from the first recovery point to the end point is greater than or equal to a preset recovery distance, a detour path from the robot to the first recovery point is generated; If the distance from the first recovery point to the end point is less than the preset recovery distance, then a second recovery point is determined based on the obstacle grid where the first obstacle point is located, and a detour path from the robot to the second recovery point is generated.
9. An electronic device, characterized in that, The electronic device includes a memory and a processor, the processor being capable of executing the steps of the robot escape method as described in any one of claims 1 to 8.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the robot escape method as described in any one of claims 1 to 8.