Robot escape method and device, electronic equipment and storage medium

By determining the inner edge profile and real-time path planning of the robot trapped area in a highly dynamic environment, the problem of escape when the robot is surrounded by movable obstacles is solved, and an efficient and safe escape process is achieved.

CN120428720APending Publication Date: 2025-08-05HANGZHOU EZVIZ SOFTWARE CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510571097.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-30
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

When a robot is surrounded by movable obstacles in a highly dynamic environment, it is difficult to escape effectively, and existing methods are difficult to use historical trajectories or to stay away from obstacles.

Method used

By determining the inner edge profile of the trapped area based on the obstacle information around the robot, a reference trajectory of escape is generated, and local path planning is carried out, and the obstacle information is updated in real time to control the robot to move along the inner edge profile until it is escaped.

Benefits of technology

It improves the robot's escape effect in a highly dynamic environment, and can seize opportunities for escape in a timely manner, avoid collisions, and achieve efficient escape.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120428720A_ABST
    Figure CN120428720A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a robot escape method and device, electronic equipment and a storage medium, and relates to the technical field of robots. The method comprises the following steps: in response to a trapped state of the robot, determining an inner edge contour of a trapped area where the robot is located based on obstacle information around the robot; according to the current position of the robot, an escape reference trajectory is generated along the inner edge contour; performing local path planning according to the escape reference trajectory and the currently detected obstacle information, and controlling the robot to move along the planned local path; and returning to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot until the robot is determined to be out of trap. In this way, the inner edge contour of the trapped area where the robot is located is updated in real time, the robot is controlled to move along the inner edge contour of the trapped area to find out the escape gap appearing at any time in the high-dynamic environment, and the robot is controlled to drive away from the escape area to achieve escape.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robotics technology, and in particular to a method, device, electronic device, and storage medium for escaping a robot. Background Art

[0002] With the continuous development of robotics technology, robots are widely used to perform various tasks. For example, cleaning robots are used to perform cleaning tasks, and food delivery robots are used to perform food delivery tasks.

[0003] In a highly dynamic environment with movable obstacles, the robot is surrounded by them and enters a trapped state. Movable obstacles include people, animals, and other movable devices.

[0004] After the robot is trapped, since the robot is blocked by obstacles on all sides, it is difficult to escape using existing robot escape methods such as moving in the reverse direction along the historical trajectory or moving in the direction away from the obstacles. Summary of the Invention

[0005] The purpose of the embodiments of the present application is to provide a robot escape method, device, electronic device, and storage medium, so as to enable a robot in a highly dynamic environment to escape through escape gaps that appear in real time. The specific technical solutions are as follows:

[0006] In a first aspect, an embodiment of the present application provides a method for escaping a robot, the method comprising:

[0007] In response to the robot being in a trapped state, determining an inner edge contour of a trapped area where the robot is located based on obstacle information around the robot;

[0008] generating an escape reference trajectory along the inner edge contour according to the current position of the robot;

[0009] Performing local path planning based on the escape reference trajectory and currently detected obstacle information, and controlling the robot to move along the planned local path;

[0010] Return to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is out of trouble.

[0011] Optionally, the step of determining the inner edge contour of the trapped area where the robot is located based on obstacle information around the robot includes:

[0012] Based on the device size of the robot and information about obstacles around the robot, each obstacle is expanded in the local map to obtain a local map after the obstacles are expanded;

[0013] In the local map after the obstacle is expanded, the contour information of the trapped area where the robot is located is extracted, and the inner edge contour of the trapped area where the robot is located is determined.

[0014] Optionally, the step of expanding each obstacle in the local map based on the device size of the robot and information about obstacles around the robot includes:

[0015] Taking half of the width of the robot as the expansion distance;

[0016] Each obstacle in the local map is expanded according to the expansion distance.

[0017] Optionally, the step of determining the inner edge contour of the trapped area where the robot is located includes:

[0018] Based on the current position coordinates of the robot in the local map and the contour information of the trapped area, determining a first maximum inner edge contour including the current position coordinates as the inner edge contour; or,

[0019] Based on the contour information of the trapped area, a second maximum inner edge contour of the trapped area is determined as the inner edge contour.

[0020] Optionally, the step of generating an escape reference trajectory along the inner edge contour according to the current position of the robot includes:

[0021] In a case where the inner edge contour is a first maximum inner edge contour, taking the current position coordinates of the robot as a starting point, generating an escape reference trajectory of a preset length along the first maximum inner edge contour;

[0022] When the inner edge contour is the second maximum inner edge contour, the robot is controlled to move to the position on the second maximum inner edge contour that is closest to the current position coordinates of the robot, and this position is used as the starting point to generate a preset length of escape reference trajectory along the second maximum inner edge contour.

[0023] Optionally, determining a method for the robot to escape includes:

[0024] During movement of the robot, determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, wherein the global reference point is a reference point with a known position outside the trapped area;

[0025] In a case where the current position is connected to the global reference point, it is determined that the robot is out of trouble.

[0026] Optionally, before the step of determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, the method further includes:

[0027] Determining whether the robot has escaped from an initial trapped area based on the current position of the robot, an initial trapped position, and an initial local map, wherein the initial local map is a local map of the robot when it enters a trapped state, and the initial trapped position is the position of the robot in the initial local map;

[0028] When the robot escapes from the initial trapped area, the step of determining whether the current position is connected to the global reference point based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information is executed.

[0029] Optionally, the step of determining whether the robot has escaped from the initial trapped area based on the current position, the initial trapped position, and the initial local map of the robot includes:

[0030] Mapping the current position of the robot to the initial local map to obtain a mapped position corresponding to the current position; determining whether the mapped position is connected to the initial trapped position based on obstacle information in the initial local map; and determining that the robot has escaped from the initial trapped area if the mapped position is not connected to the initial trapped position; or

[0031] Based on the initial trapped position and the obstacle information in the initial local map, the passable area where the robot is located is marked in the initial local map; the current position of the robot is mapped to the initial local map to obtain the mapping position corresponding to the current position, and determine whether the mapping position is located in the passable area. If the mapping position is not in the passable area, determine that the robot has escaped from the initial trapped area.

[0032] Optionally, before the step of determining the inner edge contour of the trapped area where the robot is located based on obstacle information around the robot, the method further includes:

[0033] Determining whether the robot is connected to a pre-stored global reference point and a current position of the robot, wherein the global reference point is a reference point located outside the trapped area and has a known position;

[0034] In a case where there is no communication between the robot and the global reference point, it is determined that the robot enters a trapped state.

[0035] Optionally, the step of determining whether the robot is connected to the global reference point based on a pre-stored global reference point and the current position of the robot includes:

[0036] planning a path between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information; and determining that the robot is not connected to the global reference point if a path between the current position and the global reference point cannot be planned; or

[0037] Based on a pre-stored global reference point and the current position of the robot, all paths for the robot to reach the global reference point are determined; based on the currently detected obstacle information and the contour information of the robot, whether the robot collides with an obstacle while moving along the planned path is determined; if a collision occurs on each path, it is determined that there is no connection between the robot and the global reference object.

[0038] In a second aspect, an embodiment of the present application provides a robot escape device, the device comprising:

[0039] an inner edge contour determining module, configured to determine, in response to the robot being in a trapped state, an inner edge contour of a trapped area where the robot is located based on obstacle information surrounding the robot;

[0040] A reference trajectory determination module, configured to generate an escape reference trajectory along the inner edge contour according to the current position of the robot;

[0041] A path planning module is used to plan a local path based on the escape reference trajectory and the currently detected obstacle information, and control the robot to move along the planned local path;

[0042] A return module is used to return to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot until it is determined that the robot is out of trouble.

[0043] Optionally, the inner edge contour determination module includes:

[0044] an expansion submodule, configured to expand each obstacle in the local map based on the device size of the robot and information about obstacles around the robot, to obtain a local map after the obstacles are expanded;

[0045] The contour extraction submodule is used to extract the contour information of the trapped area where the robot is located in the local map after the obstacle is expanded, and determine the inner edge contour of the trapped area where the robot is located.

[0046] Optionally, the expansion submodule includes:

[0047] an expansion distance determining unit, configured to use half of the width of the robot as the expansion distance;

[0048] The expansion unit is used to expand each obstacle in the local map according to the expansion distance.

[0049] Optionally, the contour extraction submodule includes:

[0050] An inner edge contour determining unit is used to determine, based on the current position coordinates of the robot in the local map and the contour information of the trapped area, a first maximum inner edge contour including the current position coordinates as the inner edge contour; or, based on the contour information of the trapped area, determine the second maximum inner edge contour of the trapped area as the inner edge contour.

[0051] Optionally, the reference trajectory determination module includes:

[0052] A first trajectory generating submodule is configured to generate an escape reference trajectory of a preset length along the first maximum inner edge contour with the current position coordinates of the robot as a starting point when the inner edge contour is a first maximum inner edge contour;

[0053] The second trajectory generation submodule is used to control the robot to move to the position on the second maximum inner edge contour that is closest to the current position coordinates of the robot when the inner edge contour is the second maximum inner edge contour, and use this position as the starting point to generate a preset length of escape reference trajectory along the second maximum inner edge contour.

[0054] Optionally, the device further includes a rescue determination module, including:

[0055] a first determining submodule, configured to determine, during movement of the robot, whether connectivity exists between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, wherein the global reference point is a reference point with a known position outside the trapped area;

[0056] The escape determination submodule is configured to determine whether the robot is escaped when the current position is connected to the global reference point.

[0057] Optionally, the device further includes:

[0058] a first determining module, configured to determine whether the robot has escaped from an initial trapped area based on the robot's current position, an initial trapped position, and an initial local map, before the step of determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the robot's current position, and currently detected obstacle information, wherein the initial local map is a local map of the robot when it enters a trapped state, and the initial trapped position is the position of the robot in the initial local map; and triggering an execution module when the robot escapes from the initial trapped area;

[0059] The execution module is used to execute the step of determining whether the current position is connected to the global reference point based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information.

[0060] Optionally, the first determining module includes:

[0061] The second determination submodule is used to map the current position of the robot to the initial local map to obtain the mapping position corresponding to the current position; determine whether the mapping position is connected to the initial trapped position based on the obstacle information in the initial local map; if the mapping position is not connected to the initial trapped position, determine that the robot has escaped from the initial trapped area; or, based on the initial trapped position and the obstacle information in the initial local map, mark the passable area where the robot is located in the initial local map; map the current position of the robot to the initial local map to obtain the mapping position corresponding to the current position, and determine whether the mapping position is located in the passable area. If the mapping position is not in the passable area, determine that the robot has escaped from the initial trapped area.

[0062] Optionally, the device further includes:

[0063] a second determining module, configured to determine, before the step of determining an inner edge contour of a trapped area where the robot is located based on obstacle information surrounding the robot, whether the robot is connected to a pre-stored global reference point and a current position of the robot, wherein the global reference point is a reference point located outside the trapped area and has a known position;

[0064] The trapped state determining module is used to determine that the robot enters a trapped state when there is no communication between the robot and the global reference point.

[0065] Optionally, the second determining module includes:

[0066] The third determination submodule is used to plan a path between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot and the currently detected obstacle information; if the path between the current position and the global reference point cannot be planned, determine that the robot is not connected to the global reference point; or, based on the pre-stored global reference point and the current position of the robot, determine all paths for the robot to reach the global reference point; determine whether the robot collides with an obstacle during the movement along the planned path based on the currently detected obstacle information and the contour information of the robot; if a collision occurs on each path, determine that the robot is not connected to the global reference object.

[0067] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0068] Memory for storing computer programs;

[0069] The processor is configured to implement any of the method steps described in the first aspect when executing a program stored in the memory.

[0070] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of the first aspects are implemented.

[0071] In a fifth aspect, an embodiment of the present application further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute any of the method steps described in the first aspect above.

[0072] Beneficial effects of the embodiments of the present application:

[0073] The technical solution provided by the embodiment of the present application is that the electronic device, in response to the robot being in a trapped state, determines the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot; generates an escape reference trajectory along the inner edge contour according to the current position of the robot; performs local path planning according to the escape reference trajectory and the currently detected obstacle information, and controls the robot to move along the planned local path; returns to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is escaped.

[0074] When the robot is in a trapped state, the robot is controlled to move along the inner edge contour of the trapped area to search for escape gaps that may appear at any time in a high-dynamic environment. In the process of controlling the movement of the robot, the inner edge contour of the trapped area where the robot is located is updated in real time based on the obstacle information detected around the robot, thereby updating the escape reference trajectory generated based on the inner edge contour, so as to control the robot to keep moving along the edge, thereby grasping each escape opportunity to control the robot to leave the escape area to achieve escape, greatly improving the robot's escape effect. Of course, implementing any product or method of the present invention does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0076] Figure 1 A flowchart of a robot escape method provided in an embodiment of the present application;

[0077] Figure 2 A schematic diagram of a robot provided in an embodiment of the present application in a trapped scenario;

[0078] FIG3( a ) is a schematic diagram of the inner edge contour of a trapped area provided in an embodiment of the present application;

[0079] FIG3( b ) is a schematic diagram of a reference trajectory for escaping distress provided in an embodiment of the present application;

[0080] FIG3( c ) is a schematic diagram of a robot provided in an embodiment of the present application achieving escape from distress;

[0081] Figure 4 for Figure 1 A specific flow chart of step S101 in the embodiment shown;

[0082] Figure 5 Another schematic diagram of the inner edge outline of the trapped area provided in an embodiment of the present application;

[0083] Figure 6 A flowchart of a method for determining a robot's escape from distress provided in an embodiment of the present application;

[0084] Figure 7 A schematic flow chart of another method for determining a robot's escape from distress provided in an embodiment of the present application;

[0085] FIG8( a ) is a schematic diagram of a robot escape determination scenario provided by an embodiment of the present application;

[0086] FIG8( b ) is another schematic diagram of a robot escape determination scenario provided by an embodiment of the present application;

[0087] Figure 9 A schematic structural diagram of a robot escape device provided in an embodiment of the present application;

[0088] Figure 10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0089] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field based on this application are within the scope of protection of this application.

[0090] In order to control the robot to escape from trouble, an embodiment of the present application provides a robot escape method, device, electronic device, computer-readable storage medium and computer program product. The following first introduces a robot escape method provided by an embodiment of the present application.

[0091] The robot escape method provided in the embodiments of the present application can be applied to any electronic device that can control the robot to perform escape processing, and may include a robot processor, controller, etc. The electronic device can be set in the robot, or it can be set outside the robot to communicate with the robot to control the robot's movement. For example, the electronic device can be a processor of a cleaning robot, a controller of a navigation robot in a shopping mall, a remote control device of a handling robot for transporting goods, etc., and is not specifically limited here. For the sake of clarity of description, it will be referred to as an electronic device later.

[0092] like Figure 1 As shown, an embodiment of the present application provides a method for escaping a robot, the method comprising:

[0093] S101: In response to a robot being in a trapped state, determining an inner edge contour of a trapped area where the robot is located based on obstacle information around the robot.

[0094] S102: Generate an escape reference trajectory along the inner edge contour according to the current position of the robot.

[0095] S103: Performing local path planning according to the escape reference trajectory and currently detected obstacle information, and controlling the robot to move along the planned local path.

[0096] S104: Return to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is out of trouble.

[0097] It can be seen that the technical solution provided by the embodiment of the present application is that the electronic device, in response to the robot being in a trapped state, determines the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot; generates an escape reference trajectory along the inner edge contour according to the current position of the robot; performs local path planning according to the escape reference trajectory and the currently detected obstacle information, and controls the robot to move along the planned local path; returns to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is escaped.

[0098] When the robot is in a trapped state, the robot is controlled to move along the inner edge contour of the trapped area to find escape gaps that appear at any time in a high-dynamic environment. During the movement of the robot, the inner edge contour of the trapped area where the robot is located is updated in real time based on the detected obstacle information around the robot, thereby updating the escape reference trajectory generated based on the inner edge contour to control the robot to keep moving along the edge, thereby grasping each escape opportunity to control the robot to leave the escape area to achieve escape, greatly improving the robot's escape effect.

[0099] A robot is an intelligent device that can move and perform various tasks. When operating in a highly dynamic environment with movable obstacles, the robot often becomes trapped by the obstacles due to their movement.

[0100] For example, Figure 2 As shown, when the robot is delivering food in a restaurant, people in the restaurant may move around the robot, and the robot is trapped because it is surrounded by people and tables in the restaurant.

[0101] When it is determined that the robot enters a trapped state, the electronic device may execute the above S101 and determine the inner edge contour of the trapped area where the robot is located based on obstacle information around the robot in response to the robot being in the trapped state.

[0102] In order to avoid collision between the robot and obstacles, the electronic device can obtain obstacle information around the robot through sensors.

[0103] Among them, the sensors can be various types of sensors, such as cameras, lidars, etc.; and the setting location of the sensors can be set according to actual needs. For example, the sensors can be set in the robot's working scene or in the robot itself, etc. The type and setting location of the sensors are not limited here.

[0104] When the sensor is set in the robot's working scene, the sensor can detect obstacle information around the robot, and then the sensor can send the detected obstacle information around the robot to the robot and the robot transmits it to the electronic device, or directly transmit the detected obstacle information around the robot to the electronic device; when the sensor is set on the robot, the sensor can detect obstacle information around the robot and transmit the detected obstacle information around the robot to the electronic device.

[0105] After obtaining the obstacle information around the robot, the electronic device can determine the inner edge contour of the area where the robot is trapped based on the obstacle information around the robot. The inner edge contour is the edge of the area where the robot is trapped.

[0106] In one embodiment, the electronic device may determine an inner edge contour including the current position coordinates of the robot based on the current position coordinates of the robot in the local map and obstacle information around the robot.

[0107] In one embodiment, the electronic device may directly use the largest contour of the trapped area as the inner edge contour based on the obstacle information around the robot and the contour information of the area where the robot is trapped.

[0108] Exemplarily, the local map is shown in FIG3( a ). The robot 301 is trapped because it is surrounded by obstacles 302 . The electronic device determines the inner edge contour 303 of the trapped area where the robot 301 is located based on the obstacle information around the robot.

[0109] For highly dynamic environments, since the obstacles around the robot include movable obstacles, and the movement of movable obstacles is random and at any time, the escape point for the robot is also random and appears at any time.

[0110] For example, the robot is surrounded by people and restaurant tables and chairs. As the people move away from the robot, the original location of the people becomes the robot's escape point, and the robot can escape from the trapped area from this escape point.

[0111] In order to timely sense and control the robot to escape through the escape point when it appears, the electronic device can execute step S102, that is, generate an escape reference trajectory along the inner edge contour according to the current position of the robot.

[0112] When the current position of the robot is close to the position on the inner edge contour, the current position of the robot can be used as the reference point of the inner edge contour, and a reference escape trajectory can be generated along the inner edge contour with the current position of the robot as the starting point; when the current position of the robot is far from the position on the inner edge contour, the point on the inner edge contour closest to the current position of the robot can be used as the inner edge contour reference point based on the current position of the robot, and a reference escape trajectory can be generated along the inner edge contour with the inner edge contour reference point as the starting point.

[0113] Exemplarily, based on Figure 3(a), as shown in Figure 3(b), based on the current position coordinates of the robot 301, the electronic device can generate an escape reference trajectory 304 along the inner edge contour 303 with the position P on the inner edge contour closest to the current position coordinates of the robot 301 as the starting point.

[0114] After generating the escape reference trajectory, the electronic device can control the robot to move along the escape reference trajectory. That is, the electronic device can execute the above S103, perform local path planning based on the escape reference trajectory and the currently detected obstacle information, and control the robot to move along the planned local path.

[0115] Since the obstacle information around the robot changes in real time, in order to adapt to the changes in obstacles and update the map and the edge contour of the robot's trapped area while controlling the robot to find an escape point along the edge, the electronic device can plan the robot's local path based on the escape reference trajectory and the currently detected obstacle information, and control the robot to move along the planned local path.

[0116] In this way, the planned local path smoothly tracks the escape reference trajectory and takes into account the changes in obstacles, avoiding collisions with obstacles while controlling the robot to move along the edge to find an escape gap.

[0117] In one embodiment, to prevent collisions between the robot and obstacles, the electronic device can obtain the obstacle costs associated with each obstacle around the robot. Specifically, higher obstacle costs can be assigned to special obstacles, such as people or those with significant potential damage. Local paths are planned based on the escape reference trajectory, currently detected obstacle information, and the cost values for each obstacle, and the robot is controlled to move along the planned local path.

[0118] The movement of the mobile obstacle is random at any time. The obstacle information around the robot changes with the movement of the mobile obstacle. The trapped area where the robot is located changes with the change of the obstacle information around the robot. Correspondingly, the inner edge contour of the trapped area where the robot is located changes with the change of the obstacle information around the robot. The escape reference trajectory generated along the inner edge contour also needs to change with the current position of the robot and the change of the inner edge contour of the trapped area where the robot is located. The local path planned according to the escape reference trajectory and the obstacle information around the robot also changes with the real-time changes of the escape reference trajectory and the obstacle information around the robot.

[0119] Based on this, during the process of controlling the robot's movement, in order to timely and accurately sense the escape point, the robot can adapt to the movement of moving obstacles and update the local map in real time based on the obstacle information surrounding the robot. It can also update the inner edge contour of the robot's trapped area and the escape reference trajectory. The robot's movement path can then be adjusted based on the escape reference trajectory and the detected obstacle information. That is, during the process of controlling the robot's movement, the electronic device can execute step S104 above and return to the step of determining the inner edge contour of the robot's trapped area based on the obstacle information surrounding the robot until the robot is determined to be free.

[0120] In the process of controlling the movement of the robot, the electronic device can update the inner edge contour of the trapped area where the robot is located in real time based on the detected obstacle information around the robot, and generate an escape reference trajectory along the inner edge contour based on the current position of the robot, and perform local path planning based on the escape reference trajectory and the obstacle information around the robot, and then control the robot to move along the planned path.

[0121] During the robot's movement, the electronic device can determine in real time whether the robot is out of trouble. For example, the electronic device can determine whether the robot is connected to a known global reference point located outside the trapped area to determine whether the robot is out of trouble, and further determine that the robot is out of trouble if the robot is connected to the global reference point; the electronic device can determine whether the robot can move to the next target point on the original global path to determine whether the robot is out of trouble, and further determine that the robot is out of trouble if the robot can move to the next target point on the original global path, etc.

[0122] In this way, the robot's moving path is planned in real time according to the update of obstacle information around the robot. When the robot is trapped in an area and an escape point appears due to moving obstacles away from the trapped area, when performing local path planning, since there are no obstacles at the escape point, the robot moving along the edge can move to the escape point and escape.

[0123] For example, based on Figure 3(a), as the moving obstacle moves, the trapped area where the robot is located changes. The inner edge contour 303 of the trapped area and the escape reference trajectory 304 are shown in Figure 3(c). Based on the escape reference trajectory 304 and the obstacle information, local path planning is performed, and the robot can drive out of the trapped area along the escape gap 305 to escape.

[0124] It can be seen that the technical solution provided by the embodiment of the present application is that the electronic device can control the robot to move along the inner edge contour of the trapped area to find the escape gap that appears at any time in a high dynamic environment, and in the process of the robot's movement, the inner edge contour of the trapped area where the robot is located is updated in real time based on the detected obstacle information around the robot, thereby updating the escape reference trajectory generated based on the inner edge contour to control the robot to keep moving along the edge, thereby grasping each escape opportunity to control the robot to leave the escape area to achieve escape, greatly improving the robot's escape effect, and the escape method has great universality.

[0125] As an implementation method of the present application, Figure 4 As shown, the above step S101, i.e., the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, may include:

[0126] S401: Based on the device size of the robot and information about obstacles around the robot, expand each obstacle in the local map to obtain a local map after the obstacles are expanded.

[0127] S402: Extracting contour information of the trapped area where the robot is located from the local map after the obstacle is expanded, and determining the inner edge contour of the trapped area where the robot is located.

[0128] During the movement of the robot, the sensor can obtain the environmental information of the robot, and draw a local map in real time after calculation and fusion. The local map information will be updated according to the update of the environmental information. Therefore, the local map is not related to the global map and global positioning coordinates.

[0129] To prevent the robot from colliding with obstacles while controlling it to move along the edge and find an escape point, the electronic device can obtain the robot's device size, determine an expansion distance based on the device size, and then inflate each obstacle around the robot in the local map based on the expansion distance and information about the obstacles around the robot, thereby obtaining an inflated local map. The expansion distance can be set based on the device size of the robot, for example, the robot's width, half the robot's width, or twice the robot's width, and is not limited here.

[0130] The electronic device can extract the contour information of the area where the robot is trapped from the local map after the obstacle is expanded, and use the extracted contour information as the inner edge contour of the area where the robot is trapped. The contour information is the contour information of the expanded obstacle.

[0131] In this embodiment, the electronic device expands each obstacle in the local map based on the device size of the robot and the obstacle information around the robot to obtain the local map after the obstacle expansion. In the local map after the obstacle expansion, the contour information of the trapped area where the robot is located is extracted, and the inner edge contour of the trapped area where the robot is located is determined. By expanding the obstacles in the local map and extracting the inner edge contour of the trapped area based on the expanded obstacle information, in this way, when controlling the robot to move along the local path planned based on the escape reference trajectory generated by the inner edge contour and searching for the escape point and escape path, the obstacle size that is too small due to inaccurate obstacle information due to detection error can be avoided, ensuring that the robot can pass through every possible escape path and every escape point searched out, and also ensuring that the robot can travel on a road away from unnecessary obstacles during actual movement.

[0132] As an implementation of an embodiment of the present application, the above step S401, i.e., the step of expanding each obstacle in the local map based on the device size of the robot and the obstacle information around the robot, may include:

[0133] Half of the width of the robot is used as the expansion distance; each obstacle in the local map is expanded according to the expansion distance.

[0134] The electronic device may use half of the width of the robot as an expansion distance, and expand each obstacle in the local map according to the expansion distance.

[0135] Since each obstacle is expanded to half the width of the robot, the inner edge contour of the robot's trapped area is determined based on the obstacle information after expansion. In this way, when the robot is controlled to move along the inner edge contour to find an escape, collisions between the robot and the obstacle can be avoided, and the inner edge contour can be avoided to be too small due to excessive expansion distance, thereby affecting the effect of subsequent control of the robot to search for an escape point along the edge.

[0136] In this embodiment, the electronic device uses half the robot's width as the expansion distance and expands each obstacle in the local map by this expansion distance. This combination of vehicle-width expansion and local path planning ensures that the robot can search for every possible escape path while remaining clear of unnecessary obstacles, significantly reducing collision risk.

[0137] As an implementation of an embodiment of the present application, the above step S401, i.e., the step of determining the inner edge contour of the trapped area where the robot is located, may include:

[0138] Based on the current position coordinates of the robot in the local map and the contour information of the trapped area, a first maximum inner edge contour including the current position coordinates is determined as the inner edge contour.

[0139] The electronic device can determine the current position coordinates of the robot in the local map, and based on the current position coordinates and the contour information of the trapped area, use the first maximum inner edge contour of the trapped area including the current position coordinates as the inner edge contour.

[0140] In one embodiment, the electronic device may determine the current position coordinates of the robot in the local map. If, based on the current position coordinates and the outline information of the trapped area, the distance between the current position coordinates and the position closest to the robot on the outline of the trapped area is not greater than a preset threshold, the electronic device may use the first largest inner edge contour including the current position coordinates as the inner edge contour. The preset distance may be set as needed, for example, to one robot width, and is not specifically limited herein.

[0141] For example, based on Figure 3(a), Figure 5 As shown, the distance between the current position coordinates of the robot 301 and the position closest to the robot on the outline of the trapped area is not greater than a preset threshold, and the first maximum inner edge contour including the current position coordinates is used as the inner edge contour 303.

[0142] In this embodiment, the electronic device can determine the first maximum inner edge contour including the current position coordinates of the robot in the local map and the contour information of the trapped area as the inner edge contour. In this way, the subsequently generated escape reference trajectory and the planned local path all use the robot's current position coordinates as the starting point, thereby improving the robot's movement efficiency.

[0143] As an implementation of an embodiment of the present application, the above step S401, i.e., the step of determining the inner edge contour of the trapped area where the robot is located, may include:

[0144] Based on the contour information of the trapped area, a second maximum inner edge contour of the trapped area is determined as the inner edge contour.

[0145] In order to determine the largest inner edge contour of the trapped area where the robot is located, the electronic device may determine the second largest inner edge contour with the largest enclosed area of the trapped area as the inner edge contour based on the contour information of the trapped area.

[0146] In one embodiment, the electronic device can determine the current position coordinates of the robot in the local map, and when, based on the current position coordinates and the contour information of the trapped area, the distance between the current position coordinates and the position closest to the robot on the contour of the trapped area is greater than a preset threshold, the second largest inner edge contour with the largest enclosed area of the trapped area is used as the inner edge contour.

[0147] Exemplarily, as shown in Figure 3(b), the distance between the current position coordinates of the robot 301 and the position closest to the robot on the contour of the trapped area is greater than a preset threshold, and the first maximum inner edge contour with the largest enclosing range of the trapped area is used as the inner edge contour 303.

[0148] In this embodiment, the electronic device can determine the second largest inner edge contour of the trapped area as the inner edge contour based on the contour information of the trapped area. In this way, the inner edge contour of the trapped area determined by the electronic device is the largest, and the subsequently generated escape reference trajectory and planned local path are all based on this largest inner edge contour, thereby ensuring that the robot can move along the largest inner edge of the trapped area closest to the obstacle to find the escape point, thereby improving the escape point perception ability.

[0149] As an implementation of an embodiment of the present application, the above step S102, i.e., the step of generating an escape reference trajectory along the inner edge contour according to the current position of the robot, may include:

[0150] In a case where the inner edge contour is a first maximum inner edge contour, taking the current position coordinates of the robot as a starting point, generating an escape reference trajectory of a preset length along the first maximum inner edge contour;

[0151] When the inner edge contour is the second maximum inner edge contour, the robot is controlled to move to the position on the second maximum inner edge contour that is closest to the current position coordinates of the robot, and this position is used as the starting point to generate a preset length of escape reference trajectory along the second maximum inner edge contour.

[0152] When the inner edge contour is the first maximum inner edge contour, since the first maximum inner edge contour includes the current position coordinates of the robot, the electronic device can use the current position coordinates of the robot as the starting point and generate a preset length of escape reference trajectory along the first maximum inner edge contour, wherein the preset length can be set according to actual needs, for example, the width of two robots, etc., and is not specifically limited here.

[0153] In this way, the generated escape reference trajectory takes the robot's current position coordinates as the starting point. When path planning is performed subsequently based on the escape reference trajectory, the planned path also takes the robot's current position as the starting point. By controlling the robot to move from the current position coordinates, it can move along the inner edge contour of the trapped area, thereby improving the robot's movement efficiency.

[0154] In the case where the inner edge contour is the second maximum inner edge contour, since the second maximum inner edge contour may not include the current position coordinates of the robot, the electronic device can first control the robot to move to the position on the second maximum inner edge contour that is closest to the current position coordinates of the robot, and use this position as the starting point to generate a preset length of escape reference trajectory along the second maximum inner edge contour.

[0155] In this way, since the robot is controlled to move to the second largest inner edge contour, the robot is subsequently controlled to move along the inner edge contour of the trapped area. The robot can always be at the outermost edge of the trapped contour, thereby improving the robot's ability to perceive the escape point that appears in the trapped area.

[0156] In this embodiment, when the inner edge contour is the first maximum inner edge contour, the electronic device can, with the robot's current position coordinates as the starting point, generate an escape reference trajectory of a preset length along the first maximum inner edge contour, thereby improving the robot's movement efficiency; when the inner edge contour is the second maximum inner edge contour, the electronic device can control the robot to move to the position on the second maximum inner edge contour that is closest to the robot's current position coordinates, and use this position as the starting point to generate an escape reference trajectory of a preset length along the second maximum inner edge contour, thereby improving the robot's ability to perceive the escape point. In the case where the inner edge contours of the trapped area are different, the starting point of the escape reference trajectory is determined based on the positional relationship between the robot's current position coordinates and the inner edge contour, thereby improving the overall escape efficiency.

[0157] As an implementation method of the present application, Figure 6 As shown, the method for determining the robot's escape may include:

[0158] S601: During movement of the robot, determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, wherein the global reference point is a reference point located outside the trapped area and has a known position;

[0159] S602: When the current position is connected to the global reference point, determine that the robot is out of trouble.

[0160] During the movement of the robot, since the robot is in a highly dynamic environment and the escape point appears randomly at any time, the inner edge contour of the trapped area will also change with the appearance of the escape point. The path planned by local path planning based on the escape reference trajectory generated by the inner edge contour and the obstacle information around the robot will also change. Therefore, by controlling the robot to move along the planned path, the robot can be controlled to leave the trapped area through the escape point and move outside the trapped area to achieve escape.

[0161] When the robot is at or passes through an escape point, the robot's current position is connected to a pre-stored, known global reference point located outside the trapped area. Connectivity means the robot can be controlled to move from its current position to the global reference point without colliding with obstacles. This global reference point can be the robot's charging station, the global starting point, or the task execution location, among other options, without specific limitations.

[0162] Based on this, in the process of controlling the movement of the robot, the electronic device can determine whether the current position is connected to the global reference point in the global map based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information.

[0163] In one embodiment, the electronic device can plan a path between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information; if the path between the current position and the global reference point cannot be planned, it is determined that the robot and the global reference point are not connected.

[0164] In one embodiment, the electronic device can determine all paths for the robot to reach the global reference point based on a pre-stored global reference point and the current position of the robot; determine whether the robot collides with an obstacle while moving along the planned path based on the currently detected obstacle information and the robot's contour information; and determine that there is no connectivity between the robot and the global reference object if a collision occurs on each path.

[0165] When the current position is connected to the global reference point, it can be determined that the robot is out of trouble. There is no need to execute the steps of the above-mentioned escape method. Path planning can be performed based on the current position of the robot and the task execution position of the task to be performed, and the robot can be controlled to move along the planned path to the task execution position.

[0166] When the current position is not connected to the global reference point, it can be determined that the robot has not escaped, and the above steps S101-S104 need to be continued to update the inner edge contour of the trapped area in real time and control the robot to continue searching for an escape point along the edge.

[0167] In this embodiment, during the robot's movement, the electronic device can determine whether the robot's current position is connected to the global reference point based on a pre-stored global reference point, the robot's current position, and currently detected obstacle information. The global reference point is a known reference point located outside the trapped area. If there is connectivity between the current position and the global reference point, the robot is determined to be free. In this way, during the process of controlling the robot's movement, the connectivity between the robot and the global reference point can be used to determine whether the robot has escaped. If the robot has escaped, there is no need to repeat the steps of the above-described escape method, thereby improving overall escape efficiency.

[0168] As an implementation method of the present application, Figure 7 As shown, before the above step S601, i.e., the step of determining whether the current position is connected to the global reference point based on the pre-stored global reference point, the current position of the robot, and the currently detected obstacle information, the robot escape method provided by the present application may further include:

[0169] S701: Determining whether the robot has escaped from an initial trapped area based on the current position, the initial trapped position, and the initial local map of the robot, wherein the initial local map is the local map of the robot when it enters the trapped state, and the initial trapped position is the position of the robot in the initial local map;

[0170] S702: When the robot escapes from the initial trapped area, the step of determining whether the current position is connected to the global reference point based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information is executed.

[0171] Since determining whether the robot is connected to the global reference point requires searching the global map for the path between the robot's current position and the global reference point, which requires high computing power, real-time judgment of the connectivity between the robot and the global reference point may cause a large computing power burden.

[0172] Based on this, in order to save computing power, before determining whether the robot is connected to the global reference point, the electronic device can first determine whether the robot has escaped from the initial trapped area based on the robot's current position, initial trapped position and initial local map.

[0173] The initial local map is the local map of the robot when it enters the trapped state, and the initial trapped position is the robot's position in the initial local map. Upon determining that the robot has entered the trapped state, the electronic device may record the local map of the robot when it entered the trapped state as the initial local map, and also record the robot's initial trapped position in the initial local map, obstacle information in the initial local map, and the initial trapped area.

[0174] When the robot escapes from the initially trapped area, the robot is considered to have escaped, and the electronic device can further verify by executing the above step S601, i.e., determining whether the current position is connected to the global reference point based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information.

[0175] If the robot has not escaped from the initial trapped area, continue to execute steps S101-S104, update the inner edge contour of the trapped area where the robot is located, and control the robot to move along the edge to find an escape point until it is determined that the robot has escaped from the initial trapped area, and then further verify whether the robot has escaped by executing the above-mentioned step S601, which is based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information, to determine whether the current position and the global reference point are connected.

[0176] In this embodiment, the electronic device can determine whether the robot has escaped from the initial trapped area based on the robot's current position, initial trapped position and initial local map, wherein the initial local map is the local map when the robot enters the trapped state, and the initial trapped position is the position of the robot in the initial local map; when the robot escapes from the initial trapped area, a step of determining whether the current position and the global reference point are connected based on a pre-stored global reference point, the robot's current position and the currently detected obstacle information is executed.

[0177] In this way, the electronic device can determine in real time whether the robot has escaped the initial trapped area. Since verifying whether the robot has escaped the initial trapped area does not require a global path search, it can effectively reduce computing power consumption compared to escape detection methods that require real-time detection of the robot's connectivity with a global reference point. Furthermore, if it is determined that the robot has escaped the initial trapped area, the robot's connectivity with the global reference point can be further verified to further verify whether the robot has escaped, thereby improving the accuracy of the escape detection results.

[0178] As an implementation of an embodiment of the present application, the above step S701, i.e., the step of determining whether the robot has escaped from the initial trapped area based on the current position, the initial trapped position, and the initial local map of the robot, may include:

[0179] The current position of the robot is mapped into the initial local map to obtain a mapped position corresponding to the current position; based on the obstacle information in the initial local map, it is determined whether the mapped position is connected to the initial trapped position; if there is no connection between the mapped position and the initial trapped position, it is determined that the robot has escaped from the initial trapped area.

[0180] When it is determined that the robot has entered a trapped state, the escape logic is triggered, and the electronic device can record the local map of the robot when it enters the trapped state as the initial local map, and record the robot's initial trapped position in the initial local map, obstacle information in the initial local map, and the initial trapped area.

[0181] After obtaining the current position of the robot, the electronic device can map the current position of the robot to the initial local map based on the mapping relationship between the current local map and the initial local map to obtain a mapping position corresponding to the current position.

[0182] Thereafter, the electronic device may determine whether the mapped location is connected to the initial trapped location based on the obstacle information in the initial local map.

[0183] If the mapped position is not connected to the initial trapped position, the robot can be determined to have escaped the initial trapped area because the points inside the initial trapped area are connected. If the mapped position is not connected to the initial trapped position, the robot can be determined to have not escaped the initial trapped area.

[0184] In one embodiment, when the electronic device determines that the robot has entered a trapped state, it can obtain the initial local map when the robot is in the trapped state, and expand the obstacles based on the obstacle information of the initial local map to obtain the expanded local map MapIn and the initial trapped position coordinates Pin of the robot in the initial local map. During the escape process, the current position coordinates of the robot are mapped to MapIn, and the connectivity of the mapped coordinates of the current position coordinates in MapIn with Pin is judged in real time; if the mapped coordinates are not connected with Pin, the robot may have completed the escape, and further determines whether the robot is connected with the global reference point.

[0185] For example, as shown in FIG8(a), when the electronic device determines that the robot 801 has entered a trapped state, it can obtain the initial local map at the time of the trapped state and expand the obstacle 802 based on the obstacle information in the initial local map, thereby obtaining the expanded local map MapIn and the initial trapped position coordinates Pin801 of the robot 801 in the initial local map, as well as the inner edge contour 803 of the trapped area where the robot 801 is located. During the escape process, the robot's current position coordinates are mapped to MapIn, and the connectivity of the mapped coordinates 804 of the current position coordinates in MapIn with Pin801 is determined in real time; since the mapped coordinates 804 are not connected to Pin801, the robot may have escaped, and further determination is made as to whether the robot 801 is connected to the global reference point.

[0186] In this embodiment, the electronic device can map the robot's current position onto an initial local map to obtain a mapped position corresponding to the current position; based on the obstacle information in the initial local map, determine whether the mapped position is connected to the initial trapped position; and if the mapped position is not connected to the initial trapped position, determine that the robot has escaped the initial trapped area. Determining whether the robot has escaped based on the connectivity between the mapped coordinates of the robot's current position in the initial local map and the initial trapped position can improve the efficiency of escape determination.

[0187] As an implementation of an embodiment of the present application, the above step S701, i.e., the step of determining whether the robot has escaped from the initial trapped area based on the current position, the initial trapped position, and the initial local map of the robot, may include:

[0188] Based on the initial trapped position and the obstacle information in the initial local map, the passable area where the robot is located is marked in the initial local map; the current position of the robot is mapped to the initial local map to obtain the mapping position corresponding to the current position, and determine whether the mapping position is located in the passable area. If the mapping position is not in the passable area, determine that the robot has escaped from the initial trapped area.

[0189] When it is determined that the robot has entered a trapped state, the escape logic is triggered, and the electronic device can record the local map of the robot when it enters the trapped state as the initial local map, and record the robot's initial trapped position in the initial local map, obstacle information in the initial local map, and the initial trapped area.

[0190] The electronic device can further process the initial local map and mark all feasible areas where the robot's initial trapped position is located into special pixels to distinguish the initial trapped area from the non-trapped area.

[0191] After obtaining the current position of the robot, the electronic device can map the current position of the robot to the initial local map based on the mapping relationship between the current local map and the initial local map to obtain a mapping position corresponding to the current position.

[0192] The electronic device may then determine whether the mapped location is within a traversable area.

[0193] When the mapped position is not within the passable area, it can be determined that the robot has escaped from the initial trapped area; and when the mapped position is within the passable area, it can be determined that the robot has not escaped from the initial trapped area.

[0194] In one embodiment, when the electronic device determines that the robot has entered a trapped state, it can obtain the initial local map when the robot is in the trapped state, and expand the obstacles based on the obstacle information of the initial local map to obtain the expanded local map MapIn and the passable area where the initial trapped position coordinates Pin of the robot in the initial local map are located, and mark all the passable areas as special pixels S.

[0195] During the escape process, the robot's current position coordinates are mapped to MapIn, and it is determined in real time whether the mapped coordinates of the current position coordinates are located in the area marked as special pixels S; if not, the robot may have completed the escape, and further determine whether the robot is connected to the global reference point.

[0196] For example, as shown in FIG8( b ), when the electronic device determines that the robot 801 has entered a trapped state, it can obtain the initial local map of the trapped state, and expand the obstacle 802 based on the obstacle information of the initial local map to obtain the expanded local map MapIn and the passable area 803 where the initial trapped position coordinates PIn of the robot 801 in the initial local map are located, and mark all the passable areas as special pixels S.

[0197] During the escape process, the current position coordinates of robot 801 are mapped to MapIn, and a real-time determination is made as to whether the mapped coordinates 804 of the current position coordinates are within the area identified as special pixel S. Since the mapped coordinates 804 of the robot are not within the area identified as special pixel S, robot 801 may have escaped, and further determination can be made as to whether the robot is connected to the global reference point.

[0198] In this embodiment, the electronic device can mark the traversable area where the robot is located in the initial local map based on the initial trapped position and the obstacle information in the initial local map; map the robot's current position to the initial local map, obtain the mapped position corresponding to the current position, and determine whether the mapped position is within the traversable area. If the mapped position is not within the traversable area, the electronic device determines that the robot has escaped the initial trapped area. By marking the traversable area where the robot's initial trapped position is located in the initial local map and determining whether the mapped coordinates of the robot's current position are within the traversable area, the efficiency of the escape determination can be improved.

[0199] As an implementation of an embodiment of the present application, before the above step S101, i.e., the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, the robot escape method provided by the present application may further include:

[0200] Based on a pre-stored global reference point and the current position of the robot, determine whether the robot is connected to the global reference point, wherein the global reference point is a reference point with a known position located outside the trapped area; if there is no connection between the robot and the global reference point, determine that the robot has entered a trapped state.

[0201] When the robot is surrounded by obstacles, the robot is disconnected from the global reference point with a known position outside the trapped area, that is, there is no movable path between the robot and the global reference point without colliding with obstacles.

[0202] Based on this, the electronic device can determine whether the robot is in a trapped state by determining whether the robot is connected to the global reference point based on the pre-stored global reference point and the current position of the robot.

[0203] In the absence of connectivity between the robot and the global reference point, the electronic device may determine that the robot has entered a trapped state.

[0204] When the robot is connected to the global reference point, the electronic device can determine that the robot is not trapped.

[0205] In this embodiment, the electronic device can determine whether the robot is connected to the global reference point based on a pre-stored global reference point and the robot's current position. If the robot is not connected to the global reference point, the electronic device determines that the robot has entered a trapped state. By determining whether the robot is in a trapped state, the electronic device can improve the efficiency of detecting the robot's trapped state and simplify the robot's trapped state detection logic.

[0206] As an implementation of an embodiment of the present application, the step of determining whether the robot is connected to the global reference point based on a pre-stored global reference point and the current position of the robot may include:

[0207] Based on a pre-stored global reference point, the current position of the robot and the currently detected obstacle information, a path between the current position and the global reference point is planned; if a path between the current position and the global reference point cannot be planned, it is determined that the robot is not connected to the global reference point.

[0208] The electronic device may plan a path between the current position and the global reference point based on the pre-stored global reference point, the current position of the robot, and currently detected obstacle information.

[0209] If the global trajectory between the robot and the global reference point cannot be planned, then there is no moving path between the robot and the global reference point, and it is determined that the robot and the global reference point are not connected.

[0210] If at least one global trajectory between the robot and the global reference point can be planned, then it is determined that the robot and the global reference point are connected.

[0211] In this embodiment, the electronic device can plan a path between the robot's current position and the global reference point based on a pre-stored global reference point, the robot's current position, and currently detected obstacle information. If a path between the current position and the global reference point cannot be planned, the electronic device determines that the robot and the global reference point are disconnected. Determining whether the robot is trapped based on whether a path can be planned between the robot and the global reference point can simplify the logic for detecting trapped states and improve the efficiency of trapped state detection.

[0212] As an implementation of an embodiment of the present application, the step of determining whether the robot is connected to the global reference point based on a pre-stored global reference point and the current position of the robot may include:

[0213] Based on a pre-stored global reference point and the current position of the robot, all paths for the robot to reach the global reference point are determined; based on the currently detected obstacle information and the contour information of the robot, whether the robot collides with an obstacle while moving along the planned path is determined; if a collision occurs on each path, it is determined that there is no connection between the robot and the global reference object.

[0214] By planning the path between the robot and the global reference point without considering obstacles, multiple paths between the robot and the global reference point can be planned.

[0215] Based on this, the electronic device can determine the entire path for the robot to reach the global reference point based on the pre-stored global reference point and the current position of the robot.

[0216] Afterwards, the electronic device can determine, for each path, whether the robot collides with an obstacle while moving along the path based on the currently detected obstacle information and the contour information of the robot.

[0217] If a collision occurs on each path, it can be determined that the robot is not connected to the global reference object. If a collision does not occur on at least one path, it can be determined that the robot is connected to the global reference object.

[0218] In this embodiment, the electronic device can determine all paths the robot can take to reach the global reference point based on a pre-stored global reference point and the robot's current position. Based on currently detected obstacle information and the robot's profile, the electronic device can determine whether the robot will collide with any obstacle while moving along the planned path. If a collision occurs along any path, the electronic device determines that the robot is disconnected from the global reference point. By determining whether the robot collides with any obstacle along each planned path between the robot and the global reference point, it can verify whether the robot is trapped.

[0219] Corresponding to the robot escape method, the present embodiment also provides a robot escape device.

[0220] like Figure 9 As shown, a robot escape device includes:

[0221] An inner edge contour determining module 901 is configured to determine, in response to the robot being in a trapped state, an inner edge contour of the trapped area where the robot is located based on obstacle information around the robot;

[0222] A reference trajectory determination module 902 is configured to generate an escape reference trajectory along the inner edge contour according to the current position of the robot;

[0223] A path planning module 903 is configured to plan a local path based on the escape reference trajectory and currently detected obstacle information, and control the robot to move along the planned local path;

[0224] The return module 904 is used to return to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is out of trouble.

[0225] The technical solution provided by the embodiment of the present application is that the electronic device, in response to the robot being in a trapped state, determines the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot; generates an escape reference trajectory along the inner edge contour according to the current position of the robot; performs local path planning according to the escape reference trajectory and the currently detected obstacle information, and controls the robot to move along the planned local path; returns to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is escaped.

[0226] In this way, the robot is controlled to move along the inner edge contour of the trapped area to find the escape gap that appears at any time in a high dynamic environment, and during the movement of the robot, the inner edge contour of the trapped area where the robot is located is updated in real time based on the obstacle information detected around the robot, thereby updating the escape reference trajectory generated based on the inner edge contour to control the robot to keep moving along the edge, thereby grasping each escape opportunity to control the robot to leave the escape area to achieve escape, greatly improving the robot's escape effect.

[0227] As an implementation of the embodiment of the present application, the inner edge contour determination module 901 includes:

[0228] an expansion submodule, configured to expand each obstacle in the local map based on the device size of the robot and information about obstacles around the robot, to obtain a local map after the obstacles are expanded;

[0229] The contour extraction submodule is used to extract the contour information of the trapped area where the robot is located in the local map after the obstacle is expanded, and determine the inner edge contour of the trapped area where the robot is located.

[0230] As an implementation of the embodiment of the present application, the expansion submodule includes:

[0231] an expansion distance determining unit, configured to use half of the width of the robot as the expansion distance;

[0232] The expansion unit is used to expand each obstacle in the local map according to the expansion distance.

[0233] As an implementation of an embodiment of the present application, the contour extraction submodule includes:

[0234] An inner edge contour determining unit is used to determine, based on the current position coordinates of the robot in the local map and the contour information of the trapped area, a first maximum inner edge contour including the current position coordinates as the inner edge contour; or, based on the contour information of the trapped area, determine the second maximum inner edge contour of the trapped area as the inner edge contour.

[0235] As an implementation of the embodiment of the present application, the reference trajectory determination module 902 includes:

[0236] A first trajectory generating submodule is configured to generate an escape reference trajectory of a preset length along the first maximum inner edge contour with the current position coordinates of the robot as a starting point when the inner edge contour is a first maximum inner edge contour;

[0237] The second trajectory generation submodule is used to control the robot to move to the position on the second maximum inner edge contour that is closest to the current position coordinates of the robot when the inner edge contour is the second maximum inner edge contour, and use this position as the starting point to generate a preset length of escape reference trajectory along the second maximum inner edge contour.

[0238] As an implementation of an embodiment of the present application, the device further includes an escape determination module, including:

[0239] a first determining submodule, configured to determine, during movement of the robot, whether connectivity exists between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, wherein the global reference point is a reference point with a known position outside the trapped area;

[0240] The escape determination submodule is configured to determine whether the robot is escaped when the current position is connected to the global reference point.

[0241] As an implementation of the embodiment of the present application, the device further includes:

[0242] a first determining module, configured to determine whether the robot has escaped from an initial trapped area based on the robot's current position, an initial trapped position, and an initial local map, before the step of determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the robot's current position, and currently detected obstacle information, wherein the initial local map is a local map of the robot when it enters a trapped state, and the initial trapped position is the position of the robot in the initial local map; and triggering an execution module when the robot escapes from the initial trapped area;

[0243] The execution module is used to execute the step of determining whether the current position is connected to the global reference point based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information.

[0244] As an implementation manner of the embodiment of the present application, the first determining module includes:

[0245] The second determination submodule is used to map the current position of the robot to the initial local map to obtain the mapping position corresponding to the current position; determine whether the mapping position is connected to the initial trapped position based on the obstacle information in the initial local map; if the mapping position is not connected to the initial trapped position, determine that the robot has escaped from the initial trapped area; or, based on the initial trapped position and the obstacle information in the initial local map, mark the passable area where the robot is located in the initial local map; map the current position of the robot to the initial local map to obtain the mapping position corresponding to the current position, and determine whether the mapping position is located in the passable area. If the mapping position is not in the passable area, determine that the robot has escaped from the initial trapped area.

[0246] As an implementation of the embodiment of the present application, the device further includes:

[0247] a second determining module, configured to determine, before the step of determining an inner edge contour of a trapped area where the robot is located based on obstacle information surrounding the robot, whether the robot is connected to a pre-stored global reference point and a current position of the robot, wherein the global reference point is a reference point located outside the trapped area and has a known position;

[0248] The trapped state determining module is used to determine that the robot enters a trapped state when there is no communication between the robot and the global reference point.

[0249] As an implementation manner of the embodiment of the present application, the second determining module includes:

[0250] The third determination submodule is used to plan a path between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot and the currently detected obstacle information; if the path between the current position and the global reference point cannot be planned, determine that the robot is not connected to the global reference point; or, based on the pre-stored global reference point and the current position of the robot, determine all paths for the robot to reach the global reference point; determine whether the robot collides with an obstacle during the movement along the planned path based on the currently detected obstacle information and the contour information of the robot; if a collision occurs on each path, determine that the robot is not connected to the global reference object.

[0251] The present application also provides an electronic device, such as Figure 10 Shown, including:

[0252] Memory 1001, used for storing computer programs;

[0253] The processor 1002 is configured to implement the robot escape method provided in the embodiment of the present application when executing the program stored in the memory 1001 .

[0254] Furthermore, the electronic device may further include a communication bus and / or a communication interface, and the processor 1002, the communication interface, and the memory 1001 communicate with each other via the communication bus.

[0255] The technical solution provided by the embodiment of the present application is that the electronic device, in response to the robot being in a trapped state, determines the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot; generates an escape reference trajectory along the inner edge contour according to the current position of the robot; performs local path planning according to the escape reference trajectory and the currently detected obstacle information, and controls the robot to move along the planned local path; returns to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is escaped.

[0256] In this way, the robot is controlled to move along the inner edge contour of the trapped area to find the escape gap that appears at any time in a high dynamic environment, and during the movement of the robot, the inner edge contour of the trapped area where the robot is located is updated in real time based on the obstacle information detected around the robot, thereby updating the escape reference trajectory generated based on the inner edge contour to control the robot to keep moving along the edge, thereby grasping each escape opportunity to control the robot to leave the escape area to achieve escape, greatly improving the robot's escape effect.

[0257] The communication bus mentioned in the electronic device mentioned above may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is used in the figure, but this does not mean that there is only one bus or only one type of bus.

[0258] The communication interface is used for communication between the above electronic device and other devices.

[0259] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk memory. Alternatively, the memory may be at least one storage device located away from the processor.

[0260] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, and discrete hardware components.

[0261] In another embodiment provided in the present application, a computer-readable storage medium is further provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps of any of the above-mentioned robot escape methods are implemented.

[0262] In another embodiment provided by the present application, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the method for escaping a robot in any of the above embodiments.

[0263] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state drive (SSD).

[0264] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply the existence of any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element.

[0265] Each embodiment in this specification is described in a related manner. Similar portions between embodiments can be referenced to each other. Each embodiment focuses on the differences between other embodiments. In particular, the device, electronic device, computer-readable storage medium, and computer program product embodiments are generally similar to the method embodiments, so their descriptions are relatively simple. For related portions, reference can be made to the descriptions of the method embodiments.

[0266] The above description is only a preferred embodiment of the present application and is not intended to limit the scope of protection of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application are included in the scope of protection of the present application.

Claims

1. A method for escaping a robot, characterized in that: The method comprises: In response to the robot being in a trapped state, determining an inner edge contour of a trapped area where the robot is located based on obstacle information around the robot; generating an escape reference trajectory along the inner edge contour according to the current position of the robot; Performing local path planning based on the escape reference trajectory and currently detected obstacle information, and controlling the robot to move along the planned local path; Return to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, until it is determined that the robot is out of trouble.

2. The method according to claim 1, characterized in that The step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot includes: Based on the device size of the robot and information about obstacles around the robot, each obstacle is expanded in the local map to obtain a local map after the obstacles are expanded; In the local map after the obstacle is expanded, the contour information of the trapped area where the robot is located is extracted, and the inner edge contour of the trapped area where the robot is located is determined.

3. The method according to claim 1, characterized in that The step of expanding each obstacle in the local map based on the device size of the robot and obstacle information around the robot includes: Taking half of the width of the robot as the expansion distance; Each obstacle in the local map is expanded according to the expansion distance.

4. The method according to claim 2, characterized in that The step of determining the inner edge contour of the trapped area where the robot is located comprises: Based on the current position coordinates of the robot in the local map and the contour information of the trapped area, determining a first maximum inner edge contour including the current position coordinates as the inner edge contour; or, Based on the contour information of the trapped area, a second maximum inner edge contour of the trapped area is determined as the inner edge contour.

5. The method according to claim 4, characterized in that The step of generating an escape reference trajectory along the inner edge contour according to the current position of the robot comprises: In a case where the inner edge contour is a first maximum inner edge contour, taking the current position coordinates of the robot as a starting point, generating an escape reference trajectory of a preset length along the first maximum inner edge contour; When the inner edge contour is the second maximum inner edge contour, the robot is controlled to move to the position on the second maximum inner edge contour that is closest to the current position coordinates of the robot, and this position is used as the starting point to generate a preset length of escape reference trajectory along the second maximum inner edge contour.

6. The method according to any one of claims 1 to 5, characterized in that Determining a method for the robot to escape from distress, including: During movement of the robot, determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, wherein the global reference point is a reference point with a known position outside the trapped area; In a case where the current position is connected to the global reference point, it is determined that the robot is out of trouble.

7. The method according to claim 6, characterized in that Before the step of determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, the method further includes: Determining whether the robot has escaped from an initial trapped area based on the current position of the robot, an initial trapped position, and an initial local map, wherein the initial local map is a local map of the robot when it enters a trapped state, and the initial trapped position is the position of the robot in the initial local map; When the robot escapes from the initial trapped area, the step of determining whether the current position is connected to the global reference point based on the pre-stored global reference point, the current position of the robot and the currently detected obstacle information is executed.

8. The method according to claim 7, characterized in that The step of determining whether the robot has escaped from the initial trapped area based on the current position of the robot, the initial trapped position, and the initial local map comprises: Mapping the current position of the robot to the initial local map to obtain a mapped position corresponding to the current position; determining whether the mapped position is connected to the initial trapped position based on obstacle information in the initial local map; and determining that the robot has escaped from the initial trapped area if the mapped position is not connected to the initial trapped position; or Based on the initial trapped position and the obstacle information in the initial local map, the passable area where the robot is located is marked in the initial local map; the current position of the robot is mapped to the initial local map to obtain the mapping position corresponding to the current position, and determine whether the mapping position is located in the passable area. If the mapping position is not in the passable area, determine that the robot has escaped from the initial trapped area.

9. The method according to any one of claims 1 to 5, characterized in that Before the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot, the method further includes: Determining whether the robot is connected to a pre-stored global reference point and a current position of the robot, wherein the global reference point is a reference point located outside the trapped area and has a known position; In a case where there is no communication between the robot and the global reference point, it is determined that the robot enters a trapped state.

10. The method according to claim 9, characterized in that The step of determining whether the robot is connected to the global reference point based on a pre-stored global reference point and the current position of the robot comprises: planning a path between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information; and determining that the robot is not connected to the global reference point if a path between the current position and the global reference point cannot be planned; or Based on a pre-stored global reference point and the current position of the robot, all paths for the robot to reach the global reference point are determined; based on the currently detected obstacle information and the contour information of the robot, whether the robot collides with an obstacle while moving along the planned path is determined; if a collision occurs on each path, it is determined that there is no connection between the robot and the global reference object.

11. A robot escape device, characterized in that: The device comprises: an inner edge contour determining module, configured to determine, in response to the robot being in a trapped state, an inner edge contour of a trapped area where the robot is located based on obstacle information surrounding the robot; A reference trajectory determination module, configured to generate an escape reference trajectory along the inner edge contour according to the current position of the robot; A path planning module is used to plan a local path based on the escape reference trajectory and the currently detected obstacle information, and control the robot to move along the planned local path; A return module is used to return to the step of determining the inner edge contour of the trapped area where the robot is located based on the obstacle information around the robot until it is determined that the robot is out of trouble.

12. The device according to claim 11, characterized in that The inner edge contour determination module includes: an expansion submodule, configured to expand each obstacle in the local map based on the device size of the robot and information about obstacles around the robot, to obtain a local map after the obstacles are expanded; a contour extraction submodule, configured to extract contour information of the trapped area of the robot from the local map after the obstacle is expanded, and determine the inner edge contour of the trapped area of the robot; and / or, The expansion submodule includes: an expansion distance determining unit, configured to use half of the width of the robot as the expansion distance; an expansion unit, configured to expand each obstacle in the local map according to the expansion distance; and / or, The contour extraction submodule includes: an inner edge contour determining unit, configured to determine, based on the current position coordinates of the robot in the local map and the contour information of the trapped area, a first maximum inner edge contour including the current position coordinates as the inner edge contour; or, based on the contour information of the trapped area, determine a second maximum inner edge contour of the trapped area as the inner edge contour; and / or, The reference trajectory determination module includes: A first trajectory generating submodule is configured to generate an escape reference trajectory of a preset length along the first maximum inner edge contour with the current position coordinates of the robot as a starting point when the inner edge contour is a first maximum inner edge contour; A second trajectory generating submodule is configured to, when the inner edge contour is a second maximum inner edge contour, control the robot to move to a position on the second maximum inner edge contour that is closest to the current position coordinates of the robot, and use the position as a starting point to generate an escape reference trajectory of a preset length along the second maximum inner edge contour; and / or, The device further includes a rescue determination module, including: a first determining submodule, configured to determine, during movement of the robot, whether connectivity exists between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information, wherein the global reference point is a reference point with a known position outside the trapped area; an escape determination submodule, configured to determine that the robot is escaped when there is communication between the current position and the global reference point; and / or, The device further comprises: a first determining module, configured to determine whether the robot has escaped from an initial trapped area based on the robot's current position, an initial trapped position, and an initial local map, before the step of determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the robot's current position, and currently detected obstacle information, wherein the initial local map is a local map of the robot when it enters a trapped state, and the initial trapped position is the position of the robot in the initial local map; and triggering an execution module when the robot escapes from the initial trapped area; The execution module is configured to execute the step of determining whether the current position is connected to the global reference point based on a pre-stored global reference point, the current position of the robot, and currently detected obstacle information; and / or, The first determining module includes: A second determination submodule is configured to map the current position of the robot to the initial local map to obtain a mapped position corresponding to the current position; determine whether the mapped position is connected to the initial trapped position based on the obstacle information in the initial local map; and determine that the robot has escaped from the initial trapped area if the mapped position is not connected to the initial trapped position; or, based on the initial trapped position and the obstacle information in the initial local map, mark the passable area where the robot is located in the initial local map; map the current position of the robot to the initial local map to obtain a mapped position corresponding to the current position, and determine whether the mapped position is located in the passable area. If the mapped position is not in the passable area, determine that the robot has escaped from the initial trapped area; and / or, The device further comprises: a second determining module, configured to determine, before the step of determining an inner edge contour of a trapped area where the robot is located based on obstacle information surrounding the robot, whether the robot is connected to a pre-stored global reference point and a current position of the robot, wherein the global reference point is a reference point located outside the trapped area and has a known position; a trapped state determining module, configured to determine that the robot has entered a trapped state when there is no communication between the robot and the global reference point; and / or The second determining module includes: The third determination submodule is used to plan a path between the current position and the global reference point based on a pre-stored global reference point, the current position of the robot and the currently detected obstacle information; if the path between the current position and the global reference point cannot be planned, determine that the robot is not connected to the global reference point; or, based on the pre-stored global reference point and the current position of the robot, determine all paths for the robot to reach the global reference point; determine whether the robot collides with an obstacle during the movement along the planned path based on the currently detected obstacle information and the contour information of the robot; if a collision occurs on each path, determine that the robot is not connected to the global reference object.

13. An electronic device, characterized in that: include: Memory for storing computer programs; A processor, configured to implement the method according to any one of claims 1 to 10 when executing a program stored in a memory.

14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Detecting method of whether robot is trapped and processing method of getting out of trap

    CN107943025A

  • Mobile robot escape processing method and device and mobile robot

    CN114721396A

  • Robot control method and device, robot and computer readable storage medium

    CN116000924A

  • Robot, method for controlling robot to travel along wall, system, and storage medium

    WO2025073081A1