Terrain recognition method and apparatus, robot, and storage medium
By calculating the angle of the triangle plane normal through infrared lattice, the problem of low efficiency in laser scanning recognition in the prior art is solved, and the rapid accuracy of robot terrain recognition is achieved.
Patent Information
- Application Number
- PCT/CN2024/101471
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-06-30
- Filing Date
- 2024-06-26
- Publication Date
- 2025-01-02
AI Technical Summary
The method of identifying terrain by laser scanning in the prior art is complex and slow, resulting in a low efficiency for robots to accurately identify terrain.
The infrared dot matrix is used to calculate the angle between the ray length and the angle of the ray emission, and to construct a triangle plane and calculate the angle of the normal line. Based on the comparison between the normal line angle and the preset angle threshold, the terrain state is determined, so as to quickly and efficiently identify the terrain.
It improves the robot's accurate recognition efficiency of terrain, ensures the accuracy of terrain judgment, and can quickly obtain and analyze terrain information to judge terrain conditions.
Smart Images

Figure CN2024101471_02012025_PF_FP_ABST
Abstract
Description
Terrain recognition method, device, robot and storage medium Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a terrain recognition method, device, robot, and storage medium. Background Art
[0002] With the development of robotics, technologies for automatically detecting terrain using robots have emerged. Existing technologies primarily use methods such as infrared ranging and laser scanning to identify terrain information. However, these methods rely heavily on odometers, resulting in complex and slow terrain identification methods, which in turn leads to low efficiency in accurately identifying terrain.
[0003] Summary of the Invention
[0004] Based on this, it is necessary to provide a terrain recognition method, device, robot and storage medium that can efficiently and accurately identify terrain to address the above technical problems, thereby improving the efficiency of the robot in accurately identifying terrain.
[0005] A terrain recognition method, applied to a robot, comprising:
[0006] Obtaining a target infrared dot matrix corresponding to the currently identified terrain area, and calculating the spatial coordinate position corresponding to each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix;
[0007] Sequentially acquiring points in at least two rows from the target infrared dot matrix, constructing corresponding multiple triangular planes based on the spatial coordinate positions corresponding to the points, and calculating the normal angles between the triangular planes;
[0008] Based on the comparison result of the normal angle between each triangular plane and the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is determined.
[0009] In one embodiment, sequentially acquiring points in at least two rows from the target infrared dot matrix, and constructing triangular planes corresponding to the two rows based on the spatial coordinate positions of the points includes:
[0010] Points in two adjacent preset rows are obtained from the target infrared dot matrix, and triangular planes corresponding to the two adjacent preset rows are constructed based on the spatial coordinate positions corresponding to the points.
[0011] In one embodiment, sequentially acquiring points in at least two rows from the target infrared dot matrix, constructing corresponding multiple triangular planes based on the spatial coordinate position of each point, and calculating the normal angle between each triangular plane includes:
[0012] Sequentially select any three points from each of the two rows of points as the first infrared point, the second infrared point, and the third infrared point corresponding to each of the two rows, wherein one of the first infrared point, the second infrared point, and the third infrared point is not in the same row as the other two points;
[0013] Constructing triangular planes corresponding to the two rows based on the spatial coordinate positions of the first infrared points, the second infrared points, and the third infrared points corresponding to the two rows;
[0014] Calculate the normal vectors corresponding to the triangular planes, and based on the normal vectors corresponding to the triangular planes, calculate the normal angles between the triangular planes.
[0015] In one embodiment, determining the target terrain state corresponding to the currently identified terrain area based on a comparison result of the normal angle between each triangular plane and a preset angle threshold includes:
[0016] When the normal angles between the triangular planes are all less than or equal to the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is flat terrain;
[0017] When the target terrain state is flat, the backward recognized terrain area is used as the current recognized terrain area, and the operation of obtaining the target infrared dot matrix corresponding to the current recognized terrain area is repeated.
[0018] In one embodiment, the method further comprises:
[0019] When there is a normal angle between the triangular planes that is greater than the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is that there is a height difference in the terrain;
[0020] When the target terrain state is that there is a height difference in the terrain, the height difference value corresponding to the currently identified terrain area is determined based on the comparison result of the normal angle between each triangular plane corresponding to the starting two preset adjacent rows and the last preset two adjacent rows in the target infrared dot matrix and the preset angle threshold.
[0021] In one embodiment, determining the drop height value corresponding to the currently identified terrain area based on a comparison result of the normal angle between each triangular plane corresponding to the first two preset adjacent rows and the last two preset adjacent rows in the target infrared dot array with the preset angle threshold includes:
[0022] When the angles of each normal line are less than or equal to the preset angle threshold, any one point is selected from the points in the two adjacent rows of the starting preset points as the first point to be measured, and any one point is selected from the points in the two adjacent rows of the ending preset points as the second point to be measured;
[0023] Based on the spatial coordinate positions corresponding to the first point to be measured and the second point to be measured, a height difference value corresponding to the currently identified terrain area is calculated.
[0024] In one embodiment, the method further comprises:
[0025] When there is a normal angle greater than the preset angle threshold among the normal angles, the robot moves forward, and uses the recognized terrain area corresponding to the infrared laser sensor when moving forward as the backward recognized terrain area;
[0026] When the normal angles between the triangular planes corresponding to the starting two adjacent rows and the ending two adjacent rows in the updated infrared dot matrix corresponding to the backward identified terrain area are both less than or equal to the preset angle threshold, any one point is selected from the points in the starting two adjacent rows as the first test point, and any one point is selected from the points in the ending two adjacent rows as the second test point;
[0027] Based on the spatial coordinate positions corresponding to the first point to be measured and the second point to be measured, a height difference value corresponding to the currently identified terrain area is calculated.
[0028] A terrain recognition device, comprising:
[0029] A coordinate calculation module is used to obtain a target infrared dot matrix corresponding to the currently identified terrain area, and calculate the spatial coordinate position of each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix;
[0030] An angle calculation module is used to sequentially obtain points in at least two rows from the target infrared dot matrix, construct corresponding multiple triangular planes based on the spatial coordinate position of each point, and calculate the normal angle between each triangular plane;
[0031] The terrain determination model is used to determine the target terrain state corresponding to the currently identified terrain area based on the comparison result of the normal angle between each triangular plane and the preset angle threshold.
[0032] A computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0033] Obtaining a target infrared dot matrix corresponding to the currently identified terrain area, and calculating the spatial coordinate position corresponding to each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix;
[0034] Sequentially acquiring points in at least two rows from the target infrared dot matrix, constructing corresponding multiple triangular planes based on the spatial coordinate positions corresponding to the points, and calculating the normal angles between the triangular planes;
[0035] Based on the comparison result of the normal angle between each triangular plane and the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is determined.
[0036] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0037] Obtaining a target infrared dot matrix corresponding to the currently identified terrain area, and calculating the spatial coordinate position corresponding to each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix;
[0038] Sequentially acquiring points in at least two rows from the target infrared dot matrix, constructing corresponding multiple triangular planes based on the spatial coordinate positions corresponding to the points, and calculating the normal angles between the triangular planes;
[0039] Based on the comparison result of the normal angle between each triangular plane and the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is determined.
[0040] The above-mentioned terrain recognition method, device, computer equipment and storage medium obtain the target infrared dot matrix corresponding to the current recognized terrain area, and calculate the spatial coordinate position corresponding to each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix; sequentially obtain points in at least two rows from the target infrared dot matrix, construct corresponding multiple triangular planes based on the spatial coordinate position corresponding to each point, and calculate the normal angle between each triangular plane; determine the target terrain state corresponding to the current recognized terrain area based on the comparison result of the normal angle between each triangular plane and a preset angle threshold, so that the robot constructs triangular planes through points in the infrared dot matrix, and thus judges the terrain state based on the normal angle between each triangular plane. While quickly and efficiently obtaining and analyzing point-to-surface information to judge the terrain condition, it also ensures the accuracy of terrain judgment, thereby improving the efficiency of the robot in accurately identifying the terrain. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] FIG1 is a schematic diagram of a flow chart of a terrain recognition method according to an embodiment;
[0042] FIG2 is a schematic diagram of a process for calculating a normal angle in one embodiment;
[0043] FIG3 is a schematic diagram of a process for terrain determination in one embodiment;
[0044] FIG4 is a schematic diagram of a flow chart of terrain determination in another embodiment;
[0045] FIG5 is a schematic diagram of a flow chart of fall height calculation in one embodiment;
[0046] FIG6 is a schematic diagram of a flow chart of fall height calculation in another embodiment;
[0047] FIG7 is a side view of a robot emitting infrared dots according to an embodiment;
[0048] FIG8 is a side view of a robot driving scene and an example dot matrix diagram according to an embodiment;
[0049] FIG9 is a structural block diagram of a terrain recognition device according to an embodiment;
[0050] FIG10 is a diagram showing the internal structure of a robot according to an embodiment. DETAILED DESCRIPTION
[0051] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.
[0052] The terrain recognition method provided in the embodiment of the present application is applied to a robot. The robot is used to obtain the target infrared dot matrix corresponding to the currently identified terrain area, and calculate the spatial coordinate position corresponding to each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix; sequentially obtain points in at least two rows from the target infrared dot matrix, and construct corresponding multiple triangular planes based on the spatial coordinate position corresponding to each point, and calculate the normal angle between each triangular plane; based on the comparison result of the normal angle between each triangular plane and the preset angle threshold, determine the target terrain state corresponding to the currently identified terrain area. Among them, the robot can be a robot with terrain recognition function, including but not limited to a sweeping robot, a delivery robot, a guide robot, etc.
[0053] In one embodiment, as shown in FIG1 , a terrain recognition method is provided, which is applied to a robot and includes the following steps:
[0054] Step S100 , obtaining a target infrared dot matrix corresponding to the currently identified terrain area, and calculating the spatial coordinate position of each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix.
[0055] The currently identified terrain area refers to the terrain area that the controller in the current robot is processing and identifying. The target infrared dot matrix refers to the infrared dot matrix formed by the infrared laser sensor in the robot emitting infrared rays at different emission angles to illuminate the currently identified terrain area. The infrared laser sensor calculates and records information such as the infrared ray length and ray emission angle in real time. The robot can directly read infrared ray-related data information from the infrared laser sensor, and the infrared laser sensor includes but is not limited to emitting rays at different angles in an inclined downward direction. The number of rows and columns in the target infrared dot matrix can be set and adjusted according to actual conditions and is not uniquely fixed. The infrared laser sensor can be an infrared laser TOF sensor. The ray length refers to the distance from the emission outlet of the infrared laser sensor installed on the robot to the corresponding infrared ray reaching the currently identified terrain area. The ray emission angle refers to the angle between the infrared ray and the vertical and horizontal directions when it is emitted, that is, the angle between the z-axis and the x-axis in the spatial rectangular coordinate system. The angle with the z-axis can be called the elevation angle, and the angle with the x-axis can be called the polar angle. In addition, the ray emission angle can be set and adjusted according to actual conditions. During the robot's driving process, in order to ensure the accuracy of terrain recognition, the ray emission angle of each infrared ray will maintain a fixed value in the same regional scene. If a fixed value needs to be adjusted in the same regional scene, it can be adjusted to other values as appropriate. If the robot switches to another regional scene for driving, the ray emission angle can also be readjusted to other values according to the switching of other regional scenes. Spatial coordinate position refers to the three-dimensional coordinate in the spatial rectangular coordinate system, which can represent the three-dimensional spatial position of each point in the target infrared dot array.
[0056] Specifically, an infrared laser sensor is installed on the robot. When the robot is moving, the infrared laser sensor can emit infrared rays to the terrain area in front at different angles in a tilted downward direction. The number of rows and columns of rays emitted corresponds to the number of rows and columns of the obtained infrared dot matrix. The area in the terrain area in front where infrared rays are projected is used as the current identified terrain area, and the infrared dot matrix formed by the infrared laser sensor projecting infrared rays in the terrain area in front is used as the target infrared dot matrix. When emitting infrared rays, the infrared laser sensor will record the ray length and ray emission angle corresponding to each infrared ray, so that the spatial coordinate position of each point corresponding to each infrared ray in the target infrared dot matrix can be calculated based on the ray length and ray emission angle corresponding to each infrared ray.
[0057] For example, the ray length r of a certain infrared ray corresponding to the currently identified terrain area read from the infrared laser sensor, and the angles θ and φ are the angles with the z-axis and the x-axis in the ray emission angle, respectively. Then the three-dimensional spatial calculation of the point corresponding to the infrared ray in the target infrared dot matrix corresponding to the currently identified terrain area is as follows: x = r*sin(θ)*cos(φ), y = r*sin(θ)*sin(φ), z = r*cos(θ), so it can be known that the spatial coordinate position of the point corresponding to the infrared ray in the target infrared dot matrix is (x, y, z).
[0058] Step S102 , sequentially obtaining points in at least two rows from the target infrared dot matrix, constructing corresponding multiple triangular planes based on the spatial coordinate position corresponding to each point, and calculating the normal angles between the triangular planes.
[0059] The triangle plane is the plane formed by three points. The normal angle is the angle between the normal vectors corresponding to different triangle planes.
[0060] Specifically, obtaining at least three points in different rows can form a plane. In order to exhaust the situations in which a triangular plane can be formed in the target infrared dot matrix, at least two rows of points can be obtained in sequence, and then the points for constructing the triangular plane can be determined from the at least two rows of points obtained. Based on the spatial coordinate positions of the points used to construct the triangular plane, the corresponding triangular plane can be calculated. For example, the points in rows a and b in Figure 8(d) are obtained to construct the triangular plane corresponding to ① or ②; or the points in rows b and c are obtained to construct the triangular plane corresponding to ④; or the points on rows a, b and c are obtained to construct the triangular plane corresponding to ③. The triangular planes that can be constructed in Figure 8(d) are not limited to those shown in the figure. After constructing the corresponding planes, the vectors corresponding to the two intersecting straight lines can be obtained from each plane, and the normal angle of the corresponding triangular plane can be calculated, thereby preparing data for subsequent further analysis of the terrain.
[0061] Step S104 : determining the target terrain state corresponding to the currently identified terrain area based on the comparison result of the normal angle between each triangular plane and a preset angle threshold.
[0062] The preset angle threshold refers to the angle threshold used to measure whether the normals corresponding to the two triangular planes are parallel. The closer the angle is to the preset angle threshold or the smaller it is, the more likely the two triangular planes are parallel or on the same plane. The target terrain state refers to the terrain conditions of the currently identified terrain area, including but not limited to reaching a preset flat state, partially flat and partially rugged (i.e., some terrain has elevation differences), and completely rugged with terrain drops.
[0063] Specifically, the terrain on which the robot actually travels cannot be absolutely smooth without any height difference. Therefore, an expected situation can be preset for whether there is a height difference in the terrain, that is, a preset angle threshold under the expected situation is set, so as to judge the terrain condition by comparing the normal angle between each triangular plane with the preset angle threshold. When the normal angle is less than or equal to the preset angle threshold, it means that the terrain of the small area corresponding to the triangular plane corresponding to the normal angle has reached the expected terrain flatness, and it can be considered that there is no terrain height difference; on the contrary, when the normal angle is greater than the preset angle threshold, it means that the terrain of the small area corresponding to the triangular plane corresponding to the normal angle has a height difference, and the terrain is rugged. However, when judging the terrain of the entire area of the currently identified terrain area, we cannot just look at the comparison between the normal angles between a single or several triangular planes and the preset angle threshold. We need to compare the normal angles calculated between the constructed triangular planes with the preset angle threshold to judge the terrain conditions of the terrain area corresponding to each triangular plane, so as to ensure that the terrain of each part of the currently identified terrain area is analyzed and taken into account, thereby improving the accuracy of terrain analysis and recognition.
[0064] In the above terrain recognition method, by obtaining the target infrared dot matrix corresponding to the currently recognized terrain area, the spatial coordinate position corresponding to each point in the target infrared dot matrix is calculated based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix; points in at least two rows are obtained from the target infrared dot matrix in sequence, and based on the spatial coordinate position corresponding to each point, corresponding multiple triangular planes are constructed, and the normal angle between each triangular plane is calculated; based on the comparison result of the normal angle between each triangular plane and the preset angle threshold, the target terrain state corresponding to the currently recognized terrain area is determined, and the robot is enabled to construct triangular planes through points in the infrared dot matrix, thereby judging the terrain state based on the normal angle between each triangular plane. While quickly obtaining and analyzing point-to-surface information to judge the terrain condition, the accuracy of terrain judgment is also ensured, thereby improving the efficiency of the robot in accurately identifying the terrain.
[0065] In one embodiment, an infrared laser sensor is installed on the robot; the target infrared dot array is obtained by the robot tilting the infrared laser sensor downward and emitting infrared rays at different emission angles to the currently identified terrain area; the ray length and ray emission angle corresponding to each point in the target infrared dot array are read from the infrared laser sensor.
[0066] In one embodiment, a multi-point measurement tool, such as a binocular camera or a laser radar, may be installed on the robot to obtain dot matrix information corresponding to the terrain area identified in front of the robot as it moves. Based on the dot matrix information, a plurality of corresponding triangular planes are constructed. The terrain condition of the terrain area identified in front of the robot as it moves is determined by comparing the normal angles between the triangular planes with a preset angle threshold. If any normal angle is greater than the preset angle threshold, it indicates that the terrain condition of the terrain area identified in front of the robot has a height difference such as a bump. At this point, the actual height difference of the terrain cannot be directly determined. The terrain identified as the robot continues to move forward must be analyzed until the normal angles of the triangular planes in the first two preset adjacent rows and the last two preset adjacent rows of the dot matrix corresponding to the terrain identified in front of the robot are both less than the preset angle threshold. Then, any point is selected from the corresponding points in the terrain difference area between the first two preset adjacent rows and the last two preset adjacent rows. The actual terrain height difference of the currently identified terrain area is determined based on the spatial coordinate positions of these two points. This allows the robot to perform a crossing action based on the actual terrain height difference, thereby completing the crossing of terrain with a height difference.
[0067] In one embodiment, step S102 includes: acquiring points in two preset adjacent rows from the target infrared dot matrix, and constructing triangular planes corresponding to the two preset adjacent rows based on the spatial coordinate positions corresponding to the points.
[0068] The preset two adjacent rows refer to adjacent rows in the target infrared dot matrix determined in a preset direction, which may be the row direction of the target infrared dot matrix, that is, adjacent rows are determined in the horizontal direction.
[0069] Specifically, there are corresponding numbers of points in each preset two adjacent rows in the target infrared dot matrix. You can arbitrarily select one point from one of the preset two adjacent rows and arbitrarily select two points in the other row. According to these three points, a triangular plane corresponding to the preset two adjacent rows is constructed. In order to ensure the accuracy of terrain recognition, the triangular planes that can be constructed by the points in the preset two adjacent rows will be constructed and analyzed by the controller in the robot. After the triangular planes corresponding to each adjacent row are constructed, the normal angle between all triangular planes can be calculated, that is, the angle between the normal vectors of each triangular plane corresponding to the same preset two adjacent rows and the normal vector angle between each triangular plane that does not belong to the same preset two adjacent rows can be calculated, that is, the normal angle Angle, thereby ensuring the analysis of the terrain conditions of the areas corresponding to the same two adjacent rows of preset terrain and the terrain differences of the terrain areas that do not belong to the same two adjacent rows of preset terrain, and then ensuring the analysis of the terrain conditions of the entire currently identified terrain area, so that the terrain analysis is detailed and sufficient while ensuring the correctness of the terrain recognition analysis. The angle between the normals of each triangular plane can relatively simply and intuitively reflect the ruggedness or flatness of the terrain in the currently identified terrain area, and the robot's calculation of the angle between the normals of each triangular plane does not put much pressure on the computing power, so that the terrain information of the currently identified terrain area can be provided to the robot itself quickly, efficiently and accurately, so that the robot can make a judgment on the next driving step more quickly and accurately.
[0070] In this embodiment, by obtaining the points in each preset two adjacent rows from the target infrared dot matrix, the triangular planes corresponding to each preset two adjacent rows are constructed based on the spatial coordinate position corresponding to each point, which effectively reduces the calculation of the triangular planes, thereby improving the efficiency of the robot's terrain analysis and recognition. In addition, constructing triangular planes from the points in the preset adjacent rows can also ensure a complete analysis of all parts of the current recognition area, reducing the robot's computing power while better ensuring the accuracy of terrain analysis and recognition.
[0071] In one embodiment, as shown in FIG2 , step S102 includes:
[0072] In step S200, three points are randomly selected from the two rows of points as the first infrared point, the second infrared point and the third infrared point corresponding to the two rows, and one of the first infrared point, the second infrared point and the third infrared point is not in the same row as the other two points.
[0073] Step S202 : constructing triangular planes corresponding to each two rows based on the spatial coordinate positions of the first infrared points, the second infrared points, and the third infrared points corresponding to each two rows.
[0074] Step S204 , calculating the normal vector corresponding to each triangular plane, and calculating the normal angle between each triangular plane based on the normal vector corresponding to each triangular plane.
[0075] The first infrared point, the second infrared point, and the third infrared point represent points selected for constructing a triangular plane.
[0076] Specifically, when calculating the triangular planes corresponding to each of the two rows, it is not just arbitrarily selecting three points from the different rows of points corresponding to each of the two rows and forming only a triangular plane corresponding to these three points. Instead, all situations in which triangular planes can be constructed from the points in each of the two rows are exhausted. Moreover, since the number of rows and columns corresponding to the target infrared dot array can be determined based on actual conditions, theory, experience, etc., there will not be excessive pressure on the analysis computing power and other aspects on the triangular planes that the robot analyzes and processes, thereby ensuring that the robot can accurately analyze the terrain conditions corresponding to the target infrared dot array while achieving the effect of high-efficiency analysis and processing. After constructing each of the triangular planes corresponding to each of the two rows, the normal vectors corresponding to each of the constructed triangular planes are further calculated, and then the normal angles between each of the triangular planes are calculated based on the normal vectors corresponding to each triangle, providing a data basis for subsequent judgment of the terrain conditions of the currently identified terrain area.
[0077] In this embodiment, by sequentially selecting three points from each two rows of points as the first infrared point, the second infrared point and the third infrared point corresponding to each two rows, one of the first infrared point, the second infrared point and the third infrared point is not in the same row as the other two points, and based on the spatial coordinate positions of the first infrared point, the second infrared point and the third infrared point corresponding to each two rows, triangular planes corresponding to each two rows are constructed, and the normal vector corresponding to each triangular plane is calculated. Based on the normal vector corresponding to each triangular plane, the normal angle between each triangular plane is calculated, thereby realizing the construction of triangular planes corresponding to each two rows and the calculation of the normal angle between each triangular plane. Exhaustive triangular planes corresponding to different two rows are constructed, and the normal angle between all triangular planes is calculated. While ensuring a full analysis of the currently identified terrain area, the computing pressure of the robot is further reduced, which is conducive to the robot to efficiently and accurately analyze and identify the terrain conditions of the currently identified terrain area.
[0078] In one embodiment, as shown in FIG3 , step S104 includes:
[0079] In step S300 , when the normal angles between the triangular planes are all less than or equal to the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is flat terrain.
[0080] Step S302: When the target terrain state is flat, the backward recognized terrain area is used as the current recognized terrain area, and the operation of obtaining the target infrared dot matrix corresponding to the current recognized terrain area is repeated.
[0081] The backward recognized terrain area refers to the recognized terrain area corresponding to the robot's movement at the next moment or some moments relative to the current moment.
[0082] Specifically, when the normal angles between the triangular planes are less than or equal to the preset angle threshold, it means that the terrain conditions of each part of the currently identified terrain area are consistent with the flat terrain condition, and there is no height difference in the terrain. The robot can drive normally in the currently identified terrain area. In addition, the robot analyzes the terrain conditions of the current driving area while driving. Therefore, after analyzing the currently identified terrain area, it will perform terrain analysis and identification on the terrain area corresponding to the next driving moment.
[0083] In this embodiment, when the normal angles between the triangular planes are less than or equal to the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is flat, and the backward identified terrain area is used as the currently identified terrain area. The operation of repeatedly obtaining the target infrared dot matrix corresponding to the currently identified terrain area is repeated, thereby realizing the analysis and identification of the terrain corresponding to any current moment when the robot is driving, so as to ensure the safety of the robot's driving.
[0084] In one embodiment, as shown in FIG4 , step S104 includes:
[0085] In step S400 , when there is a normal angle between the triangular planes that is greater than a preset angle threshold, the target terrain state corresponding to the currently identified terrain area is that the terrain has a height difference.
[0086] Step S402, when the target terrain state is that there is a height difference in the terrain, the height difference value corresponding to the currently identified terrain area is determined based on the comparison result of the normal angle between each triangular plane corresponding to the starting two preset adjacent rows and the last two preset adjacent rows in the target infrared dot matrix and the preset angle threshold.
[0087] The presence of a height difference in the terrain means that the terrain is no longer suitable for the robot to move normally, and the robot needs to perform corresponding crossing actions based on the height of the terrain, such as climbing stairs. The drop height value refers to the terrain drop height corresponding to the currently identified terrain area. For example, when climbing stairs, the height of the stairs is the drop height value. The two adjacent rows of the starting preset are the two frontmost rows in the target infrared dot matrix, that is, the two adjacent rows farthest from the robot. The two adjacent rows of the ending preset are the two rearmost rows in the target infrared dot matrix, that is, the two adjacent rows closest to the robot.
[0088] Specifically, when the normal angles between the triangular planes corresponding to the currently identified terrain area are greater than the preset angle threshold, it indicates that there is an area with a terrain height difference in the currently identified terrain area. In order to accurately measure the height value of the difference, the comparison of the normal angles between the triangular planes in the starting two preset adjacent rows and the last two preset adjacent rows in the target infrared dot matrix can be further analyzed; if the analysis finds that the normal angles between the triangular planes in the starting two preset adjacent rows are greater than the preset angle threshold, or the normal angles between the triangular planes in the last two preset adjacent rows are greater than the preset angle threshold, or the triangular planes in the starting two preset adjacent rows are greater than the preset angle threshold, If the normal angle between the triangular planes in two adjacent rows is greater than the preset angle threshold, it means that there is a terrain drop in the terrain area corresponding to the starting two preset adjacent rows or the terrain area corresponding to the last two preset adjacent rows, or there is a terrain drop between the area corresponding to the starting two preset adjacent rows and the area corresponding to the last two preset adjacent rows. At this time, it is impossible to determine whether the drop height value corresponding to the existing terrain drop is the highest drop height corresponding to the currently identified terrain area, that is, the actual terrain height drop value. The robot needs to travel further to obtain the terrain conditions ahead for further analysis to obtain the actual terrain drop height value, so that the robot can perform the corresponding crossing action according to the actual terrain drop height value.
[0089] To understand the above-described scenario more intuitively, it can be seen from Figure 8 that the small rectangular box in Figure 8 is the robot's infrared laser sensor, the large rectangular box is the step, and the four black dots are the points where the infrared rays are projected onto the ground, that is, the points in the target infrared dot matrix. Figure 8 (a) is a case where the terrain is flat. At this time, the robot moves forward and reaches the situation in (b). It can be seen that at this time, the points in the two adjacent rows of the starting preset are on the vertical plane between the step and the ground, and the points in the two adjacent rows of the last preset are on the horizontal ground. The normal angle between the triangular plane corresponding to the two adjacent rows of the starting preset and the triangular plane corresponding to the two adjacent rows of the last preset is 90°, indicating that the area corresponding to the two adjacent rows of the starting preset is the same as the area corresponding to the two adjacent rows of the last preset. There is a terrain height difference between the areas, and the actual height of the steps cannot be directly determined at this time. The robot needs to continue driving and analyzing the corresponding terrain conditions. When the points corresponding to the two adjacent rows of the starting preset fall on the step plane, and the points corresponding to the two adjacent rows of the last preset fall on the horizontal ground under the steps, as shown in (c) in Figure 8, the actual height difference corresponding to the currently identified terrain area can be calculated based on the spatial coordinate position of any point on the step plane in the two adjacent rows of the starting preset and the spatial coordinate position of any point on the horizontal ground in the two adjacent rows of the last preset. In this scenario, it is only necessary to subtract the z-axis positions of the spatial coordinate positions of the two points to calculate the height difference between the steps and the horizontal ground in the current scenario.
[0090] In this embodiment, when the included normal angles between the triangular planes are greater than a preset angle threshold, the target terrain state corresponding to the currently identified terrain area is determined to be a terrain with a height difference. Based on the comparison result of the included normal angles between the triangular planes corresponding to the first two preset adjacent rows and the last two preset adjacent rows in the target infrared dot array with the preset angle threshold, a drop height value corresponding to the currently identified terrain area is determined, thereby calculating the actual drop height value corresponding to the currently identified terrain area. When a height difference is identified in the currently identified terrain area, the drop height corresponding to the currently identified terrain area is not directly calculated based on the coordinate position information corresponding to the target infrared dot array. Instead, the terrain conditions of the terrain areas corresponding to the first two preset adjacent rows and the last two preset adjacent rows are further analyzed, and then the drop height value corresponding to the currently identified terrain area is further analyzed and calculated. This ensures the accuracy of the drop height value calculation. In addition, by analyzing the relationship between the normal angles of the triangular planes during the calculation process, the terrain conditions can be fully identified, thereby improving the efficiency of terrain recognition by the robot to a certain extent.
[0091] In one embodiment, as shown in FIG5 , step S402 includes:
[0092] Step S500: When all normal angles are less than or equal to the preset angle threshold, any point is selected from the first two adjacent rows of points as the first point to be measured, and any point is selected from the last two adjacent rows of points as the second point to be measured.
[0093] Step S502 : Based on the spatial coordinate positions of the first point to be measured and the second point to be measured, a height difference value corresponding to the currently identified terrain area is calculated.
[0094] The first point to be measured and the second point to be measured refer to infrared points used to calculate the actual height difference of the terrain.
[0095] Specifically, when the normal angles between the triangular planes corresponding to the starting two adjacent rows and the last two adjacent rows in the target infrared dot matrix are both less than or equal to the preset angle threshold, it means that the planes of the terrain area corresponding to the starting two adjacent rows and the planes of the terrain area corresponding to the last two adjacent rows are parallel (the specific situation can be shown in Figure 8(c)). At this time, two points can be arbitrarily selected from the points corresponding to the area where there is a terrain height difference between the starting two adjacent rows and the last two adjacent rows. One of the two points belongs to the points in the starting two adjacent rows, and the other point is a point in the last two adjacent rows. Then, according to the spatial coordinate positions corresponding to these two points, the height difference value corresponding to the currently identified terrain area is calculated.
[0096] In this embodiment, when the angles of each normal are less than or equal to the preset angle threshold, any point is selected from the two adjacent rows of points in the starting preset position as the first measured point, and any point is selected from the two adjacent rows of points in the ending preset position as the second measured point. Based on the spatial coordinate positions corresponding to the first measured point and the second measured point, the height difference value corresponding to the currently identified terrain area is calculated, and different analyses are performed according to different situations, so that the results obtained by the analysis are more targeted and accurate, so that the robot can efficiently and quickly obtain high-accuracy height difference values and perform corresponding terrain crossing actions.
[0097] In one embodiment, as shown in FIG6 , step S402 includes:
[0098] Step S600: When there is a normal angle greater than a preset angle threshold among the normal angles, the robot moves forward and uses the recognized terrain area corresponding to the infrared laser sensor when moving forward as the backward recognized terrain area.
[0099] Step S602: When the normal angles between the triangular planes corresponding to the starting two adjacent rows and the ending two adjacent rows in the updated infrared dot matrix corresponding to the backward identified terrain area are both less than or equal to the preset angle threshold, any point is selected from the points in the starting two adjacent rows as the first point to be measured, and any point is selected from the points in the ending two adjacent rows as the second point to be measured.
[0100] Step S604 : Based on the spatial coordinate positions of the first point to be measured and the second point to be measured, a height difference value corresponding to the currently identified terrain area is calculated.
[0101] Among them, updating the infrared dot matrix refers to the infrared dot matrix corresponding to when the robot travels forward a preset distance from the current identified terrain area and the infrared laser sensor emits to the backward identified terrain area. At this time, the information of each point in the updated infrared dot matrix is partially different from or completely different from the information of each point in the target infrared dot matrix.
[0102] Specifically, if the normal angle between each triangular plane corresponding to the starting two adjacent rows and the last two adjacent rows in the target infrared dot matrix is greater than the preset angle threshold, it means that there is a terrain difference between the terrain area corresponding to the starting two adjacent rows and the terrain area corresponding to the last two adjacent rows (as shown in Figure 8 (b)). At this time, the actual height difference that the robot has to cross in the current identified terrain area cannot be directly calculated based on the spatial coordinate positions of the points in the starting two adjacent rows and the last two adjacent rows. The robot needs to move forward so that the normal angle between each triangular plane corresponding to the starting two adjacent rows and the last two adjacent rows in the updated infrared dot matrix corresponding to the backward identified terrain area is less than or equal to the preset angle threshold, thereby achieving a situation similar to Figure 8 (c). When the planes of the area corresponding to the starting two adjacent rows are parallel to the planes of the area corresponding to the last two adjacent rows, then Directly from the terrain area where there is a terrain height difference between the corresponding areas of the two adjacent rows of the starting preset rows and the corresponding areas of the two adjacent rows of the ending preset rows, any point is selected from the points of the two adjacent rows of the starting preset rows and the points of the two adjacent rows of the ending preset rows. The actual height difference that the robot needs to cross in the current identified terrain area is calculated based on the spatial coordinate positions corresponding to these two points. For example, in Figure 8(c), the two rows of points on the steps are the points of the two adjacent rows of the starting preset rows. If some of the points in the two adjacent rows of the starting preset rows fall on the steps and the other part falls on the ground at the same height as the horizontal ground, then any point is selected from the points in the two adjacent rows of the starting preset rows that fall on the steps. If all the points in the two adjacent rows of the starting preset rows fall on the steps, then any point is selected from all the points corresponding to the two adjacent rows of the starting preset rows, and the other point is selected from any point corresponding to the two adjacent rows of the ending preset rows that are on the horizontal ground. Then, the corresponding terrain height difference is calculated based on the spatial coordinate positions of these two points.
[0103] In this embodiment, when there is a normal angle greater than a preset angle threshold among the normal angles, the robot moves forward, and the identified terrain area corresponding to the infrared laser sensor when moving forward is used as the backward identified terrain area. When the normal angles between the triangular planes corresponding to the starting preset two adjacent rows and the last preset two adjacent rows in the updated infrared dot matrix corresponding to the backward identified terrain area are both less than or equal to the preset angle threshold, any point is selected from the points in the starting preset two adjacent rows as the first to be measured point, and any point is selected from the points in the last preset two adjacent rows as the second to be measured point. Based on the spatial coordinate positions corresponding to the first to be measured point and the second to be measured point, the drop height value corresponding to the current identified terrain area is calculated, thereby achieving more accurate analysis of the actual drop height value that the robot has to cross in the current identified terrain area under different circumstances, layer-by-layer targeted analysis, low computing power and high accuracy terrain recognition, thereby greatly improving the efficiency of the robot in accurately identifying the terrain.
[0104] In one embodiment, a scenario involving a robot identifying the height difference between a step and the ground is used as an example. While the robot is moving, an infrared laser sensor mounted on the robot can emit infrared rays at different angles, tilted downward, toward an area within 0.5 to 2 meters in front of the robot. This ensures that a target infrared dot array falls within the area within 0.5 to 2 meters in front of the robot. The robot's control system then analyzes the information corresponding to the target infrared dot array, reading the infrared ray length and emission angle corresponding to each point in the target infrared dot array from the infrared laser sensor. The spatial coordinate position of each point is calculated based on the ray length and emission angle. A side view of the robot emitting infrared rays is shown in Figure 7. The vertical rectangle in Figure 7 represents the robot, and the four rays corresponding to the gray area are the infrared rays emitted by the infrared laser sensor. Furthermore, when the spatial coordinate position of each point in the target infrared dot matrix is calculated, multiple triangular planes corresponding to the target infrared dot matrix can be exhaustively constructed; further consideration is given to ensuring that the terrain recognition area corresponding to the target infrared dot matrix can be fully analyzed and identified while reducing the robot computing power to improve execution efficiency. Triangular planes corresponding to two adjacent rows of points in each lateral direction of the target infrared dot matrix can be constructed, that is, three points are arbitrarily selected from the points in each adjacent row, and one of these three points is in a different row from the other two points, so that a triangular plane is constructed based on these three points, and multiple triangular planes can be constructed for each adjacent row of points. For example, in the point matrix (d) in Figure 8, a and b are adjacent rows, and b and c are adjacent rows. The two rows of points a and b can construct their corresponding multiple triangular planes, and the two rows of points b and c can also construct corresponding multiple triangular planes.
[0105] Furthermore, after constructing the triangular planes, the normal angles between each triangular plane are calculated. If the normal angles of each triangular plane are less than or equal to the preset angle threshold, it means that the terrain of the current identified terrain area analyzed by the robot is relatively flat and there is no need to jump or cross, which is as shown in Figure 8 (a); if the normal angles of the triangular planes in the current identified terrain area analyzed by the robot are greater than the preset angle threshold, it means that there is a terrain difference in the current identified terrain area, which requires the robot to jump or cross, but the specific jumping height needs further analysis. The normal angles between the triangular planes corresponding to the first two rows and the triangular planes corresponding to the last two rows in the target infrared dot matrix can be analyzed. If the analysis finds that the normal angle is still greater than the preset angle threshold, it means that the current terrain may not be the actual highest drop height, as shown in Figure 8(b). At this time, the robot needs to continue driving to obtain real-time information about the terrain area identified by the robot at the time of driving. When the analyzed terrain situation is as shown in Figure 8(c), the actual drop height value of the step to be crossed by the robot in the currently identified terrain area can be obtained. The robot can then perform the corresponding crossing action based on the calculated drop height value, thereby realizing the robot's automatic and rapid obstacle avoidance operation. During the entire terrain recognition process, the robot can construct the corresponding triangular plane based on the information of each point in the infrared dot matrix, and then fully and effectively analyze the terrain situation of the terrain area to be recognized based on the normal angle corresponding to the triangular plane. Through low-computing power analysis, the terrain area can be fully analyzed and recognized efficiently and accurately, thereby greatly improving the efficiency of the robot in accurately recognizing terrain.
[0106] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.
[0107] Based on the same inventive concept, embodiments of the present application also provide a terrain recognition device for implementing the aforementioned terrain recognition method. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more of the following terrain recognition device embodiments can be found in the aforementioned limitations of the terrain recognition method and will not be further elaborated here.
[0108] In one embodiment, as shown in FIG9 , a terrain recognition device is provided, including: a coordinate calculation module 900 , an angle calculation module 902 , and a terrain determination model 904 , wherein:
[0109] The coordinate calculation module 900 is used to obtain the target infrared dot matrix corresponding to the current identified terrain area, and calculate the spatial coordinate position of each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix.
[0110] The angle calculation module 902 is used to sequentially obtain points in at least two rows from the target infrared dot matrix, construct corresponding multiple triangular planes based on the spatial coordinate position corresponding to each point, and calculate the normal angle between each triangular plane.
[0111] The terrain determination model 904 is used to determine the target terrain state corresponding to the currently identified terrain area based on the comparison result of the normal angle between each triangular plane and the preset angle threshold.
[0112] In one embodiment, the angle calculation module 902 is further configured to obtain points in two preset adjacent rows from the target infrared dot matrix, and construct triangular planes corresponding to the two preset adjacent rows based on the spatial coordinate positions corresponding to the points.
[0113] In one embodiment, the angle calculation module 902 is also used to sequentially select any three points from each two rows of points as the first infrared point, the second infrared point and the third infrared point corresponding to each two rows, and one of the first infrared point, the second infrared point and the third infrared point is not in the same row as the other two points; based on the spatial coordinate positions corresponding to the first infrared point, the second infrared point and the third infrared point corresponding to each two rows, construct the triangular planes corresponding to each two rows; calculate the normal vector corresponding to each triangular plane, and based on the normal vector corresponding to each triangular plane, calculate the normal angle between each triangular plane.
[0114] In one embodiment, the terrain determination model 904 is also used to determine that when the normal angles between the triangular planes are less than or equal to the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is flat terrain; when the target terrain state is flat terrain, the backward identified terrain area is used as the currently identified terrain area, and the operation of obtaining the target infrared dot matrix corresponding to the currently identified terrain area is repeated.
[0115] In one embodiment, the terrain recognition device also includes a drop calculation module 906, which is used to determine the target terrain state corresponding to the currently recognized terrain area as terrain with height difference when there is a normal angle between the normal angles of each triangular plane that is greater than the preset angle threshold; when the target terrain state is terrain with height difference, based on the comparison result of the normal angle between each triangular plane corresponding to the starting preset two adjacent rows and the last preset two adjacent rows in the target infrared dot matrix with the preset angle threshold, determine the drop height value corresponding to the currently recognized terrain area.
[0116] In one embodiment, the drop calculation module 906 is also used to select any point from the two adjacent rows of points in the starting preset position as the first test point, and select any point from the two adjacent rows of points in the ending preset position as the second test point when the angles of each normal line are less than or equal to the preset angle threshold; based on the spatial coordinate positions corresponding to the first test point and the second test point, calculate the drop height value corresponding to the currently identified terrain area.
[0117] In one embodiment, the drop calculation module 906 is also used to, when there is a normal angle greater than the preset angle threshold among the normal angles, the robot moves forward and uses the identified terrain area corresponding to the infrared laser sensor when moving forward as the backward identified terrain area; when the normal angles between the triangular planes corresponding to the starting preset two adjacent rows and the last preset two adjacent rows in the updated infrared dot matrix corresponding to the backward identified terrain area are both less than or equal to the preset angle threshold, arbitrarily select a point from the points in the starting preset two adjacent rows as the first point to be measured, and arbitrarily select a point from the points in the last preset two adjacent rows as the second point to be measured; based on the spatial coordinate positions corresponding to the first point to be measured and the second point to be measured, calculate the drop height value corresponding to the current identified terrain area.
[0118] Each module in the terrain recognition device described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each module may be embedded in or independent of a processor in a computer device in the form of hardware, or may be stored in a memory in the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.
[0119] In one embodiment, a robot is provided, the internal structure of which may be shown in FIG10 . The robot includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The robot's processor is used to provide computing and control capabilities. The robot's memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The robot's communication interface is used to communicate with an external robot via wired or wireless communication. The wireless communication may be achieved via Wi-Fi, a carrier network, NFC (near-field communication), or other technologies. When executed by the processor, the computer program implements a terrain recognition method. The robot's display screen may be a liquid crystal display or an electronic ink display screen. The robot's input device may be a touch layer covering the display screen, or may be buttons, a trackball, or a touchpad provided on the robot housing, or may be an external keyboard, touchpad, or mouse.
[0120] Those skilled in the art will understand that the structure shown in FIG10 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0121] In one embodiment, a robot is also provided, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the processor implements the steps in the above-mentioned method embodiments when executing the computer instructions.
[0122] In one embodiment, a computer-readable storage medium is provided, storing a computer program, which implements the steps in the above-mentioned method embodiments when executed by a processor.
[0123] In one embodiment, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a robot reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the robot to perform the steps of each of the above method embodiments.
[0124] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of relevant countries and regions.
[0125] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented 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, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.
[0126] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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.
[0127] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.
Claims
1. A terrain recognition method, characterized in that: The method is applied to a robot, and the method comprises: Obtaining a target infrared dot matrix corresponding to the currently identified terrain area, and calculating the spatial coordinate position corresponding to each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix; Sequentially obtain points in at least two rows from the target infrared dot matrix, construct corresponding multiple triangular planes based on the spatial coordinate position corresponding to each point, and calculate the normal angle between each triangular plane; Based on the comparison result of the normal angle between each triangular plane and the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is determined.
2. The method according to claim 1, characterized in that The step of sequentially acquiring points in at least two rows from the target infrared dot matrix and constructing triangular planes corresponding to the two rows based on the spatial coordinate positions corresponding to the points comprises: Points in two preset adjacent rows are obtained from the target infrared dot matrix, and triangular planes corresponding to two preset adjacent rows are constructed based on the spatial coordinate positions corresponding to the points.
3. The method according to claim 1, characterized in that The step of sequentially acquiring points in at least two rows from the target infrared dot matrix, constructing a plurality of corresponding triangular planes based on the spatial coordinate position corresponding to each point, and calculating the normal angles between the triangular planes comprises: Sequentially select any three points from the points in each of the two rows as the first infrared point, the second infrared point and the third infrared point corresponding to each of the two rows, wherein one of the first infrared point, the second infrared point and the third infrared point is not in the same row as the other two points; Based on the spatial coordinate positions of the first infrared points, the second infrared points and the third infrared points corresponding to the two rows, constructing the triangular planes corresponding to the two rows; The normal vectors corresponding to the triangular planes are calculated, and based on the normal vectors corresponding to the triangular planes, the normal angles between the triangular planes are calculated.
4. The method according to claim 1, characterized in that: The determining of the target terrain state corresponding to the currently identified terrain area based on the comparison result of the normal angle between each triangular plane and the preset angle threshold comprises: When the normal angles between the triangular planes are all less than or equal to the preset angle threshold, the target terrain state corresponding to the currently identified terrain area is flat terrain; When the target terrain state is flat, the backward recognized terrain area is used as the current recognized terrain area, and the operation of obtaining the target infrared dot matrix corresponding to the current recognized terrain area is repeated.
5. The method according to any one of claims 1 to 2, characterized in that: The method further comprises: When there is a normal angle greater than the preset angle threshold among the normal angles between the triangular planes, the target terrain state corresponding to the currently identified terrain area is that there is a height difference in the terrain; When the target terrain state is that there is a height difference in the terrain, based on the comparison result between the normal angle between each triangular plane corresponding to the starting preset two adjacent rows and the last preset two adjacent rows in the target infrared dot matrix and the preset angle threshold, it is determined Determine the height difference value corresponding to the currently identified terrain area.
6. The method according to claim 5, characterized in that The step of determining the height difference value corresponding to the currently identified terrain area based on the comparison result of the normal angle between each triangular plane corresponding to the starting preset two adjacent rows and the last preset two adjacent rows in the target infrared dot matrix with the preset angle threshold comprises: When the normal angles are all less than or equal to the preset angle threshold, any one point is selected from the points in the two adjacent rows of the starting preset points as the first point to be measured, and any one point is selected from the points in the two adjacent rows of the ending preset points as the second point to be measured; Based on the spatial coordinate positions corresponding to the first point to be measured and the second point to be measured, a height difference value corresponding to the currently identified terrain area is calculated.
7. The method according to claim 5, characterized in that The method further comprises: When there is a normal angle greater than the preset angle threshold among the normal angles, the robot moves forward, and uses the recognized terrain area corresponding to the infrared laser sensor when moving forward as the backward recognized terrain area; When the normal angles between the triangular planes corresponding to the starting two adjacent rows and the ending two adjacent rows in the updated infrared dot matrix corresponding to the backward identified terrain area are both less than or equal to the preset angle threshold, any point is selected from the points of the starting two adjacent rows as the first point to be measured, and any point is selected from the points of the ending two adjacent rows as the second point to be measured; Based on the spatial coordinate positions corresponding to the first point to be measured and the second point to be measured, a height difference value corresponding to the currently identified terrain area is calculated.
8. A terrain recognition device, characterized in that: The device comprises: A coordinate calculation module is used to obtain the target infrared dot matrix corresponding to the current identified terrain area, and calculate the spatial coordinate position corresponding to each point in the target infrared dot matrix based on the ray length and ray emission angle corresponding to each point in the target infrared dot matrix; An angle calculation module, used to sequentially obtain points in at least two rows from the target infrared dot matrix, construct corresponding multiple triangular planes based on the spatial coordinate position corresponding to each point, and calculate the normal angle between each triangular plane; The terrain determination model is used to determine the target terrain state corresponding to the currently identified terrain area based on the comparison result of the normal angle between each triangular plane and the preset angle threshold.
9. A robot, characterized in that: The robot further comprises a memory and a processor, wherein the memory stores computer-readable instructions, and the processor is configured to implement the steps of the method according to any one of claims 1 to 7 when executing the computer-readable instructions.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Measuring method for construction depth of asphalt road surface
CN102635056A
Movement control method for robot to get in and out of elevator, laser robot and chip
CN111728533A
Sweeping robot operation management method, sweeping robot, equipment and storage medium
CN112826393A
Terrain recognition method and device, robot and storage medium
CN117092660A
Method and device for modeling formation ground
JP1995271847A