Stair slope angle determination method and device, electronic equipment and storage medium
By establishing a vertical projection plane in an intelligent driving vehicle and fitting the slope of point cloud data, the problem of accurate stair slope angle was solved, enabling accurate identification of the stair slope angle and improving the stair climbing ability of intelligent driving vehicles.
Patent Information
- Application Number
- CN202411235089.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2026-02-24
- Estimated Expiration
- 2044-09-04
AI Technical Summary
Existing technologies cannot accurately determine the slope angle of stairs, which affects the stair-climbing ability of intelligent driving vehicles.
By acquiring multiple point cloud data of the staircase, a projection plane perpendicular to the plane where the staircase is located is established. The point cloud data is mapped onto the projection plane, and the slope of the two-dimensional point cloud coordinates is fitted to determine the slope angle of the staircase.
It enables accurate determination of the slope angle of stairs, improving the recognition accuracy and climbing ability of intelligent driving vehicles.
Smart Images

Figure CN119087456B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of vehicle control technology, and in particular to a method, device, electronic device and storage medium for determining the slope angle of a staircase. Background Technology
[0002] Slope prediction is one of the key technologies in advanced automotive technology and an important component of intelligent vehicles and autonomous driving technology. For example, accurate slope information is required in anti-lock braking systems (ABS), automatic transmission technology (AMT), adaptive cruise control system (ACC), direct shift transmission technology (DSG), hill start assist system (HAC), and hill descent control system (HDC).
[0003] As a type of slope, the current technology for determining the slope angle of stairs mainly involves the following approaches:
[0004] (1) Use millimeter-wave radar to detect stair parameters. Millimeter-wave radar point clouds are sparse and can only provide information in three dimensions: distance, orientation, and velocity. Height information is very limited and cannot obtain complete environmental information. It can identify the width of the staircase, but cannot obtain accurate height information, so it cannot process and obtain stair slope information; (2) Use inertial measurement unit (IMU) to detect stair parameters. Simply use IMU to obtain the pitch angle to calculate the current slope angle of the staircase. However, for the staircase environment, the vehicle body will have large vibrations during operation, resulting in large noise in the IMU measurement results, and its measurement accuracy is low; (3) Use stereo vision camera to detect stair parameters. Although stereo vision camera can obtain three-dimensional environmental information, it requires high computing power from the control module, and may have inaccurate detection problems in low light or obstructed conditions, resulting in the inability to correctly detect and identify the staircase scene.
[0005] Therefore, determining the slope angle of the stairs to provide a foundation for intelligent driving vehicles to climb stairs has become an urgent problem to be solved. Summary of the Invention
[0006] In view of this, embodiments of this application provide a method, apparatus, electronic device, and storage medium for determining the slope angle of a staircase, in order to solve the problem in the prior art that the slope angle of a staircase cannot be accurately determined.
[0007] A first aspect of this application provides a method for determining the slope angle of a staircase. The method includes: acquiring multiple point cloud data corresponding to the staircase, and establishing a projection plane based on the plane where the staircase is located, wherein the projection plane is perpendicular to the plane where the staircase is located; mapping the multiple point cloud data onto the projection plane, and acquiring the two-dimensional point cloud coordinates of each point cloud data after mapping to the projection plane; performing slope fitting processing on the multiple two-dimensional point cloud coordinates to obtain the staircase slope corresponding to the staircase, and determining the slope angle of the staircase based on the staircase slope.
[0008] A second aspect of this application provides a device for determining the slope angle of a staircase. The device includes: an acquisition module for acquiring multiple point cloud data corresponding to the staircase and establishing a projection plane based on the plane where the staircase is located, wherein the projection plane is perpendicular to the plane where the staircase is located; a mapping module for mapping the multiple point cloud data onto the projection plane and acquiring the two-dimensional point cloud coordinates of each point cloud data after mapping to the projection plane; and a calculation module for performing slope fitting processing on the multiple two-dimensional point cloud coordinates to obtain the slope of the staircase corresponding to the staircase, and determining the slope angle of the staircase based on the slope of the staircase.
[0009] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described method.
[0010] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method.
[0011] The beneficial effects of this application embodiment compared with the prior art are as follows: The method in this application embodiment obtains multiple point cloud data corresponding to the staircase, and establishes a projection plane based on the plane where the staircase is located, with the projection plane perpendicular to the plane where the staircase is located; maps multiple point cloud data onto the projection plane, and obtains the two-dimensional point cloud coordinates of each point cloud data after mapping to the projection plane; performs slope fitting processing on the multiple two-dimensional point cloud coordinates to obtain the staircase slope corresponding to the staircase, and determines the slope angle of the staircase based on the staircase slope. Here, by mapping multiple three-dimensional point cloud data onto a projection plane perpendicular to the plane where the staircase is located, the three-dimensional point cloud data is converted into two-dimensional point cloud coordinates. Since multiple two-dimensional point cloud coordinates can express the fitted straight line corresponding to the staircase, this example can obtain the slope corresponding to the straight line fitted by multiple two-dimensional point cloud coordinates by performing slope fitting processing on multiple two-dimensional point cloud coordinates. Subsequently, the slope angle of the staircase can be accurately determined based on the staircase slope, avoiding the problem in related technologies where the slope angle of the staircase cannot be accurately determined. Attached Figure Description
[0012] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1 This is a flowchart illustrating a method for determining the slope angle of a staircase according to an embodiment of this application.
[0014] Figure 2 This is a basic schematic diagram of a lidar system for identifying stairs, provided in an embodiment of this application.
[0015] Figure 3 This is a basic schematic diagram of a two-dimensional point cloud coordinate mapping to a projection plane provided in an embodiment of this application;
[0016] Figure 4 This is a flowchart illustrating another method for determining the slope angle of a staircase provided in an embodiment of this application.
[0017] Figure 5 This is a basic schematic diagram of the initial coordinate system of a lidar provided in an embodiment of this application;
[0018] Figure 6 This is a flowchart illustrating another method for determining the slope angle of a staircase provided in an embodiment of this application.
[0019] Figure 7 This is a flowchart illustrating another method for determining the slope angle of a staircase provided in an embodiment of this application;
[0020] Figure 8 This is a flowchart illustrating another method for determining the slope angle of a staircase provided in an embodiment of this application.
[0021] Figure 9 This is a flowchart illustrating another optional method for determining the slope angle of a staircase provided in an embodiment of this application.
[0022] Figure 10 This is a flowchart illustrating another optional method for determining the slope angle of a staircase provided in an embodiment of this application.
[0023] Figure 11 This is a schematic diagram of the basic structure of a vehicle provided in an embodiment of this application;
[0024] Figure 12 This is a flowchart illustrating another optional method for determining the slope angle of a staircase provided in this application embodiment;
[0025] Figure 13This is a structural schematic diagram of a staircase slope angle determination device provided in an embodiment of this application;
[0026] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0027] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0028] The following will describe in detail, with reference to the accompanying drawings, a method and apparatus for determining the slope angle of a staircase according to an embodiment of this application.
[0029] Figure 1 This application provides a method for determining the slope angle of a staircase, such as... Figure 1 As shown, the method includes:
[0030] S101. Obtain multiple point cloud data corresponding to the staircase, and establish a projection plane based on the plane where the staircase is located. The projection plane is perpendicular to the plane where the staircase is located.
[0031] S102. Map multiple point cloud data onto the projection plane, and obtain the two-dimensional point cloud coordinates of each point cloud data after it has been mapped onto the projection plane;
[0032] S103. Perform slope fitting processing on multiple two-dimensional point cloud coordinates to obtain the slope of the staircase, and determine the slope angle of the staircase based on the slope of the staircase.
[0033] It is understood that the method for determining the slope angle of stairs provided in this example is applied to vehicles equipped with lidar. These vehicles are new energy vehicles using hybrid powertrains, and include vehicles with autonomous or intelligent driving capabilities (including passenger vehicles (such as cars, buses, coaches, minibuses, etc.), cargo vehicles (such as ordinary trucks, box trucks, trailer trucks, enclosed trucks, tank trucks, flatbed trucks, container trucks, dump trucks, special structure trucks), special vehicles (such as logistics delivery vehicles, automated guided vehicles (AGVs), patrol vehicles, cranes, excavators, bulldozers, loaders, road rollers, off-road engineering vehicles, armored engineering vehicles, sewage treatment vehicles, sanitation vehicles, vacuum trucks, floor scrubbers, water sprinkler trucks, sweeping robots, food delivery robots, shopping guide robots, lawnmowers, golf carts, etc.), recreational vehicles (such as amusement vehicles, amusement park autonomous driving devices, balance bikes, etc.), and rescue vehicles (such as fire trucks, ambulances, power repair vehicles, engineering emergency vehicles, etc.)). It is understandable that the method for determining the slope angle of stairs provided in this example can also be applied to unmanned vehicles and wheeled / tracked / legged robots equipped with lidar.
[0034] To better illustrate this, the following example will use the method for determining the slope angle of the stairs described above as an example applied to a vehicle equipped with a LiDAR. For instance, the LiDAR is installed on the roof of the vehicle and is connected to a System on Chip (SOC). After acquiring point cloud data of the stairs using the LiDAR, the SOC determines the slope angle of the stairs based on steps S101 and S103 described above.
[0035] This example method first uses LiDAR to perform point cloud identification on the stairs, acquiring multiple point cloud data corresponding to the stairs. This point cloud data is three-dimensional, with each point cloud data having (x, y, z) coordinates. In some examples, the LiDAR mentioned above is a mechanical rotating multi-line LiDAR. The characteristic of a mechanical rotating multi-line LiDAR is that the entire optomechanical structure is rotated by a motor, and the transmitting and receiving systems rotate in a macroscopic sense. By continuously rotating the transmitting head, the laser beams change from "lines" to "surfaces," and multiple laser beams are arranged vertically to form multiple surfaces, achieving the purpose of dynamic scanning and dynamic information reception. A 360° rotating scan is performed using a mechanical structure, with directional distributed scanning in the vertical direction. Both the transmitter and receiver rotate with the scanning components, thereby achieving omnidirectional environmental perception of the stairs and acquiring point cloud data distributed on the stair surface.
[0036] In some examples, this example will also establish a projection plane based on the plane where the stairs are located, which is perpendicular to the plane where the stairs are located. Specifically, a plane in three-dimensional space can be represented by an equation, usually in the form Ax + By + Cz + D = 0, where A, B, and C are the components of the plane's normal vector (i.e., the vector perpendicular to the plane), and D is a constant used to adjust the plane's position. This example uses LiDAR to acquire point cloud data distributed on the surface of the stairs. Each point cloud data has (x, y, z) coordinates, and then determines the plane where the stairs are located based on these (x, y, z) coordinates.
[0037] Specifically, taking a lidar directly facing the stairs, with the lidar's own center as the center, and establishing a lidar coordinate system according to the right-hand rule as an example, let the plane containing the stairs be (Ax+By+Cz+D=0). For each point cloud data (x... i ,y i ,z i Adjust the x-values of each point cloud data point to make them the same. Then, for each point cloud data point (x... i ,y i ,z i Calculate the distances to the plane (Ax + By + Cz + D = 0) and find the sum of the squares of these distances. Minimize this sum to obtain the values of A, B, C, and D, thereby determining the plane in which the staircase is located.
[0038] After determining the projection plane, this example identifies the plane where the stairs are located and then establishes a projection plane perpendicular to it; for example, such as... Figure 2 As shown, Figure 2 As shown, when the LiDAR is facing the stairs (the projection plane formed by the X and Z axes in the LiDAR's 3D coordinate system is perpendicular to the plane of the stairs, and the Y axis is parallel to the plane of the stairs), the LiDAR identifies each step of the stairs and generates a series of point cloud data on the steps. The coordinates P of any point cloud data can be obtained using the PCL point cloud library algorithm. origin (x, y, z). Since the lidar is facing the stairs, the projection plane formed by the lidar's X-axis and Z-axis is perpendicular to the plane of the stairs. Therefore, in this example, the projection plane is established using the lidar's X-axis and Z-axis as reference axes.
[0039] After establishing the projection plane, this example maps multiple point cloud data onto the projection plane, obtaining the two-dimensional point cloud coordinates corresponding to each point cloud data. Within this projection plane, each two-dimensional point cloud coordinate corresponds to a point cloud data. A schematic diagram of mapping multiple point cloud data onto the projection plane is shown below. Figure 3As shown, although point cloud noise occurs due to lidar measurement errors and the presence of interference, by mapping multiple point cloud data onto a projection plane, the final point cloud data presented on the projection plane will converge to a certain straight line. That is, the point cloud data can be fitted to a straight line, where the horizontal direction of the projection plane is the X-axis and the vertical direction is the Y-axis. Clearly, the fitted straight line can be expressed as y = kx + b, where the x-coordinate represents the lidar point cloud data P. origin The x-component of (x, y, z) represents the point cloud data P of the LiDAR. origin The z-components of (x, y, z). The parameter k represents the slope of the fitted line, which in practical terms represents the slope of the staircase. Based on this slope, the inclination angle of the staircase can be accurately determined.
[0040] Based on the above principle, this example performs slope fitting on multiple two-dimensional point cloud coordinates to obtain the slope corresponding to the straight line fitted by multiple two-dimensional point cloud coordinates, and finally determines the slope angle of the staircase based on the staircase slope.
[0041] According to the technical solution provided in this application embodiment, multiple point cloud data corresponding to the staircase are obtained, and a projection plane is established based on the plane where the staircase is located, with the projection plane perpendicular to the plane where the staircase is located. The multiple point cloud data are mapped onto the projection plane, and the two-dimensional point cloud coordinates of each point cloud data after mapping onto the projection plane are obtained. The slope of the staircase is obtained by performing slope fitting processing on the multiple two-dimensional point cloud coordinates, and the slope angle of the staircase is determined based on the staircase slope. In this case, by mapping multiple three-dimensional point cloud data onto a projection plane perpendicular to the plane where the staircase is located, the three-dimensional point cloud data is converted into two-dimensional point cloud coordinates. Since multiple two-dimensional point cloud coordinates can express the fitted straight line corresponding to the staircase, this example can obtain the slope corresponding to the straight line fitted by multiple two-dimensional point cloud coordinates by performing slope fitting processing on multiple two-dimensional point cloud coordinates. Subsequently, the slope angle of the staircase is accurately determined based on the staircase slope, avoiding the problem in related technologies where the slope angle of the staircase cannot be accurately determined.
[0042] In some embodiments, such as Figure 4 As shown, a projection plane is established based on the plane where the staircase is located, including:
[0043] S401. Obtain the initial coordinate system of the lidar, which is used to perform point cloud recognition on the stairs.
[0044] S402. Determine the calibration axis and reference axis from the initial coordinate system, and obtain the positional relationship between the calibration axis and the plane where the staircase is located;
[0045] S403. If the calibration axis intersects with the plane where the stairs are located, adjust the position of the lidar according to the plane of the stairs so that the calibration axis is parallel to the plane where the stairs are located.
[0046] S404. Construct a projection plane based on the adjusted reference axis of the lidar.
[0047] Specifically, taking a LiDAR directly facing a staircase, with the LiDAR's own center as the center, and establishing a radar coordinate system according to the right-hand rule as an example, the projection plane formed by the LiDAR's X and Z axes is perpendicular to the plane of the staircase. Therefore, the projection plane can be directly established using the LiDAR's X and Z axes as reference axes. However, in daily vehicle use, the LiDAR and the staircase are often not directly aligned. In this case, the projection plane formed by the LiDAR's X and Z axes is not perpendicular to the plane of the staircase. Therefore, the projection plane cannot be directly established using the LiDAR's X and Z axes as reference axes.
[0048] For the reasons mentioned above, when the positional relationship between the lidar and the stairs is not directly aligned (i.e., the projection plane formed by the X and Z axes of the lidar is not perpendicular to the plane containing the stairs), this example will obtain the initial coordinate system of the lidar. For instance, the lidar establishes its initial coordinate system using its own center as the center, following the right-hand rule, as follows: Figure 5 As shown.
[0049] It is understood that this example does not limit the lidar to establishing the initial coordinate system only in the above manner. Relevant personnel can flexibly set the method for establishing the initial coordinate system of the lidar according to actual needs.
[0050] After obtaining the initial coordinate system, this example determines the calibration axis and reference axes from it. Specifically, the initial coordinate system contains three coordinate axes: X, Y, and Z. One coordinate axis is the calibration axis, and the other two are reference axes. The Z coordinate axis in the initial coordinate system is always a reference axis. Of the X and Y coordinate axes, the axis facing the stairs is another reference axis, and the other X and Y axis is a different calibration axis. For example, taking a LiDAR with its own center as the center and establishing an initial coordinate system according to the right-hand rule, the Y coordinate axis is used as the calibration axis, and the X and Z coordinate axes are used as reference axes.
[0051] It is understandable that when the LiDAR is facing the stairs, the calibration axis is parallel to the plane of the stairs. Therefore, if the calibration axis intersects the plane of the stairs, the positional relationship between the LiDAR and the stairs is not directly opposite. In this case, this example will adjust the position of the LiDAR according to the plane of the stairs (at this time, the adjustment is a virtual adjustment, so that the LiDAR after the virtual adjustment is facing the stairs). This makes the calibration axis in the initial coordinate system corresponding to the virtually adjusted LiDAR parallel to the plane of the stairs, and the plane formed by the two reference axes in the initial coordinate system corresponding to the virtually adjusted LiDAR is perpendicular to the plane of the stairs (achieving the effect of the LiDAR facing the stairs).
[0052] Finally, this example constructs a projection plane based on the adjusted lidar reference axis, making the projection plane perpendicular to the plane containing the stairs.
[0053] According to the technical solution provided in this application embodiment, an initial coordinate system of the LiDAR is obtained, and the LiDAR is used to perform point cloud recognition on the stairs; a calibration axis and a reference axis are determined from the initial coordinate system, and the positional relationship between the calibration axis and the plane where the stairs are located is obtained; if the calibration axis and the plane where the stairs are located intersect, the position of the LiDAR is adjusted according to the plane of the stairs so that the calibration axis is parallel to the plane where the stairs are located; a projection plane is constructed based on the adjusted reference axis of the LiDAR; this example determines whether a projection plane can be directly constructed based on the reference axis by the positional relationship between the calibration axis and the plane where the stairs are located. When the calibration axis and the plane where the stairs are located intersect, the LiDAR is adjusted so that the projection plane constructed based on the reference axis can be parallel to the plane where the stairs are located.
[0054] In some embodiments, such as Figure 6 As shown, the two-dimensional point cloud coordinates of each point cloud data point mapped to the projection plane are obtained, including:
[0055] S601. Determine the three-dimensional coordinates of each point cloud data in the adjusted initial coordinate system;
[0056] S602. Remove the calibration axis coordinates from the three-dimensional coordinates corresponding to each point cloud data to obtain the two-dimensional point cloud coordinates corresponding to each point cloud data.
[0057] Specifically, after adjusting the initial coordinate system, this example will adjust the coordinates of each point cloud data according to the adjustment of the initial coordinate system, so as to determine the three-dimensional coordinates of each point cloud data in the adjusted initial coordinate system.
[0058] Since the projection plane is constructed based on two reference axes, after projecting the 3D point cloud data onto the projection plane, the 3D point cloud data no longer has coordinates corresponding to the calibration axes. Therefore, in this example, the calibration axis coordinates are removed from the 3D coordinates corresponding to each point cloud data to obtain the 2D point cloud coordinates corresponding to each point cloud data.
[0059] First, a forward FOV range of (-β°, β°) is selected from the LiDAR as the Region of Interest (ROI). This ROI includes the stairs, and the 3D coordinates of all point cloud data of the stairs within this ROI are obtained as P. roi (x,y,z) is projected onto the XZ plane of the lidar, resulting in the two-dimensional point cloud coordinates P on the XZ plane. CZ (x,y), where P XZ The component x equals P roi The components x, PXz The component y equals P roi The component z.
[0060] In some examples, an initial projection plane can be obtained first, then the point cloud data can be mapped onto the initial projection plane, and the initial two-dimensional point cloud coordinates of each point cloud data after mapping to the projection plane can be obtained. Then, the initial projection plane can be adjusted so that it is perpendicular to the plane where the stairs are located. Finally, the initial two-dimensional point cloud coordinates can be adjusted according to the adjustment of the initial projection plane to obtain the two-dimensional point cloud coordinates.
[0061] According to the technical solution provided in the embodiments of this application, the three-dimensional coordinates of each point cloud data in the adjusted initial coordinate system are determined; the calibration axis coordinates of the three-dimensional coordinates corresponding to each point cloud data are removed to obtain the two-dimensional point cloud coordinates corresponding to each point cloud data. In this method, after mapping the point cloud data to the projection plane, the coordinate relationship of the point cloud data in the projection plane is determined, and the calibration axis coordinates of the three-dimensional coordinates corresponding to the point cloud data are removed based on the coordinate relationship, thereby achieving accurate acquisition of the two-dimensional point cloud coordinates corresponding to each point cloud data.
[0062] In some embodiments, such as Figure 7 As shown, slope fitting is performed on multiple two-dimensional point cloud coordinates to obtain the slope of the staircase, including:
[0063] S701. Obtain the pre-set slope fitting formula. The slope fitting formula is obtained by taking the slope partial derivative of the objective function corresponding to the straight line fitting formula.
[0064] S702. Substitute the coordinates of multiple two-dimensional point clouds into the slope fitting formula to perform slope fitting processing and obtain the slope of the staircase.
[0065] Specifically, the preset slope fitting formula is as follows:
[0066]
[0067] Where K is the slope of the staircase, n is the number of coordinates in the two-dimensional point cloud, and x i Let y be the x-coordinate corresponding to the i-th two-dimensional point cloud coordinate. i Let be the ordinate corresponding to the i-th two-dimensional point cloud coordinate.
[0068] After obtaining the slope fitting formula mentioned above, this example substitutes multiple two-dimensional point cloud coordinates into the slope fitting formula to perform slope fitting processing, thereby obtaining the slope of the staircase.
[0069] It is understandable that the above slope fitting formula is obtained by taking the slope partial derivative of the objective function corresponding to the straight line fitting formula; specifically, for the two-dimensional point cloud coordinates P corresponding to the projected point cloud data.XZ (x i ,y i (i = 1, 2, ..., n), the linear fitting formula after fitting the line based on the coordinates of the two-dimensional point cloud is f(x) i )=y i =kx i +b, where k is the slope of the line (which is also the slope of the staircase), and b is the intercept of the line (which characterizes the staircase intercept). The goal is to solve for parameters k and b such that y i =kx i +b holds true. Based on the above linear fitting formula, an objective function is constructed as follows:
[0070]
[0071] By transforming the objective function, we can obtain:
[0072]
[0073] By taking the partial derivative of the above equation and setting it equal to zero, we get the following:
[0074]
[0075] The slope fitting formula can then be obtained as follows:
[0076]
[0077] According to the technical solution provided in the embodiments of this application, a pre-set slope fitting formula is obtained. The slope fitting formula is obtained by taking the slope partial derivative of the objective function corresponding to the straight line fitting formula. Multiple two-dimensional point cloud coordinates are substituted into the slope fitting formula for slope fitting processing to obtain the slope of the staircase. In this way, the calculation of the slope angle of the staircase is converted into the calculation of the slope of a straight line. This method can accurately and quickly obtain the slope of the straight line, thereby improving the calculation efficiency of the slope angle of the staircase.
[0078] In some embodiments, such as Figure 8 As shown, determining the slope angle of a staircase based on its incline includes:
[0079] S801, Obtain the preset slope and angle conversion function;
[0080] S802. The slope of the stairs is converted using a conversion function to obtain the slope angle.
[0081] It is understandable that the slope is the ratio of the vertical distance to the horizontal distance of a straight line rising (or falling), while the angle is the angle between the straight line and the positive x-axis in the coordinate system. As stated above, the slope and angle are related. This example sets up a conversion function between slope and angle based on this relationship, as follows: α = arctan(k), where α is the angle and k is the slope.
[0082] After obtaining the stair slope, this example substitutes the stair slope into the conversion function to obtain the corresponding slope angle, as follows: Slope angle = arctan(stair slope).
[0083] According to the technical solution provided in the embodiments of this application, a pre-set conversion function between slope and angle is obtained; the slope of the stairs is converted through the conversion function to obtain the slope angle. The conversion function can reflect the relationship between slope and angle. Therefore, this example accurately converts the slope of the stairs into the slope angle through the conversion function.
[0084] In some embodiments, such as Figure 9 As shown, the method also includes:
[0085] S901. Obtain the pre-set intercept fitting formula. The intercept fitting formula is obtained by taking the intercept partial derivative of the objective function corresponding to the straight line fitting formula.
[0086] S902. Substitute multiple two-dimensional point cloud coordinates into the intercept fitting formula to perform intercept fitting processing, and obtain the stair intercept. The stair intercept represents the distance between the stair and the origin corresponding to the two-dimensional point cloud coordinates.
[0087] Specifically, the preset intercept fitting formula is as follows:
[0088]
[0089] Where b is the stair intercept, n is the number of two-dimensional point cloud coordinates, and x i Let y be the x-coordinate corresponding to the i-th two-dimensional point cloud coordinate. i Let be the ordinate corresponding to the i-th two-dimensional point cloud coordinate.
[0090] After obtaining the above intercept fitting formula, this example substitutes multiple two-dimensional point cloud coordinates into the intercept fitting formula to perform intercept fitting processing, thereby obtaining the stair intercept.
[0091] It is understandable that the above intercept fitting formula is obtained by taking the partial derivative of the intercept of the objective function corresponding to the straight line fitting formula; specifically, for the two-dimensional point cloud coordinates P corresponding to the projected point cloud data. XZ (x i ,y i(i = 1, 2, ..., n), the linear fitting formula after fitting the line based on the coordinates of the two-dimensional point cloud is f(x) i )=y i =kx i +b, where k is the slope of the line (which is also the slope of the staircase), and b is the intercept of the line (which characterizes the staircase intercept). The goal is to solve for parameters k and b such that y i =kx i +b holds true. Based on the above linear fitting formula, an objective function is constructed as follows:
[0092]
[0093] By transforming the objective function, we can obtain:
[0094]
[0095] By taking the partial derivative of the above equation and setting it equal to zero, we get the following:
[0096]
[0097] The slope fitting formula can then be obtained as follows:
[0098]
[0099] According to the technical solution provided in the embodiments of this application, a pre-set intercept fitting formula is obtained. The intercept fitting formula is obtained by taking the intercept partial derivative of the objective function corresponding to the straight line fitting formula. Multiple two-dimensional point cloud coordinates are substituted into the intercept fitting formula for intercept fitting processing to obtain the stair intercept. The stair intercept represents the distance between the stair and the origin corresponding to the two-dimensional point cloud coordinates, thus realizing the accurate determination of the stair intercept and providing a basis for subsequent vehicle control.
[0100] In some embodiments, such as Figure 10 As shown, the method also includes:
[0101] S1001. Determine the power distribution strategy based on the slope angle, and determine the starting point of the staircase based on the staircase section distance;
[0102] S1002. Generate a vehicle control strategy based on the slope angle and the starting point of the stairs, and control the vehicle according to the vehicle control strategy.
[0103] Specifically, different slope angles correspond to different power distribution strategies. For example, the higher the slope angle, the higher the required power output; the lower the slope angle, the lower the required power output. Furthermore, the higher the slope angle, the slower the speed, ensuring the vehicle maintains sufficient traction and avoids slippage. Based on these principles, relevant personnel can flexibly set the power distribution strategy corresponding to the slope angle, which will not be elaborated further here.
[0104] In some examples, the vehicle can also determine the starting point of the stairs based on the aforementioned stair intercept, which allows the vehicle to determine the position to begin climbing the stairs. Therefore, this example generates a vehicle control strategy based on the slope angle and the starting point of the stairs, and controls the vehicle according to the vehicle control strategy.
[0105] To better understand this method, this embodiment provides a more specific example for illustration:
[0106] The vehicle comprises four parts: LiDAR, System-on-a-Chip (SOC), Microcontroller Unit (MCU), and cockpit domain. Intelligent driving vehicles are equipped with multi-line LiDAR (such as the Robosense Ruby Plus 128-line LiDAR). Figure 11 As shown, the LiDAR is connected to the Intelligent Driving Domain SOC via the ETH network. The SOC can execute steps 101 to S103 as described above. When the vehicle needs to perform stair slope recognition, the multi-line LiDAR inputs the raw point cloud data to the Intelligent Driving Domain SOC. The SOC can output the slope angle, which can be directly output to the stair slope UI display module and stair slope voice broadcast module in the cockpit domain, allowing direct interaction with the driver. Based on the stair slope angle, the driver can objectively know the slope angle of the road ahead (in some examples, the stair intercept can also be output), providing a decision-making basis for whether off-road stair climbing is possible. On the other hand, the stair slope recognition result can also be input to the Intelligent Driving SOC decision planning module, and further input to the control execution module, providing perception result information for future autonomous stair climbing by intelligent driving vehicles.
[0107] Continuing from the previous example, the method for SOC to calculate the slope angle based on point cloud data is as follows: Figure 12As shown, this example first acquires point cloud data using a LiDAR system mounted on the vehicle. Each point cloud data point has three-dimensional coordinates. Then, a point cloud ROI extraction algorithm is used to obtain the point cloud data corresponding to the stairs. A projection plane is then generated, and the extracted point cloud data is mapped onto the projection plane. The two-dimensional point cloud coordinates corresponding to each point cloud data point in the projection plane are obtained. The two-dimensional point cloud coordinates are then fitted (using a Ceres-based fitting algorithm), and a suitable fitting cost is set to obtain the final fitting result, yielding the final stair slope. Based on this slope, the gradient angle is determined, and finally, the gradient angle corresponding to the stairs is output. This method uses LiDAR to provide high-precision three-dimensional point cloud data, making the detection of stair slope more accurate. Furthermore, this method is applicable to various indoor and outdoor environments, capable of handling complex environments with low light levels, and reducing the impact of external factors on detection accuracy. This method is also applicable to autonomous vehicles, wheeled / tracked robots, and intelligent driving passenger vehicles, expanding the application scope of autonomous vehicles. Furthermore, the slope angle and stair intercept in this method can be directly output to the display module and voice broadcast module to assist the driver in making decisions; they can also be input to the intelligent driving controller to provide perception information for future autonomous stair climbing in intelligent driving vehicles. This method uses a unidirectional fitting algorithm and optimization based on the Ceres library, which improves computational efficiency and fitting accuracy. With the reduction in the cost of LiDAR hardware, this technology becomes more economical and practical. This method is simple and reliable, greatly saving settlement resources and development costs, and is easy to implement in practice.
[0108] According to the technical solution provided in the embodiments of this application, a power distribution strategy is determined based on the slope angle, and the starting point of the staircase is determined based on the staircase intercept. A vehicle control strategy is generated based on the slope angle and the starting point of the staircase, and the vehicle is controlled based on the vehicle control strategy. In this example, the slope angle and staircase intercept provide the basis for determining the power distribution strategy, making the determined vehicle control strategy more in line with the actual situation, thereby improving the experience of the vehicle climbing stairs.
[0109] All of the above-mentioned optional technical solutions can be combined in any way to form the optional embodiments of this application, and will not be described in detail here.
[0110] The following are embodiments of the apparatus described in this application, which can be used to execute the embodiments of the method described in this application. For details not disclosed in the apparatus embodiments of this application, please refer to the embodiments of the method described in this application.
[0111] This embodiment also provides a device for determining the slope angle of a staircase, such as... Figure 13 As shown, the device includes:
[0112] The acquisition module 1301 is used to acquire multiple point cloud data corresponding to the staircase and establish a projection plane based on the plane where the staircase is located. The projection plane is perpendicular to the plane where the staircase is located.
[0113] The mapping module 1302 is used to map multiple point cloud data onto a projection plane and obtain the two-dimensional point cloud coordinates of each point cloud data after it has been mapped onto the projection plane.
[0114] The calculation module 1303 is used to perform slope fitting processing on multiple two-dimensional point cloud coordinates to obtain the slope of the staircase, and to determine the slope angle of the staircase based on the slope of the staircase.
[0115] In some examples, the acquisition module 1301 is also used to acquire the initial coordinate system of the lidar, which is used to perform point cloud recognition on the stairs; determine the calibration axis and the reference axis from the initial coordinate system, and acquire the positional relationship between the calibration axis and the plane where the stairs are located; if the calibration axis and the plane where the stairs are located intersect, adjust the position of the lidar according to the plane of the stairs so that the calibration axis is parallel to the plane where the stairs are located; and construct the projection plane according to the adjusted reference axis of the lidar.
[0116] In some examples, the mapping module 1302 is also used to determine the three-dimensional coordinates of each point cloud data in the adjusted initial coordinate system; and to remove the calibration axis coordinates of the three-dimensional coordinates corresponding to each point cloud data to obtain the two-dimensional point cloud coordinates corresponding to each point cloud data.
[0117] In some examples, the calculation module 1303 is also used to obtain a pre-set slope fitting formula, which is obtained by taking the slope partial derivative of the objective function corresponding to the straight line fitting formula; and to obtain the slope of the staircase by substituting multiple two-dimensional point cloud coordinates into the slope fitting formula.
[0118] In some examples, the calculation module 1303 is also used to obtain a pre-set conversion function between slope and angle; the slope of the stairs is converted using the conversion function to obtain the slope angle.
[0119] In some examples, the calculation module 1303 is also used to obtain a pre-set intercept fitting formula, which is obtained by taking the intercept partial derivative of the objective function corresponding to the straight line fitting formula; and to substitute multiple two-dimensional point cloud coordinates into the intercept fitting formula for intercept fitting processing to obtain the stair intercept, which represents the distance between the stair and the origin corresponding to the two-dimensional point cloud coordinates.
[0120] In some examples, the calculation module 1303 is also used to determine a power distribution strategy based on the slope angle, determine the starting point of the staircase based on the staircase intercept, generate a vehicle control strategy based on the slope angle and the starting point of the staircase, and control the vehicle based on the vehicle control strategy.
[0121] According to the technical solution provided in this application embodiment, the stair slope angle determination device provided in this embodiment acquires multiple point cloud data corresponding to the staircase, and establishes a projection plane based on the plane where the staircase is located, with the projection plane perpendicular to the plane where the staircase is located; maps multiple point cloud data onto the projection plane, and obtains the two-dimensional point cloud coordinates of each point cloud data after mapping to the projection plane; performs slope fitting processing on the multiple two-dimensional point cloud coordinates to obtain the staircase slope corresponding to the staircase, and determines the staircase slope angle based on the staircase slope. Specifically, by mapping multiple three-dimensional point cloud data onto a projection plane perpendicular to the plane where the staircase is located, the three-dimensional point cloud data is converted into two-dimensional point cloud coordinates. Since multiple two-dimensional point cloud coordinates can express the fitted straight line corresponding to the staircase, this example, by performing slope fitting processing on multiple two-dimensional point cloud coordinates, can obtain the slope corresponding to the straight line fitted by multiple two-dimensional point cloud coordinates. Subsequently, the staircase slope angle is accurately determined based on this staircase slope, avoiding the problem in related technologies where the staircase slope angle cannot be accurately determined.
[0122] Figure 14 This is a schematic diagram of the electronic device 14 provided in an embodiment of this application. Figure 14 As shown, the electronic device 14 of this embodiment includes: a processor 1401, a memory 1402, and a computer program 1403 stored in the memory 1402 and executable on the processor 1401. When the processor 1401 executes the computer program 1403, it implements the steps in the various method embodiments described above. Alternatively, when the processor 1401 executes the computer program 1403, it implements the functions of each module / unit in the various device embodiments described above.
[0123] Electronic device 14 can be a desktop computer, laptop, handheld computer, cloud server, or other electronic device. Electronic device 14 may include, but is not limited to, processor 1401 and memory 1402. Those skilled in the art will understand that... Figure 14 This is merely an example of electronic device 14 and does not constitute a limitation on electronic device 14. It may include more or fewer components than shown, or different components.
[0124] The processor 1401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0125] The memory 1402 can be an internal storage unit of the electronic device 14, such as a hard disk or RAM of the electronic device 14. The memory 1402 can also be an external storage device of the electronic device 14, such as a plug-in hard disk, Smart Media Card (SMC), Secure Digital (SD) card, FlashCard, etc., equipped on the electronic device 14. The memory 1402 can also include both internal and external storage units of the electronic device 14. The memory 1402 is used to store computer programs and other programs and data required by the electronic device.
[0126] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0127] If an integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program may include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. A computer-readable medium may include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in a computer-readable medium can be appropriately added or removed according to regional requirements and patent practice requirements. For example, in some regions, according to regional requirements and patent practice, a computer-readable medium may not include electrical carrier signals and telecommunication signals.
[0128] The above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.
Claims
1. A method for determining the slope angle of a staircase, characterized in that, The method includes: Acquire multiple point cloud data corresponding to the staircase, and establish a projection plane based on the plane where the staircase is located, wherein the projection plane is perpendicular to the plane where the staircase is located; Map multiple point cloud data onto the projection plane, and obtain the two-dimensional point cloud coordinates of each point cloud data after it has been mapped onto the projection plane; The slope of the staircase is obtained by performing slope fitting on multiple two-dimensional point cloud coordinates, and the slope angle of the staircase is determined based on the staircase slope. Establishing a projection plane based on the plane where the staircase is located includes: obtaining an initial coordinate system for a lidar radar used to perform point cloud recognition on the staircase; determining a calibration axis and a reference axis from the initial coordinate system, and obtaining the positional relationship between the calibration axis and the plane where the staircase is located; if the calibration axis intersects the plane where the staircase is located, adjusting the position of the lidar according to the plane of the staircase so that the calibration axis is parallel to the plane where the staircase is located; and constructing the projection plane based on the adjusted reference axis of the lidar radar.
2. The method according to claim 1, characterized in that, Obtaining the two-dimensional point cloud coordinates of each point cloud data point mapped onto the projection plane includes: Determine the three-dimensional coordinates of each point cloud data point in the adjusted initial coordinate system; The calibration axis coordinates are removed from the three-dimensional coordinates corresponding to each point cloud data to obtain the two-dimensional point cloud coordinates corresponding to each point cloud data.
3. The method according to claim 1, characterized in that, Slope fitting is performed on multiple two-dimensional point cloud coordinates to obtain the stair slope corresponding to the staircase, including: Obtain a pre-set slope fitting formula, which is obtained by taking the slope partial derivative of the objective function corresponding to the straight line fitting formula; The slope of the staircase is obtained by substituting the coordinates of multiple two-dimensional point clouds into the slope fitting formula.
4. The method according to claim 1, characterized in that, Determining the slope angle of the staircase based on its incline includes: Obtain the pre-set conversion function between slope and angle; The slope of the staircase is converted using the conversion function to obtain the slope angle.
5. The method according to claim 4, characterized in that, The method further includes: Obtain a pre-set intercept fitting formula, which is obtained by taking the intercept partial derivative of the objective function corresponding to the straight line fitting formula; The multiple two-dimensional point cloud coordinates are substituted into the intercept fitting formula to perform intercept fitting processing, and the stair intercept is obtained. The stair intercept represents the distance between the stair and the origin corresponding to the two-dimensional point cloud coordinates.
6. The method according to claim 5, characterized in that, The method further includes: The power distribution strategy is determined based on the slope angle, and the starting point of the staircase is determined based on the staircase intercept. A vehicle control strategy is generated based on the slope angle and the starting point of the staircase, and the vehicle is controlled according to the vehicle control strategy.
7. A device for determining the slope angle of a staircase, characterized in that, The device includes: An acquisition module is used to acquire multiple point cloud data corresponding to the staircase and establish a projection plane based on the plane where the staircase is located, wherein the projection plane is perpendicular to the plane where the staircase is located. Establishing the projection plane based on the plane where the staircase is located includes: acquiring an initial coordinate system of a lidar, wherein the lidar is used to perform point cloud recognition on the staircase; determining a calibration axis and a reference axis from the initial coordinate system and acquiring the positional relationship between the calibration axis and the plane where the staircase is located; if the calibration axis and the plane where the staircase is located intersect, adjusting the position of the lidar based on the plane where the staircase is located so that the calibration axis is parallel to the plane where the staircase is located; and constructing the projection plane based on the adjusted reference axis of the lidar. The mapping module is used to map multiple point cloud data onto the projection plane and obtain the two-dimensional point cloud coordinates of each point cloud data after it has been mapped onto the projection plane. The calculation module is used to perform slope fitting processing on multiple two-dimensional point cloud coordinates to obtain the slope of the staircase, and to determine the slope angle of the staircase based on the slope of the staircase.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Detection method, device and equipment integrating SLAM, gradient detection and three-dimensional reconstruction
CN118444280A