Obstacle avoidance method and device of mobile robot, computer equipment and storage medium

By using color images and depth images to analyze obstacle information and conduct risk assessment, it solves the problem of difficulty in detecting side obstacles for traditional AGVs and achieves AGV's high efficiency, safe obstacle avoidance and improvement in production efficiency.

CN118605502APending Publication Date: 2024-09-06SOUTH CHINA NORMAL UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410507065.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-25
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Traditional tape-guided AGVs are difficult to effectively detect side obstacles in the workshop environment, leading to safety accidents and low production efficiency. Moreover, traditional sensors cannot determine the type and location of obstacles, affecting the customized operation of AGVs.

Method used

A method based on real-time collected color images and depth images is used to extract relevant information about obstacles, analyze the spatial and positional relationships between the mobile robot and the obstacles, conduct risk assessment through object categories and dynamic and static labels, and control the mobile robot to perform Efficient and safe obstacle avoidance operation.

Benefits of technology

It improves the safety and production efficiency of AGV in the workshop environment, ensures that AGV can accurately detect and avoid obstacles, reduces the occurrence of safety accidents, and improves the automation level of the production process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118605502A
    Figure CN118605502A
Patent Text Reader

Abstract

The invention relates to the field of robot technology application, in particular to an obstacle avoidance method of a mobile robot, which comprises the following steps of: extracting related information of a plurality of obstacles in a target area based on a color image and a depth image which are acquired in real time; analyzing space relation information between the mobile robot and the plurality of obstacles and position relation information among the plurality of obstacles, and performing risk assessment according to object category information and dynamic and static label information in related information of the plurality of obstacles in the space relation information and the position relation information. The method is used for controlling the mobile robot to perform efficient and safe obstacle avoidance work, so that the production efficiency is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the application field of robot technology, and in particular to an obstacle avoidance method, device, computer equipment and storage medium for a mobile robot. Background Art

[0002] Magnetic-guided mobile robots, such as Automated Guided Vehicles (AGVs), operate in workshops and need to leave the magnetic track and move sideways to the front assembly line when transporting materials. Although the layout arrangement will try to ensure that there are no obstacles on the AGV's working path, due to the complex workshop environment, which is full of stationary materials, working staff, and manually driven forklifts, it is inevitable that obstacles will affect the operation of the AGV. This requires the AGV to have the ability to quickly detect whether there are obstacles on the operating path.

[0003] Usually, AGVs are equipped with sensors at the front and rear, but lack relevant sensors on the sides, so sensors need to be installed on AGVs to ensure safety. However, the current traditional AGV obstacle detection method uses ultrasonic sensors, infrared sensors, lidar, and a variety of sensor fusion technologies. Although obstacles can be detected, in a workshop environment, it is easy to cause some safety accidents due to the interference of the surface material of the object, which may cause the obstacle distance to be unable to be correctly detected. In addition, traditional sensor methods cannot determine the type of obstacle, and cannot complete some customized operations to enable AGV to ensure production efficiency as much as possible while ensuring production safety. For example, in the material assembly stage, AGV needs to actively approach the material. At this time, if traditional sensors are used for obstacle judgment, the material may be judged as an obstacle, thereby affecting factory logistics. Summary of the invention

[0004] Based on this, the purpose of the present invention is to provide an obstacle avoidance method, device, computer equipment and storage medium for a mobile robot, extract relevant information of several obstacles in the target area based on the real-time collected color image and depth image, analyze the spatial relationship information between the mobile robot and several obstacles and the positional relationship information between several obstacles according to the relevant information of several obstacles, and perform risk assessment based on the object category information and dynamic and static label information in the spatial relationship information, positional relationship information and relevant information of several obstacles, so as to control the mobile robot to perform efficient and safe obstacle avoidance work, thereby further improving production efficiency. The specific scheme is as follows:

[0005] In a first aspect, an embodiment of the present application provides an obstacle avoidance method for a mobile robot, comprising the following steps:

[0006] Obtaining a real-time image within the target area, wherein the real-time image includes a color image and a depth image;

[0007] Performing target detection on the color image to obtain obstacle information data of the target area, wherein the obstacle information data includes object category data, dynamic and static label data, and two-dimensional coordinate data of a plurality of obstacles;

[0008] Aligning the color image and the depth image to obtain depth information data, performing spatial relationship detection based on the depth information data and the two-dimensional coordinate data of the plurality of obstacles to obtain spatial relationship data between the mobile robot and the plurality of obstacles, wherein the spatial relationship data is used to indicate an angular relationship and a distance relationship between the mobile robot and the obstacles;

[0009] According to the object category data and the two-dimensional coordinate data of the plurality of obstacles in the obstacle information data, the relationship between the plurality of obstacles is predicted to obtain the relationship probability data between the plurality of obstacles, and according to the relationship probability data, the position relationship data between the plurality of obstacles is obtained, wherein the position relationship data is used to indicate the relative position relationship between the obstacles;

[0010] A risk assessment is performed based on object category data of several obstacles, dynamic and static label data, spatial relationship data between the mobile robot and several obstacles, and position relationship data between several obstacles to obtain a risk assessment result. Based on the risk assessment result, the mobile robot is controlled to perform obstacle avoidance work.

[0011] In a second aspect, an embodiment of the present application provides an obstacle avoidance device for a mobile robot, comprising:

[0012] An image acquisition module, used to obtain a real-time image within a target area, wherein the real-time image includes a color image and a depth image;

[0013] A target detection module, used to perform target detection on the color image to obtain obstacle information data of the target area, wherein the obstacle information data includes object category data, dynamic and static label data, and two-dimensional coordinate data of a plurality of obstacles;

[0014] A spatial relationship detection module, used to align the color image and the depth image to obtain depth information data, perform spatial relationship detection based on the depth information data and the two-dimensional coordinate data of the plurality of obstacles, and obtain spatial relationship data between the mobile robot and the plurality of obstacles, wherein the spatial relationship data is used to indicate the angle relationship and distance relationship between the mobile robot and the obstacles;

[0015] a position relationship detection module, used to predict the relationship between the plurality of obstacles according to the object category data and the two-dimensional coordinate data of the plurality of obstacles in the obstacle information data, obtain the relationship probability data between the plurality of obstacles, and obtain the position relationship data between the plurality of obstacles according to the relationship probability data, wherein the position relationship data is used to indicate the relative position relationship between the obstacles;

[0016] The mobile robot control module is used to perform risk assessment based on object category data of several obstacles, dynamic and static label data, spatial relationship data between the mobile robot and several obstacles, and position relationship data between several obstacles, obtain risk assessment results, and control the mobile robot to avoid obstacles based on the risk assessment results.

[0017] In a third aspect, an embodiment of the present application provides a computer device comprising: a processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the obstacle avoidance method for a mobile robot as described in the first aspect are implemented.

[0018] In a fourth aspect, an embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the obstacle avoidance method for a mobile robot as described in the first aspect are implemented.

[0019] In an embodiment of the present application, a mobile robot obstacle avoidance method, apparatus, computer equipment and storage medium are provided. Based on color images and depth images collected in real time, relevant information of several obstacles in a target area is extracted. According to the relevant information of the several obstacles, spatial relationship information between the mobile robot and the several obstacles and positional relationship information between the several obstacles are analyzed. According to the spatial relationship information, positional relationship information, object category information and dynamic and static label information in the relevant information of the several obstacles, risk assessment is performed to control the mobile robot to perform efficient and safe obstacle avoidance work, thereby further improving production efficiency.

[0020] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 A schematic diagram of a flow chart of an obstacle avoidance method for a mobile robot provided in one embodiment of the present application;

[0022] Figure 2 A schematic diagram of the process of S3 in the obstacle avoidance method for a mobile robot provided in one embodiment of the present application;

[0023] Figure 3A schematic diagram of the flow of S4 in the obstacle avoidance method for a mobile robot provided in one embodiment of the present application;

[0024] Figure 4 A schematic diagram of the flow of S4 in the obstacle avoidance method for a mobile robot provided in one embodiment of the present application;

[0025] Figure 5 A schematic diagram of the flow of S4 in the obstacle avoidance method for a mobile robot provided in one embodiment of the present application;

[0026] Figure 6 A schematic diagram of the flow of S4 in the obstacle avoidance method for a mobile robot provided in one embodiment of the present application;

[0027] Figure 7 A schematic diagram of the flow of S5 in the obstacle avoidance method for a mobile robot provided in one embodiment of the present application;

[0028] Figure 8 A schematic diagram of the structure of an obstacle avoidance device for a mobile robot provided in one embodiment of the present application;

[0029] Fig. 9 A schematic diagram of the structure of a computer device provided for one embodiment of the present application. DETAILED DESCRIPTION

[0030] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.

[0031] The terms used in this application are for the purpose of describing specific embodiments only and are not intended to limit this application. The singular forms of "a", "said" and "the" used in this application and the appended claims are also intended to include plural forms unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0032] It should be understood that, although the terms first, second, third, etc. may be used in the present application to describe various information, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" / "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determination".

[0033] See also Figure 1 , Figure 1 A flowchart of an obstacle avoidance method for a mobile robot provided in one embodiment of the present application is provided, wherein the method comprises the following steps:

[0034] S1: Obtain a real-time image within the target area.

[0035] The execution subject of the obstacle avoidance method of the mobile robot is an obstacle avoidance device of the obstacle avoidance method of the mobile robot (hereinafter referred to as obstacle avoidance device). In an optional embodiment, the obstacle avoidance device can be a computer device, a server, or a server cluster composed of multiple computer devices.

[0036] When the automated guided vehicle (AGV) leaves the track and approaches the assembly line, in this embodiment, the obstacle avoidance device can collect real-time images in the target area through the image acquisition device set on the mobile robot, wherein the real-time image includes a color image and a depth image, so as to obtain image information and depth information in the forward direction of the AGV.

[0037] S2: Performing target detection on the color image to obtain obstacle information data of the target area.

[0038] In this embodiment, the obstacle avoidance device performs target detection on the color image to obtain obstacle information data of the target area, wherein the obstacle information data includes object category data, dynamic and static label data, and two-dimensional coordinate data of the plurality of obstacles, the two-dimensional coordinate data is two-dimensional bounding box coordinate data of a bounding box constructed around the obstacle, and the dynamic and static label data is used to indicate whether the obstacle is a dynamic obstacle or a static obstacle, so as to capture the information data of the plurality of obstacles in the color image.

[0039] Specifically, the obstacle avoidance device uses a target detection model, such as a YOLOv5 model, to perform target detection on the color image, obtain object category data and two-dimensional coordinate data of several obstacles, and obtain dynamic and static label data of the obstacles with corresponding object category data according to the correspondence between the preset object category and the dynamic and static categories, which reflects the movement properties of the obstacles, so as to facilitate the subsequent stage to divide the risk level according to the movement properties of the obstacles.

[0040] S3: Aligning the color image and the depth image to obtain depth information data, performing spatial relationship detection based on the depth information data and the two-dimensional coordinate data of several obstacles, and obtaining spatial relationship data between the mobile robot and the several obstacles.

[0041] In this embodiment, the obstacle avoidance device aligns the color image and the depth image to obtain depth information data, performs spatial relationship detection based on the depth information data and the two-dimensional coordinate data of several obstacles, and obtains the spatial relationship data between the mobile robot and the several obstacles, wherein the spatial relationship data is used to indicate the angle relationship and distance relationship between the mobile robot and the obstacles.

[0042] The spatial relationship data includes angle relationship data and distance relationship data. Figure 2 , Figure 2 The flowchart of S3 in the obstacle avoidance method of a mobile robot provided in one embodiment of the present application includes steps S31 to S32, which are specifically as follows:

[0043] S31: constructing a coordinate system with the mobile robot as the origin, performing spatial coordinate transformation according to the two-dimensional bounding box coordinate data of the plurality of obstacles, the two-dimensional image depth data and a preset spatial coordinate calculation algorithm, and obtaining the spatial coordinate data of the plurality of obstacles.

[0044] The spatial coordinate calculation algorithm is:

[0045]

[0046] Where, X c is the horizontal axis coordinate in the spatial coordinate data, Y c is the vertical axis coordinate in the spatial coordinate data, Z c is the vertical axis coordinate in the spatial coordinate data, f x is the horizontal focal length of the camera, f y is the vertical focal length of the camera, c x is the horizontal axis coordinate of the camera at the optical center in the coordinate system, c yis the vertical coordinate of the camera at the optical center in the coordinate system, u and v are the horizontal coordinate and vertical coordinate in the two-dimensional bounding box coordinate data respectively, and Z is the depth value in the two-dimensional image depth data.

[0047] In this embodiment, the obstacle avoidance device constructs a coordinate system with the mobile robot as the origin, performs spatial coordinate conversion based on the two-dimensional bounding box coordinate data of several obstacles, the two-dimensional image depth data and a preset spatial coordinate calculation algorithm, and obtains the spatial coordinate data of several obstacles to convert the two-dimensional coordinate data into spatial coordinate data that reflects the real world.

[0048] S32: Calculate the angle value and distance value between the mobile robot and the several obstacles based on the spatial coordinate data between the several obstacles, obtain the angle relationship data between the mobile robot and the several obstacles based on the angle value and the preset several angle threshold intervals, and obtain the distance relationship data between the mobile robot and the several obstacles based on the distance value and the preset several distance threshold intervals.

[0049] In this embodiment, the obstacle avoidance device calculates the angle value and the distance value between the mobile robot and the plurality of obstacles according to the spatial coordinate data between the plurality of obstacles, wherein the angle value is:

[0050]

[0051] Wherein, θ is the angle value, z is the vertical axis coordinate in the spatial coordinate data of the obstacle, and x is the horizontal axis coordinate in the spatial coordinate data of the obstacle.

[0052] The obstacle avoidance device obtains the angle relationship data between the mobile robot and several obstacles according to the angle value and several preset angle threshold intervals. By generalizing the data, the camera measurement error is effectively avoided and the accuracy and expression efficiency of scene modeling are optimized.

[0053] Specifically, the angle relationship data includes right, right front, front, left front and left, and the angle threshold interval includes the right threshold interval, the right front threshold interval, the front threshold interval, the left front threshold interval and the left threshold interval. The obstacle avoidance device determines the angle threshold interval to which the angle value belongs based on the angle value and several angle threshold intervals, and obtains the angle relationship corresponding to the angle threshold interval as the angle relationship data between the mobile robot and the obstacle.

[0054] The obstacle avoidance device obtains the distance relationship data between the mobile robot and the plurality of obstacles according to the distance value and the preset plurality of distance threshold intervals. Specifically, the distance relationship data includes a short distance, a medium distance and a long distance, and the distance threshold interval includes a short distance threshold interval, a medium distance threshold interval and a long distance threshold interval. The obstacle avoidance device determines the distance threshold interval to which the distance value belongs according to the distance value and the plurality of distance threshold intervals, and obtains the distance relationship corresponding to the distance threshold interval as the distance relationship data between the mobile robot and the obstacle.

[0055] S4: predicting the relationship between the obstacles based on the object category data and two-dimensional coordinate data of the obstacles in the obstacle information data, obtaining the relationship probability data between the obstacles, and obtaining the position relationship data between the obstacles based on the relationship probability data.

[0056] Since the area constructed between obstacles may affect the operation of the AGV, in this embodiment, the obstacle avoidance device predicts the relationship between several obstacles based on the object category data and two-dimensional coordinate data of several obstacles in the obstacle information data, obtains the relationship probability data between the several obstacles, and obtains the position relationship data between the several obstacles based on the relationship probability data, wherein the position relationship data is used to indicate the relative position relationship between the obstacles.

[0057] The relationship probability data includes deep relationship probability data, see Figure 3 , Figure 3 The flowchart of S4 in the obstacle avoidance method of a mobile robot provided in one embodiment of the present application includes steps S401 to S404, which are specifically as follows:

[0058] S401: Combine a plurality of obstacles in pairs to construct a plurality of obstacle combinations, and obtain subject and object information data of the plurality of obstacle combinations.

[0059] In this embodiment, the obstacle avoidance device combines several obstacles in pairs to construct several obstacle combinations, and obtains subject-object information data of the several obstacle combinations, wherein the subject-object information data is used to indicate obstacles as subject objects and obstacles as object objects in the obstacle combinations.

[0060] Specifically, the obstacle avoidance device can determine the priority of the movement properties of the obstacles based on the object type data and dynamic and static label data of the obstacles in the obstacle combination, and take obstacles with higher priority as the main objects and obstacles with lower priority as the object objects.

[0061] S402: extracting information based on subject and object information data of a plurality of obstacle combinations, object category data of a plurality of obstacles in the obstacle information data, and two-dimensional coordinate data to obtain context information data of the plurality of obstacle combinations.

[0062] In this embodiment, the obstacle avoidance device extracts information based on subject-object information data of several obstacle combinations, object category data of several obstacles in the obstacle information data, and two-dimensional coordinate data to obtain context information data of several obstacle combinations, wherein the context information data includes a semantic vector and a bounding box position vector of the obstacle as the subject object, a semantic vector and a bounding box position vector of the obstacle as the object object, and a bounding box position difference vector between the obstacle as the object object and the obstacle as the subject object, and the context information data is:

[0063]

[0064] In the formula, is the context information data, is the semantic vector of the obstacle as the main object, is the bounding box position vector of the obstacle as the main object, is the semantic vector of the obstacle as the object, is the bounding box position vector of the obstacle as the object, is the bounding box position difference vector between the obstacle as the object and the obstacle as the subject.

[0065] Specifically, the obstacle avoidance device identifies obstacles as subject objects and obstacles as object objects in the obstacle combination according to the subject-object information data of several obstacle combinations, and converts the object category data of obstacles as subject objects and the object category data of obstacles as object objects into semantic vectors using the GloVe word vector model according to the object category data of several obstacles in the obstacle information data, and subtracts the bounding box position vector of the obstacle as object object from the obstacle as subject object to obtain the bounding box position difference vector between the obstacle as object object and the obstacle as subject object, as shown below:

[0066]

[0067] S403: performing depth feature extraction according to the depth information data and the context information data of the plurality of obstacle combinations to obtain bounding box depth feature vectors of obstacles as subject objects and bounding box depth feature vectors of obstacles as object objects in the plurality of obstacle combinations.

[0068] In this embodiment, the obstacle avoidance device adopts the ResNet deep relation network (DRN) to perform depth feature extraction based on the depth information data and the context information data of several obstacle combinations, and obtain the bounding box depth feature vectors of the obstacles as the main objects in the several obstacle combinations and the bounding box depth feature vectors of the obstacles as the object objects.

[0069] S404: According to the bounding box depth feature vector of the obstacle as the main object, the bounding box depth feature vector of the obstacle as the object in the same obstacle combination, and a preset depth relationship feature extraction algorithm, the depth relationship feature vectors of several obstacle combinations are obtained, and the depth relationship feature vectors of the several obstacle combinations are sequentially processed by fully connected layers and nonlinear transformation to obtain depth relationship probability data of the several obstacle combinations.

[0070] In this embodiment, the obstacle avoidance device obtains depth relationship feature vectors of several obstacle combinations according to the bounding box depth feature vector of the obstacle as the main object, the bounding box depth feature vector of the obstacle as the object object in the same obstacle combination, and a preset depth relationship feature extraction algorithm. The output value of the depth relationship feature vector is close to 1, indicating that the main object is located in front of the object object; the output value is close to 0, indicating that the main object is located behind the object object; when the output value is close to 0.5, it indicates that the main object and the object object are in the same depth plane, wherein the depth relationship feature extraction algorithm is:

[0071]

[0072] In the formula, is the deep relationship feature vector, is the depth feature vector of the bounding box of the obstacle as the main object, is the depth feature vector of the bounding box of the obstacle as the object.

[0073] The obstacle avoidance device performs full-connection layer processing and nonlinear transformation processing on the depth relationship feature vectors of several obstacle combinations in sequence to obtain the depth relationship probability data of several obstacle combinations, and converts the depth relationship feature vectors into depth relationship probability data to reflect the probability of the front-end relationship and adjacent relationship between the subject object and the object object in terms of depth position.

[0074] The relationship probability data includes contact relationship probability data, see Figure 4 , Figure 4 The flowchart of S4 in the obstacle avoidance method of a mobile robot provided in one embodiment of the present application includes steps S411 to S412, which are specifically as follows:

[0075] S411: Obtaining contact relationship feature vectors of a plurality of obstacle combinations according to the depth relationship feature vectors of the plurality of obstacle combinations and a preset contact relationship feature extraction algorithm.

[0076] The contact relationship feature extraction algorithm is:

[0077]

[0078] In the formula, is the contact relationship feature vector.

[0079] In industrial scenarios, typical contact semantic relationships include handling, inspection, and assembly. In this embodiment, the obstacle avoidance device adopts a contextual relation network (CRN), inputs the deep relationship feature vector of several obstacle combinations into the contextual relation network, obtains the contact relationship feature vector of several obstacle combinations according to a preset contact relationship feature extraction algorithm, enhances the deep relationship feature vector, and uses the enhanced result as the contact relationship enhancement vector to improve the network's prediction ability for contact relationship features.

[0080] S412: Obtaining contact relationship probability data of the plurality of obstacle combinations according to the contact relationship feature vectors of the plurality of obstacle combinations, the context information data, and a preset contact relationship probability calculation algorithm.

[0081] The contact relationship probability calculation algorithm is:

[0082]

[0083] In the formula, R C is the contact relationship probability data, σ(·) is the activation function, FC(·) is the full connection function, Context information data.

[0084] When the object pairs are at the same level, the network will tend to output contact-type relationships such as handling and operation; when the object pairs are at different levels, the network reduces the confidence of the contact-type relationships and is more inclined to output the spatial relationship between them. In this embodiment, the obstacle avoidance device obtains contact relationship probability data of several obstacle combinations based on the contact relationship feature vectors of several obstacle combinations, context information data and a preset contact relationship probability calculation algorithm to extract the information of the contact-type relationships between the obstacles in the obstacle combination, so as to improve the network's prediction ability for contact relationship features.

[0085] The relationship probability data includes visual relationship probability data, see Figure 5 , Figure 5The flowchart of S4 in the obstacle avoidance method of a mobile robot provided in one embodiment of the present application includes steps S421 to S422, which are specifically as follows:

[0086] S421: extracting visual information based on subject-object information data and color images of several obstacle combinations, obtaining visual feature vectors of obstacles as subject objects and visual feature vectors of obstacles as object objects in the several obstacle combinations, performing feature fusion on the visual feature vectors of obstacles as subject objects and visual feature vectors of obstacles as object objects in the same obstacle combination, and obtaining visual relationship feature vectors of the several obstacle combinations.

[0087] In this embodiment, the obstacle avoidance device adopts a visual relation network (VRN) to extract visual information based on subject and object information data and color images of several obstacle combinations, and obtains visual feature vectors of obstacles as subject objects and visual feature vectors of obstacles as object objects in the several obstacle combinations.

[0088] The obstacle avoidance device performs feature fusion on the visual feature vector of the obstacle as the main object and the visual feature vector of the obstacle as the object object in the same obstacle combination to obtain the visual relationship feature vectors of several obstacle combinations, wherein the visual relationship feature vector is:

[0089]

[0090] In the formula, is the visual relationship feature vector, is the visual feature vector of the obstacle as the main object, is the visual feature vector of the obstacle as the object.

[0091] S422: Obtaining visual relationship probability data of the plurality of obstacle combinations according to the visual relationship feature vectors of the plurality of obstacle combinations and a preset visual relationship probability calculation algorithm.

[0092] The visual relationship probability calculation algorithm is:

[0093]

[0094] In the formula, R v is the visual relationship probability data, is the visual relationship feature vector, W V is the weight parameter, b V is the bias parameter.

[0095] In this embodiment, the obstacle avoidance device obtains visual relationship probability data of several obstacle combinations based on the visual relationship feature vectors of the several obstacle combinations and a preset visual relationship probability calculation algorithm to extract information on the visual class relationship between the obstacles in the obstacle combinations to improve the network's prediction ability for visual relationship features.

[0096] See also Figure 6 , Figure 6 The flowchart of S4 in the obstacle avoidance method of a mobile robot provided in one embodiment of the present application includes step S43, which is as follows:

[0097] S43: Obtain position relationship probability data of several obstacle combinations based on their depth relationship probability data, contact relationship probability data, visual relationship probability data and a preset position relationship probability data calculation algorithm; obtain position relationship data of several obstacle combinations based on the position relationship corresponding to the maximum position relationship probability vector in the position relationship probability data.

[0098] The position relationship probability data calculation algorithm is:

[0099]

[0100] In the formula, R is the position relationship probability data, R d is the deep relationship probability data, α is the first empirical factor, and β is the second empirical factor.

[0101] In this embodiment, the obstacle avoidance device obtains position relationship probability data of several obstacle combinations based on the depth relationship probability data, contact relationship probability data, visual relationship probability data and a preset position relationship probability data calculation algorithm of the several obstacle combinations. The obstacle avoidance device obtains the position relationship data of several obstacle combinations based on the position relationship corresponding to the maximum position relationship probability vector in the position relationship probability data.

[0102] S5: Perform risk assessment based on object category data of several obstacles, dynamic and static label data, spatial relationship data between the mobile robot and several obstacles, and position relationship data between several obstacles to obtain risk assessment results, and control the mobile robot to avoid obstacles based on the risk assessment results.

[0103] In this embodiment, the obstacle avoidance device generates corresponding control instructions based on the object category data of several obstacles, dynamic and static label data, the spatial relationship data between the mobile robot and several obstacles, and the position relationship data between several obstacles, to control the mobile robot to perform obstacle avoidance.

[0104] Based on the real-time collected color images and depth images, the relevant information of several obstacles in the target area is extracted. According to the relevant information of several obstacles, the spatial relationship information between the mobile robot and the several obstacles and the positional relationship information between the several obstacles are analyzed. According to the spatial relationship information, positional relationship information, object category information, and dynamic and static label information in the relevant information of several obstacles, risk assessment is performed to control the mobile robot to perform efficient and safe obstacle avoidance work, thereby further improving production efficiency.

[0105] The risk assessment results include the risk levels of the areas corresponding to several obstacles and the risk levels of the areas corresponding to several combinations of obstacles; please refer to Figure 7 , Figure 7 The flowchart of S5 in the obstacle avoidance method of a mobile robot provided in one embodiment of the present application includes steps S51 to S52, which are specifically as follows:

[0106] S51: Obtain a preset first risk level comparison table and a second risk level comparison table.

[0107] In this embodiment, the obstacle avoidance device obtains a preset first risk level comparison table and a second risk level comparison table, wherein the first risk level comparison table includes the correspondence between dynamic and static label data, angle relationship data, distance relationship data and risk levels of several obstacles; the second risk level comparison table includes the correspondence between position relationship data of several obstacle combinations and risk levels.

[0108] S52: According to the dynamic and static label data of several obstacles, the angle relationship data and the distance relationship data in the spatial relationship data between the mobile robot and the several obstacles, the first risk level correspondence table is traversed to obtain the risk levels of the areas corresponding to the several obstacles; according to the object category data of several obstacles and the position relationship data between the several obstacles, the second risk level correspondence table is traversed to obtain the risk levels of the areas corresponding to the several obstacle combinations; according to the risk levels of the areas corresponding to the several obstacles and the risk levels of the areas corresponding to the several obstacle combinations, the mobile robot is controlled to perform obstacle avoidance.

[0109] In this embodiment, the obstacle avoidance device traverses the first risk level correspondence table based on the dynamic and static label data of the several obstacles, the angle relationship data and the distance relationship data in the spatial relationship data between the mobile robot and the several obstacles, and obtains the risk levels of the areas corresponding to the several obstacles.

[0110] The obstacle avoidance device traverses the second risk level correspondence table according to the object category data of the several obstacles and the position relationship data between the several obstacles, obtains the risk level of the area corresponding to the several obstacle combinations, and controls the mobile robot to perform obstacle avoidance according to the risk level of the area corresponding to the several obstacles and the risk level of the area corresponding to the several obstacle combinations.

[0111] Please refer to Figure 8 , Figure 8 This is a schematic diagram of the structure of an obstacle avoidance device for a mobile robot provided by an embodiment of the present application. The device can implement all or part of the obstacle avoidance device for the mobile robot through software, hardware, or a combination of both. The device 8 includes:

[0112] An image acquisition module 81 is used to obtain a real-time image in a target area, wherein the real-time image includes a color image and a depth image;

[0113] A target detection module 82 is used to perform target detection on the color image to obtain obstacle information data of the target area, wherein the obstacle information data includes object category data, dynamic and static label data, and two-dimensional coordinate data of a plurality of obstacles;

[0114] A spatial relationship detection module 83 is used to align the color image and the depth image to obtain depth information data, perform spatial relationship detection based on the depth information data and the two-dimensional coordinate data of the plurality of obstacles, and obtain spatial relationship data between the mobile robot and the plurality of obstacles, wherein the spatial relationship data is used to indicate the angle relationship and distance relationship between the mobile robot and the obstacles;

[0115] A position relationship detection module 84 is used to predict the relationship between the plurality of obstacles according to the object category data and the two-dimensional coordinate data of the plurality of obstacles in the obstacle information data, obtain the relationship probability data between the plurality of obstacles, and obtain the position relationship data between the plurality of obstacles according to the relationship probability data, wherein the position relationship data is used to indicate the relative position relationship between the obstacles;

[0116] The mobile robot control module 85 is used to perform risk assessment based on object category data of several obstacles, dynamic and static label data, spatial relationship data between the mobile robot and several obstacles, and position relationship data between several obstacles, obtain risk assessment results, and control the mobile robot to avoid obstacles based on the risk assessment results.

[0117] In an embodiment of the present application, a real-time image in a target area is obtained through an image acquisition module, wherein the real-time image includes a color image and a depth image; a target detection module is used to perform target detection on the color image to obtain obstacle information data of the target area, wherein the obstacle information data includes object category data, dynamic and static label data, and two-dimensional coordinate data of a plurality of obstacles; a spatial relationship detection module is used to align the color image and the depth image to obtain depth information data, and a spatial relationship detection is performed based on the depth information data and the two-dimensional coordinate data of the plurality of obstacles to obtain spatial relationship data between the mobile robot and the plurality of obstacles, wherein the spatial relationship data is used to indicate the angular distance between the mobile robot and the obstacles. degree relationship and distance relationship; through the position relationship detection module, according to the object category data and two-dimensional coordinate data of several obstacles in the obstacle information data, the relationship between several obstacles is predicted to obtain the relationship probability data between several obstacles, and according to the relationship probability data, the position relationship data between several obstacles is obtained, wherein the position relationship data is used to indicate the relative position relationship between the obstacles; through the mobile robot control module, according to the object category data of several obstacles, the dynamic and static label data, the spatial relationship data between the mobile robot and several obstacles, and the position relationship data between several obstacles, a risk assessment is performed to obtain a risk assessment result, and according to the risk assessment result, the mobile robot is controlled to perform obstacle avoidance work. Based on the real-time collected color image and depth image, the relevant information of several obstacles in the target area is extracted, and according to the relevant information of several obstacles, the spatial relationship information between the mobile robot and several obstacles and the position relationship information between several obstacles are analyzed, and the risk assessment is performed according to the object category information and dynamic and static label information in the spatial relationship information, the position relationship information and the relevant information of several obstacles, so as to control the mobile robot to perform efficient and safe obstacle avoidance work, thereby further improving production efficiency.

[0118] Please refer to Fig. 9 , Fig. 9 The computer device 9 includes: a processor 91, a memory 92, and a computer program 93 stored in the memory 92 and executable on the processor 91; the computer device may store a plurality of instructions, which are suitable for being loaded and executed by the processor 91. Figures 1 to 7 The method steps of the embodiment shown in the figure, and the specific execution process can be referred to as shown in the figure Figures 1 to 7 The specific description of the illustrated embodiment will not be repeated here.

[0119] Among them, the processor 91 may include one or more processing cores. The processor 91 uses various interfaces and lines to connect various parts in the server, and executes various functions and processes data of the obstacle avoidance device 8 of the mobile robot by running or executing instructions, programs, code sets or instruction sets stored in the memory 92, and calling the data in the memory 92. Optionally, the processor 91 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programble Logic Array, PLA). The processor 91 can integrate one or more combinations of a central processing unit 91 (Central Processing Unit, CPU), an image processor 91 (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed on the touch display; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 91, and it can be implemented by a single chip.

[0120] Among them, the memory 92 may include a random access memory 92 (Random Access Memory, RAM), and may also include a read-only memory 92 (Read-Only Memory). Optionally, the memory 92 includes a non-transitory computer-readable storage medium. The memory 92 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 92 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as touch instructions, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 92 may also be optionally at least one storage device located away from the aforementioned processor 91.

[0121] The present application also provides a storage medium, which can store multiple instructions, which are suitable for the processor to load and execute the above-mentioned Figures 1 to 7 The method steps of the embodiment shown in the figure, and the specific execution process can be referred to as shown in the figure Figures 1 to 7 The specific description of the illustrated embodiment will not be repeated here.

[0122] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0123] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0124] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraint algorithm of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0125] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0126] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0127] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0128] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc.

[0129] The present invention is not limited to the above-mentioned embodiments. If various changes or modifications to the present invention do not depart from the spirit and scope of the present invention, and if these changes and modifications fall within the scope of the claims and equivalent technologies of the present invention, the present invention is also intended to include these changes and modifications.

Claims

1. A method for avoiding obstacles of a mobile robot, characterized in that: The following steps are involved: Obtaining a real-time image within the target area, wherein the real-time image includes a color image and a depth image; Performing target detection on the color image to obtain obstacle information data of the target area, wherein the obstacle information data includes object category data, dynamic and static label data, and two-dimensional coordinate data of a plurality of obstacles; Aligning the color image and the depth image to obtain depth information data, performing spatial relationship detection based on the depth information data and the two-dimensional coordinate data of the plurality of obstacles to obtain spatial relationship data between the mobile robot and the plurality of obstacles, wherein the spatial relationship data is used to indicate an angular relationship and a distance relationship between the mobile robot and the obstacles; According to the object category data and the two-dimensional coordinate data of the plurality of obstacles in the obstacle information data, the relationship between the plurality of obstacles is predicted to obtain the relationship probability data between the plurality of obstacles, and according to the relationship probability data, the position relationship data between the plurality of obstacles is obtained, wherein the position relationship data is used to indicate the relative position relationship between the obstacles; A risk assessment is performed based on object category data of several obstacles, dynamic and static label data, spatial relationship data between the mobile robot and several obstacles, and position relationship data between several obstacles to obtain a risk assessment result. Based on the risk assessment result, the mobile robot is controlled to perform obstacle avoidance work.

2. The obstacle avoidance method for a mobile robot according to claim 1, characterized in that: The two-dimensional coordinate data is two-dimensional bounding box coordinate data of a bounding box constructed around the obstacle; The spatial relationship data includes angle relationship data and distance relationship data; The method of aligning the color image and the depth image to obtain depth information data, performing spatial relationship detection according to the depth information data and the two-dimensional coordinate data of a plurality of obstacles, and obtaining spatial relationship data between the mobile robot and the plurality of obstacles comprises the steps of: A coordinate system is constructed with the mobile robot as the origin. According to the two-dimensional bounding box coordinate data of several obstacles, the two-dimensional image depth data and a preset spatial coordinate calculation algorithm, spatial coordinate transformation is performed to obtain the spatial coordinate data of several obstacles. The spatial coordinate calculation algorithm is: In the formula, X c is the horizontal axis coordinate in the spatial coordinate data, Y c is the vertical axis coordinate in the spatial coordinate data, Z c is the vertical axis coordinate in the spatial coordinate data, f x is the horizontal focal length of the camera, f y is the vertical focal length of the camera, c x is the horizontal axis coordinate of the camera at the optical center in the coordinate system, c y is the vertical axis coordinate of the camera at the optical center in the coordinate system, u and v are the horizontal axis coordinate and the vertical axis coordinate in the two-dimensional bounding box coordinate data respectively, and Z is the depth value in the two-dimensional image depth data; According to the spatial coordinate data between the several obstacles, the angle value and the distance value between the mobile robot and the several obstacles are calculated. According to the angle value and the preset several angle threshold intervals, the angle relationship data between the mobile robot and the several obstacles are obtained. According to the distance value and the preset several distance threshold intervals, the distance relationship data between the mobile robot and the several obstacles are obtained.

3. The obstacle avoidance method for a mobile robot according to claim 2, characterized in that: The relationship probability data includes deep relationship probability data; The method of predicting the relationship between the plurality of obstacles based on the object category data and the two-dimensional coordinate data of the plurality of obstacles in the obstacle information data to obtain the probability data of the relationship between the plurality of obstacles comprises the steps of: Combining a plurality of obstacles in pairs to construct a plurality of obstacle combinations, and obtaining subject-object information data of the plurality of obstacle combinations, wherein the subject-object information data is used to indicate obstacles serving as subject objects and obstacles serving as object objects in the obstacle combinations; Extracting information based on subject-object information data of the plurality of obstacle combinations, object category data of the plurality of obstacles in the obstacle information data, and two-dimensional coordinate data to obtain context information data of the plurality of obstacle combinations, wherein the context information data includes a semantic vector and a bounding box position vector of the obstacle as the subject object, a semantic vector and a bounding box position vector of the obstacle as the object object, and a bounding box position difference vector between the obstacle as the object object and the obstacle as the subject object; Performing depth feature extraction according to the depth information data and the context information data of the plurality of obstacle combinations to obtain bounding box depth feature vectors of obstacles as subject objects and bounding box depth feature vectors of obstacles as object objects in the plurality of obstacle combinations; According to the bounding box depth feature vector of the obstacle as the main object, the bounding box depth feature vector of the obstacle as the object object in the same obstacle combination, and a preset depth relationship feature extraction algorithm, the depth relationship feature vectors of several obstacle combinations are obtained, and the depth relationship feature vectors of the several obstacle combinations are sequentially subjected to full connection layer processing and nonlinear transformation processing to obtain the depth relationship probability data of the several obstacle combinations, wherein the depth relationship feature extraction algorithm is: In the formula, is the deep relationship feature vector, is the depth feature vector of the bounding box of the obstacle as the main object, is the depth feature vector of the bounding box of the obstacle as the object.

4. The obstacle avoidance method for a mobile robot according to claim 3, characterized in that: The relationship probability data includes contact relationship probability data; The method of performing relationship prediction on a plurality of obstacle combinations based on the object category data and two-dimensional coordinate data of a plurality of obstacles in the obstacle information data to obtain relationship probability data between the plurality of obstacles comprises the steps of: According to the depth relationship feature vectors of the plurality of obstacle combinations and a preset contact relationship feature extraction algorithm, the contact relationship feature vectors of the plurality of obstacle combinations are obtained, wherein the contact relationship feature extraction algorithm is: In the formula, is the contact relationship feature vector; According to the contact relationship feature vectors of the plurality of obstacle combinations, the context information data and the preset contact relationship probability calculation algorithm, the contact relationship probability data of the plurality of obstacle combinations are obtained, wherein the contact relationship probability calculation algorithm is: In the formula, RC is the contact relationship probability data, σ(·) is the activation function, FC(·) is the full connection function, Context information data.

5. The obstacle avoidance method for a mobile robot according to claim 4, characterized in that: The relationship probability data includes visual relationship probability data; The method of performing relationship prediction on a plurality of obstacle combinations based on the object category data and two-dimensional coordinate data of a plurality of obstacles in the obstacle information data to obtain relationship probability data between the plurality of obstacles comprises the steps of: Extracting visual information based on subject-object information data and color images of several obstacle combinations, obtaining visual feature vectors of obstacles as subject objects and visual feature vectors of obstacles as object objects in several obstacle combinations, and performing feature fusion on the visual feature vectors of obstacles as subject objects and visual feature vectors of obstacles as object objects in the same obstacle combination, to obtain visual relationship feature vectors of several obstacle combinations; According to the visual relationship feature vectors of the plurality of obstacle combinations and a preset visual relationship probability calculation algorithm, the visual relationship probability data of the plurality of obstacle combinations are obtained, wherein the visual relationship probability calculation algorithm is: In the formula, R v is the visual relationship probability data, is the visual relationship feature vector, W V is the weight parameter, b V is the bias parameter.

6. The obstacle avoidance method for a mobile robot according to claim 5, characterized in that: The step of obtaining position relationship data between a plurality of obstacles according to the relationship probability data comprises the following steps: According to the depth relationship probability data, contact relationship probability data, visual relationship probability data of the plurality of obstacle combinations and a preset position relationship probability data calculation algorithm, the position relationship probability data of the plurality of obstacle combinations are obtained; according to the position relationship corresponding to the maximum position relationship probability vector in the position relationship probability data, the position relationship data of the plurality of obstacle combinations are obtained, wherein the position relationship probability data calculation algorithm is: In the formula, R is the position relationship probability data, R d is the deep relationship probability data, α is the first empirical factor, and β is the second empirical factor.

7. The obstacle avoidance method for a mobile robot according to claim 5, characterized in that: The risk assessment result includes the risk levels of the areas corresponding to the several obstacles and the risk levels of the areas corresponding to the several combinations of obstacles; The risk assessment is performed based on the object category data of the plurality of obstacles, the dynamic and static label data, the spatial relationship data between the mobile robot and the plurality of obstacles, and the position relationship data between the plurality of obstacles to obtain the risk assessment result, including the steps of: Obtain a preset first risk level comparison table and a second risk level comparison table, wherein the first risk level comparison table includes the correspondence between the dynamic and static label data, angle relationship data, distance relationship data and risk levels of a plurality of obstacles; and the second risk level comparison table includes the correspondence between the position relationship data and risk levels of a plurality of obstacle combinations; According to the dynamic and static label data of several obstacles, the angle relationship data and the distance relationship data in the spatial relationship data between the mobile robot and the several obstacles, the first risk level correspondence table is traversed to obtain the risk levels of the areas corresponding to the several obstacles; according to the object category data of the several obstacles and the position relationship data between the several obstacles, the second risk level correspondence table is traversed to obtain the risk levels of the areas corresponding to the several obstacle combinations; according to the risk levels of the areas corresponding to the several obstacles and the risk levels of the areas corresponding to the several obstacle combinations, the mobile robot is controlled to perform obstacle avoidance.

8. An obstacle avoidance device for a mobile robot, characterized in that: include: An image acquisition module, used to obtain a real-time image within a target area, wherein the real-time image includes a color image and a depth image; A target detection module, used to perform target detection on the color image to obtain obstacle information data of the target area, wherein the obstacle information data includes object category data, dynamic and static label data, and two-dimensional coordinate data of a plurality of obstacles; A spatial relationship detection module, used to align the color image and the depth image to obtain depth information data, perform spatial relationship detection based on the depth information data and the two-dimensional coordinate data of the plurality of obstacles, and obtain spatial relationship data between the mobile robot and the plurality of obstacles, wherein the spatial relationship data is used to indicate the angle relationship and distance relationship between the mobile robot and the obstacles; a position relationship detection module, used to predict the relationship between the plurality of obstacles according to the object category data and the two-dimensional coordinate data of the plurality of obstacles in the obstacle information data, obtain the relationship probability data between the plurality of obstacles, and obtain the position relationship data between the plurality of obstacles according to the relationship probability data, wherein the position relationship data is used to indicate the relative position relationship between the obstacles; The mobile robot control module is used to perform risk assessment based on object category data of several obstacles, dynamic and static label data, spatial relationship data between the mobile robot and several obstacles, and position relationship data between several obstacles, obtain risk assessment results, and control the mobile robot to avoid obstacles based on the risk assessment results.

9. A computer device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and executable on the processor; when the computer program is executed by the processor, the steps of the obstacle avoidance method for a mobile robot as described in any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the obstacle avoidance method for a mobile robot as described in any one of claims 1 to 7 are implemented.