Robot motion trajectory generation method and storage medium based on indoor three-dimensional scene

By generating obstacle infographics and grid maps in indoor three-dimensional scenes, and using full coverage path planning algorithms, the problem of insufficient coverage of robot training data sets in the prior art is solved, and the motion trajectory generation suitable for different types of robots is realized, and the quality and user experience of the data set are improved.

CN114839981BActive Publication Date: 2025-05-09HANGZHOU QUNHE INFORMATION TECHNOLOGIES CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210431158.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-22
Publication Date
2025-05-09
Estimated Expiration
2042-04-22

AI Technical Summary

Technical Problem

The prior art is difficult to generate indoor motion trajectories suitable for different types of robots, resulting in insufficient coverage of robot training data sets, affecting the performance of the algorithm in actual use.

Method used

By obtaining the depth map of the indoor three-dimensional scene, an obstacle infographic is generated, and area segmentation and grid map conversion are performed. The full coverage path planning algorithm is used to generate motion trajectories that meet the needs of various robots.

Benefits of technology

It realizes the rapid generation of massive robot training data sets, adapting to the motion needs of different types of robots, and improving the coverage and user experience of the data set.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114839981B_ABST
    Figure CN114839981B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and storage medium for generating a robot motion trajectory based on an indoor three-dimensional scene, the method comprising: obtaining a depth map of a preset height in an indoor three-dimensional scene; generating an obstacle information map based on the depth map, wherein pixels in the obstacle information map are divided into obstacle pixels or non-obstacle pixels; performing region segmentation on the obstacle information map to obtain an obstacle information map corresponding to each room, and using the obstacle information map of each room as a sub-region map; generating a corresponding high-precision grid map and a low-precision grid map according to each sub-region map; generating a sub-region full coverage path corresponding to each sub-region map based on the high-precision grid map and the low-precision grid map corresponding to each sub-region map. The present invention can generate motion trajectories that meet the requirements of various types of robots, so as to facilitate the rapid production of massive robot training data sets.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the field of robot simulation, and in particular relates to a method for generating a robot motion trajectory based on an indoor three-dimensional scene. Background Art

[0002] In recent years, with the development of science and technology and the improvement of people's living standards, people's demand for indoor service robots has become more and more urgent. Based on this demand, indoor service robots, especially sweeping robots, have developed rapidly. A major factor affecting the performance of such indoor service robots is their ability to automatically plan trajectories and identify and avoid obstacles. The SLAM (Simultaneous localization and mapping) algorithm gives the robot this ability. From design to verification, an excellent SLAM algorithm requires a large number of data sets for testing, such as the Kitti data set and the EuRoC data set. However, these data sets rely on manual collection from real scenes, which is not only time-consuming and labor-intensive, but also difficult to ensure that the data set has a wide enough coverage. This is even more true for indoor service robots. Home types are complex and furniture placement varies greatly. It is almost impossible to obtain a sufficiently rich data set from real scenes by manpower. The insufficient coverage of the data set will cause the designed algorithm to encounter many corner cases in actual use, affecting the user experience.

[0003] Existing technologies, such as the Chinese patent document with patent publication number CN113067986A, propose an editable automatic camera trajectory generation solution, whose main function is to calculate the camera pose according to the customized trajectory parameters and camera parameters, thereby forming a camera motion trajectory. However, this method cannot be well adapted to the needs of indoor robots. Different types of robots have different drivable areas for the same scene. The trajectory generated using the same scene graph cannot be adapted to all types of robots. Therefore, it still cannot solve the problem that the training of indoor robots in the prior art is limited by the data set. Summary of the invention

[0004] One of the purposes of the present invention is to provide a robot motion trajectory generation method based on an indoor three-dimensional scene, which generates motion trajectories that meet the requirements of various types of robots, so as to quickly produce massive robot training data sets.

[0005] To achieve the above object, the technical solution adopted by the present invention is:

[0006] A method for generating a robot motion trajectory based on an indoor three-dimensional scene, the method comprising:

[0007] S1, obtaining a depth map of a preset height in an indoor three-dimensional scene;

[0008] S2. generating an obstacle information map based on the depth map, where pixels in the obstacle information map are divided into obstacle pixels or non-obstruction pixels;

[0009] S3, performing region segmentation on the obstacle information map to obtain an obstacle information map corresponding to each room, and using the obstacle information map of each room as a sub-region map;

[0010] S4. Generate a corresponding high-precision grid map and a low-precision grid map according to each sub-region map, including:

[0011] S41, determining whether a square area with each pixel as the center and the robot diameter as the side length in the sub-area map contains an obstacle pixel, setting each pixel value of the obstacle pixel to the first single value, otherwise, setting it to the second single value, and traversing each pixel to obtain a binary image as a high-precision grid map;

[0012] S42, dividing the pixels in the high-precision grid map into square areas with the robot diameter as the side length, setting the pixel value in the square area whose central pixel is a non-obstruction pixel to the second single value, otherwise setting it to the first single value, and traversing each square area to obtain a binary image as the low-precision grid map;

[0013] S5. Generate a sub-region full coverage path corresponding to each sub-region map based on the high-precision grid map and the low-precision grid map corresponding to each sub-region map, including:

[0014] S51, using a full coverage path planning algorithm with a low-precision grid map as the main component and a high-precision grid map as the auxiliary component to generate a full coverage path for each room;

[0015] S52. Calculate the connectivity between the full coverage paths in each room based on the low-precision grid map, and connect the full coverage paths with connectivity in the room end to end using the A* algorithm for each room to obtain the sub-area full coverage path corresponding to each room.

[0016] Several optional methods are also provided below, but they are not intended to be additional limitations on the above-mentioned overall solution, but are merely further supplements or preferences. Under the premise that there are no technical or logical contradictions, each optional method can be combined with the above-mentioned overall solution separately, and multiple optional methods can also be combined.

[0017] Preferably, the step of obtaining a depth map at a preset height in an indoor three-dimensional scene includes:

[0018] Take the indoor 3D scene data, arrange the orthogonal camera at a preset height, and obtain the depth map of the orthogonal projection.

[0019] Preferably, generating an obstacle information map based on the depth map includes:

[0020] Get the height range [A, B] of the required obstacle information input by the user;

[0021] Set the minimum depth threshold to BA;

[0022] The depth map with a height of B is binarized. If the depth value of a pixel is less than the threshold BA, the pixel value of the pixel is set to the first single value, otherwise the pixel value of the pixel is set to the second single value. Each pixel in the depth map with a height of B is traversed to obtain an obstacle information map. The pixel points in the obstacle information map with the first single value represent obstacle pixels, and the pixel points in the obstacle information map with the second single value represent non-obstruction pixels.

[0023] Preferably, the step of performing region segmentation on the obstacle information map comprises:

[0024] Convert the room outline information in the world coordinate system into the room outline information in the image pixel coordinate system;

[0025] Dividing the obstacle information map into a plurality of preliminary sub-region maps according to each room contour information in the image pixel coordinate system;

[0026] In each preliminary sub-region map, the room outline is re-taken into a rectangular area according to the maximum and minimum values ​​of the outline pixels;

[0027] The parts outside the rectangular area in the preliminary sub-area map are set as obstacles to obtain the sub-area map.

[0028] Preferably, the step S4 further comprises:

[0029] Add a layer of obstacle boundary to the image boundary of the high-precision grid map and the low-precision grid map respectively. The width of the obstacle boundary is the diameter of the robot.

[0030] The high-precision grid map and the low-precision grid map are transformed from the original pixel coordinates with the long sides of the high-precision grid map and the low-precision grid map as the positive direction of the x-axis and a vertex of the long side as the origin.

[0031] Preferably, the method of using a full coverage path planning algorithm with a low-precision grid map as the main method and a high-precision grid map as the auxiliary method to generate a full coverage path for each room includes:

[0032] The full coverage path planning algorithm uses the low-precision grid as the input grid to calculate the full coverage path;

[0033] In the process of calculating the full coverage path, if the grid corresponding to the obstacle pixel is encountered when traversing the grid corresponding to the non-obstruction pixel, the grid corresponding to the next non-obstruction pixel is searched in the original traversal direction until the preset length is exceeded. After the preset length is exceeded, the shortest reachable path is calculated in the high-precision grid map using the A* algorithm with the grids corresponding to the two non-obstruction pixels as the two ends;

[0034] If there is a shortest reachable path, the path is added to the full coverage path, and the traversal continues in the low-precision grid map starting from the grid corresponding to the next non-obstruction pixel; if there is no shortest reachable path, the original full coverage path planning algorithm is executed normally.

[0035] Preferably, the sub-area full coverage path corresponding to each room is converted from the image pixel coordinate system to the world coordinate system, the motion trajectory of the robot in the world coordinate system is obtained, and an indoor scene training data set is generated based on the motion trajectory.

[0036] The robot motion trajectory generation method based on indoor three-dimensional scenes provided by the present invention obtains scene data from a highly realistic simulation environment for making a data set, which is an efficient and convenient way. The present invention can automatically generate a robot motion trajectory that traverses each room and avoids furniture according to the apartment design and furniture layout. In addition, considering that different types of robots have different obstacle avoidance requirements, for example, a sweeping robot can enter the bottom of a sofa or table at a corresponding height according to its own height, and can enter a carpet at a corresponding height due to its different ability to climb over obstacles. The drone cruises in a specified height range and needs to know the distribution of obstacles in this height range. These requirements can be met by the automatic trajectory generation solution designed by the present invention.

[0037] Therefore, the present invention can be typically applied to the production of robot indoor scene datasets. By using realistic indoor home scene datasets, the motion trajectories required by various robots can be automatically generated in a simulation environment. Cameras, radars and other sensors can be arranged on the motion trajectories to obtain simulated motion datasets from the robot's perspective, thereby quickly producing massive robot training datasets.

[0038] A second object of the present invention is to provide a computer-readable storage medium on which a computer program is processed to generate motion trajectories that meet the requirements of various types of robots, so as to facilitate the rapid production of massive robot training data sets.

[0039] To achieve the above object, the technical solution adopted by the present invention is:

[0040] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the method for generating a robot motion trajectory based on an indoor three-dimensional scene. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] Figure 1 It is a flow chart of the method for generating robot motion trajectory based on indoor three-dimensional scene of the present invention;

[0042] Figure 2 This is the depth map when the camera height of the present invention is 960 mm;

[0043] Figure 3 For the present invention and Figure 2 Depth map of the same indoor 3D scene with a camera height of 1960mm;

[0044] Figure 4 For the present invention Figure 2 Obstacle information map with a height range of 100mm-1960mm in indoor 3D scenes;

[0045] Figure 5 For the present invention Figure 2 Obstacle information map with a height range of 1000mm-1960mm in indoor 3D scenes;

[0046] Figure 6 Based on Figure 4 A schematic diagram of the sub-area full coverage path generated by the obstacle information map;

[0047] Figure 7 Based on Figure 5 Schematic diagram of the sub-area full coverage path generated by the obstacle information map. DETAILED DESCRIPTION

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

[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.

[0050] In order to solve the problem of time-consuming and labor-intensive methods of collecting robot simulation training data sets in the prior art, the present embodiment provides a robot motion trajectory generation method based on an indoor three-dimensional scene. The method quickly generates a large number of motion trajectories that meet the specific needs of indoor mobile robots in a simulation environment based on the indoor three-dimensional data set, and assists in generating a robot simulation training data set for users to verify related algorithms.

[0051] For the convenience of description, this embodiment takes a sweeping robot as an example. In this embodiment, a full coverage path algorithm of the ox-ploughing method that meets the needs of the sweeping robot is selected as the full coverage path planning algorithm. In actual use, it can be replaced with a trajectory generation algorithm that meets the needs of the robot's own movement. The present invention requires three inputs: indoor three-dimensional scene data, room boundary point coordinate information in the scene, and robot diameter.

[0052] Specifically, Figure 1 As shown, the method for generating a robot motion trajectory based on an indoor three-dimensional scene in this embodiment includes the following steps:

[0053] S1. Obtain a depth map of a preset height in an indoor three-dimensional scene.

[0054] Based on the indoor three-dimensional scene data set, different indoor scene data are obtained. It is easy to understand that the indoor three-dimensional scene data as input information can be pulled from a specified furniture design software, or can be obtained by other specified methods, which is not limited in this embodiment.

[0055] An orthogonal camera is placed at a specified height of the 3D scene to look down at the panorama and obtain a depth map of orthogonal projection. This embodiment selects an orthogonal camera because orthogonal projection does not change the size and position of objects due to distance, thereby ensuring that the room outline and layout will not change in the depth map at different heights. Figure 2 , Figure 3 The depth images of the same indoor 3D scene are shown when the camera height is 960mm and 1960mm respectively. The size and pixel coordinates of the same object in the two images are the same, and the only difference is the depth value. Of course, these two values ​​are just examples, and the height value can be set arbitrarily between 0 and the room height.

[0056] S2. Generate an obstacle information map based on the depth map, where each pixel in the obstacle information map is divided into an obstacle pixel or a non-obstacle pixel.

[0057] In order to intuitively reflect whether there are obstacles, this embodiment uses a binary image as the obstacle information image. First, the minimum depth threshold is set to BA according to the height interval [A, B] of the required obstacle information input by the user. The depth map with a height of B is binarized. If the depth value of the pixel point is less than the threshold BA, the pixel value of the pixel point is set to the first single value, otherwise the pixel value of the pixel point is set to the second single value. Each pixel point in the depth map with a height of B is traversed to obtain the obstacle information map. The pixel points with the first single value in the obstacle information map represent obstacle pixels, and the pixel points with the second single value in the obstacle information map represent non-obstruction pixels.

[0058] For example, if obstacle information is required between a height range of 300mm (A=300mm) and 1000mm (B=1000mm), the minimum depth threshold is set to (1000-300)mm, and the depth map with a camera height of 1000mm is binarized. When the depth value of a pixel is less than the depth threshold, the pixel value is set to the first single value, otherwise it is set to the second single value. In this way, the depth map can be converted into a binary map that reflects whether the pixel is an obstacle. If the pixel value is the first single value, it means that there is an obstacle in the height range, and if it is the second single value, it means that there is no obstacle in the height range. Figure 4 and Figure 5 The following table shows the Figure 2 Obstacle information map with height ranges of 100mm-1960mm and 1000mm-1960mm in the scene, where black areas represent obstacles.

[0059] S3. Performing region segmentation on the obstacle information map to obtain an obstacle information map corresponding to each room, and using the obstacle information map of each room as a sub-region map.

[0060] The three-dimensional scene data provides the coordinate information of the room boundary points of each three-dimensional home scene (ie, room contour information). The obtained obstacle information map can be segmented according to the room contour information to obtain a binary map of each room as a sub-area map.

[0061] Since the room outline information in the database is in the real scene world coordinate system, it is necessary to calculate the transformation matrix to convert it to the pixel coordinate system of the image. The calculation of the transformation matrix is ​​mainly divided into two steps. First, the room outline information in the world coordinate system is converted to the camera coordinate system, and then from the camera coordinate system to the image pixel coordinate system. The specific process is as follows:

[0062] 1) Convert world coordinate system to camera coordinate system:

[0063]

[0064] In formula (1), (x, y, z) is the camera coordinates, x w ,y w ,z w Represents the world coordinates, R represents the rotation matrix of the camera, and t represents the translation vector of the camera. R and t can be obtained according to the camera position parameters.

[0065] 2) Convert the camera coordinate system to the image pixel coordinate system:

[0066] Because orthogonal projection has no scaling, it can be directly calculated based on the proportional relationship between the orthogonal projection field of view and the image size. Assuming that the image size is u,v and the orthogonal projection field of view size is U,V, the transformation matrix can be obtained as transform in formula (2).

[0067]

[0068] At this point, the transformation matrix that converts the spatial points of the room contour information into the pixel points of the image space is obtained.

[0069] After obtaining the room contour information in the image pixel coordinate system, the image processing algorithm is used to divide the binary image in S2 into multiple preliminary sub-region maps. In each preliminary sub-region map, the room contour is divided into rectangular areas according to the maximum and minimum values ​​of the contour pixels of each sub-region, and the part outside the contour area in the preliminary sub-region map is set as an obstacle to prevent unnecessary calculations, thereby obtaining a sub-region map.

[0070] There are several points that characterize the outline of the room. Find the maximum and minimum values ​​of the x and y coordinates of these points, and draw a rectangle with these values. The area outside the rectangular outline refers to all other spaces except this room. Because there are several rooms in a scene, when processing room A, for example, all other rooms including the outline are set as obstacles to avoid repeated calculations. The operation of setting as obstacles in this embodiment is to set the pixel value of the corresponding pixel to the first single value.

[0071] S4. Generate a corresponding high-precision grid map and a low-precision grid map according to each sub-region map.

[0072] Each sub-region image to be processed obtained in step S3 is processed to convert the binary image representing whether a pixel contains an obstacle into a binary image representing whether the robot will collide with the obstacle when the robot coincides with the center of the pixel, that is, whether the robot can be placed at the pixel. The specific steps are as follows:

[0073] S41. This embodiment uses the erosion operation of the image processing algorithm to calculate whether each pixel in the binary image is the square area with the robot diameter as the center, that is, to determine whether the square area with each pixel as the center and the robot diameter as the side length in the sub-area map contains obstacle pixels, and set the pixel value of each pixel located at the center containing the obstacle pixel as the first single value, otherwise, set it to the second single value, and traverse each pixel to obtain the binary image as the high-precision grid map.

[0074] S42. To speed up the path calculation, this embodiment further coarsens the high-precision grid map according to the diameter of the robot, divides the pixels in the high-precision grid map into square areas with the diameter of the robot as the side length, sets the pixel value in the square area whose central pixel is a non-obstruction pixel to the second single value, otherwise it is set to the first single value, and the binary image obtained after traversing each square area is used as the low-precision grid map.

[0075] In the high-precision and low-precision grids obtained in this embodiment, the second single-valued pixel points all represent places where the robot can be placed. In addition, to ensure the robustness of the algorithm at the edge of the image, this embodiment adds a layer of obstacle boundary (i.e., pixel points with pixel values ​​of the first single value) around the image boundaries of the high-precision grid map and the low-precision grid map, and the width of the obstacle boundary is the diameter of the robot. Finally, the long sides of the two grid images are used as the positive direction of the x-axis, and one vertex of the long side is used as the origin for coordinate transformation to ensure that the side length is used as the traversal direction when planning the full coverage path.

[0076] Usually, the original pixel coordinates of an image are the top left corner as the origin, the right as the positive x direction, and the bottom as the positive y direction. Therefore, the above coordinate transformation means rotating the original image so that its longest side coincides with the positive x-axis, and the vertex of the long side is the origin. The coordinates of the high-precision grid map and the low-precision grid map conversion are both pixel coordinates.

[0077] S5. Generate a sub-region full coverage path corresponding to each sub-region map based on the high-precision grid map and the low-precision grid map corresponding to each sub-region map.

[0078] For each pair of high-precision grid maps and low-precision grid maps calculated in step S4, using the improved full coverage path planning algorithm to calculate the full coverage path in the sub-area map includes:

[0079] S51. A full coverage path planning algorithm is used with a low-precision grid map as the main component and a high-precision grid map as the auxiliary component to generate a full coverage path for each room.

[0080] First, a low-precision grid is used as the input grid and the full coverage path is calculated by the full coverage path planning algorithm to obtain each coverage path in the sub-area until all pixels of the grid are covered.

[0081] In the process of calculating the full coverage path, in order to ensure the continuity of the path, the present invention uses the high-precision grid map in step S4 as an aid, so that the algorithm can avoid obstacles when encountering some small obstacles. If the grid corresponding to the obstacle pixel is encountered when traversing the grid corresponding to the non-obstruction pixel, the grid corresponding to the next non-obstruction pixel is first searched in the original traversal direction until it exceeds the preset length, and the N×1 (N is the distance between the grids corresponding to the two non-obstruction pixels) low-precision grids formed at both ends are calculated in the high-precision grid map by the A* algorithm.

[0082] If there is a shortest reachable path, add it to the full coverage path of the sub-region, and continue to traverse in the low-precision grid map starting from the grid corresponding to the next non-obstructed pixel; if there is no shortest reachable path, execute normally according to the original full coverage path planning algorithm. Finally, post-process all coverage paths in the sub-region, and delete coverage paths whose length is less than a certain threshold as needed.

[0083] S52, based on the low-precision grid map, calculate the connectivity between the full coverage paths in each room, and connect the full coverage paths with connectivity in the room end to end using the A* algorithm to obtain the sub-area full coverage path corresponding to each room. Figure 6 , Figure 7 The following table shows the Figure 4 , Figure 5 The effect diagram of the sub-area full coverage path under the corresponding height interval. In this embodiment, several trajectories in the same room are connected, but the trajectories between different rooms are disconnected.

[0084] Based on this, this embodiment can obtain motion trajectories that meet the needs of various types of robots by replacing different indoor three-dimensional scene data and setting different height areas, and obtain a training data set based on the motion trajectory. Specifically, the coordinates of the full coverage path of each sub-area obtained in S5 are converted back to the original world coordinate system coordinates according to the inverse matrix of the transform matrix, thereby obtaining the motion trajectory of the robot in the simulated indoor environment, which is used to assist in generating an indoor scene data set.

[0085] The trajectory generation method provided in this embodiment is based on a large amount of indoor home scene data, and can quickly generate a large number of indoor robot motion trajectories and produce a large number of scene data sets. In addition, the embodiment has a high degree of generalization ability, and can obtain obstacle information in any height range according to user needs, and then generate a trajectory map of the corresponding height range according to the corresponding trajectory generation algorithm, which meets the motion requirements of various indoor robots.

[0086] It should be noted that Figures 2 to 7 They are mainly renderings of depth maps, binary maps, and path planning maps, which are schematic diagrams after image processing and do not involve the focus of improvement in this application. The clarity of the schematic interface is related to pixels and scaling, so the presentation effect is relatively limited.

[0087] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0088] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0089] The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A method for generating robot motion trajectories based on indoor three-dimensional scenes, characterized in that: The method for generating a robot motion trajectory based on an indoor three-dimensional scene comprises: S1, obtaining a depth map of a preset height in an indoor three-dimensional scene; S2. generating an obstacle information map based on the depth map, where pixels in the obstacle information map are divided into obstacle pixels or non-obstruction pixels; S3, performing region segmentation on the obstacle information map to obtain an obstacle information map corresponding to each room, and using the obstacle information map of each room as a sub-region map; S4. Generate a corresponding high-precision grid map and a low-precision grid map according to each sub-region map, including: S41, determining whether a square area with each pixel as the center and the robot diameter as the side length in the sub-area map contains an obstacle pixel, setting each pixel value of the obstacle pixel to the first single value, otherwise, setting it to the second single value, and traversing each pixel to obtain a binary image as a high-precision grid map; S42, dividing the pixels in the high-precision grid map into square areas with the robot diameter as the side length, setting the pixel value in the square area whose central pixel is a non-obstruction pixel to the second single value, otherwise setting it to the first single value, and traversing each square area to obtain a binary image as the low-precision grid map; S5. Generate a sub-region full coverage path corresponding to each sub-region map based on the high-precision grid map and the low-precision grid map corresponding to each sub-region map, including: S51, using a full coverage path planning algorithm with a low-precision grid map as the main component and a high-precision grid map as the auxiliary component to generate a full coverage path for each room; S52. Calculate the connectivity between the full coverage paths in each room based on the low-precision grid map, and connect the full coverage paths with connectivity in the room end to end using the A* algorithm for each room to obtain the sub-area full coverage path corresponding to each room.

2. The method for generating a robot motion trajectory based on an indoor three-dimensional scene according to claim 1, characterized in that: The step of obtaining a depth map at a preset height in an indoor three-dimensional scene includes: Take the indoor 3D scene data, arrange the orthogonal camera at a preset height, and obtain the depth map of the orthogonal projection.

3. The method for generating robot motion trajectories based on indoor three-dimensional scenes as claimed in claim 2, characterized in that: The generating an obstacle information map based on the depth map includes: Get the height range [A, B] of the required obstacle information input by the user; Set the minimum depth threshold to BA; The depth map with a height of B is binarized. If the depth value of a pixel is less than the threshold BA, the pixel value of the pixel is set to the first single value, otherwise the pixel value of the pixel is set to the second single value. Each pixel in the depth map with a height of B is traversed to obtain an obstacle information map. The pixel points in the obstacle information map with the first single value represent obstacle pixels, and the pixel points in the obstacle information map with the second single value represent non-obstruction pixels.

4. The method for generating a robot motion trajectory based on an indoor three-dimensional scene according to claim 1, characterized in that: The performing region segmentation on the obstacle information map includes: Convert the room outline information in the world coordinate system into the room outline information in the image pixel coordinate system; Dividing the obstacle information map into a plurality of preliminary sub-region maps according to each room contour information in the image pixel coordinate system; In each preliminary sub-region map, the room outline is re-taken into a rectangular area according to the maximum and minimum values ​​of the outline pixels; The parts outside the rectangular area in the preliminary sub-area map are set as obstacles to obtain the sub-area map.

5. The method for generating robot motion trajectories based on indoor three-dimensional scenes as claimed in claim 1, characterized in that: The S4 further comprises: Add a layer of obstacle boundary to the image boundary of the high-precision grid map and the low-precision grid map respectively. The width of the obstacle boundary is the diameter of the robot. The high-precision grid map and the low-precision grid map are transformed from the original pixel coordinates with the long sides of the high-precision grid map and the low-precision grid map as the positive direction of the x-axis and a vertex of the long side as the origin.

6. The method for generating robot motion trajectory based on indoor three-dimensional scene according to claim 1, characterized in that: The full coverage path planning algorithm is mainly based on the low-precision grid map and supplemented by the high-precision grid map to generate a full coverage path for each room, including: The full coverage path planning algorithm uses the low-precision grid as the input grid to calculate the full coverage path; In the process of calculating the full coverage path, if the grid corresponding to the obstacle pixel is encountered when traversing the grid corresponding to the non-obstruction pixel, the grid corresponding to the next non-obstruction pixel is searched in the original traversal direction until the preset length is exceeded. After the preset length is exceeded, the shortest reachable path is calculated in the high-precision grid map using the A* algorithm with the grids corresponding to the two non-obstruction pixels as the two ends; If there is a shortest reachable path, the path is added to the full coverage path, and the traversal continues in the low-precision grid map starting from the grid corresponding to the next non-obstruction pixel; if there is no shortest reachable path, the original full coverage path planning algorithm is executed normally.

7. The method for generating robot motion trajectory based on indoor three-dimensional scene according to claim 1, characterized in that: The full coverage path of the sub-area corresponding to each room is converted from the image pixel coordinate system to the world coordinate system, the motion trajectory of the robot in the world coordinate system is obtained, and an indoor scene training dataset is generated based on the motion trajectory.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Automatic camera track generation method, device and system capable of editing definition and storage medium

    CN113067986A

  • Robot topological map generation system and method, computer device and storage medium

    CN113741422A

  • Track generation method and device in narrow space, electronic equipment and storage medium

    CN113959445A