A positioning method, system, device, and medium for a long straight corridor.
By constructing constrained straight lines and circles based on attitude yaw angle and odometry data, and solving the robot pose by solving simultaneous equations, the problem of positioning drift in long straight corridor environments was solved, improving the positioning accuracy and reliability of the robot in such environments.
Patent Information
- Application Number
- CN202610102613.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-26
- Publication Date
- 2026-05-26
AI Technical Summary
In long, straight corridor environments, existing laser SLAM or visual SLAM systems suffer from positioning drift and inaccuracy due to the lack of longitudinal dimensional features, which affects the reliability of robot path tracking and task execution.
By constructing constraint lines based on attitude yaw angles and constraint circles based on odometry data, the final pose of the robot is solved by solving simultaneous equations, thus supplementing the constraints of the longitudinal positioning dimension and improving positioning accuracy.
In long, straight corridor environments, the robot's positioning accuracy and reliability are improved, the cost of building a positioning system is reduced, and accurate positioning is achieved without relying on high-performance radar or visual tags.
Smart Images

Figure CN122083935A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot positioning technology, and in particular to a positioning method, system, device and medium for a long straight corridor. Background Technology
[0002] In indoor automated service robot applications, accurate localization is a fundamental step in ensuring the normal operation of the robot. Current mainstream localization technologies rely on laser SLAM or visual SLAM systems. Their core mechanism involves predicting initial pose values using kinematic models and then combining this with environmental feature point clouds for registration optimization. While these methods perform well in feature-rich indoor scenes, they face significant challenges in structured environments such as long, straight corridors. Because the walls on both sides of the corridor exhibit a highly symmetrical parallel structure, the point cloud data acquired by the laser sensors lacks differentiated features in the vertical dimension, causing the registration process to fail to effectively constrain the robot's motion parameters along the corridor's length. This feature degradation phenomenon leads to cumulative errors in the localization system in the vertical dimension, manifesting as drift or oscillations in robot pose estimation, and in severe cases, causing localization failure.
[0003] Existing technologies fail to address the lack of dimensional constraints in degraded environments. When a robot continuously moves through a long, straight corridor, while the lateral walls provide stable constraints, the lack of effective environmental feature matching in the longitudinal dimension prevents the localization system from distinguishing minute displacement changes in the direction of movement. This failure of single-dimensional constraints makes it difficult for the robot to maintain continuous and reliable localization capabilities, particularly affecting path tracking and task execution. To address the localization reliability problem in long, straight corridor scenarios, a new constraint mechanism is urgently needed to supplement longitudinal dimension localization information. Summary of the Invention
[0004] This application provides a positioning method, system, device, and medium for long straight corridors, which can solve the positioning drift problem caused by laser feature degradation in long straight corridor environments and improve positioning accuracy.
[0005] Firstly, this application provides a positioning method for a long straight corridor, applicable to robots, including: When it is determined that the robot has entered the long straight corridor area, the robot is controlled to move in the same direction as the extension of the long straight corridor area, and the robot's first pose data, first mileage data and attitude yaw angle are collected when it enters the area. As the robot travels along the long straight corridor area, it collects the second pose data and second mileage data at the current moment in real time. Based on the slope of the long straight corridor region and the second pose data, a constraint line corresponding to the long straight corridor is constructed; wherein, the slope of the long straight corridor region is determined according to the attitude yaw angle; The movement distance is calculated based on the first mileage data and the second mileage data. A constraint circle is constructed with the coordinate point corresponding to the first pose data as the center and the movement distance as the radius. Solve the equations of the constraint line and the constraint circle simultaneously, and determine the final positioning pose of the robot in the long straight corridor area based on the solution results.
[0006] This application addresses the problem of inaccurate and unreliable localization in existing laser SLAM or visual SLAM methods in degraded environments such as long, straight corridors due to the lack of longitudinal dimension constraints. By converting the attitude yaw angle of the long, straight corridor into a slope to construct a constraint line, and using the pose upon entering the corridor as the center and the distance traveled calculated by odometry as the radius to construct a constraint circle, the final pose is determined by solving simultaneous equations. This effectively supplements the longitudinal localization dimension constraint, reduces the impact of the disappearance of corridor directional constraints on localization, and improves the accuracy of robot localization in long, straight corridor environments. Furthermore, this solution does not rely on high-performance, long-range radar or additional visual tags; accurate localization can be achieved solely through existing odometry data and geometric constraint algorithms, reducing the cost of building a localization system and demonstrating practicality and economy.
[0007] Further, the step of constructing the constraint line corresponding to the long straight corridor region based on the slope of the long straight corridor region and the second pose data includes: Based on the slope of the long straight corridor region, the longitudinal extension direction of the long straight corridor region is determined, the position corresponding to the second pose data is taken as the first reference point, and an offset point is set along the longitudinal extension direction as the second reference point. Based on the relative positional relationship between the first reference point and the second reference point, the constraint line corresponding to the long straight corridor region is determined.
[0008] This application uses the robot's current pose as the first reference point and sets a second reference point based on the longitudinal extension direction of the corridor. The constraint line is determined by the relative positional relationship between the two points. This design can accurately fit the actual extension trajectory of a long, straight corridor, ensuring that the constraint line is completely consistent with the corridor's direction, providing a precise geometric constraint basis for longitudinal positioning. Through the explicit design of the reference points, this application makes the construction of the constraint line objective and accurate, further improving the positioning accuracy of subsequent simultaneous solutions. This ensures that the robot is always positioned reasonably along the longitudinal direction of the corridor, avoiding positioning offset problems caused by deviations in the constraint line.
[0009] Further, the calculation of the travel distance based on the first mileage data and the second mileage data includes: Obtain the planar position information corresponding to the first mileage data and the second mileage data respectively, calculate the straight-line distance between the two sets of planar position information, and use the straight-line distance as the movement distance.
[0010] This application calculates the robot's actual travel distance by extracting planar position information from two consecutive odometer readings and using a straight-line distance formula. This calculation method, directly based on odometer position data, accurately reflects the robot's longitudinal travel distance within a long, straight corridor, providing data support for setting the radius of the constraint circle. Compared to complex odometer integration calculations, straight-line distance calculation is simpler and more efficient, effectively avoiding the accumulation of integration errors and ensuring the accuracy of the constraint circle's radius. This, in turn, guarantees the accuracy of the simultaneous solution of the constraint circle and constraint lines, providing crucial data assurance for the reliability of the final positioning result.
[0011] Further, solving the equations of the constraint line and the constraint circle simultaneously, and determining the final positioning pose based on the solution results, includes: Solve the equations of the constraint line and the constraint circle simultaneously, and determine the intersection of the constraint line and the constraint circle based on the solution results. If the intersection situation is that the constraint line and the constraint circle have no intersection point, then the currently acquired second pose data is taken as the final positioning pose; If the intersection situation is that the constraint line and the constraint circle have a unique intersection point, then the pose data corresponding to the unique intersection point is taken as the final positioning pose. If the intersection situation is that the constraint line and the constraint circle have two intersection points, then calculate the similarity between the candidate poses corresponding to the two intersection points and the second pose data, and take the candidate pose with higher similarity as the final positioning pose.
[0012] This application designs differentiated pose determination strategies for different intersection scenarios between constraint lines and constraint circles, forming a complete closed-loop solution logic. When there is no intersection, the current pose is used, ensuring the continuity of localization; when there is a unique intersection, the pose of that intersection is directly adopted, ensuring the accuracy of localization; when there are two intersections, a candidate point closer to the current pose is selected, balancing the stability and accuracy of localization. This differentiated strategy can handle various localization scenarios that may occur in long straight corridors, effectively avoiding the localization jumps or increased errors that may be caused by a single solution method. This ensures that the localization results conform to both geometric constraint logic and the robot's actual motion trajectory, further improving the stability and reliability of the localization system.
[0013] Furthermore, the step of simultaneously solving the equations of the constraint line and the constraint circle includes: By combining the equations of the constraining line and the constraining circle, a quadratic equation containing only a single position coordinate is obtained through algebraic derivation. Based on the coefficients of the quadratic equation, a discrimination parameter is calculated to determine the number of solutions to the equation. This discrimination parameter is obtained by subtracting four times the product of the quadratic term's related value and the constant term's related value from the square of the related value of the linear term in the quadratic equation. Based on the values of the discrimination parameters, the intersection of the constraint line and the constraint circle is determined, thereby obtaining the corresponding candidate pose.
[0014] This application transforms the complex geometric problem into a standard algebraic solution by simultaneously solving the equations of the constraint line and the constraint circle and performing algebraic derivation. This reduces the difficulty of the solution while ensuring the standardization and accuracy of the solution process. Secondly, by calculating a discrimination parameter based on the coefficients of the quadratic equation to determine the number of solutions, the intersection relationship between the constraint line and the constraint circle can be accurately reflected. The calculation method of this discrimination parameter effectively distinguishes between three cases: no intersection, unique intersection, and two intersections. This provides a reliable basis for determining subsequent candidate poses and avoids positioning errors or failures caused by unclear intersection conditions.
[0015] Further, the step of determining when the robot enters a long, straight corridor area includes: The long straight corridor region is constructed by recording multiple points in sequence to form a closed polygonal structure, and default positioning areas of the closed polygonal structure are set at both ends of the long straight corridor region. The robot collects its current position coordinates in real time and uses a polygon interior / exterior judgment algorithm to determine whether the current position coordinates are within the long straight corridor area.
[0016] This application utilizes a polygon interior / exterior judgment algorithm to accurately determine the robot's location. The polygonal region construction clearly defines the boundaries of long, straight corridors, avoiding erroneous localization mode switching caused by ambiguous region boundaries. The default localization zones at both ends provide clear trigger boundaries for localization mode switching. Compared to traditional distance threshold judgment methods, the polygon interior / exterior judgment algorithm offers higher region recognition accuracy and can adapt to long, straight corridors of different shapes and lengths. This ensures that the robot promptly activates the localization scheme upon entering the corridor and smoothly switches upon leaving, providing a reliable foundation for automated and precise localization mode switching.
[0017] Furthermore, when it is determined, based on the final positioning pose, that the robot is not in the long straight corridor area and is in the default positioning area, the robot is controlled to switch to SLAM positioning mode.
[0018] This application designs an automatic localization mode switching mechanism. When the robot enters the default localization area, it automatically switches to SLAM localization mode, achieving seamless integration between the long straight corridor localization mode and the normal environment localization mode. This ensures that the robot can adopt the optimal localization scheme in different environments, both inside and outside the corridor. Switching to SLAM mode in the default localization area (non-feature degradation environment) can fully leverage the localization advantages of SLAM in feature-rich environments. Activating the constrained localization mode of this application within the corridor enables adaptive adjustment of the localization strategy in different environments, further improving the continuity and reliability of the robot's overall localization in complex indoor environments.
[0019] Secondly, this application also provides a positioning system for long straight corridors, applicable to robots, including: The first data acquisition module is used to control the robot to move in the same direction as the extension of the long straight corridor area when it is determined that the robot has entered the long straight corridor area, and to acquire the robot's first pose data, first mileage data and attitude yaw angle when entering the area. The second data acquisition module is used to collect the second pose data and second mileage data in real time during the robot's movement along the long straight corridor area. The constraint construction module is used to construct a constraint line corresponding to the long straight corridor based on the slope of the long straight corridor region and the second pose data; wherein, the slope of the long straight corridor region is determined according to the attitude yaw angle; the movement distance is calculated based on the first mileage data and the second mileage data, and a constraint circle is constructed with the coordinate point corresponding to the first pose data as the center and the movement distance as the radius; The pose solving module is used to solve the equations of the constraint line and the constraint circle simultaneously, and to determine the final positioning pose of the robot in the long straight corridor area based on the solution results.
[0020] This application achieves precise decomposition and coordination of the positioning function through modular design. The first data acquisition module provides a reliable initial benchmark for positioning, the second data acquisition module ensures real-time dynamic data input, the constraint construction module effectively supplements the missing longitudinal positioning information in the feature degradation environment of long straight corridors with the help of geometric constraints, and the pose solving module accurately outputs the positioning results, thereby improving the positioning accuracy of the robot in long straight corridors.
[0021] Thirdly, this application provides a terminal device including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the steps of the method provided in the first aspect above.
[0022] Fourthly, this application provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to perform the steps in the method provided in the first aspect above. Attached Figure Description
[0023] To more clearly illustrate the technical solution of this application, the drawings used in the embodiments 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 from these drawings without creative effort.
[0024] Figure 1 This is a flowchart illustrating one embodiment of the positioning method for a long straight corridor provided in this application; Figure 2 This is a schematic diagram of the regional structure of one embodiment of the long straight corridor provided in this application.
[0025] Figure 3 This is a schematic diagram of one embodiment of the positioning system for a long straight corridor provided in this application.
[0026] Labeling explanation: 100, First data acquisition module; 200, Second data acquisition module; 300, Constraint construction module; 400, Pose solving module. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0028] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0029] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0030] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0031] In robot localization applications, when robots are in structured environments such as long, straight corridors, the parallel structure of the walls on both sides of the corridor makes it difficult to provide effective environmental features for matching in the longitudinal dimension. The point cloud data acquired by the laser sensor lacks differentiated features in the longitudinal dimension, which weakens or even disables the localization system's constraints on the robot's motion parameters along the length of the corridor. It cannot effectively distinguish small displacement changes in the forward direction, manifesting as localization drift or oscillation, thus affecting the robot's path tracking accuracy and task execution reliability.
[0032] In response, this application proposes a method for locating long, straight corridors; please refer to [the relevant documentation]. Figure 1 , Figure 1 This is a flowchart of one embodiment of a positioning method for long, straight corridors provided in this application. To address the positioning drift problem caused by laser feature degradation in long, straight corridor environments in the prior art, one embodiment of this application provides a positioning method for long, straight corridors, including steps S1 to S5, each step as follows: Step S1: When it is determined that the robot has entered the long straight corridor area, control the robot to move in the same direction as the extension of the long straight corridor area, and collect the robot's first pose data, first mileage data and attitude yaw angle when entering. Step S2: As the robot travels along the long straight corridor, it collects the second pose data and second mileage data in real time at the current moment. Step S3: Based on the slope and second pose data of the long straight corridor region, construct the constraint line corresponding to the long straight corridor; wherein, the slope of the long straight corridor region is determined according to the attitude yaw angle; Step S4: Calculate the movement distance based on the first mileage data and the second mileage data, and construct a constraint circle with the coordinate point corresponding to the first pose data as the center and the movement distance as the radius; Step S5: Solve the equations of the constraint line and the constraint circle simultaneously, and determine the robot's final positioning pose in the long straight corridor area based on the solution results.
[0033] Among them, long straight corridor areas refer to passage areas in the indoor environment that have longitudinal extension characteristics and relatively constant lateral width. These areas are characterized by symmetrical wall structures on both sides, and the environmental features are repetitive or lack differentiation in the longitudinal dimension, which poses a challenge to traditional feature matching-based localization methods.
[0034] Pose data refers to information describing a robot's position and orientation in a specific coordinate system. Position is typically represented by two-dimensional or three-dimensional coordinates, while orientation is represented by azimuth angles (such as yaw, pitch, and roll). The first pose data and the second pose data refer to pose information collected at different times.
[0035] Attitude yaw angle refers to the rotation angle of a robot in the horizontal plane, usually measured with a reference direction as the zero point. This angle reflects the robot's orientation and plays an important role in determining the extension direction of long, straight corridors.
[0036] Mileage data refers to the distance or cumulative displacement of a robot relative to its starting point, measured by sensors inside the robot. First mileage data and second mileage data refer to mileage information recorded at different times.
[0037] Specifically, in some embodiments, step S3, constructing the constraint line corresponding to the long straight corridor region based on the slope of the long straight corridor region and the second pose data, includes: Based on the slope of the long straight corridor region, the longitudinal extension direction of the long straight corridor region is determined. The position corresponding to the second pose data is used as the first reference point, and an offset point is set along the longitudinal extension direction as the second reference point. Based on the relative positional relationship between the first and second reference points, the constraint lines corresponding to the long straight corridor region are determined.
[0038] Specifically, the longitudinal extension direction of a long, straight corridor is determined based on its slope, aiming to clarify the main orientation of the corridor in a two-dimensional plane. The slope of the long, straight corridor is calculated by combining the robot's attitude yaw angle obtained from its attitude sensors when entering the corridor with known corridor orientation information, and is used to determine the longitudinal extension direction of the corridor.
[0039] Setting an offset point as the second reference point along the longitudinal extension direction means that after determining the first reference point and the longitudinal extension direction of the long straight corridor, an offset point with a certain distance from the first reference point is set along this direction to obtain the second reference point. These two reference points together define the local direction of the long straight corridor, thereby enabling the construction of the constraint line representing the long straight corridor more accurately.
[0040] The following example illustrates this: When performing an inspection task, the robot identifies that it has entered a long, straight corridor area using a pre-defined closed polygon region detection mechanism. This long, straight corridor area is formed by multiple points recorded in sequence. The robot's orientation upon entering is consistent with the direction of the corridor's extension. The system simultaneously records the robot's yaw angle at this moment and determines it as the slope k of the long, straight corridor area, providing the core directional basis for constructing the constraint line. Before constructing the constraint line, the system first acquires the necessary input data, including the determined slope k of the long, straight corridor area, and the real-time pose data pose2 collected by the robot during its movement within the long, straight corridor. This pose data contains the robot's current position coordinates.
[0041] Subsequently, the system begins to construct constraint lines: First, the position corresponding to the robot's current pose pose2 is taken as the first reference point. Based on the coordinate information of pose2, the horizontal coordinate x1 and vertical coordinate y1 of the first reference point are directly extracted. Then, the second reference point is set along the longitudinal extension direction of the long straight corridor (determined by the slope k). Starting from the first reference point, the coordinates (x2, y2) of the second reference point are calculated by combining the trigonometric function value corresponding to the slope k, where x2=x1+cos(k) and y2=y1+sin(k), ensuring that the line connecting the second reference point and the first reference point completely conforms to the longitudinal extension trend of the corridor.
[0042] After obtaining the coordinates of the two reference points, the system calculates the differences between them on the horizontal and vertical axes, i.e., dx = x2 - x1 and dy = y2 - y1. These two differences directly reflect the relative positional relationship between the two reference points. Based on these two differences, the system further calculates the parameters A, B, and C of the general formula for the constraint line (Ax + By + C = 0): parameter A is calculated by y1 - y2, parameter B by x2 - x1, and parameter C by x1y2 - x2y1. Finally, substituting the calculated parameters A, B, and C into the general formula for the line, the equation of the constraint line corresponding to the long straight corridor can be obtained.
[0043] Specifically, in some embodiments, step S4, calculating the travel distance based on the first mileage data and the second mileage data, includes: Obtain the planar position information corresponding to the first mileage data and the second mileage data respectively, calculate the straight-line distance between the two sets of planar position information, and use the straight-line distance as the movement distance.
[0044] Before calculating the movement distance, the system first collects the necessary input data, including the first mileage data odom1 recorded when the robot first enters the long, straight corridor area, and the current second mileage data odom2 collected in real time during continuous movement within the corridor. Both odom1 and odom2 contain the robot's planar position information at the corresponding moment. This information is derived from the robot's onboard odometry combined with a kinematic model and reflects the robot's specific position in a two-dimensional coordinate system.
[0045] The next step is to calculate the distance traveled: First, extract the corresponding planar position information from the first mileage data odom1 to obtain the robot's planar coordinates at that moment. , Simultaneously, the current planar position information is extracted from the second mileage data odom2 to obtain the coordinates ( , Next, based on the formula for calculating the distance between two points in plane geometry, the straight-line distance between the two sets of planar position coordinates is calculated, specifically using the following formula.
[0046] This formula calculates the sum of the squares of the differences between two coordinate points on the horizontal and vertical axes, and then takes the square root to obtain the straight-line distance between the two points. This distance is the actual distance the robot has traveled from entering the long straight corridor to the current moment. The distance calculated in the above way can accurately reflect the length of the robot's journey in the long straight corridor.
[0047] Specifically, in some embodiments, step S5 involves solving the equations of the constraint line and the constraint circle simultaneously, and determining the final positioning pose based on the solution results, including: Solve the equations of the constraining line and the constraining circle simultaneously, and determine the intersection of the constraining line and the constraining circle based on the solution results. If the intersection is such that the constraint line and the constraint circle have no intersection, then the currently acquired second pose data will be used as the final positioning pose. If the intersection is such that the constraint line and the constraint circle have a unique intersection point, then the pose data corresponding to the unique intersection point is taken as the final positioning pose. If the intersection situation is that the constraint line and the constraint circle have two intersection points, then calculate the similarity between the candidate pose corresponding to the two intersection points and the second pose data, and take the candidate pose with the higher similarity as the final positioning pose.
[0048] In other embodiments, step S5 involves solving the equations of the constraint line and the constraint circle simultaneously, including: By combining the equations of the constraining line and the constraining circle, a quadratic equation containing only a single position coordinate is obtained through algebraic derivation. Based on the coefficients of the quadratic equation, a discriminant parameter is calculated to determine the number of solutions to the equation. This discriminant parameter is obtained by subtracting four times the product of the quadratic term's related value and the constant term's related value from the square of the related value of the linear term in the quadratic equation. Based on the values of the discrimination parameters, the intersection of the constraint line and the constraint circle is determined, thereby obtaining the corresponding candidate pose.
[0049] The following is a specific example to illustrate this. After the robot enters the long straight corridor positioning mode, it has obtained the required input data: odometry data odom1 when it first entered the corridor, initial pose pose1, current odometry data odom2, real-time pose pose2, and corridor slope k.
[0050] Using the robot's current pose (pose2) position (x1, y1) as the first reference point, and setting a second reference point (x2, y2) along the corridor slope k, the constraint line equation is obtained as Ax + By + C = 0. Based on the planar position information corresponding to odom1 and odom2, the robot's actual travel distance odom_distance is obtained. Using the initial pose (pose1) coordinates (cx, cy) of the robot when entering the corridor as the center, and odom_distance as the radius, the final constraint circle equation is (x - cx)² + (y - cy)² = odom_distance².
[0051] By simultaneously solving the equations of the constrained line and the constrained circle, and through algebraic elimination, we derive a quadratic equation in one variable, ax² + bx + c = 0, which contains only a single positional coordinate (e.g., the x-coordinate). The coefficients of the quadratic term (a), the linear term (b), and the constant term (c) are all calculated from the parameters of the constrained line (A, B, C) and the constrained circle. a = A² + B² b = 2 × (AC + ABcy - B²cx) c=C²+2BCcy+B²cx²+B²cy²-B²odom_distance² The discriminant parameter *det* is calculated based on the coefficients of the quadratic equation, corresponding to the formula *det = b² - 4ac*. The value of *det* directly reflects the number of solutions to the quadratic equation, and thus the intersection of the constraint line and the constraint circle. If det < 0: the quadratic equation has no real solutions, and the corresponding constraint line and constraint circle have no intersection. If det=0: the quadratic equation has a unique real solution, and the corresponding constraint line and constraint circle have a unique intersection point; If det > 0: the quadratic equation has two distinct real solutions, corresponding to two intersection points between the constraint line and the constraint circle, thus yielding two candidate poses.31 and pose 32 .
[0052] When det > 0, two candidate poses are obtained. 31 ( , ) and pose 32 ( , When calculating the candidate pose and the current second pose pose2, the process is as follows: , The system determines the proximity of positions by measuring the distance between them; the closer the distance, the higher the proximity. The candidate pose with the smaller distance is selected as the final localization pose, effectively eliminating ambiguity in localization. Through this complete logic, the system can systematically determine geometric constraints, ensuring the robot's localization accuracy in degraded environments such as long, straight corridors.
[0053] In some embodiments of this application, please refer to Figure 2 In step S1, when it is determined that the robot has entered the long straight corridor area, the following steps are included: Record multiple points in sequence to construct a long straight corridor area with a closed polygonal structure, and set default positioning areas for the closed polygonal structure at both ends of the long straight corridor area. The robot collects its current position coordinates in real time and uses a polygon interior / exterior judgment algorithm to determine whether its current position coordinates are within a long straight corridor area.
[0054] Specifically, each long, straight corridor section is formed into a closed polygonal region by sequentially recording multiple points. At both ends of the long, straight corridor, default positioning areas are also set using polygonal enclosures. For example, in a long, straight corridor, engineers would sequentially record multiple coordinate points along the corridor's boundary. These points enclose a rectangular area, defined as the "long, straight corridor region." When the robot enters this rectangular area, the system automatically determines that it has entered the long, straight corridor. Simultaneously, at both ends of the long, straight corridor, similar polygonal enclosures can be defined as "default positioning areas" to ensure the robot maintains stable positioning even in the transition areas between entering and exiting the corridor. Figure 2 As shown, the area within the red box enclosed by A→B→C→D is the long straight corridor area, and a1→bl→c1→d1 and a2→b2→c2→d2 are the default positioning areas.
[0055] Specifically, in some embodiments, this application further proposes that when it is determined, based on the final positioning pose, that the robot is not in a long straight corridor area and is in the default positioning area, the robot is controlled to switch to SLAM positioning mode.
[0056] Specifically, when the robot is determined to be outside the long straight corridor area and in the default positioning area based on the final positioning pose, a mode switching operation is triggered to control the robot to switch to SLAM positioning mode. SLAM positioning mode is an autonomous positioning technology widely used in the field of robotics. In this mode, the robot can use its onboard sensors (such as LiDAR, cameras, inertial measurement units, etc.) to perceive the surrounding environment in real time, and at the same time build an environmental map and determine its own precise position in the map.
[0057] Please refer to Figure 3 , Figure 3 This is a schematic diagram of the structure of a positioning system for a long straight corridor according to some embodiments of this application. The system includes: a first data acquisition module 100, a second data acquisition module 200, a constraint construction module 300, and a pose solving module 400.
[0058] The first data acquisition module 100 is used to control the robot to move in the same direction as the long straight corridor area when it is determined that the robot has entered the long straight corridor area, and to collect the robot's first pose data, first mileage data and attitude yaw angle when entering the area. The second data acquisition module 200 is used to collect the second pose data and second mileage data in real time during the robot's movement along the long straight corridor area. The constraint construction module 300 is used to construct the constraint line corresponding to the long straight corridor based on the slope of the long straight corridor region and the second pose data; wherein, the slope of the long straight corridor region is determined according to the attitude yaw angle; the movement distance is calculated based on the first mileage data and the second mileage data, and a constraint circle is constructed with the coordinate point corresponding to the first pose data as the center and the movement distance as the radius; The pose solving module 400 is used to solve the equations of the constraint line and the constraint circle simultaneously, and to determine the final positioning pose of the robot in the long straight corridor area based on the solution results.
[0059] This application effectively constrains the robot's pose estimation in the longitudinal dimension by combining the geometric constraints of a long straight corridor with the robot's kinematic constraints through simultaneous equation solving. In implementation, when the constraint line and constraint circle have two intersection points, the system selects the intersection point with a higher degree of similarity to the current second pose data as the final localization pose, thereby enhancing the robustness of localization.
[0060] It is understood that the above system embodiments correspond to the method embodiments of this application, and can implement the positioning method for a long straight corridor provided by any of the above method embodiments of this application.
[0061] It should be noted that the system embodiments described above are merely illustrative, and some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided in this application, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0062] For ease of description and brevity, the embodiments of the system items in this application include all the implementation methods in the above-described embodiments of the positioning method for long straight corridors, and will not be repeated here.
[0063] Based on the above embodiments of the positioning method for long straight corridors, another embodiment of this application provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor. When the processor executes the computer program, it implements the positioning method for long straight corridors of any embodiment of this application.
[0064] For example, in this embodiment, the computer program can be divided into one or more modules, which are stored in the memory and executed by the processor to complete this application. The one or more module units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the terminal device.
[0065] The terminal device may be a desktop computer, laptop, handheld computer, or cloud server, etc. The terminal device may include, but is not limited to, a processor and a memory.
[0066] The processor can 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. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the terminal device, connecting all parts of the terminal device via various interfaces and lines.
[0067] Based on the above-described method embodiments, another embodiment of this application provides a computer-readable storage medium including a stored computer program, wherein, when the computer program is executed, it controls the device where the computer-readable storage medium is located to execute the positioning method for a long straight corridor as described in any of the above-described method embodiments of this application.
[0068] The modules / units integrated in the device / terminal equipment, if implemented as software functional units and sold or used as independent products, 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 includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the 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.
[0069] The above description is the preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications are also considered to be within the scope of protection of this application.
Claims
1. A method for locating a long, straight corridor, characterized in that, Applicable robots include: When it is determined that the robot has entered the long straight corridor area, the robot is controlled to move in the same direction as the extension of the long straight corridor area, and the robot's first pose data, first mileage data and attitude yaw angle are collected when it enters the area. As the robot travels along the long straight corridor area, it collects the second pose data and second mileage data at the current moment in real time. Based on the slope of the long straight corridor region and the second pose data, a constraint line corresponding to the long straight corridor is constructed; wherein, the slope of the long straight corridor region is determined according to the attitude yaw angle; The movement distance is calculated based on the first mileage data and the second mileage data. A constraint circle is constructed with the coordinate point corresponding to the first pose data as the center and the movement distance as the radius. Solve the equations of the constraint line and the constraint circle simultaneously, and determine the final positioning pose of the robot in the long straight corridor area based on the solution results.
2. The positioning method for a long straight corridor according to claim 1, characterized in that, The step of constructing the constraint line corresponding to the long straight corridor region based on the slope of the long straight corridor region and the second pose data includes: Based on the slope of the long straight corridor region, the longitudinal extension direction of the long straight corridor region is determined, the position corresponding to the second pose data is taken as the first reference point, and an offset point is set along the longitudinal extension direction as the second reference point. Based on the relative positional relationship between the first reference point and the second reference point, the constraint line corresponding to the long straight corridor region is determined.
3. The positioning method for a long straight corridor according to claim 1, characterized in that, The calculation of the travel distance based on the first mileage data and the second mileage data includes: Obtain the planar position information corresponding to the first mileage data and the second mileage data respectively, calculate the straight-line distance between the two sets of planar position information, and use the straight-line distance as the movement distance.
4. The positioning method for a long straight corridor according to claim 1, characterized in that, Solving the equations of the constraint line and the constraint circle simultaneously, and determining the final positioning pose based on the solution results, includes: Solve the equations of the constraint line and the constraint circle simultaneously, and determine the intersection of the constraint line and the constraint circle based on the solution results. If the intersection situation is that the constraint line and the constraint circle have no intersection point, then the currently acquired second pose data is taken as the final positioning pose; If the intersection situation is that the constraint line and the constraint circle have a unique intersection point, then the pose data corresponding to the unique intersection point is taken as the final positioning pose. If the intersection situation is that the constraint line and the constraint circle have two intersection points, then calculate the similarity between the candidate poses corresponding to the two intersection points and the second pose data, and take the candidate pose with higher similarity as the final positioning pose.
5. The positioning method for a long straight corridor according to claim 1, characterized in that, The step of simultaneously solving the equations of the constraining line and the constraining circle includes: By combining the equations of the constraining line and the constraining circle, a quadratic equation containing only a single position coordinate is obtained through algebraic derivation. Based on the coefficients of the quadratic equation, a discrimination parameter is calculated to determine the number of solutions to the equation. This discrimination parameter is obtained by subtracting four times the product of the quadratic term's related value and the constant term's related value from the square of the related value of the linear term in the quadratic equation. Based on the values of the discrimination parameters, the intersection of the constraint line and the constraint circle is determined, thereby obtaining the corresponding candidate pose.
6. The positioning method for a long straight corridor according to claim 1, characterized in that, The step of determining when the robot enters a long, straight corridor area includes: The long straight corridor region is constructed by recording multiple points in sequence to form a closed polygonal structure, and default positioning areas of the closed polygonal structure are set at both ends of the long straight corridor region. The robot collects its current position coordinates in real time and uses a polygon interior / exterior judgment algorithm to determine whether the current position coordinates are within the long straight corridor area.
7. The positioning method for a long straight corridor according to claim 6, characterized in that, Also includes: When it is determined, based on the final positioning pose, that the robot is not in the long straight corridor area and is in the default positioning area, the robot is controlled to switch to SLAM positioning mode.
8. A positioning system for a long straight corridor, applicable to robots, characterized in that, include: The first data acquisition module is used to control the robot to move in the same direction as the extension of the long straight corridor area when it is determined that the robot has entered the long straight corridor area, and to acquire the robot's first pose data, first mileage data and attitude yaw angle when entering the area. The second data acquisition module is used to collect the second pose data and second mileage data in real time during the robot's movement along the long straight corridor area. The constraint construction module is used to construct a constraint line corresponding to the long straight corridor based on the slope of the long straight corridor region and the second pose data; wherein, the slope of the long straight corridor region is determined according to the attitude yaw angle; the movement distance is calculated based on the first mileage data and the second mileage data, and a constraint circle is constructed with the coordinate point corresponding to the first pose data as the center and the movement distance as the radius; The pose solving module is used to solve the equations of the constraint line and the constraint circle simultaneously, and to determine the final positioning pose of the robot in the long straight corridor area based on the solution results.
9. A terminal device, characterized in that, It includes a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, it implements the positioning method for a long straight corridor as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, include: A stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the positioning method for a long straight corridor as described in any one of claims 1-7.
