Grid map generation method, device, system, storage medium and electronic device

By obtaining three-dimensional pose data and two-dimensional point cloud data in robot motion, the error of two-dimensional point cloud data is reduced, and the problem of low grid map accuracy in the robot in the hill climbing scene is solved, achieving higher map accuracy and user experience.

CN113758481BActive Publication Date: 2025-03-25GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111032691.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-03
Publication Date
2025-03-25
Estimated Expiration
2041-09-03

AI Technical Summary

Technical Problem

In existing robots, in moving scenarios such as hill climbing, the two-dimensional point cloud data error is large, resulting in a reduced accuracy of the grid map and affecting the user experience.

Method used

By acquiring three-dimensional pose data of multiple positions and corresponding two-dimensional point cloud data, the three-dimensional pose data is used to reduce the accuracy loss of two-dimensional point cloud data in different directions, thereby generating a more accurate raster map.

Benefits of technology

Improve the accuracy and stability of the grid map, bringing users a better user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113758481B_ABST
    Figure CN113758481B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, system, storage medium and electronic device for generating a grid map, the method comprising obtaining three-dimensional posture data corresponding to each of a plurality of positions, obtaining two-dimensional point cloud data corresponding to each three-dimensional posture data, and generating a grid map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data. The present application can use three-dimensional posture data to reduce the precision loss of two-dimensional point cloud data in different directions in the process of constructing a grid map, so as to improve the accuracy and stability of the grid map and bring a better user experience to users.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of robot vision, and in particular to a grid map generation method, device, system, storage medium and electronic device. Background Art

[0002] With the rapid development of science and technology, robots that provide services to users are beginning to appear in more and more industries. Robots can perceive external information through their own sensors, and simultaneously perform positioning and build grid maps. Traditional vision technology uses cameras as sensors, uses image feature points (such as ORB, SIFT, etc.) to calculate the matching relationship between images, and builds maps by projecting these feature points onto a two-dimensional plane.

[0003] However, in the process of constructing grid maps by existing robots, when the robot passes through moving scenes such as climbing a slope, it is easy for the data to produce large errors, thereby reducing the accuracy of the grid map and affecting the user's experience of the robot. Summary of the invention

[0004] The embodiments of the present application provide a grid map generation method, device, system, storage medium and electronic device, which can reduce the error of two-dimensional point cloud data when the robot passes through moving scenarios such as climbing a slope, so as to ensure the accuracy of the generated grid map.

[0005] In a first aspect, an embodiment of the present application provides a method for generating a grid map, comprising:

[0006] Obtain three-dimensional pose data corresponding to each of the multiple positions;

[0007] Obtain the two-dimensional point cloud data corresponding to each three-dimensional pose data;

[0008] A grid map is generated according to each three-dimensional pose data and two-dimensional point cloud data corresponding to the three-dimensional pose data.

[0009] In a second aspect, an embodiment of the present application provides a grid map generating device, including:

[0010] A first acquisition module is used to acquire three-dimensional posture data corresponding to each of the multiple positions;

[0011] A second acquisition module is used to acquire two-dimensional point cloud data corresponding to each of the posture data;

[0012] The first processing module is used to generate a grid map according to each of the three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data.

[0013] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;

[0014] The processor is connected to the memory;

[0015] A memory for storing executable program codes;

[0016] The processor runs the program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the grid map generation method provided by the first aspect of the embodiment of the present application or any one of the implementations of the first aspect.

[0017] In a fourth aspect, an embodiment of the present application provides a grid map generation system, including:

[0018] A first acquisition unit is used to obtain three-dimensional posture data corresponding to each of the multiple positions;

[0019] A second acquisition unit is used to obtain two-dimensional point cloud data corresponding to each of the three-dimensional posture data;

[0020] A processing unit is used to generate a grid map according to each of the three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data.

[0021] In a fifth aspect, the embodiment of the present application further provides a grid map generation system, including:

[0022] A motor encoder is used to obtain three-dimensional posture data corresponding to multiple positions;

[0023] A laser radar, used to obtain two-dimensional point cloud data corresponding to each of the three-dimensional posture data;

[0024] A processor is used to generate a grid map according to each of the three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data.

[0025] In a sixth aspect, an embodiment of the present application provides a computer storage medium, which stores a computer program. The computer program includes program instructions. When the program instructions are executed by a processor, the grid map generation method provided by the first aspect of the embodiment of the present application or any one of the implementation methods of the first aspect can be implemented.

[0026] In the embodiment of the present application, the three-dimensional posture data corresponding to each of the multiple positions is obtained, the two-dimensional point cloud data corresponding to each of the three-dimensional posture data is obtained, and a grid map is generated according to each of the three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data. In the process of constructing the grid map, the three-dimensional posture data can be used to reduce the precision loss of the two-dimensional point cloud data in different directions, so as to improve the accuracy and stability of the grid map and bring a better user experience to the user. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0028] Figure 1 A schematic diagram of the architecture of a grid map generation system provided in an embodiment of the present application;

[0029] Figure 2 A schematic diagram of the structure of a legged robot based on a grid map generation system provided in an embodiment of the present application;

[0030] Figure 3 A flowchart of a grid map generation method provided in an embodiment of the present application;

[0031] Figure 4 A schematic diagram of a coordinate system rotation angle provided in an embodiment of the present application;

[0032] Figure 5 A schematic diagram of a flow chart of another method for generating a grid map provided in an embodiment of the present application;

[0033] Figure 6 A schematic diagram of motion trajectory optimization processing provided in an embodiment of the present application;

[0034] Figure 7 A schematic diagram of a flow chart of another method for generating a grid map provided in an embodiment of the present application;

[0035] Figure 8 A schematic diagram of a flow chart of another method for generating a grid map provided in an embodiment of the present application;

[0036] Fig. 9 A schematic diagram of the structure of a grid map generating device provided in an embodiment of the present application;

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

[0038] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.

[0039] The terms "first", "second", "third", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0040] See also Figure 1 , Figure 1 A schematic diagram of the architecture of a grid map generation system provided in an embodiment of the present application is shown.

[0041] like Figure 1 As shown, the grid map generation system may include at least a first acquisition unit 101, a second acquisition unit 102 and a processing unit 103, wherein:

[0042] The first acquisition unit 101 can obtain three-dimensional posture data corresponding to each of the multiple positions, and each three-dimensional posture data includes the coordinates and attitude angles of the corresponding position in the coordinate system. Among them, the coordinate system of each position is different in the execution body of the grid map generation system 100. Here, taking the application of the grid map generation system 100 to a foot-type robot as an example, the first acquisition unit 101 can obtain the three-dimensional coordinates and corresponding attitude angles of each position in the foot-type robot coordinate system based on the motor encoder. The foot-type robot coordinate system can be understood as a three-dimensional rectangular coordinate system established with a fixed position of the foot-type robot as the origin, that is, the posture data corresponding to each position obtained can be expressed as (x, y, z, θ), x can represent the value of the position on the x-axis in the foot-type robot coordinate system, y can represent the value of the position on the y-axis in the foot-type robot coordinate system, z can represent the value of the position on the z-axis in the foot-type robot coordinate system, and θ can represent the attitude angle of the position in the foot-type robot coordinate system. The fixed position of the legged robot mentioned here may be but is not limited to any center point of the sole of the legged robot, and this embodiment is not limited thereto.

[0043] It should be noted that the attitude angle error directly obtained based on the motor encoder is relatively large. The embodiment of the present application can also correct the attitude angle through an inertial sensor. For example, the attitude angle can be corrected through an acceleration sensor, a gyroscope sensor, and a magnetic sensor. The attitude angle corresponding to each position is calculated and can be expressed as (roll, pitch, yaw). Roll can represent the angle of rotation of the current position around the x-axis (also called the pitch angle), pitch can represent the angle of rotation of the current position around the y-axis (also called the yaw angle), and yaw can represent the angle of rotation of the current position around the z-axis (also called the roll angle). The three-dimensional posture data corresponding to each position obtained based on this can also be expressed as (x, y, z, roll, pitch, yaw).

[0044] It can also be understood that the first acquisition unit 101 can obtain the three-dimensional posture data corresponding to each of the multiple positions based on a preset time period, wherein the preset time period can be divided into multiple timestamps, each of which can correspond to a position and corresponding three-dimensional posture data, so as to ensure the validity and real-time nature of the three-dimensional posture data corresponding to the multiple positions. For example, taking the preset time period from the current moment to the next second of the current moment as an example, the one second can be divided into 10 timestamps, and the time corresponding to each timestamp is 0.1 seconds, that is, the first acquisition unit 101 can obtain the three-dimensional posture data corresponding to a position every 0.1 seconds based on the preset time period.

[0045] The second acquisition unit 102 can obtain the two-dimensional point cloud data corresponding to each three-dimensional posture data, which can also be understood as each position can correspond to three-dimensional posture data and two-dimensional point cloud data. Among them, the two-dimensional point cloud data can be obtained based on the laser radar, and the points included in each frame of two-dimensional point cloud data can be represented based on the radar coordinate system. Specifically, taking the radar coordinate system as the two-dimensional rectangular coordinate system established with the center of the laser radar as the origin as an example, the points included in each frame of two-dimensional point cloud data are all coordinates in the radar coordinate system, for example, can be expressed as (x, y). It can be understood that, referring to the above example of using the executor of the map generation system 100 as a foot-type robot, the radar coordinate system and the foot-type robot coordinate system are not the same coordinate system, and there is an offset between the two coordinate systems, that is, the different positions of the origins of each coordinate system and the different angles of the planes where any adjacent axes in each coordinate system are located.

[0046] It can also be understood that the second acquisition unit 102 can also refer to the above-mentioned acquisition of two-dimensional point cloud data corresponding to each of the multiple positions within a preset time period, wherein the preset time period can be divided into multiple timestamps, and each timestamp can correspond to a position and corresponding two-dimensional point cloud data. For example, taking the preset time period from the current moment to the next second of the current moment as an example, the one second can be divided into 10 timestamps, and the time corresponding to each timestamp is 0.1 seconds, that is, the second acquisition unit 102 can acquire the two-dimensional point cloud data corresponding to a position every 0.1 seconds based on the preset time period.

[0047] The processing unit 103 can generate a grid map based on each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data, wherein the processing unit 103 can generate a corresponding motion trajectory based on each three-dimensional posture data, and combine the processing of the motion trajectory to generate a map based on the two-dimensional point cloud data corresponding to each three-dimensional posture data included in the processed motion trajectory.

[0048] Here we take the map generation system as an example of a grid map component of a legged robot. Figure 2 A schematic diagram of the structure of a legged robot based on a grid map generation system provided in an embodiment of the present application is shown.

[0049] like Figure 2 As shown, the legged robot 200 may include at least a laser radar 201, a motor encoder 202, a processor 203, a robot joint 204, and a power supply 205, wherein:

[0050] The laser radar 201 can obtain the timestamp of each frame of radar data within a preset time period and obtain the two-dimensional point cloud data of each timestamp in the radar coordinate system, wherein the timestamp of each frame of radar data can be understood as the data collection frequency of the laser radar within the preset time period. For example, 10 frames of radar data are obtained between the current moment and the next second in the preset time period, and the timestamp corresponding to each frame of radar data is 0.1 second, which can be understood as obtaining the two-dimensional point cloud data in the radar coordinate system every 0.1 second within the preset time period.

[0051] It can be understood that, in this embodiment, the laser radar 201 can be a single-line laser radar, and the two-dimensional point cloud data obtained by it can be expressed as (x, y).

[0052] The motor encoder 202 can obtain the three-dimensional pose data corresponding to each time stamp mentioned by the laser radar 201 in the legged robot coordinate system. For example, referring to the above-mentioned acquisition of 10 frames of radar data within one second from the current moment to the current moment in the preset time period, the motor encoder 202 acquires the three-dimensional pose data in the legged robot coordinate system every 0.1 seconds. It can be understood that each three-dimensional pose data acquired by the motor encoder 202 can be expressed as (x, y, z, θ).

[0053] In addition, the motor encoder 202 in this embodiment can also be replaced by a motor encoder and an inertial sensor. Since the attitude angle error obtained by the motor encoder is large, an inertial sensor can be introduced to correct the attitude angle obtained by the motor encoder, and the three-dimensional posture data obtained by Kalman filtering can be expressed as (x, y, z, roll, pitch, yaw).

[0054] The processor 203 can generate a point cloud grid map based on the multiple three-dimensional posture data obtained by the motor encoder 202 and the two-dimensional point cloud data corresponding to each three-dimensional posture data, and control the rotation of the robot joint 204 in combination with the operation instruction obtained by the legged robot. For example, after generating the point cloud grid map, the processor 203 can send the point cloud grid map to the legged robot control terminal, receive the operation instruction sent by the legged robot control terminal, and control the robot joint 204 to perform operations such as moving forward or backward according to the operation instruction.

[0055] The power supply 205 can be used to supply power to the laser radar 201, the motor encoder 202, the processor 203 and the robot joint 204 respectively.

[0056] It should be noted that the grid map generation system proposed in this application is not limited to application in the above-mentioned legged robot field, for example, it can also be applied in the field of autonomous driving or visual analysis, and the following application will use the legged robot as the executor to explain the grid map generation method in detail.

[0057] See also Figure 3 , Figure 3 A schematic flow chart of a grid map generation method provided in an embodiment of the present application is shown.

[0058] like Figure 3 As shown, the grid map generation method comprises at least the following steps:

[0059] Step 301: Obtain three-dimensional posture data corresponding to each of the multiple positions.

[0060] Specifically, the footed robot can obtain three-dimensional posture data of multiple positions in the footed robot coordinate system based on the motor encoder, and the footed robot coordinate system can be a three-dimensional rectangular coordinate system established with a fixed position of the footed robot as the origin. Among them, each three-dimensional posture data may include the coordinates and attitude angles of the corresponding position in the footed robot coordinate system, for example but not limited to (x1, y1, z1, θ), the x1, y1 and z1 can be understood as the values ​​corresponding to the x-axis, y-axis and z-axis of the corresponding position in the footed robot coordinate system, respectively, and the attitude angle θ can be understood as the angle of rotation of the corresponding position compared to the footed robot coordinate system. It can be understood that in this embodiment, multiple positions can be multiple positions traversed by the footed robot in the route, for example but not limited to multiple positions included in the historical route of the footed robot or multiple positions included in the real-time route of the footed robot. In addition, the fixed position of the footed robot mentioned here can be but not limited to any one of the center points of the sole of the footed robot, and this embodiment is not limited to this.

[0061] It should be noted that the attitude angle error directly obtained based on the motor encoder is relatively large. The embodiment of the present application can also correct the attitude angle through an inertial sensor. For example, the attitude angle can be corrected through an acceleration sensor, a gyroscope sensor, and a magnetic sensor. The attitude angle corresponding to each position is calculated and expressed as (roll, pitch, yaw). Roll can represent the angle of rotation of the current position around the x-axis (also called the pitch angle), pitch can represent the angle of rotation of the current position around the y-axis (also called the yaw angle), and yaw can represent the angle of rotation of the current position around the z-axis (also called the roll angle). The three-dimensional posture data corresponding to each position obtained based on this can also be expressed as (x1, y1, z1, roll, pitch, yaw).

[0062] Step 302: Obtain the two-dimensional point cloud data corresponding to each three-dimensional pose data.

[0063] Specifically, the legged robot can obtain two-dimensional point cloud data corresponding to each three-dimensional pose data based on a single-line laser radar, and the two-dimensional point cloud data may include the coordinates of multiple points generated based on the radar coordinate system. Among them, the radar coordinate system can be a two-dimensional rectangular coordinate system established with the center of the single-line laser radar as the origin. Each point included in the two-dimensional point cloud data can be expressed as (x2, y2) in the radar coordinate system. The x2 and y2 can be understood as the values ​​corresponding to the x-axis and y-axis of each point in the two-dimensional point cloud data in the radar coordinate system. It can be understood that the radar coordinate system is not the same coordinate system as the above-mentioned legged robot coordinate system. There is an offset between the two coordinate systems, that is, the different positions of the origins of each coordinate system and the different angles between the planes where the x-axis and the y-axis are located in each coordinate system.

[0064] Step 303: Generate a grid map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data.

[0065] Specifically, after respectively acquiring each three-dimensional posture data and the two-dimensional point cloud data corresponding to each three-dimensional posture data, the legged robot can generate a point cloud grid map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data.

[0066] It can be understood that when a point cloud grid map is generated according to each three-dimensional pose data and the two-dimensional point cloud data corresponding to the three-dimensional pose data, each two-dimensional point cloud data can be subjected to a rasterization process (which can also be understood as a gridding process). The rasterization process can be to apply the coordinates of all points included in each two-dimensional point cloud data to a plurality of regularly divided grid point clouds, and each grid point cloud can include points in a plurality of two-dimensional point cloud data. Further, after all points included in each two-dimensional point cloud data are applied to a plurality of regularly divided grid point clouds, a point cloud grid map is generated according to the plurality of grid point clouds including all points in each two-dimensional point cloud data.

[0067] In an embodiment of the present application, three-dimensional pose data can be used in the process of constructing a raster map to reduce the precision loss of two-dimensional point cloud data in different directions, so as to improve the accuracy and stability of the raster map and bring a better user experience.

[0068] As an embodiment of the present application, each frame of two-dimensional point cloud data corresponds to a timestamp;

[0069] Get the 3D pose data corresponding to multiple positions, including:

[0070] Acquire three-dimensional posture data corresponding to each of the multiple positions within a preset time period; each three-dimensional posture data corresponds to a timestamp;

[0071] Get the 2D point cloud data corresponding to each 3D pose data, including:

[0072] Get 2D point cloud data that is consistent with the timestamp of each 3D pose data.

[0073] Specifically, the legged robot can collect multiple frames of three-dimensional pose data within a preset time period, each frame of three-dimensional pose data can correspond to a position, and each frame of three-dimensional pose data corresponds to a timestamp within the preset time period. Among them, the multiple positions can be part or all of the multiple positions corresponding to the multiple frames of three-dimensional pose data. For example, taking the legged robot collecting 10 frames of pose data within the current moment and the next second of the current moment in the preset time period as an example, the multiple positions can be part or all of the 10 positions corresponding to the 10 frames of three-dimensional pose data. As a preferred method, all 10 positions can be used as multiple positions to improve data processing efficiency.

[0074] Furthermore, after determining the timestamps of the three-dimensional pose data corresponding to each of the multiple positions, the legged robot can obtain two-dimensional point cloud data consistent with the timestamp of each three-dimensional pose data based on the laser radar.

[0075] It can be understood that before the legged robot obtains the three-dimensional posture data corresponding to multiple positions within a preset time period, it first determines the collection frequency of the three-dimensional posture data, that is, determines the timestamp corresponding to each frame of three-dimensional posture data, and then determines multiple positions within the preset time period, and obtains the three-dimensional posture data corresponding to each of the multiple positions.

[0076] It should be noted that the present embodiment is not limited to first determining the acquisition frequency of the three-dimensional pose data. For example, the acquisition frequency of the lidar may be first determined, and the timestamp corresponding to each frame of two-dimensional point cloud data is determined according to the acquisition frequency of the lidar, and the three-dimensional pose data corresponding to each position within a preset time period is obtained according to the timestamp corresponding to each frame of the two-dimensional point cloud data, wherein the timestamp corresponding to each position data is consistent with the timestamp corresponding to each frame of the two-dimensional point cloud data.

[0077] In an embodiment of the present application, the timestamp corresponding to each frame of three-dimensional pose data can be determined before acquiring the three-dimensional pose data, and two-dimensional point cloud data consistent with the timestamp can be acquired based on the timestamp corresponding to each frame of the three-dimensional pose data, so that the acquired three-dimensional pose data and the two-dimensional point cloud data have a corresponding relationship in terms of timestamp, thereby ensuring the stability of the generated point cloud raster map.

[0078] As another embodiment of the present application, after obtaining the three-dimensional posture data corresponding to each of the multiple positions within a preset time period, before generating a grid map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data, it also includes:

[0079] Convert each three-dimensional pose data into three-dimensional pose data generated based on the world coordinate system;

[0080] Generate a grid map according to each three-dimensional pose data and two-dimensional point cloud data corresponding to the three-dimensional pose data, including:

[0081] A grid map is generated according to each three-dimensional pose data generated based on the world coordinate system and two-dimensional point cloud data corresponding to the three-dimensional pose data generated based on the world coordinate system.

[0082] Specifically, before the legged robot generates a map based on each three-dimensional pose data and the two-dimensional point cloud data corresponding to the three-dimensional pose data, it can convert the three-dimensional pose data corresponding to each of the multiple positions generated based on the legged robot coordinate system into three-dimensional pose data generated based on the world coordinate system. Among them, the legged robot coordinate system can be a three-dimensional rectangular coordinate system established by the legged robot with a fixed position as the origin, and the world coordinate system can be a three-dimensional rectangular coordinate system established by the legged robot with a fixed position on the plane where it is located as the origin. It can be understood that the origins corresponding to the legged robot coordinate system and the world coordinate system in this embodiment can be set by default by the legged robot program or manually by the operator.

[0083] Taking the coordinates (x, y, z, roll, pitch, yaw) generated by the three-dimensional pose data corresponding to a certain position in the legged robot coordinate system as an example, the coordinates (X, Y, Z) of the position in the world coordinate system can be obtained based on the following formula (1):

[0084]

[0085] Among them, R is the rotation matrix, and T is the translation matrix represented by the coordinates corresponding to the origin of the legged robot coordinate system in the world coordinate system.

[0086] Here, since the coordinates generated by the position in the legged robot coordinate system are jointly controlled by the components in the x-axis, y-axis and z-axis directions, the rotation matrix R can be obtained by the following formulas (2)-(5):

[0087] R=r1×r2×r3 (2)

[0088]

[0089]

[0090]

[0091] Wherein, α in formula (3) can be the angle between the plane where the y-axis and z-axis of the legged robot coordinate system are located and the plane where the Y-axis and Z-axis of the world coordinate system are located. For details, please refer to Figure 4 The schematic diagram of the rotation angle corresponding to a in the schematic diagram of the rotation angle of a coordinate system provided in an embodiment of the present application is shown. β in formula (4) can be the angle between the plane where the x-axis and z-axis of the foot-type robot coordinate system are located and the plane where the x-axis and z-axis of the world coordinate system are located. For details, please refer to Figure 4The diagram of the rotation angle corresponding to b in the diagram of the rotation angle of a coordinate system provided in an embodiment of the present application is shown. γ in formula (5) can be the angle between the plane where the y-axis and x-axis of the legged robot coordinate system are located and the plane where the Y-axis and X-axis of the world coordinate system are located. For details, please refer to Figure 4 A schematic diagram of the rotation angle corresponding to c in a schematic diagram of the rotation angle of a coordinate system provided in an embodiment of the present application is shown.

[0092] It should be noted that the origin position of the legged robot coordinate system corresponding to each position in the world coordinate system is different, and the angles between the planes of any adjacent axes in each coordinate system are different, that is, the three-dimensional posture data corresponding to each position has different corresponding rotation matrices R and translation matrices T in the process of converting them to the world coordinate system.

[0093] It is understandable that the above-mentioned conversion between the legged robot coordinate system and the world coordinate system can be implemented based on editing code, such as but not limited to Python code, which will not be elaborated here.

[0094] In an embodiment of the present application, the three-dimensional pose data corresponding to each of the multiple positions are converted into a coordinate system in order to improve the processing efficiency of the three-dimensional pose data, thereby improving the overall data processing efficiency while ensuring the accuracy of the point cloud raster map.

[0095] As another embodiment of the present application, please refer to Figure 5 A schematic flow chart of another grid map generation method provided in an embodiment of the present application is shown.

[0096] like Figure 5 As shown, the grid map generation method comprises at least the following steps:

[0097] Step 501: Obtain three-dimensional posture data corresponding to each of a plurality of positions.

[0098] Specifically, step 501 is consistent with step 301 and will not be repeated here.

[0099] Step 502: Obtain the two-dimensional point cloud data corresponding to each three-dimensional pose data.

[0100] Specifically, step 502 is consistent with step 301 and will not be described again here.

[0101] Step 503: Convert each three-dimensional pose data into three-dimensional pose data generated based on the world coordinate system.

[0102] Specifically, step 503 may refer to the above-mentioned embodiment, which will not be described in detail here.

[0103] Step 504: Generate a motion trajectory within a preset time period according to a plurality of three-dimensional posture data generated based on a world coordinate system.

[0104] Specifically, the legged robot can obtain three-dimensional posture data corresponding to multiple positions within a preset time period and convert each three-dimensional posture data into three-dimensional posture data generated based on the world coordinate system. For example, it can generate a motion trajectory within the preset time period in the world coordinate system by connecting adjacent coordinate points according to multiple coordinate points in the world coordinate system that respectively correspond to the multiple three-dimensional posture data generated based on the world coordinate system.

[0105] It is understandable that the present application is not limited to the above-mentioned method of generating a motion trajectory within a preset time period by connecting coordinate points. For example, the motion trajectory may also be established through other models.

[0106] Step 505: perform loop detection on the motion trajectory.

[0107] Specifically, after determining the three-dimensional pose data corresponding to the first position among multiple positions, the legged robot can recursively calculate the three-dimensional pose data corresponding to each subsequent position, but the three-dimensional pose data corresponding to each subsequently calculated position will have errors, and the errors in the three-dimensional pose data corresponding to two adjacent positions will be accumulated to the error of the three-dimensional pose data corresponding to the next position.

[0108] Based on this, in order to eliminate the error of the three-dimensional posture data, the legged robot in this embodiment can perform loop detection on the motion trajectory within a preset time period. This method can be understood as detecting whether there is a loop trajectory in the motion trajectory (that is, whether there are two identical positions in the motion trajectory). It should be noted that the two identical positions in the motion trajectory are not necessarily limited to the first position and the last position, that is, the motion trajectory can be a loop trajectory that appears during the motion process and its last position is not the same as the first position.

[0109] It should be noted that the loop detection method for the motion trajectory in this embodiment here can be to input the motion trajectory into the bag-of-words model, calculate the similarity between the bag-of-words vector corresponding to the motion trajectory and the loop detection vector obtained by using the reverse index, take the one with the highest similarity as the loop pair, and verify the loop pair to check whether it is a correct loop. Of course, the embodiment of the present application can also use other visual algorithms to perform loop detection on the motion trajectory.

[0110] Step 506: If the loop detection result shows that a loop exists, nonlinear processing is performed on the motion trajectory to obtain an optimized motion trajectory.

[0111] Specifically, if the legged robot detects that the loop detection result of the motion trajectory is a loop, it indicates that there is a loop trajectory in the motion trajectory, and the motion trajectory can be nonlinearly optimized to obtain an optimized motion trajectory. The optimized motion trajectory is smoother and has a smaller error than the motion trajectory for loop detection, and the number of multiple positions corresponding to the optimized motion trajectory is less than or equal to the number of multiple positions corresponding to the motion trajectory for loop detection.

[0112] See here Figure 6 The schematic diagram of a motion trajectory optimization process provided by an embodiment of the present application is shown. Figure 6 In the motion trajectory of the detected loop shown in 6a, the first position coincides with the last position. If position A is taken as the first position, the motion trajectory can include position A, position a, position b, position B, position c, position d, position C, position D, position e, position E, position f, position g, and position A in the order of the trajectory. Figure 6 6b shows the motion trajectory after the motion trajectory in 6a is optimized, and the optimized motion trajectory may include position A, position B, position C, position D and position E in the order of the trajectory. It can be understood that the optimized motion trajectory shown in 6b can eliminate the error influence of position a, position b, position c, position d, position e and position f on the motion trajectory compared with the motion trajectory shown in 6a.

[0113] Step 507: Generate a grid map based on the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the optimized motion trajectory.

[0114] Specifically, after obtaining the optimized motion trajectory, the legged robot can re-determine a plurality of three-dimensional posture data corresponding to the optimized motion trajectory, and generate a point cloud grid map according to the two-dimensional point cloud data corresponding to each three-dimensional posture data.

[0115] In an embodiment of the present application, loop detection can be performed on the motion trajectory generated by each three-dimensional pose data. When a loop is detected, the motion trajectory can be optimized to filter out three-dimensional pose data with large errors in the motion trajectory, thereby further ensuring the accuracy of the generated point cloud raster map.

[0116] As another embodiment of the present application, the two-dimensional point cloud data is generated based on a radar coordinate system;

[0117] Generate a grid map based on the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory, including:

[0118] Converting the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory into two-dimensional point cloud data generated based on the world coordinate system;

[0119] Generate a raster map based on each two-dimensional point cloud data generated based on the world coordinate system.

[0120] Specifically, the legged robot can convert each two-dimensional point cloud data generated based on the radar coordinate system into two-dimensional point cloud data generated based on the world coordinate system, so that the point cloud grid map generated based on the two-dimensional point cloud data generated based on the world coordinate system can be applied in the world coordinate system. Here, the coordinate data generated based on the world coordinate system remains fixed during the movement of the legged robot, which can ensure that the generated point cloud grid map is more applicable. It should be noted that during the movement of the legged robot, the position of the radar coordinate system corresponding to each frame of two-dimensional point cloud data is changing (it can also be understood that the origin and coordinate axis of the radar coordinate system corresponding to each frame of two-dimensional point cloud data are changed). If a point cloud grid map is generated based on the two-dimensional point cloud data generated based on the radar coordinate system, it is easy to cause the accuracy of the point cloud grid map to be low.

[0121] It should also be noted that the world coordinate system here can be a two-dimensional rectangular coordinate system established with a fixed position of the legged robot on the plane where it is located as the origin, and the plane where the corresponding x-axis and y-axis are located can be the plane where the x-axis and y-axis corresponding to the world coordinate system in the three-dimensional pose data generated based on the world coordinate system mentioned above are located.

[0122] It can be understood that the rotation matrix and offset matrix of the radar coordinate system corresponding to each frame of two-dimensional point cloud data are inconsistent with the world coordinate system. Based on this, it is necessary to first calculate the rotation matrix and offset matrix corresponding to each frame of two-dimensional point cloud data, and then convert each frame of two-dimensional point cloud data into two-dimensional point cloud data based on the world coordinate system.

[0123] In an embodiment of the present application, the coordinate system of the two-dimensional point cloud data can be converted so that the point cloud grid map generated by the converted two-dimensional point cloud data has a wider applicability, thereby improving the user's diversified usage experience.

[0124] As another embodiment of the present application, after loop closure detection is performed on the motion trajectory, the method further includes:

[0125] If the loop detection result is that there is no loop, a grid map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the motion trajectory.

[0126] Specifically, if the legged robot detects that the loop detection result of the motion trajectory is that there is no loop, it indicates that there is no loop trajectory in the motion trajectory, for example, the motion trajectory is a straight line trajectory or a non-loop curve trajectory. Here, the motion trajectory is taken as an example of a straight line trajectory. It is known in the known technology that the three-dimensional posture change of each position in the straight line trajectory is small (only the corresponding coordinate value changes), and the posture error between two adjacent positions is small. Therefore, a point cloud grid map can be directly generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the motion trajectory.

[0127] In an embodiment of the present application, when no loop is detected in the motion trajectory, the motion trajectory can be regarded as a regular linear trajectory. When the error is small, a point cloud grid map can be directly generated based on the two-dimensional point cloud data corresponding to each three-dimensional pose data to improve the overall generation efficiency of the point cloud grid map.

[0128] As another embodiment of the present application, please refer to Figure 7 A schematic flow chart of another grid map generation method provided in an embodiment of the present application is shown.

[0129] like Figure 7 As shown, the grid map generation method comprises at least the following steps:

[0130] Step 701: Obtain three-dimensional posture data corresponding to each of the multiple positions.

[0131] Specifically, step 701 is consistent with step 501 and step 301 and will not be repeated here.

[0132] Step 702: Obtain the two-dimensional point cloud data corresponding to each three-dimensional pose data.

[0133] Specifically, step 702 is consistent with step 502 and step 301, and will not be repeated here.

[0134] Step 703: Convert each three-dimensional pose data into three-dimensional pose data generated based on the world coordinate system.

[0135] Specifically, step 703 is consistent with step 503 and will not be repeated here.

[0136] Step 704: Generate a motion trajectory within a preset time period according to a plurality of three-dimensional posture data generated based on a world coordinate system.

[0137] Specifically, step 704 is consistent with step 504 and will not be described again here.

[0138] Step 705: perform loop detection on the motion trajectory.

[0139] Specifically, step 705 is consistent with step 505 and will not be repeated here.

[0140] Step 706: If the loop detection result is that there is no loop, obtain three-dimensional posture data corresponding to each of the multiple positions in the next time period corresponding to the preset time period.

[0141] Specifically, if the legged robot detects that the loop detection result of the motion trajectory does not exist, it can also determine the next time period corresponding to the preset time period, and obtain the three-dimensional posture data corresponding to each timestamp in the next time period. Among them, the next time period can be a time period equal to the preset time period and adjacent to the preset time period. For example, taking the preset time period as 0-10 seconds and the timestamp corresponding to each frame of three-dimensional posture data as 0.1 seconds, it can be determined that the next time period is 10-20 seconds, and the timestamp corresponding to each frame of three-dimensional posture data in the next time period is also 0.1 seconds.

[0142] It is understandable that the motion trajectory within the preset time period may not have a loop trajectory, but there is still three-dimensional posture data with large errors, and the point cloud map generated based on the corresponding two-dimensional point cloud data within the preset time period is not accurate. Based on this, this embodiment can obtain multiple three-dimensional posture data corresponding to the next time period of the preset time period, and perform loop detection on the motion trajectory corresponding to the next time period.

[0143] Step 707: Convert the three-dimensional pose data corresponding to each of the multiple positions acquired in the next time period into a plurality of three-dimensional pose data generated based on the world coordinate system.

[0144] Specifically, the legged robot can convert the three-dimensional posture data corresponding to each of the multiple positions generated based on the legged robot coordinate system in the next time period into three-dimensional posture data generated based on the world coordinate system. Among them, the legged robot coordinate system can be a three-dimensional rectangular coordinate system established by the legged robot with a fixed position as the origin, and the world coordinate system can be a three-dimensional rectangular coordinate system established by the legged robot with a fixed position on the plane as the origin. It can be understood that the origins corresponding to the legged robot coordinate system and the world coordinate system in this embodiment can be set by default by the legged robot program or manually by the operator.

[0145] It should be noted that the origin position of the legged robot coordinate system corresponding to each position in the world coordinate system is different, and the angles between the planes of any adjacent axes in each coordinate system are different, that is, the three-dimensional posture data corresponding to each position has different corresponding rotation matrices R and translation matrices T in the process of converting them to the world coordinate system.

[0146] It is understandable that the above-mentioned conversion between the legged robot coordinate system and the world coordinate system can be implemented based on editing code, such as but not limited to Python code, which will not be elaborated here.

[0147] Step 708: Generate a motion trajectory for the next time period according to each three-dimensional posture data generated based on the world coordinate system, and perform loop detection on the motion trajectory for the next time period.

[0148] Specifically, after the legged robot obtains the three-dimensional posture data corresponding to multiple positions in the next time period and converts each three-dimensional posture data into three-dimensional posture data generated based on the world coordinate system, it can generate a motion trajectory in the next time period in the world coordinate system by connecting adjacent coordinate points according to the multiple coordinate points in the world coordinate system corresponding to each three-dimensional posture data generated based on the world coordinate system.

[0149] It is understandable that the present application may not be limited to the above-mentioned loop detection on the motion trajectory in the next time period. For example, after generating the motion trajectory in the next time period according to multiple three-dimensional posture data generated based on the world coordinate system, loop detection may be performed on the motion trajectory composed of the preset time period and the next time period.

[0150] Furthermore, if the legged robot detects that there is a loop in the motion trajectory within the next time period, it can perform nonlinear optimization on the motion trajectory and generate a point cloud grid map based on the multiple three-dimensional pose data corresponding to the optimized motion trajectory and the two-dimensional point cloud data corresponding to the multiple three-dimensional pose data.

[0151] Furthermore, if the legged robot detects that there is no loop in the motion trajectory in the next time period, it can continue to determine the time period corresponding to the next time period, obtain the three-dimensional posture data corresponding to each of the multiple positions in the time period and generate the corresponding motion trajectory, and continue to perform loop detection on the corresponding motion trajectory in the time period until a loop is detected in the motion trajectory. It should be noted that when the legged robot detects the existence of a loop in a certain time period, it can perform nonlinear optimization on the motion trajectory, and generate a point cloud grid map based on the multiple three-dimensional posture data corresponding to the optimized motion trajectory and the two-dimensional point cloud data corresponding to each of the multiple three-dimensional posture data.

[0152] In an embodiment of the present application, when no loop is detected in the motion trajectory, the three-dimensional posture data and the corresponding motion trajectory in the next time period can be obtained based on the preset time period, and the motion trajectory in the next time period can continue to be detected for loops until a loop is found, and then a point cloud grid map is generated based on the corresponding two-dimensional point cloud data, so that the generated point cloud grid map is more accurate under nonlinear processing of the motion trajectory.

[0153] As another embodiment of the present application, please refer to Figure 8 A schematic flow chart of another grid map generation method provided in an embodiment of the present application is shown.

[0154] like Figure 8As shown, the grid map generation method comprises at least the following steps:

[0155] Step 801: Obtain the timestamp of each frame of three-dimensional pose data within a preset time period.

[0156] Step 802: Obtain three-dimensional posture data corresponding to each of the multiple positions according to the timestamp.

[0157] Step 803: Acquire two-dimensional point cloud data that is consistent with the timestamp of each three-dimensional pose data.

[0158] Step 804: perform loop detection on the motion trajectory generated according to the three-dimensional posture data corresponding to multiple positions.

[0159] Step 805 , determine whether there is a loop in the motion trajectory, if yes, proceed to step 907 , if no, proceed to step 802 .

[0160] Step 806: Perform nonlinear processing on the motion trajectory to obtain an optimized motion trajectory.

[0161] Step 807: Generate a map based on the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the optimized motion trajectory.

[0162] Specifically, the footed robot can obtain the timestamp of each frame of three-dimensional pose data within a preset time period, and obtain the three-dimensional pose data corresponding to multiple positions and the two-dimensional point cloud data consistent with the timestamp of each three-dimensional pose data according to the timestamp. It can be understood that the embodiment of the present application is not limited to obtaining the timestamp of each frame of three-dimensional pose data within a preset time period, for example, it can also be the timestamp of each frame of two-dimensional point cloud data within a preset time period. Further, the footed robot can generate a motion trajectory in the world coordinate system according to the three-dimensional pose data corresponding to each of the multiple positions, and perform loop detection on the motion trajectory. Possibly, if the loop detection result is that there is no loop, the three-dimensional pose data corresponding to each of the multiple positions and the two-dimensional point cloud data consistent with the timestamp of each three-dimensional pose data can continue to be obtained according to the timestamp, and the motion trajectory generated in the world coordinate system according to the three-dimensional pose data corresponding to each of the multiple positions continues to be loop detected until the detection result is that there is a loop. If possible, if the loop detection result shows that a loop exists, the motion trajectory is nonlinearly processed to obtain an optimized motion trajectory, and a point cloud map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory.

[0163] In an embodiment of the present application, each three-dimensional pose data and the corresponding two-dimensional point cloud data can be obtained in combination with a timestamp, and the obtained three-dimensional pose data can be optimized based on the results of loop detection based on the motion trajectory generated by each three-dimensional pose data to screen out three-dimensional pose data with large errors. This can improve the accuracy of the grid map generated by the robot based on the two-dimensional point cloud data when encountering moving scenarios such as climbing a slope.

[0164] See also Fig. 9 , Fig. 9 A schematic structural diagram of a grid map generating device provided in an embodiment of the present application is shown.

[0165] like Fig. 9 As shown, the grid map generating device may include at least a first acquisition module 901, a second acquisition module 902 and a first processing module 903, wherein:

[0166] A first acquisition module 901 is used to acquire three-dimensional posture data corresponding to each of the multiple positions;

[0167] The second acquisition module 902 is used to acquire the two-dimensional point cloud data corresponding to each posture data;

[0168] The first processing module 903 is used to generate a grid map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data.

[0169] In some possible embodiments, each frame of two-dimensional point cloud data corresponds to a timestamp;

[0170] The first acquisition module 901 is specifically used for:

[0171] Acquire three-dimensional posture data corresponding to each of the multiple positions within a preset time period; each three-dimensional posture data corresponds to a timestamp;

[0172] The second acquisition module 902 is specifically used for:

[0173] Get 2D point cloud data that is consistent with the timestamp of each 3D pose data.

[0174] In some possible embodiments, the grid map generating device 900 further includes:

[0175] A second processing module is used for, after acquiring the three-dimensional posture data corresponding to each of the plurality of positions within a preset time period, converting each three-dimensional posture data into three-dimensional posture data generated based on a world coordinate system before generating a raster map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data;

[0176] The first processing module 903 is specifically configured to generate a grid map according to each three-dimensional pose data generated based on the world coordinate system and the two-dimensional point cloud data corresponding to the three-dimensional pose data generated based on the world coordinate system.

[0177] In some possible embodiments, the first processing module 903 is specifically used to:

[0178] Generate a motion trajectory within a preset time period according to a plurality of three-dimensional posture data generated based on a world coordinate system;

[0179] Perform loop detection on the motion trajectory;

[0180] If the loop detection result shows that there is a loop, the motion trajectory is processed nonlinearly to obtain an optimized motion trajectory;

[0181] A grid map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the optimized motion trajectory.

[0182] In some possible embodiments, the two-dimensional point cloud data is generated based on a radar coordinate system;

[0183] The first processing module 903 is specifically used for:

[0184] Converting the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory into two-dimensional point cloud data generated based on the world coordinate system;

[0185] Generate a raster map based on each two-dimensional point cloud data generated based on the world coordinate system.

[0186] In some possible embodiments, the first processing module 903 is specifically used to:

[0187] If the loop detection result is that there is no loop, a grid map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the motion trajectory.

[0188] In some possible embodiments, the first processing module 903 is specifically used to:

[0189] Converting the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the motion trajectory into two-dimensional point cloud data generated based on the world coordinate system;

[0190] Generate a raster map based on each two-dimensional point cloud data generated based on the world coordinate system.

[0191] In some possible embodiments, the first processing module 903 is specifically used to:

[0192] If the loop detection result is that there is no loop, then three-dimensional pose data corresponding to each of the multiple positions is obtained in the next time period corresponding to the preset time period; each three-dimensional pose data corresponds to a timestamp;

[0193] Convert each three-dimensional pose data acquired in the next period into a plurality of three-dimensional pose data generated based on the world coordinate system;

[0194] A motion trajectory for the next period of time is generated according to each three-dimensional pose data generated based on the world coordinate system, and a loop detection is performed on the motion trajectory for the next period of time.

[0195] See also Fig.10 , Fig.10 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown.

[0196] like Fig.10 As shown, the electronic device 1000 may include: at least one processor 1001 , at least one network interface 1004 , a user interface 1003 , a memory 1005 , a laser radar 1006 , a motor encoder 1007 and at least one communication bus 1002 .

[0197] The communication bus 1002 may be used to realize the connection and communication among the above-mentioned components.

[0198] The user interface 1003 may include buttons, and the optional user interface may also include a standard wired interface or a wireless interface.

[0199] The network interface 1004 may include, but is not limited to, a Bluetooth module, an NFC module, a Wi-Fi module, etc.

[0200] Among them, the laser radar 1006 can be but is not limited to a single-line laser radar for obtaining two-dimensional point cloud data.

[0201] The motor encoder 1007 may also be replaced by a motor encoder integrated with an inertial sensor.

[0202] Among them, the processor 1001 may include one or more processing cores. The processor 1001 uses various interfaces and lines to connect the various parts of the entire electronic device 1000, and executes various functions and processes data of the electronic device 1000 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1005, and calling data stored in the memory 1005. Optionally, the processor 1001 can be implemented in at least one hardware form of DSP, FPGA, and PLA. The processor 1001 can integrate one or a combination of CPU, GPU, modem, etc. 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 display screen; the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 1001, and it can be implemented separately through a chip.

[0203] Among them, the memory 1005 may include RAM and may also include ROM. Optionally, the memory 1005 includes a non-transitory computer-readable medium. The memory 1005 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 1005 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 a touch function, a sound playback function, an image playback function, 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 1005 may optionally be at least one storage device located away from the aforementioned processor 1001. As Fig.10 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a raster map generation application.

[0204] Specifically, the processor 1001 may be used to call a grid map generation application stored in the memory 1005, and specifically perform the following operations:

[0205] Obtain three-dimensional pose data corresponding to each of the multiple positions;

[0206] Obtain the two-dimensional point cloud data corresponding to each three-dimensional pose data;

[0207] A grid map is generated according to each three-dimensional pose data and two-dimensional point cloud data corresponding to the three-dimensional pose data.

[0208] In some possible embodiments, each frame of two-dimensional point cloud data corresponds to a timestamp;

[0209] When the processor 1001 obtains the three-dimensional posture data corresponding to each of the multiple positions, it is specifically used to execute:

[0210] Acquire three-dimensional posture data corresponding to each of the multiple positions within a preset time period; each three-dimensional posture data corresponds to a timestamp;

[0211] When the processor 1001 obtains the two-dimensional point cloud data corresponding to each three-dimensional pose data, it is specifically used to execute:

[0212] Get 2D point cloud data that is consistent with the timestamp of each 3D pose data.

[0213] In some possible embodiments, after the processor 1001 obtains the three-dimensional posture data corresponding to each of the multiple positions within a preset period of time, before generating a grid map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data, it is further used to execute:

[0214] Convert each three-dimensional pose data into three-dimensional pose data generated based on the world coordinate system;

[0215] When the processor 1001 generates a grid map according to each three-dimensional posture data and the two-dimensional point cloud data corresponding to the three-dimensional posture data, it is specifically used to execute:

[0216] A grid map is generated according to each three-dimensional pose data generated based on the world coordinate system and two-dimensional point cloud data corresponding to the three-dimensional pose data generated based on the world coordinate system.

[0217] In some possible embodiments, when the processor 1001 generates a grid map according to each three-dimensional pose data generated based on the world coordinate system and the two-dimensional point cloud data corresponding to the three-dimensional pose data generated based on the world coordinate system, it is specifically used to execute:

[0218] Generate a motion trajectory within a preset time period according to a plurality of three-dimensional posture data generated based on a world coordinate system;

[0219] Perform loop detection on the motion trajectory;

[0220] If the loop detection result shows that there is a loop, the motion trajectory is processed nonlinearly to obtain an optimized motion trajectory;

[0221] A grid map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the optimized motion trajectory.

[0222] In some possible embodiments, the two-dimensional point cloud data is generated based on a radar coordinate system;

[0223] When the processor 1001 generates a grid map according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the optimized motion trajectory, it is specifically used to execute:

[0224] Converting the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory into two-dimensional point cloud data generated based on the world coordinate system;

[0225] Generate a raster map based on each two-dimensional point cloud data generated based on the world coordinate system.

[0226] In some possible embodiments, after performing loop detection on the motion trajectory, the processor 1001 is further configured to execute:

[0227] If the loop detection result is that there is no loop, a grid map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the motion trajectory.

[0228] In some possible embodiments, when the processor 1001 generates a grid map according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the motion trajectory, it is specifically used to execute:

[0229] Converting the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the motion trajectory into two-dimensional point cloud data generated based on the world coordinate system;

[0230] Generate a raster map based on each two-dimensional point cloud data generated based on the world coordinate system.

[0231] In some possible embodiments, after performing loop detection on the motion trajectory, the processor 1001 is further configured to execute:

[0232] If the loop detection result is that there is no loop, then three-dimensional pose data corresponding to each of the multiple positions is obtained in the next time period corresponding to the preset time period; each three-dimensional pose data corresponds to a timestamp;

[0233] Convert each three-dimensional pose data acquired in the next period into a plurality of three-dimensional pose data generated based on the world coordinate system;

[0234] A motion trajectory for the next period of time is generated according to each three-dimensional pose data generated based on the world coordinate system, and a loop detection is performed on the motion trajectory for the next period of time.

[0235] The embodiment of the present application also provides a computer-readable storage medium, in which instructions are stored. When the instructions are executed on a computer or a processor, the computer or the processor executes the above-mentioned Figure 3 or Figure 5 or Figure 7 or Figure 8 One or more steps in the illustrated embodiment. If the components of the electronic device described above are implemented in the form of software functional units and sold or used as independent products, they can be stored in the computer-readable storage medium.

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

[0237] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The aforementioned storage medium includes: ROM, RAM, magnetic disk or optical disk and other media that can store program codes. In the absence of conflict, the technical features in this embodiment and the implementation scheme can be combined arbitrarily.

[0238] The embodiments described above are merely preferred embodiments of the present application and are not intended to limit the scope of the present application. Without departing from the design spirit of the present application, various modifications and improvements made to the technical solutions of the present application by ordinary technicians in this field should fall within the protection scope determined by the claims of the present application.

Claims

1. A method for generating a grid map, characterized in that: include: Acquire three-dimensional posture data corresponding to a plurality of positions in the legged robot coordinate system within a preset time period; Obtaining two-dimensional point cloud data corresponding to each of the three-dimensional pose data; Converting the three-dimensional pose data corresponding to the multiple positions in the legged robot coordinate system into three-dimensional pose data generated based on the world coordinate system; Generate a motion trajectory within the preset time period according to a plurality of three-dimensional posture data generated based on a world coordinate system; The motion trajectory is input into the bag-of-words model, and the bag-of-words vector corresponding to the motion trajectory is calculated to have a similarity with the loop detection vector obtained by using the reverse index, and the one with the highest similarity is taken as a loop pair, and the loop pair is verified to check whether it is a correct loop, so as to obtain a loop detection result; If the loop detection result is that a loop exists, nonlinear processing is performed on the motion trajectory to obtain an optimized motion trajectory, and the number of multiple positions corresponding to the optimized motion trajectory is less than or equal to the number of multiple positions corresponding to the motion trajectory for loop detection; A grid map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the optimized motion trajectory.

2. The method according to claim 1, characterized in that Each frame of the two-dimensional point cloud data corresponds to a timestamp, and each frame of the three-dimensional pose data corresponds to a timestamp; The obtaining of two-dimensional point cloud data corresponding to each of the three-dimensional pose data comprises: Acquire two-dimensional point cloud data consistent with the timestamp of each of the three-dimensional pose data.

3. The method according to claim 1, characterized in that The two-dimensional point cloud data is generated based on the radar coordinate system; The generating of a grid map according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the optimized motion trajectory comprises: Converting the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory into two-dimensional point cloud data generated based on the world coordinate system; A grid map is generated according to each of the two-dimensional point cloud data generated based on the world coordinate system.

4. The method according to claim 1, characterized in that: After performing loop detection on the motion trajectory, the method further includes: If the loop detection result is that there is no loop, a grid map is generated according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the motion trajectory.

5. The method according to claim 1, characterized in that The generating of a grid map according to the two-dimensional point cloud data corresponding to each three-dimensional posture data corresponding to the motion trajectory comprises: Converting the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the motion trajectory into two-dimensional point cloud data generated based on the world coordinate system; A grid map is generated according to each of the two-dimensional point cloud data generated based on the world coordinate system.

6. The method according to claim 1, characterized in that After performing loop detection on the motion trajectory, the method further includes: If the loop detection result is that there is no loop, then obtaining three-dimensional posture data corresponding to each of the multiple positions in the next time period corresponding to the preset time period; each of the three-dimensional posture data corresponds to a timestamp; Convert each three-dimensional pose data acquired in the next period into a plurality of three-dimensional pose data generated based on a world coordinate system; The motion trajectory in the next time period is generated according to each of the three-dimensional posture data generated based on the world coordinate system, and loop detection is performed on the motion trajectory in the next time period.

7. A grid map generating device, characterized in that: include: A first acquisition module is used to acquire three-dimensional posture data corresponding to a plurality of positions in a legged robot coordinate system within a preset period of time; A second acquisition module is used to acquire two-dimensional point cloud data corresponding to each of the posture data; The first processing module is used to convert the three-dimensional pose data corresponding to multiple positions in the legged robot coordinate system into three-dimensional pose data generated based on the world coordinate system; generate a motion trajectory within the preset time period according to the multiple three-dimensional pose data generated based on the world coordinate system; input the motion trajectory into the bag-of-words model, calculate the similarity between the bag-of-words vector corresponding to the motion trajectory and the loop detection vector obtained by using the reverse index, take the one with the highest similarity as the loop pair, and verify the loop pair to check whether it is a correct loop to obtain a loop detection result; if the loop detection result is that there is a loop, perform nonlinear processing on the motion trajectory to obtain an optimized motion trajectory, and the number of multiple positions corresponding to the optimized motion trajectory is less than or equal to the number of multiple positions corresponding to the motion trajectory for loop detection; generate a grid map according to the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory.

8. An electronic device, characterized in that: including a processor and a memory; The processor is connected to the memory; The memory is used to store executable program code; The processor runs a program corresponding to the executable program code by reading the executable program code stored in the memory, so as to execute the method according to any one of claims 1 to 6.

9. A map generation system, characterized in that: include: A first acquisition unit is used to obtain three-dimensional posture data corresponding to multiple positions in the legged robot coordinate system within a preset time period; A second acquisition unit is used to obtain two-dimensional point cloud data corresponding to each of the three-dimensional posture data; A processing unit is used to convert three-dimensional pose data corresponding to multiple positions in the legged robot coordinate system into three-dimensional pose data generated based on a world coordinate system; generate a motion trajectory within the preset time period based on multiple three-dimensional pose data generated based on the world coordinate system; input the motion trajectory into a bag-of-words model, calculate the similarity between the bag-of-words vector corresponding to the motion trajectory and the loop detection vector obtained by using a reverse index, take the one with the highest similarity as a loop pair, and verify the loop pair to check whether it is a correct loop to obtain a loop detection result; if the loop detection result is that a loop exists, perform nonlinear processing on the motion trajectory to obtain an optimized motion trajectory, and the number of multiple positions corresponding to the optimized motion trajectory is less than or equal to the number of multiple positions corresponding to the motion trajectory for loop detection; generate a grid map based on the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory.

10. A map generation system, characterized in that: include: A motor encoder is used to obtain three-dimensional posture data corresponding to multiple positions in the legged robot coordinate system within a preset time period; A laser radar, used to obtain two-dimensional point cloud data corresponding to each of the three-dimensional posture data; A processor is used to convert three-dimensional pose data corresponding to multiple positions in a legged robot coordinate system into three-dimensional pose data generated based on a world coordinate system; generate a motion trajectory within the preset time period based on multiple three-dimensional pose data generated based on the world coordinate system; input the motion trajectory into a bag-of-words model, calculate the similarity between the bag-of-words vector corresponding to the motion trajectory and the loop detection vector obtained by using a reverse index, take the one with the highest similarity as a loop pair, and verify the loop pair to check whether it is a correct loop to obtain a loop detection result; if the loop detection result is that a loop exists, perform nonlinear processing on the motion trajectory to obtain an optimized motion trajectory, and the number of multiple positions corresponding to the optimized motion trajectory is less than or equal to the number of multiple positions corresponding to the motion trajectory for loop detection; generate a grid map based on the two-dimensional point cloud data corresponding to each three-dimensional pose data corresponding to the optimized motion trajectory.

11. 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 6 is implemented.

Citation Information

Patent Citations

  • Construction method, construction device, intelligent robot and readable storage medium

    CN111881239A

  • Map construction method, device and equipment and storage medium

    CN111912417A