Escape method, device, apparatus and readable storage medium
By integrating data from multiple environmental sensing sensors to update the cost map, the self-moving device can efficiently determine the escape direction when trapped, solving the problems of long time consumption and poor safety in existing technologies, and achieving rapid and safe escape.
Patent Information
- Application Number
- CN202310749697.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-25
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2043-06-25
AI Technical Summary
Existing self-moving devices are time-consuming and unsafe when encountering obstacles, and cannot effectively cope with complex environments.
By integrating data from multiple environmental perception sensors to update the original cost map, a current cost map is generated. The escape direction is determined based on the current cost map. This method eliminates the need to rotate in place to find a gap, thus improving escape efficiency and safety.
It enables efficient escape of self-moving equipment in a trapped state, improves the accuracy and safety of the escape direction, and reduces the time spent rotating to find a gap.
Smart Images

Figure CN116766225B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present application relate to the technical field of self-moving robots, and in particular to a method and device for escaping from a trapped state, a device, and a readable storage medium. BACKGROUND
[0002] With the development of artificial intelligence (AI), various self-moving devices are increasingly applied in various fields, such as service robots, cleaning robots, self-moving vending robots, etc.
[0003] During the travel, if the self-moving device is trapped by an obstacle, the self-moving device rotates in place, determines an escape direction based on environmental data collected by an environmental perception sensor, and travels according to the escape direction to escape from the trapped state.
[0004] However, the current escape method is time-consuming and has poor safety. SUMMARY
[0005] Embodiments of the present application provide a method and device for escaping from a trapped state, a device, and a readable storage medium, which fuse first environmental data collected by multiple environmental perception sensors into a current cost map, and determine an escape direction based on the current cost map fused with various sensor data, thereby achieving high escape efficiency and high safety.
[0006] In a first aspect, embodiments of the present application provide a method for escaping from a trapped state, applied to a self-moving device, and the method comprises:
[0007] During the operation of the self-moving device, a first environmental data collected by at least two environmental perception sensors is used to update an original cost map to obtain a current cost map, and each environmental perception sensor is arranged on the self-moving device;
[0008] When the self-moving device is in a trapped state, an escape direction is determined based on the current cost map;
[0009] The self-moving device escapes according to the escape direction.
[0010] In a second aspect, embodiments of the present application provide a device for escaping from a trapped state, comprising:
[0011] An updating module is configured to, during the operation of the self-moving device, update an original cost map based on first environmental data collected by at least two environmental perception sensors to obtain a current cost map, and each environmental perception sensor is arranged on the self-moving device;
[0012] A processing module is configured to, when the self-moving device is in a trapped state, determine an escape direction based on the current cost map;
[0013] An escaping module is configured to escape according to the escape direction.
[0014] In a third aspect, an electronic device is provided, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to enable the electronic device to implement the method according to the first aspect or any possible implementation of the first aspect.
[0015] In a fourth aspect, a non-volatile computer readable storage medium is provided, which stores computer instructions, and the computer instructions are executable on a processor to implement the method according to the first aspect or any possible implementation of the first aspect.
[0016] In a fifth aspect, a computer program product is provided, which includes a computer program executable on a processor to implement the method according to the first aspect or any possible implementation of the first aspect.
[0017] The self-moving device is provided with a plurality of environment perception sensors, and the self-moving device pre-stores an original cost map and a global environment map. During operation, the self-moving device updates the original cost map by using first environment data collected by the plurality of environment perception sensors to obtain a current cost map. When the self-moving device is in a trapped state, a direction for escaping from the trapped state is determined according to the current cost map, and the self-moving device escapes from the trapped state according to the direction. According to the scheme, the self-moving device does not need to rotate in place to find a gap direction and then escape from the trapped state, but updates the original cost map according to the first environment data collected by the plurality of environment perception sensors to indicate a current environment condition to obtain the current cost map, and determines the direction for escaping from the trapped state according to the current cost map, so that the efficiency of escaping from the trapped state is high and the safety is high. In addition, by fusing the first environment data of the plurality of environment perception sensors into the current cost map, the self-moving device can more comprehensively master obstacle information in the surrounding environment, which helps to improve the accuracy of the direction for escaping from the trapped state. BRIEF DESCRIPTION OF DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings needed in the embodiment description. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0019] Figure 1A is a whole schematic diagram of a self-moving device for executing the method for escaping from a trapped state provided by the embodiments of the present application;
[0020] Figure 1B is Figure 1A is a schematic diagram of the detection range of various sensors in
[0021] Figure 1C is a back view of Figure 1A ;
[0022] Figure 1D is a front view of Figure 1A ;
[0023] Figure 1E is a side view of Figure 1A ;
[0024] Figure 2 is a flowchart of the method for escaping from a predicament provided by the embodiments of the present application;
[0025] Figure 3 is a process diagram of the generation of the original cost map in the method for escaping from a predicament provided by the embodiments of the present application;
[0026] Figure 4 is a schematic diagram of the grid map and the sub-layers in the method for escaping from a predicament provided by the embodiments of the present application;
[0027] Figure 5A is a motion trajectory predicted by the forward kinematics simulation in the method for escaping from a predicament provided by the embodiments of the present application;
[0028] Figure 5B is a corresponding flowchart; Figure 5A
[0029] Figure 6A is a schematic diagram of the actual environment of the self-moving device in the method for escaping from a predicament provided by the embodiments of the present application;
[0030] Figure 6B is a corresponding schematic diagram of the current cost map and the local cost map; Figure 6A
[0031] is a schematic diagram of a device for escaping from a predicament provided by the embodiments of the present application; Figure 7
[0032] is a schematic diagram of the structure of an electronic device provided by the embodiments of the present application. Figure 8 DETAILED DESCRIPTION
[0033] The self-moving device is also called a robot, an autonomous mobile device, a self-moving robot, etc., and is widely applied in various industries because it can free human hands, etc.
[0034] After entering an unfamiliar environment, the self-moving device creates an environment map by combining technologies such as simultaneous localization and mapping (SLAM). Subsequently, the self-moving device plans a travel path based on the environment map, travels and works according to the planned path. When encountering an obstacle, the self-moving device avoids the obstacle. If the self-moving device cannot bypass the obstacle, it means that the self-moving device is trapped by the obstacle. At this time, the self-moving device needs to escape from the trap.
[0035] In one way, the self-moving device rotates in place while using a ranging sensor to determine whether there is a passable gap in front. If there is a passable gap in front, the self-moving device travels towards the passable gap to escape from the trap. If there is no passable gap in front, the self-moving device issues an alarm. The ranging sensor is, for example, a laser radar.
[0036] In another way, the self-moving device is stationary in place, uses an ultrasonic sensor to detect the distance between itself and surrounding obstacles, and selects an escape direction by synthesizing the distances detected in each direction. There is no obstacle in the escape direction, or the obstacle in the escape direction is farthest from the self-moving device.
[0037] In yet another way, the self-moving device rotates in place while using an optical sensor to identify the positions of objects in the surrounding environment, and then determines an escape direction to escape from the trap.
[0038] In the above escape methods, the self-moving device needs to rotate in place when determining the escape direction based on sensor information, which is time-consuming. Moreover, even if rotation is not required, the escape direction is determined based on environment data collected by a single sensor, which cannot cope with complex environments and is highly dangerous.
[0039] Therefore, embodiments of the present application provide an escape method, device, equipment and readable storage medium, which fuse first environment data collected by multiple environment perception sensors into a current cost map, and determine an escape direction based on the current cost map, so as to have high escape efficiency and high safety.
[0040] The escape method provided by the embodiments of the present application is applied to a self-moving device, which refers to an electronic device capable of autonomous movement and intelligent control. For example, the self-moving device is a robot near an entrance of a shopping mall, a library or a museum, which has a guiding function. For another example, the self-moving device is a robot in a shopping mall or a museum, which has a guiding function. For another example, the self-moving device is a carrying robot in a library or a canteen. Through the self-moving device, unattended operation of various work can be realized.
[0041] Below, taking a self-moving device as a guide robot as an example, the self-moving device provided by the embodiments of the present application is described. It should be noted that although the structure of the self-moving device provided by the embodiments of the present application is illustrated by taking a guide robot as an example in FIG. 1, it does not mean that the self-moving device provided by the present application can only be implemented as a guide robot.
[0042] Figure 1A is a schematic diagram of the self-moving device provided by the embodiments of the present application for performing the method for escaping from a trouble. Please refer to Figure 1A , the self-moving device is a guide robot with a display screen. In addition to the display screen, the guide robot also includes a chassis, a support rod, etc. The chassis is used to provide power for the movement and steering of the guide robot. A plurality of sensors are also arranged on the guide robot, which are distributed on the support rod, the display screen or the base of the guide robot. For example, a depth camera 11, a wide-angle camera 12 and a planar TOF (time of fly) sensor 18 are arranged on the support rod of the guide robot. An ultrasonic sensor 13 is arranged on each of the four corners of the display screen. A laser radar 14 is arranged on the base. The laser radar 14 and the support rod are arranged on the same face of the base. A cliff detection sensor 15 and an ultrasonic sensor 16 are arranged on the side face of the base. The cliff detection sensor 15 is used to detect whether there is a step or a cliff in the direction of travel. The ultrasonic sensor 16 is used to detect whether there is a transparent material such as glass or plastic in front. A downward-looking sensor 17 is also arranged on the bottom of the base, which is used to detect whether there is a cliff in all directions in the direction of travel.
[0043] In the embodiments of the present application, the various sensors on the guide robot constitute a 3D environment perception system, which can ensure that the guide robot can sensitively perceive the surrounding environment during travel and ensure safety.
[0044] Figure 1B is a schematic diagram of the detection range of the various sensors in Figure 1A . Please refer to Figure 1A and 1B , the top of the support rod of the guide robot and the lower end of the display screen are both provided with a depth camera. The detection range of the depth camera is as shown in S1. The detection range of the wide-angle camera 12 is as shown in S2. The detection range of the planar TOF 18 is as shown in S8. The detection range of the ultrasonic sensor 13 on the display screen is as shown in S3 in the figure. The detection range of the laser radar 14 is as shown in S4 in the figure. The detection range of the cliff detection sensor 15 on the base is as shown in S5 in the figure. The detection range of the ultrasonic sensor 16 on the base is as shown in S6 in the figure. The detection range of the downward-looking sensor 17 is as shown in S7 in the figure. The detection range of the wide-angle camera is not shown in the figure. It can be understood that although Figure 1BThe detection ranges of various sensors are shown in a planar manner, but in fact, the detection ranges of various sensors are three-dimensional in space, and the corresponding spatial regions partially or entirely overlap.
[0045] Figure 1C is a back view of Figure 1A is a front view of Figure 1D is a side view of Figure 1A is a side view of Figure 1E is a side view of Figure 1A Please refer to Figures 1C-1E Various types of sensors are arranged on the robot, which constructs a 3D environment perception system for the robot, thereby ensuring the safety of the robot and ensuring that the robot can correctly guide the user.
[0046] It should be noted that the positions and numbers of various sensors in the above Figures 1A-1E are merely illustrative, and embodiments of the present application are not limited. In practice, any number of sensors can be arranged at any position of the robot according to requirements. In addition, the wide-angle camera 12 and the like can not be used for navigation, but have other purposes.
[0047] In embodiments of the present application, the self-moving device pre-creates and stores an original cost map and an environment map, plans a path using the environment map, travels and works according to the path. At the same time, various environment perception sensors are used to collect first environment data of the surrounding environment, and the original cost map is updated using the first environment data, thereby obtaining a current cost map.
[0048] During the travel of the self-moving device, if an obstacle is encountered, the obstacle is avoided. If the obstacle cannot be avoided, it means that the self-moving device is in a trapped state. At this time, the self-moving device determines an escape direction to escape using the current cost map.
[0049] It should be noted that although the device body 11 of the self-moving device 100 in the above Fig. 1 is circular. However, embodiments of the present application are not limited thereto, and in other feasible implementation manners, the device body 11 can also be circular, square or irregular, etc.
[0050] Figure 2 is a flowchart of the escape method provided by embodiments of the present application. The execution subject of the present embodiment is a self-moving device. The present embodiment includes:
[0051] 201. During the operation of the self-moving device, the first environment data collected by at least two environment perception sensors is used to update an original cost map, thereby obtaining a current cost map, and each environment perception sensor is arranged on the self-moving device.
[0052] In the embodiments of the present application, the cost map is a data format commonly used when the self-moving device performs local obstacle avoidance. The space around the self-moving device is divided into a plurality of grids to represent the corresponding unit area in the real world, and the detected obstacles are mapped into the corresponding grids, and different data is used as the cost value to represent the possibility of the existence of obstacles. In addition, on the basis of determining the position of the obstacle, the grids around the obstacle are set as a buffer zone according to a preset inflation strategy, so as to avoid collision between the self-moving device and the obstacle.
[0053] In the embodiments of the present application, the cost map is, for example, a three-dimensional cost map or a two-dimensional cost map, depending on the application scenario and the type of environmental perception sensor, etc. The cost map includes an original cost map and a current cost map. The original cost map is the cost map initially created by the self-moving device. For example, after the self-moving device enters an unfamiliar environment, an environmental map is created based on the SLAM technology, and at the same time, the original cost map is created. For another example, after the self-moving device creates an environmental map, it travels in the working area and collects second environmental data using an environmental perception sensor, and creates an original cost map based on the second environmental data.
[0054] In addition, when the working area is relatively large, the original cost map is constantly updated during the movement of the self-moving device. At this time, for this update, the current cost map obtained by the last update of the original cost map becomes the original cost map. Taking the self-moving device as a guide robot for example, after the guide robot enters an unfamiliar shopping mall, an environmental map and an original cost map are created. The environmental map includes an exhibition area 1, a game area 2, a dining area 3, a cinema 4, and a book area 5. When the guide robot guides the user in the exhibition area 1, first environmental data of the exhibition area 1 is collected using various environmental perception sensors, and the part corresponding to the exhibition area 1 in the original cost map is updated using the first environmental data, thereby obtaining a current cost map a. After entering the game area 2, the first environmental data of the game area 2 is collected using various environmental perception sensors, and the current cost map a is updated, thereby obtaining a current cost map b. At this time, the current cost map a corresponds to the original cost map.
[0055] After the self-moving device creates an environmental map and an original cost map, it travels in the working area and collects first environmental data using an environmental perception sensor, and updates the original cost map using the first environmental data, thereby obtaining a current cost map.
[0056] In the embodiments of the present application, a plurality of environmental perception sensors are arranged on the self-moving device. The first environmental data collected by different environmental perception sensors is different. For example, when the environmental perception sensor is a laser radar, the first environmental data includes three-dimensional point cloud data, etc.
[0057] For example, when the environment perception sensor is a depth camera, the first environment data includes a depth image, etc.
[0058] For example, when the environment perception sensor is an ultrasonic sensor, the first environment data includes a distance between the self-moving device and an obstacle, etc.
[0059] For example, when the environment perception sensor is a downward-looking sensor, the first environment data includes cliff data, etc. If the downward-looking sensor collects cliff data, a high cost value is assigned to a grid corresponding to the cliff data, so that the self-moving device is prohibited from passing through the location.
[0060] For example, when the environment perception sensor is a geomagnetic sensor, the first environment data includes detected metal magnetic stripe data. If the geomagnetic sensor collects metal magnetic stripe data, a high cost value is assigned to a grid corresponding to the metal magnetic stripe data, so that the self-moving device is prohibited from passing through the location.
[0061] 202. When the self-moving device is in the trapped state, a direction for escaping from the trapped state is determined according to the current cost map.
[0062] Generally, the location of an obstacle, etc. is marked in an environment map. The self-moving device avoids the obstacle after reaching the location. Alternatively, the self-moving device determines whether there is an obstacle in front of the self-moving device by using a depth camera, etc. during travel, and avoids the obstacle if there is an obstacle in front of the self-moving device. If the obstacle cannot be avoided, it is considered that the self-moving device is in a trapped state and needs to escape from the trapped state. The obstacle includes but is not limited to a static obstacle, a dynamic obstacle, a single obstacle, multiple obstacles, etc. When the self-moving device creates an environment map, the location of the static obstacle is often marked. When a path is planned, the path that avoids the static obstacle can be planned according to the environment map. However, the dynamic obstacle cannot be displayed in the environment map. For the dynamic obstacle, the self-moving device avoids the obstacle, escapes from the trapped state, etc. according to the current cost map during travel.
[0063] The self-moving device pre-stores an environment map created based on a SLAM technology, etc. During travel, the self-moving device creates and updates a local environment map in real time with the self-moving device as the center. The local environment map is, for example, a square of 3 m x 3 m, a rectangle of 3 m x 4 m, a circle with a radius of 3 m, etc. The local environment map can reflect the location of an obstacle in the current environment, a moving obstacle, a static obstacle, etc. After encountering the obstacle, the self-moving device determines whether a new path can be found to avoid the obstacle according to the global environment map and the local environment map. If the self-moving device plans a new path according to the global environment map or the local environment map, the obstacle is avoided. If the self-moving device cannot plan a new path according to the global environment map and cannot plan a new path according to the local environment map, it is considered that the self-moving device is in a trapped state and needs to escape from the trapped state.
[0064] After determining that the mobile device is in the trapped state, the mobile device determines an escape direction according to the current cost map. Continuing with the previous example, assuming that the mobile device determines that it is trapped in bedroom 1, the mobile device determines the part of the cost map corresponding to bedroom 1, and determines the escape direction according to the cost map corresponding to bedroom 1.
[0065] 203. Escaping according to the escape direction.
[0066] After determining the escape direction, the mobile device travels according to the escape direction to escape.
[0067] The escape method provided by the embodiments of the present application sets various environment sensing sensors on the mobile device, and the mobile device pre-stores an original cost map and a global environment map. During operation, the mobile device updates the original cost map using first environment data collected by the various environment sensing sensors to obtain a current cost map. When the mobile device is in a trapped state, an escape direction is determined according to the current cost map, and the mobile device escapes according to the escape direction. With this scheme, the mobile device does not need to rotate in place to find a gap direction to escape, but updates the original cost map using first environment data collected by the various environment sensing sensors to obtain a current cost map, and determines an escape direction according to the current cost map, which is high in escape efficiency and safety. In addition, by fusing the first environment data of the various environment sensing sensors into the current cost map, the mobile device can more comprehensively grasp obstacle information in the surrounding environment, which helps to improve the accuracy of the escape direction.
[0068] Optionally, in the above embodiments, when the mobile device determines an escape direction and escapes according to the escape direction, the mobile device rotates to make the advancing direction of the mobile device the same as the escape direction, and then advances to escape; or the mobile device rotates to make the advancing direction of the mobile device opposite to the escape direction, and then retreats to escape.
[0069] For example, in the embodiments of the present application, the mobile device does not need to rotate during the process of determining an escape direction. The mobile device rotates after determining the escape direction. The purpose of rotation is to make the advancing direction the same as or opposite to the escape direction. The mobile device can determine the rotation direction according to the included angle between the direction of the mobile device before rotation and the escape direction. For the sake of clarity, the direction before rotation is referred to as the initial direction. For example, taking clockwise as the reference, the mobile device determines the included angle between the initial direction and the escape direction from the initial direction. If 0 < the included angle ≤ 90 degrees, the mobile device rotates clockwise to make the advancing direction the same as the escape direction. If 90 < the included angle < 180 degrees, the mobile device rotates counterclockwise to make the advancing direction opposite to the escape direction, and the rotation angle = 180° - the included angle.
[0070] In addition, the self-moving device can also take the anticlockwise direction as a reference, and the embodiments of the present application are not limited.
[0071] By rotating in place by a certain angle, the self-moving device can make the moving direction and the escape direction the same or opposite, and then move forward or backward to escape, thereby escaping at the smallest rotation angle and improving the escape speed.
[0072] Optionally, in the above embodiment, before the self-moving device updates the original cost map by using the first environment data collected by the at least two environment perception sensors to obtain the current cost map, the self-moving device also creates the original cost map. In the creation process, the self-moving device obtains second environment data by using the at least two environment perception sensors. Then, the self-moving device converts the second environment data obtained by each environment perception sensor into the global coordinate system to obtain second conversion data of each environment perception sensor. Finally, the self-moving device generates the original cost map according to the second conversion data of each environment perception sensor. The global coordinate system is a coordinate system used for creating an environment map, also known as a global world coordinate system, etc.
[0073] For example, the self-moving device creates the original cost map after entering an unfamiliar environment for the first time, or after the user deletes the original cost map. The self-moving device can create the original cost map while creating a global environment map by using the SLAM technology, or can create the original cost map at other times, and the embodiments of the present application are not limited. In the process of creating the original cost map, the self-moving device pre-processes the original second environment data, so as to denoise and correct the second environment data. Then, the self-moving device converts the pre-processed second environment data from the sensor coordinate system to the global coordinate system to obtain second conversion data of each environment perception sensor. Then, the self-moving device generates the original cost map according to the second conversion data of each environment perception sensor.
[0074] By converting the second environment data in the sensor coordinate system to the global coordinate system, and then creating the original cost map according to the second conversion data in the global coordinate system, the self-moving device can quickly and accurately create the original cost map.
[0075] Optionally, in the above embodiment, in the process of generating the original cost map by the self-moving device according to the first conversion data of each environment perception sensor, first, the blank map is rasterized to obtain a raster map. Then, a plurality of sub-layers are generated according to the raster map, different sub-layers correspond to different types of environment perception sensors, and the grids in the raster map and the grids in the sub-layers one-to-one correspond. Subsequently, for each grid in the raster map, the cost value of the corresponding grid in each sub-layer is determined according to the second conversion data to obtain the cost value of each grid in the raster map, and then the original cost map is generated according to the cost value of each grid in the raster map.
[0076] Figure 3 is a generation process diagram of the original cost map in the escape method provided by the embodiment of the application, which includes:
[0077] 301. The self-moving device acquires second environment data collected by at least two types of environment perception sensors.
[0078] In the process of creating the original cost map, the self-moving device acquires second environment data collected by various environment perception sensors, and the second environment data is used to indicate the distance between the obstacles and the self-moving device, the orientation of the obstacles relative to the self-moving device, etc.
[0079] 302. The second environment data is preprocessed.
[0080] The self-moving device performs filtering, denoising, correction, etc. on different types of second environment data to improve the quality of the second environment data, so as to obtain more accurate obstacle position information, etc. For example, the self-moving device filters the second environment data of the laser radar by using a filter to eliminate noise.
[0081] 303. The second environment data acquired by each environment perception sensor is converted to a global coordinate system to obtain second conversion data corresponding to each environment perception sensor.
[0082] Illustratively, the self-moving device converts the preprocessed second environment data from the sensor coordinate system to the global coordinate system. In the conversion process, the relative position of the environment perception sensor and the self-moving device, the position and pose of the environment perception sensor in the global coordinate system, the position and pose of the self-moving device in the global coordinate system, etc. need to be considered.
[0083] 304. The blank map is rasterized to obtain a raster map.
[0084] For example, the self-moving device generates a blank map according to the size of the environment, the requirement of custom resolution, etc., rasterizes the blank map to obtain a raster map. The raster map includes a plurality of grids, and different grids correspond to different areas or spaces in the real environment. The size of each grid is, for example, 5 cm, 6 cm, 10 cm, etc., and the embodiments of the present application are not limited thereto.
[0085] 305, determine the generation value of each grid in the raster map, and then generate the original cost map according to the generation value of each grid in the raster map.
[0086] In the process of determining the generation value of each grid in the raster map, the self-moving device regards the raster map as a total layer, copies the raster map to obtain a plurality of sub-layers, different sub-layers correspond to different kinds of environment perception sensors, and the grids in the raster map and the grids in the sub-layers correspond one-to-one. Alternatively, the self-moving device creates a blank map, the size of the blank map is the same as the environment map, rasterizes and copies the blank map to obtain a plurality of sub-layers.
[0087] Then, for each grid in the raster map, the generation value is determined according to the second conversion data of the corresponding grid in each sub-layer to obtain the generation value of each grid in the raster map. For example, please refer to Figure 4 , Figure 4 is a schematic diagram of the raster map and the sub-layers in the escape method provided by the embodiments of the present application.
[0088] Please refer to Figure 4 There are three kinds of environment perception sensors: radar, ultrasonic sensor, and optical sensor. After the self-moving device obtains the raster map 40, the raster map 40 is copied to obtain the sub-layer 41, the sub-layer 42, and the sub-layer 43, which correspond to the radar, the ultrasonic sensor, and the optical sensor, respectively. The grids in the raster map 40 and the grids in the sub-layer 41 correspond one-to-one. Similarly, the grids in the raster map 40 and the grids in the sub-layer 42 correspond one-to-one, and the grids in the raster map 40 and the grids in the sub-layer 42 correspond one-to-one. In each grid of each sub-layer, the second environment data of the real environment corresponding to the grid is stored, and the second environment data is used to indicate the information of the obstacles in the real environment corresponding to the grid, such as the distance of the obstacles and the density of the obstacles.
[0089] For example, in each grid of the sub-layer 41, the radar data (i.e., the second environment data) collected by the radar, the second conversion data obtained by performing coordinate conversion on the second environment data, and the generation value determined according to the second conversion data are stored. The generation value is an exponential function which is inversely proportional to the distance of the obstacles and is proportional to the density of the obstacles. The smaller the distance between the self-moving device and the obstacles, the higher the density of the obstacles, which indicates that the probability of the obstacles appearing in the grid is higher, and the grid is less suitable for the self-moving device to pass through.
[0090] For any one grid in the grid map, the self-moving device determines the generation value of the grid in the grid map according to the generation values of the corresponding grids in the sub-layers. Please refer to Figure 4 , the grid 400 in the grid map 40 corresponds to the grid 411 in the sub-layer 41, the grid 421 in the sub-layer 42, and the grid 431 in the sub-layer 43. After the self-moving device determines the generation value of the grid 411, the generation value of the grid 421, and the generation value of the grid 431, the generation values are fused and superimposed to obtain the generation value of the grid 400.
[0091] After the self-moving device obtains the generation value of each grid in the grid map 40, the original cost map is obtained. The original cost map includes the total layer and the sub-layers. Each grid of the total layer stores the generation value, etc., and each grid of the sub-layers stores the second environmental data, the second conversion data, etc., the generation value, etc. It can be understood that the generation value stored by the sub-layer is different from the generation value stored by the grid map.
[0092] By using this scheme, the self-moving device fuses the second environmental data collected by various environmental perception sensors in the process of creating the original cost map, so as to achieve the purpose of accurately creating the original cost map.
[0093] Optionally, in the above embodiment, during the running of the self-moving device, the first environmental data collected by at least two environmental perception sensors is used to update the original cost map to obtain the current cost map, which is similar to the creation of the original cost map: first, the self-moving device converts the first environmental data collected by each environmental perception sensor to the global coordinate system to obtain the first conversion data corresponding to each environmental perception sensor. Then, the self-moving device projects the first conversion data of each environmental perception sensor to the grid of the corresponding sub-layer to update the sub-layer. Finally, the self-moving device updates the original cost map according to the updated sub-layers of each environmental perception sensor.
[0094] Please refer to Figure 4 , during the running of the self-moving device, the first environmental data collected by the radar, the ultrasonic sensor, and the optical sensor is converted to the global coordinate system to obtain the first conversion data, and the areas covered by each first conversion data are as shown in the areas 412, 422, and 432 in the figure. The self-moving device updates the generation value, obstacle information, etc. of each grid in the area 412 according to the first conversion data of the radar. Similarly, the self-moving device updates the generation value, obstacle information, etc. of each grid in the area 422 according to the first conversion data of the ultrasonic sensor. The self-moving device updates the generation value, obstacle information, etc. of each grid in the area 432 according to the first conversion data of the optical sensor.
[0095] After the self-moving device updates the areas 412, 422 and 432, the cost values of the corresponding grids in the area 401 are updated according to the cost values of the grids in the areas 412, 422 and 432, so as to complete the update of the original cost map. During the update, the calculation process of the cost values of the grids in the sub-layers and the like can refer to the description of the creation of the original cost map, which will not be described here.
[0096] By using this scheme, the original cost map is updated in real time during the travel of the self-moving device to obtain the current cost map, so that the current cost map can more accurately reflect the current surrounding environment, and the purpose of accurately determining the escape direction is achieved.
[0097] Optionally, in the above embodiment, when the self-moving device is in the besieged state, the self-moving device determines the escape direction according to the current cost map, and a local cost map is cut from the current cost map with the self-moving device as the center. Then, the self-moving device determines the escape direction according to the local cost map.
[0098] For example, after the self-moving device determines that it is in the besieged state, a local cost map is cut from the current cost map with the self-moving device as the center. The local cost map can be a square of 3m x 3m, a rectangle of 3m x 4m, a circle with a radius of 3m, etc., and the embodiment of the present application is not limited thereto.
[0099] The local cost map has a plurality of grids, and each grid represents a real world. A cost value is stored in each grid, which is determined according to the first environment data collected by the plurality of environment perception sensors. The higher the cost value is, the greater the possibility that there is an obstacle in the real world corresponding to the grid is. The smaller the cost value is, the smaller the possibility that there is an obstacle in the real world corresponding to the grid is.
[0100] After the self-moving device cuts the local cost map from the original cost map, the escape direction is determined according to the cost values of the grids in the local cost map and the first environment data collected by the plurality of environment perception sensors.
[0101] By using this scheme, when the self-moving device determines the escape direction, only the local cost map with the self-moving device as the center needs to be considered, and the whole global current cost map does not need to be traversed, so that the calculation power is reduced, the operation amount of the processor of the self-moving device is reduced, and the calculation resources of the self-moving device are saved.
[0102] Optionally, in the above embodiment, when the self-moving device determines the escape direction according to the local cost map, a set of grids is determined from the local cost map, and the cost value of each grid in the set of grids is greater than a first threshold. Then, the self-moving device determines a first repulsive force corresponding to each grid in the set of grids, and determines a fused repulsive force according to the first repulsive force corresponding to each grid in the set of grids. Finally, the self-moving device determines the escape direction according to the fused repulsive force.
[0103] In the embodiment of the present application, the current cost map includes a plurality of grids, and each grid has its own cost value. The greater the cost value, the greater the possibility that there is an obstacle in the real environment corresponding to the grid. After the self-moving device is in a trapped state, a local cost map is intercepted from the current cost map with the self-moving device as the center, the cost value of each grid included in the local cost map is determined, and then the grids with a cost value greater than a first threshold are determined, which form a set of grids.
[0104] After obtaining the set of grids, the self-moving device determines a first repulsive force corresponding to each grid in the set of grids. For example, the self-moving device determines the distance from the self-moving device to the obstacle in the grid, and determines the first repulsive force corresponding to the grid according to the distance, and the distance and the first repulsive force are inversely proportional. The distance from the self-moving device to the obstacle in the grid can be calculated according to the first environmental data collected by each environmental perception sensor. After determining the first repulsive force of each grid in the set of grids, the self-moving device performs vector summation on the first repulsive forces to determine a fused repulsive force. Then, the self-moving device takes the reverse direction of the fused repulsive force as the escape direction to escape.
[0105] By using this scheme, the self-moving device determines a set of grids from the local map, determines a fused repulsive force according to the first repulsive force of each grid in the set of grids, and then determines the escape direction according to the fused repulsive force, which is accurate and fast.
[0106] Optionally, in the above embodiment, when the self-moving device determines the first repulsive force corresponding to each grid in the set of grids, first, for each grid in the set of grids, a plurality of second repulsive forces are determined, and each second repulsive force in the plurality of second repulsive forces corresponds to a type of environmental perception sensor. Then, the self-moving device determines the first repulsive force corresponding to the grid according to the plurality of second repulsive forces.
[0107] In the embodiment of the present application, a plurality of types of environmental perception sensors are arranged on the self-moving device, and the number of each type of environmental perception sensor can be multiple or one. Different types of environmental perception sensors correspond to different sub-layers, such as Figure 4The self-moving device determines a plurality of obstacle distances for each grid in the grid set, and different obstacle distances correspond to different kinds of environment perception sensors. For example, there are three kinds of environment perception sensors, which are laser, ultrasonic sensor and optical sensor. The self-moving device determines one obstacle distance according to the first conversion data of the laser. Similarly, the self-moving device determines one obstacle distance according to the first conversion data of the ultrasonic sensor, and determines one obstacle distance according to the first conversion data of the optical sensor. In this way, the self-moving device determines three obstacle distances for the same grid. It can be understood that the three obstacle distances all indicate the distance between the self-moving device and the obstacle in the same grid, but are based on the data of different kinds of environment perception sensors.
[0108] For the same grid, after the self-moving device obtains the obstacle distances corresponding to various environment perception sensors, the self-moving device determines the second repulsive force corresponding to each environment perception sensor according to the obstacle distance. For example, the second repulsive force is determined by using the following formula:
[0109] F=k×(1 / dist-1 / d)^2
[0110] Wherein, F represents the second repulsive force, k represents a weight coefficient, and the weight coefficients of different kinds of environment perception sensors are the same or different. The greater k is, the higher the confidence of the environment perception sensor is, that is, the more reliable the obstacle distance determined according to the environment perception sensor is. Dist represents the obstacle distance, that is, the distance between the self-moving device and the obstacle, and d represents a parameter of the local cost map. For example, when the local cost map is a circle, d represents the radius of the local cost map. For another example, when the local cost map is a square, d represents the side length of the local cost map. For another example, when the local cost map is a rectangle, d represents the length of half of the diagonal of the local cost map. The direction of the second repulsive force is from the obstacle to the self-moving device.
[0111] For the same grid in the grid map, after the self-moving device determines the second repulsive force corresponding to various environment perception sensors, the self-moving device performs weighted summation on the second repulsive forces, thereby obtaining the first repulsive force corresponding to the grid. Then, the self-moving device performs vector summation on the first repulsive forces corresponding to the grids in the grid set, thereby obtaining the fusion repulsive force. Finally, the self-moving device takes the opposite direction of the fusion repulsive force as the escape direction, and escapes according to the escape direction.
[0112] By using this scheme, for each grid, after the self-moving device determines the second repulsive force corresponding to various environment perception sensors, the self-moving device determines the first repulsive force corresponding to the grid according to the second repulsive forces, thereby achieving the purpose of accurately determining the first repulsive force, and further achieving the purpose of accurately determining the escape direction.
[0113] Optionally, in the above embodiment, the self-moving device predicts a target position point in the process of escaping from the trap in the escape direction, and the target position point is a position point reached by the self-moving device after at least a preset time length. Then, the self-moving device determines a target grid in which the target position point is located from the local cost map. After that, the self-moving device determines an obstacle distance corresponding to each environment perception sensor, and the obstacle distance is used to indicate a distance between the self-moving device and an obstacle in the target grid. The traveling is stopped when the target grid meets a preset condition. The preset condition includes at least one of the following conditions: a cost value of the target grid is greater than a second threshold, and the obstacle distance corresponding to at least one environment perception sensor is less than a preset distance.
[0114] In the process of escaping from the trap, the self-moving device continuously predicts a position point reached after at least a preset time length, to simulate a judgment on whether a collision occurs between the self-moving device and an obstacle when the self-moving device is located at the position point. In one way, the self-moving device predicts a target position point reached after a preset time length from a current position, and performs risk assessment on the target position point.
[0115] In another way, the self-moving device predicts a motion trajectory, and takes each position point on the motion trajectory as a target position point. For each target position point, the self-moving device predicts whether a collision risk exists in the order of reaching. Once it is predicted that a collision risk exists in a certain target position point, risk assessment on a subsequent target position point is not needed.
[0116] Figure 5A is a motion trajectory predicted by the forward kinematics simulation in the trap-escaping method provided by the embodiment of the present application. Figure 5B is Figure 5A corresponding flowchart. Please refer to Figure 5A The thick black solid line represents a motion trajectory predicted by the self-moving device, and each position point on the motion trajectory is a target position point. Figure 5B includes:
[0117] 501, acquire state information of the self-moving device.
[0118] The state information includes a current position, a speed, a direction, and the like of the self-moving device.
[0119] 502, acquire a local cost map.
[0120] During the process of escaping from the trap, the self-moving device continuously acquires and updates the local cost map. The local cost map is a cost map which is extracted from the current cost map with the current position of the self-moving device as the center. The local cost map may be a square of 3m x 3m, a rectangle of 3m x 4m, a circle with a radius of 3m, etc., and the embodiments of the present application are not limited thereto. It can be understood that the local cost map is different when the self-moving device is located at different positions. The cost map includes a plurality of grids, and the cost value of the grid represents the collision risk of the self-moving device at the position. The cost value of the grid where the obstacle is located is higher, and the cost value of the grid without the obstacle is lower.
[0121] 503. predicting a target position point in the process of escaping from the trap according to the escape direction, the target position point being a position point reached by the self-moving device after a preset time length.
[0122] After obtaining the local cost map, the self-moving device combines the current state information, the expected motion trajectory, etc., and predicts the target position point reached after a preset time length by using a preset motion model. The preset time length may be 2 seconds, 3 seconds, etc., and the embodiments of the present application are not limited thereto.
[0123] 504. determining a target grid where the target position point is located from the local cost map.
[0124] For each target position point, the self-moving device maps the target position point into the local cost map, thereby determining the target grid where the target position point is located.
[0125] 505. determining obstacle distances corresponding to various environmental perception sensors, the obstacle distances being used to indicate distances between the self-moving device and obstacles in the target grid.
[0126] For each target position point, the self-moving device determines corresponding grids from various environmental perception sensor corresponding sub-layers according to the target grid, which are referred to as projection grids hereinafter. Then, a plurality of obstacle distances are determined according to the first conversion data recorded by the projection grids, etc. It can be understood that the obstacle distances all indicate distances between the self-moving device and obstacles in the target grid, but are based on data of different environmental perception sensors.
[0127] 506. judging whether there is a collision risk, if there is a collision risk, performing step 507; if there is no collision risk, performing step 501.
[0128] The self-moving device performs risk assessment on the target position point to determine whether there is a collision risk. During the assessment, the value of the target grid, the obstacle distance of each environment perception sensor, and the like are analyzed. When the target grid meets the preset conditions, step 507 is performed; when the target grid does not meet any of the preset conditions, the self-moving device continues to move and returns to step 501. The preset conditions include at least one of the following conditions: the value of the target grid is greater than a second threshold, and the obstacle distance corresponding to at least one environment perception sensor is less than a preset distance.
[0129] 507、stop moving.
[0130] If the value of the target grid exceeds the second threshold, or the obstacle distance corresponding to at least one environment perception sensor is less than the preset distance, it is determined that there is a collision risk, and the self-moving device needs to stop moving. Otherwise, the self-moving device continues to move. During the movement, the state information of the self-moving device and the local cost map are updated, and the forward prediction and collision risk assessment are performed again, so as to ensure that the self-moving device moves on a safe trajectory.
[0131] By using this scheme, the self-moving device uses multiple environment perception sensors to simulate and predict the trajectory of the self-moving device, so as to determine whether the self-moving device collides with the obstacle, and the safety is higher.
[0132] The above-described escape method will be described in detail in combination with a specific application scenario.
[0133] Application scenario:
[0134] Figure 6A is the actual environment schematic diagram of the self-moving device in the escape method provided by the embodiments of the present application. Figure 6B is Figure 6A schematic diagram of the corresponding current cost map and local cost map.
[0135] Please refer to Figure 6A , the front, left and right sides of the self-moving device are all obstacles, the self-moving device cannot plan a new path according to the global environment map, and cannot plan a new path according to the local environment map, which indicates that the self-moving device is in a besieged state and needs to escape.
[0136] Please refer to Figure 6BThe current cost map is shown by the thick black solid rectangular frame, and the local cost map is shown by the thick black dashed line. The grids in the current cost map and the local cost map have three states: an obstacle, a non-obstacle, and an unknown region. The cost value of a grid occupied by an obstacle is, for example, 1-5. The greater the cost value of a grid is, the greater the possibility that an obstacle exists in the real environment corresponding to the grid is. The cost value of a grid without an obstacle is 0, and the cost value of an unknown region is empty. The grid in the unknown region is shown by the gray filled grid in the figure.
[0137] After the mobile device intercepts the current cost map to obtain the local cost map, the mobile device determines the grids with a cost value greater than a first threshold value from the local cost map, thereby obtaining a grid set. The first threshold value is, for example, 3. Then, the mobile device determines the first repulsive force corresponding to each grid in the grid set. For each grid, when the first repulsive force of the grid is calculated, the first environmental data projected by each environmental perception sensor to the grid is determined, and then the second repulsive force corresponding to each environmental perception sensor is determined. Finally, the second repulsive forces corresponding to the environmental perception sensors are weighted and summed, thereby obtaining the first repulsive force.
[0138] After the mobile device determines the first repulsive force of each grid in the grid set, the first repulsive forces of the grids are vector summed, thereby obtaining a fusion repulsive force. Then, the opposite direction of the fusion repulsive force is taken as the escape direction.
[0139] Please refer to Figure 6B The escape direction is shown by the straight-line arrow in the figure that starts from the mobile device. After escaping, the mobile device plans a path according to the environmental map, the current position, and the position of the destination, and the path is shown by the dashed arrow in the figure. The destination is shown by the black filled grid in the figure.
[0140] During the movement of the mobile device, the first environmental data is continuously collected by using various environmental perception sensors, and the original cost map is updated by using the first environmental data, thereby obtaining the current cost map. After being trapped, the local cost map is intercepted from the latest current cost map, and the escape direction is determined according to the intercepted local cost map and the mobile device escapes.
[0141] The following is an apparatus embodiment of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the apparatus embodiments of the present application, please refer to the method embodiments of the present application.
[0142] Figure 7 A schematic diagram of an escape device provided by an embodiment of the present application is shown in FIG. 7. The escape device 700 includes an update module 71, a processing module 72, and an escape module 73.
[0143] An updating module 71 is configured to update the original cost map by using first environment data collected by at least two environment perception sensors arranged on the self-moving device during operation of the self-moving device, to obtain a current cost map.
[0144] A processing module 72 is configured to determine an escape direction according to the current cost map when the self-moving device is in an encircled state.
[0145] An escape module 73 is configured to escape according to the escape direction.
[0146] In an implementation form, the processing module 72 is configured to extract a local cost map from the current cost map with the self-moving device as the center, and determine the escape direction according to the local cost map.
[0147] In an implementation form, the processing module 72 is configured to determine a set of grids from the local cost map, each grid in the set of grids has a cost value greater than a first threshold, determine a first repulsive force corresponding to each grid in the set of grids, determine a fusion repulsive force according to the first repulsive forces corresponding to the grids in the set of grids, and determine the escape direction according to the fusion repulsive force.
[0148] In an implementation form, when determining the first repulsive force corresponding to each grid in the set of grids, the processing module 72 is configured to determine a plurality of second repulsive forces for each grid in the set of grids, each second repulsive force in the plurality of second repulsive forces corresponds to one environment perception sensor, and determine the first repulsive force corresponding to the grid according to the plurality of second repulsive forces.
[0149] In an implementation form, the processing module 72 is further configured to predict a target position point in the escape process according to the escape direction, the target position point is a position point reached by the self-moving device after a preset time period, determine a target grid in which the target position point is located from the local cost map, determine an obstacle distance corresponding to each environment perception sensor, the obstacle distance is used to indicate a distance between the self-moving device and an obstacle in the target grid, and stop moving when the target grid satisfies a preset condition, wherein the preset condition includes at least one of the following conditions: the cost value of the target grid is greater than a second threshold, and the obstacle distance corresponding to at least one environment perception sensor is less than a preset distance.
[0150] In a possible implementation, the updating module 71 is configured to convert the first environment data collected by each environment perception sensor into a global coordinate system to obtain first conversion data of each environment perception sensor; project the first conversion data of each environment perception sensor onto a grid of a corresponding submap to update a submap layer corresponding to each environment perception sensor; and update the original cost map according to the updated submap layer of each environment perception sensor to obtain a current cost map.
[0151] In a possible implementation, the processing module 72 is further configured to, before the updating module 71 updates the original cost map by using the first environment data collected by at least two environment perception sensors to obtain a current cost map during operation of the self-moving device, acquire second environment data by each environment perception sensor; convert the second environment data acquired by each environment perception sensor into a global coordinate system to obtain second conversion data of each environment perception sensor, the global coordinate system being a coordinate system used for creating an environment map; and generate the original cost map according to the second conversion data of each environment perception sensor.
[0152] In a possible implementation, when the processing module 72 generates the original cost map according to the second conversion data of each environment perception sensor, the processing module 72 is configured to rasterize the environment map to obtain a grid map; generate a plurality of submap layers according to the grid map, different submap layers corresponding to different types of environment perception sensors, and a grid in the grid map corresponding to a grid in the submap layer in a one-to-one manner; for each grid in the grid map, determine a cost value according to the second conversion data of a corresponding grid in each submap layer to obtain the cost value of each grid in the grid map; and generate the original cost map according to the cost value of each grid in the grid map.
[0153] In a possible implementation, the escape module 73 is configured to, after rotating to make the advancing direction of the self-moving device consistent with the escape direction, advance or retreat to escape.
[0154] The escape device provided by the embodiments of the present application can perform the actions of the self-moving device in the above embodiments, and has similar implementation principles and technical effects, which will not be described herein again.
[0155] Figure 8 FIG. 8 is a structural schematic diagram of an electronic device provided by an embodiment of the present application. As shown in FIG. 8, the electronic device 800, for example, is the self-moving device described above, and the electronic device 800 includes: Figure 8
[0156] a processor 81 and a memory 82;
[0157] The memory 82 stores computer instructions.
[0158] The processor 81 executes computer instructions stored in the memory 82, so that the processor 81 performs the method for escaping from the stuck state implemented by the mobile device as described above.
[0159] The specific implementation process of the processor 81 can refer to the method embodiments described above, which have similar implementation principles and technical effects, and will not be described here.
[0160] Optionally, the electronic device 800 further includes a communication component 83. The processor 81, the memory 82, and the communication component 83 can be connected through the bus 84.
[0161] The embodiments of the present application also provide a computer readable storage medium, and the computer readable storage medium stores computer instructions. The computer instructions are executed by a processor to implement the method for escaping from the stuck state implemented by the mobile device as described above.
[0162] The embodiments of the present application also provide a computer program product, and the computer program product contains a computer program. The computer program is executed by a processor to implement the method for escaping from the stuck state implemented by the mobile device as described above.
[0163] Other embodiments of the present application will be apparent to those skilled in the art from consideration of the specification and practice of the application disclosed here. The application is intended to cover any variations, uses or adaptations of the application following, in general, the principles of the application and including such departures from the present disclosure as come within known or customary practice in the art to which the application pertains or can relate. The specification and examples are to be regarded as illustrative only, and the true scope and spirit of the application are indicated by the following claims.
[0164] It should be understood that the application is not limited to the precise construction that has been described above and illustrated in the accompanying drawings, and that various modifications and changes can be made by those skilled in the art without departing from the scope of the application. The scope of the application is limited only by the appended claims.
Claims
1. A method for escaping difficulties, characterized in that, Applied to self-moving devices, the method includes: During the operation of the self-moving device, the original cost map is updated using first environmental data collected by at least two environmental perception sensors to obtain the current cost map. Each environmental perception sensor is set on the self-moving device. When the self-moving device is trapped, the escape direction is determined according to the current cost map; Escape in the described escape direction; Wherein, determining the escape direction based on the current cost map when the self-moving device is in a trapped state includes: A partial cost map is extracted from the current cost map, centered on the self-moving device; A set of graticles is determined from the graticles contained in the local cost map, wherein the cost value of each graticle in the set of graticles is greater than a first threshold. Determine the first repulsive force corresponding to each grid cell in the grid set; The fusion repulsion force is determined based on the first repulsion force corresponding to each grid in the grid set; The escape direction is determined based on the fusion repulsion force.
2. The method according to claim 1, characterized in that, Determining the first repulsion force corresponding to each grid cell in the grid set includes: For each grid in the grid set, multiple second repulsion forces are determined, and each of the multiple second repulsion forces corresponds one-to-one with an environmental sensing sensor. The first repulsion force corresponding to the grid is determined based on the plurality of second repulsion forces.
3. The method according to any one of claims 1 to 2, characterized in that, Also includes: During the escape process according to the escape direction, the target location is predicted, and the target location is the location reached by the self-moving device after a preset time. The target grid containing the target location point is determined from the local cost map; Determine the obstacle distances corresponding to various environmental perception sensors, wherein the obstacle distances are used to indicate the distance between the self-moving device and obstacles within the target grid; The movement stops when the target grid meets the preset conditions; The preset conditions include at least one of the following: the cost of the target grid is greater than a second threshold, and the obstacle distance corresponding to at least one environmental perception sensor is less than a preset distance.
4. The method according to any one of claims 1 to 2, characterized in that, The process of updating the original cost map using first environmental data collected by at least two environmental perception sensors during the operation of the self-moving device to obtain the current cost map includes: The first environmental data collected by each environmental sensing sensor is transformed into the global coordinate system to obtain the first transformed data of each environmental sensing sensor. The first transformation data of each environmental perception sensor is projected onto the grid of the corresponding sub-map to update the sub-layer corresponding to each environmental perception sensor. The original cost map is updated based on the updated sub-layers of each environmental perception sensor to obtain the current cost map.
5. The method according to any one of claims 1 to 2, characterized in that, Before updating the original cost map using first environmental data collected by at least two environmental perception sensors during the operation of the self-moving device to obtain the current cost map, the method further includes: Secondary environmental data is acquired through various environmental sensing sensors; The second environmental data acquired by each environmental perception sensor is transformed into the global coordinate system to obtain the second transformed data of each environmental perception sensor. The global coordinate system is the coordinate system used to create the environmental map. The original cost map is generated based on the second conversion data from each environmental perception sensor.
6. The method according to claim 5, characterized in that, The step of generating the original cost map based on the second conversion data from each environmental perception sensor includes: Rasterize the blank map to obtain a raster map; Based on the grid map, multiple sub-layers are generated, with different sub-layers corresponding to different types of environmental sensing sensors. The grids in the grid map and the grids in the sub-layers correspond one-to-one. For each grid cell in the grid map, the cost value is determined based on the second transformation data of the corresponding grid cell in each sub-layer, so as to obtain the cost value of each grid cell in the grid map; The original cost map is generated based on the cost value of each grid cell in the grid map.
7. The method according to any one of claims 1 to 2, characterized in that, The process of escaping in the stated escape direction includes: After rotating so that the forward direction of the self-moving device is the same as the escape direction, it moves forward to escape the predicament; Alternatively, the self-moving device can be rotated so that its forward direction is opposite to its escape direction, and then it can be reversed to escape the predicament.
8. A device for escaping obstacles, characterized in that, include: An update module is used to update the original cost map using first environmental data collected by at least two environmental perception sensors during the operation of the self-moving device, so as to obtain the current cost map. Each environmental perception sensor is set on the self-moving device. The processing module is used to determine the escape direction based on the current cost map when the self-moving device is in a trapped state; The escape module is used to escape in the stated escape direction; The processing module is used for: A partial cost map is extracted from the current cost map, centered on the self-moving device; A set of graticles is determined from the graticles contained in the local cost map, wherein the cost value of each graticle in the set of graticles is greater than a first threshold. Determine the first repulsive force corresponding to each grid cell in the grid set; The fusion repulsion force is determined based on the first repulsion force corresponding to each grid in the grid set; The escape direction is determined based on the fusion repulsion force.
9. An electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic device to implement the method as described in any one of claims 1 to 7.
10. A non-volatile computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Cost map generation method and device, computer equipment and storage medium
CN114820973A
Robot control method, robot and computer readable storage medium
CN115008465A