Map construction method, map construction device and computer storage medium

By acquiring texture images and recording odometry data on a mobile robot, updating pose and topology status, and optimizing texture maps and topological road networks, the problem of decreased texture map accuracy and complex drawing in existing technologies is solved, achieving efficient and high-precision mapping.

CN121876944APending Publication Date: 2026-04-17ZHEJIANG HUARAY TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ZHEJIANG HUARAY TECH CO LTD
Filing Date
2025-11-24
Publication Date
2026-04-17

AI Technical Summary

Technical Problem

Existing ground texture SLAM mapping methods suffer from decreased texture map accuracy when wheels slip or the road network topology is complex, and manually drawing topology maps is tedious and difficult to guarantee accuracy.

Method used

By moving a mobile robot along a guideline, collecting texture images and recording odometry data and line-following detection results, predictive pose and topology state are generated, the actual pose and topology nodes are updated, and optimization is performed by combining keyframes and topology node constraints to construct a texture map and topology road network.

Benefits of technology

It enables high-precision construction of texture maps and topological road networks in complex environments, reduces manual drawing steps, improves mapping accuracy and efficiency, and eliminates cumulative errors caused by roaming.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121876944A_ABST
    Figure CN121876944A_ABST
Patent Text Reader

Abstract

The invention provides a map construction method, a map construction device and a computer storage medium. The map construction method comprises the following steps: generating a current predicted pose at a current moment according to odometer data of the mobile robot; generating a current predicted topological state at the current moment according to a current topological map generated by a line patrol detection result of the mobile robot; updating the current predicted pose according to the current line patrol detection result of the mobile robot at the current moment to obtain a current actual pose; updating the current predicted topological state according to the current line patrol detection result of the mobile robot at the current moment to obtain a current actual topological state, and generating topological nodes; screening out key frames from all the texture images according to the pose of the mobile robot or a line patrol detection result; and projecting all the key frames and all the topological nodes to a map coordinate system according to the key frame poses to obtain a final texture map and a topological road network. Through the map construction method, the texture map and the topological road network are constructed at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of ground mapping technology, and in particular to a map building method, a map building device, and a computer storage medium. Background Technology

[0002] Ground texture SLAM (Simultaneous Localization and Mapping) navigation is increasingly widely used due to its advantages such as high navigation accuracy, insensitivity to environmental changes, no need for QR code pasting, and ease of maintenance. Ground texture SLAM requires the construction of high-precision texture maps. Currently, methods for ground texture mapping mainly include topology-dependent methods, topology-independent methods, topology-constructed methods, and methods relying on other sensors.

[0003] One method, relying on a topology map, pre-paints markings along the robot's route. Key points are formed by the intersection of multiple straight lines, creating a topology map. The coordinates of each point on the topology map are manually measured and input into the robot as a reference for texture mapping. During mapping, the robot typically runs a line-following algorithm, traveling along the ground markings and capturing images from a downward-looking texture camera. The pose of each frame is obtained by performing pose estimation on the topology map, and then stitched together to form the texture map. This method, which combines a reference topology map with odometry integration for pose estimation, is susceptible to significant pose inaccuracies when wheel slippage occurs, leading to a decrease in texture map accuracy.

[0004] Furthermore, when the mapping site is particularly large and the topological road network is very complex, manually measuring and drawing the topological road network becomes extremely tedious and difficult to guarantee accuracy, ultimately affecting the accuracy of texture mapping. Summary of the Invention

[0005] To address the aforementioned technical problems, this application proposes a map building method, a map building apparatus, and a computer storage medium.

[0006] To address the aforementioned technical problems, this application proposes a map building method, which is applied to a mobile robot. The map building method includes: The mobile robot is controlled to move along a guide line and to acquire texture images; During the movement of the mobile robot, the texture image, odometry data, and line-following detection results of the mobile robot are recorded; Based on the odometry data of the mobile robot, the current predicted pose is generated at the current moment; Based on the current topology map generated by the mobile robot's line-following detection results, the current predicted topology state at the current moment is generated; The current predicted pose is updated based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual pose; The current predicted topology state is updated based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state and generate topology nodes; Keyframes are selected from all texture images based on the pose or line-following detection results of the mobile robot. The keyframes and / or the constraints of the topology nodes are added to the pose graph model for optimization to obtain the optimized keyframe poses. Based on the keyframe pose, all keyframes and all topological nodes are projected onto the map coordinate system to obtain the final texture map and topological road network.

[0007] The step of generating the current predicted topology state at the current moment based on the current topology map generated from the line-following detection results of the mobile robot includes: The robot's position at a later time step is used to update the line-following detection results at an earlier time step: In response to the earlier line-following detection result being an intersection state, the distance between the robot's position at a later time and the intersection at the earlier time is checked to see if it is greater than a first preset threshold; if so, the earlier line-following detection result is updated to a line-following state. In response to the earlier line-following detection result being in line-following state, the robot's position at a later time step is checked to see if the perpendicular distance between the robot's position at a later time step and the straight line at the earlier time step is greater than a second preset threshold; if so, the earlier line-following detection result is updated to roaming state. In response to the earlier line-following detection result being in a roaming state, the system checks whether the distance between the robot's position at a later time and the nearest intersection point to the mobile robot on the topology map at the earlier time is greater than a third preset threshold; if not, the earlier line-following detection result is updated to an intersection point state.

[0008] The map construction method further includes: In response to the earlier line-following detection result being in a roaming state, and the distance between the robot position in the later time and the nearest intersection point to the mobile robot on the topology map in the earlier time being greater than a third preset threshold, it is detected whether the distance between the robot position in the later time and the straight line with the smallest vertical distance to the mobile robot on the topology map in the earlier time being less than a fourth preset threshold. If so, update the previous line-following detection result to the line-following status.

[0009] The step of updating the current predicted pose based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual pose includes: In response to the current line detection result indicating the existence of an intersection point and the current predicted topology state being an intersection point state, the current predicted pose is updated according to the road matching rules to obtain the current actual pose. In response to the current line-following detection result indicating the existence of an intersection point, and the current predicted topology state being a line-following state, the current predicted pose is updated according to the road-to-lane matching rules to obtain the current actual pose; In response to the current line-following detection result indicating the existence of an intersection point and the current predicted topology state being a roaming state, the map coordinates of the intersection point are determined based on the current pose of the mobile robot, the coordinates of the intersection point identified by the current texture image, and the pose of the texture camera relative to the mobile robot; a new topology node is added based on the map coordinates, and the same number of topology lines are generated based on the newly added topology node according to the straight-line emission angle of the intersection point.

[0010] The step of updating the current predicted pose based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual pose includes: In response to the current lane detection result being a single straight line, the current predicted pose is updated according to the lane matching rules to obtain the current actual pose.

[0011] The road matching rule is as follows: Obtain several line directions at the current intersection; Determine the map intersection pose and camera intersection pose of the current intersection point in each line direction, and determine the current candidate pose of the mobile robot on the map based on the map intersection pose, the camera intersection pose, and the pose of the texture camera relative to the mobile robot. The current candidate pose corresponding to the minimum difference between each current candidate pose and the predicted pose angle of the current predicted pose is determined as the current pose of the mobile robot.

[0012] The lane matching rule is as follows: Obtain the first projection point of the center point of the mobile robot onto the current straight line; The center point of the mobile robot is projected onto the camera coordinate system according to the pose of the texture camera relative to the mobile robot to obtain the second projection point; The second projection point is projected onto the current straight line in the texture image to obtain the third projection point; Based on the third projection point and the two directions of the current line, the camera line pose of the current line in the camera reference frame is obtained; Based on the first projection point and the two directions of the current line, the map line pose of the current line in the map coordinate system is obtained; Based on the camera's linear pose, the map's linear pose, and the texture camera's pose relative to the mobile robot, determine the mobile robot's current candidate pose on the map; The current candidate pose corresponding to the minimum difference between each current candidate pose and the predicted pose angle of the current predicted pose is determined as the current pose of the mobile robot.

[0013] The road-to-lane matching rule is as follows: Obtain the current orientation of the current topology route where the mobile robot is located; Project the current intersection point detected from the current texture image onto the map coordinate system to obtain the projection point; Determine the foot of the perpendicular from the projection point to the topological line; The pose of the topology line is determined based on the coordinates of the perpendicular point and the current orientation. Traverse several line directions of the projection points and obtain the camera intersection pose in the camera coordinate system for each line direction. Based on the camera intersection pose, the topology line pose, and the pose of the texture camera relative to the mobile robot, the current candidate pose of the mobile robot on the map is determined; The current candidate pose corresponding to the minimum difference between each current candidate pose and the predicted pose angle of the current predicted pose is determined as the current pose of the mobile robot.

[0014] The step of updating the current predicted topology state based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state includes: In response to the current line inspection result indicating the existence of an intersection point, and the current predicted topology state being an intersection point state, the current actual topology state is determined to be an intersection point state. In response to the current line inspection result indicating the existence of an intersection point, and the current predicted topology state being a line inspection state, the current actual topology state is determined to be an intersection point state. In response to the current line inspection result indicating the existence of an intersection point and the current predicted topology state being a roaming state, the current actual topology state is determined to be an intersection point state.

[0015] The step of updating the current predicted topology state based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state includes: In response to the current line-following detection result being a single straight line and the current predicted topology state being an intersection state, the current actual topology state is determined to be a line-following state. In response to the current line-following detection result being a single straight line and the current predicted topology state being a line-following state, the current actual topology state is determined to be a line-following state. In response to the current line inspection result being a single straight line and the current predicted topology state being a roaming state, the current actual topology state is determined to be a roaming state.

[0016] The step of updating the current predicted topology state based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state includes: In response to the current line patrol detection result indicating that no straight lines or intersections were detected, the current actual topology state is determined to be a roaming state.

[0017] The constraints of the keyframe and / or the topology node include at least one of the following constraints: Constraints include adjacent keyframes, adjacent topology nodes, keyframe and topology node constraints, and loop closure constraints.

[0018] The map construction method further includes: When an associated intersection is detected in the current keyframe, the historical keyframe set of the associated intersection is obtained; Iterate through each historical keyframe in the set of historical keyframes and perform a loopback match with the current keyframe: Extract the current feature points of the current keyframe and the historical feature points of the historical keyframes; Obtain the feature point pairs that are successfully matched between the current feature point and the historical feature points; The historical pose is determined based on the coordinates of the associated intersection point in the camera coordinate system of the historical keyframe, and the direction of any outgoing ray segment of the associated intersection point in the historical keyframe. Based on the coordinates of the associated intersection point in the camera coordinate system of the current keyframe, and the direction of each outgoing ray segment of the associated intersection point in the current keyframe, several current poses are determined. Based on the historical pose and the current pose, determine the relative pose of the current keyframe with respect to the historical keyframe; The current feature point is projected onto the historical keyframe camera coordinate system using the relative pose, and the distance between the projected point and the historical keyframe of the feature point pair is calculated. Count the number of valid matching point pairs whose distance is less than the preset reprojection error threshold; The relative pose corresponding to the outgoing ray direction with the largest number of valid matching point pairs is selected as the loop closure matching result of the current keyframe relative to the historical keyframe. Compare the loop closure matching results of all historical keyframes, select the historical keyframe with the largest number of valid matching point pairs as the loop closure keyframe of the current keyframe, and use the relative pose corresponding to the loop closure keyframe to generate loop closure constraints.

[0019] The map construction method further includes: Based on the poses of two adjacent keyframes, the relative poses are calculated to generate constraints for adjacent keyframes.

[0020] The map construction method further includes: Obtain the associated topology nodes and keyframes; Determine the coordinates of the intersection points detected in the keyframe in the camera coordinate system; The relative pose of the keyframe with respect to the topology node is generated based on the coordinate values ​​to generate constraints between the keyframe and the topology node.

[0021] The map construction method further includes: Obtain the first and second keyframes corresponding to each of two adjacent topology nodes. Obtain the first angle between the attitude angle direction of the first keyframe and the first angle between the line connecting the two adjacent topology nodes; Obtain the second included angle between the attitude angle direction of the second keyframe and the line connecting the two adjacent topology nodes; The relative poses of the two adjacent topological nodes are generated based on the length of the line connecting the two adjacent topological nodes, the first included angle, and the second included angle, and are used to generate the constraints of the adjacent topological nodes.

[0022] To address the aforementioned technical problems, this application also proposes a map building apparatus, which includes a memory and a processor coupled to the memory; wherein the memory is used to store program data, and the processor is used to execute the program data to implement the map building method described above.

[0023] To address the aforementioned technical problems, this application also proposes a computer storage medium for storing program data, which, when executed by a computer, is used to implement the aforementioned map construction method.

[0024] Compared with the prior art, the beneficial effects of this application are: the map building device simultaneously acquires texture map and topological road network information by collecting texture images and recording odometer data and line-following detection results while the mobile robot is moving; the map building device can continue to calculate its pose even if the robot leaves the guide line by predicting and updating the topological state and pose, and can regenerate topological nodes once the robot returns to the intersection, ensuring the accuracy of the mobile robot's movement path; the map building device improves the accuracy of mapping by eliminating the cumulative error caused by roaming through global optimization. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of 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 based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating an embodiment of the map construction method provided in this application; Figure 2 This is a schematic diagram of the functional modules of the map building device provided in this application; Figure 3 This is a schematic diagram of the mobile robot's movement scenario provided in this application; Figure 4 This is a schematic diagram of the straight line types processed by the line-following module provided in this application; Figure 5 This is a schematic diagram of the computational process for simultaneously constructing a texture map and a topological road network, as provided in this application. Figure 6 This is a schematic diagram of the scenario of the newly added topology node provided in this application; Figure 7 This is a schematic diagram of the matchCross calculation scenario provided in this application; Figure 8 This is a schematic diagram of the matchLane calculation scenario provided in this application; Figure 9 This is a schematic diagram of the matchCrossToLane calculation scenario provided in this application; Figure 10 This is a flowchart illustrating the loop closure detection solution provided in this application; Figure 11 This is a schematic diagram of the intersection loop closure detection provided in this application; Figure 12 This is a schematic diagram of the optimization model provided in this application; Figure 13 This is a schematic diagram of adjacent topology node constraints provided in this application; Figure 14 This is a schematic diagram of the texture map and topological road network before optimization provided in this application; Figure 15 This is a schematic diagram of the optimized texture map and topological road network provided in this application; Figure 16 This is a schematic diagram of an embodiment of the map building apparatus provided in this application; Figure 17 This is a schematic diagram of the structure of an embodiment of the computer storage medium provided in this application. Detailed Implementation

[0026] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of the embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0027] The terms “first,” “second,” “third,” “fourth,” etc. (if present) in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a particular order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the application described herein can be implemented, for example, in orders other than those illustrated or described herein. Furthermore, the terms “comprising” and “having,” and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] The technical terms used in the map construction method of this application include, but are not limited to: Pose: refers to position and attitude. In this application, it specifically refers to 2D pose, i.e., [x, y, θ], which represents the coordinate components and yaw angle of a rectangular coordinate system.

[0029] Texture: refers to the patterns and designs on the ground. In some specific scenarios, naturally occurring dirt and cracks on the ground also fall under the category of ground texture.

[0030] Odometry data: This refers to wheeled odometers. By combining the number of rotations of the two wheels per unit time with the wheel diameter and wheel mounting position, the robot's linear velocity and angular velocity can be calculated. Furthermore, the robot's estimated pose can be obtained by integrating the velocities at multiple moments. In this proposal, the linear velocity and angular velocity from the odometer data are primarily used, i.e., odom = {v, ω}.

[0031] Compared with existing solutions, the map construction method provided in this application can simultaneously construct topological road networks and texture maps, thereby saving the step of drawing topological maps and improving implementation efficiency and mapping accuracy.

[0032] Please refer to details. Figure 1 and Figure 2 , Figure 1 This is a flowchart illustrating an embodiment of the map construction method provided in this application. Figure 2 This is a schematic diagram of the functional modules of the map building device provided in this application.

[0033] The map building method of this application is applied to a map building apparatus, wherein the map building apparatus can be a server, a terminal device, or a system in which the server and the terminal device cooperate with each other. Accordingly, the various parts of the map building apparatus, such as each unit, subunit, module, and submodule, can all be set in the server, all in the terminal device, or separately in the server and the terminal device.

[0034] Furthermore, the aforementioned server can be either hardware or software. When the server is hardware, it can be implemented as a distributed server cluster consisting of multiple servers, or as a single server. When the server is software, it can be implemented as multiple software programs or software modules, such as software or software modules used to provide distributed server functionality, or as a single software program or software module; no specific limitations are made here.

[0035] It should be noted that the map building device of this application can be equipped with... Figure 2 The autonomous mobile robot with the functional modules shown.

[0036] Specifically, the main functional modules of the map building device of this application that play a role in the scanning process are: the line-following module and the map building module, which will be explained below in conjunction with the specific map building process.

[0037] like Figure 1 As shown, the specific steps are as follows: Step S11: Control the mobile robot to move along the guide line and collect texture images.

[0038] In the embodiments of this application, please refer to Figure 3 , Figure 3 This is a schematic diagram of the mobile robot's movement scenario provided in this application.

[0039] like Figure 3 As shown, staff members pre-paste guide lines on the ground in areas where texture mapping is needed. These guide lines are the routes that the mobile robot needs to travel to perform its tasks, and they form an unknown topological road network.

[0040] The mobile robot (hereinafter referred to as the robot) begins to walk around the site and scan the texture map. Assume the texture camera is mounted on the robot, i.e., the pose of the texture camera relative to the robot is... .

[0041] The robot generally follows the guide lines, but in special circumstances it may deviate from them. Therefore, there are three topological states during the scanning process: 1. Crossover point status, such as Figure 3 As shown in Robot 1.

[0042] 2. Tracking status, such as Figure 3 Robot 2 is shown.

[0043] 3. Roaming status, such as Figure 3 As shown in robot 3.

[0044] During the robot's movement, the texture camera mounted on the robot acquires texture images at a preset frequency.

[0045] Step S12: During the movement of the mobile robot, record the texture image, odometry data, and line-following detection results of the mobile robot.

[0046] In the embodiments of this application, Figure 2 The line-following module shown is responsible for detecting straight lines and intersections in the texture image in real time, calculating and correcting the robot's deviation from the route, so that the robot always travels along a straight line. Straight line detection in the image can employ publicly available and mature methods, such as the Hough transform and the EDLine algorithm; when multiple sets of straight lines are detected in the image, their intersections are checked, and if they intersect, the intersection point is obtained.

[0047] The type of straight line detected by the line-following module can be according to Figure 4 Divided into the following 6 categories, Figure 4 This is a schematic diagram of the straight line types processed by the line-following module provided in this application: (1) Single straight line: The line inspection result returns the equation of a straight line described by a point and a direction.

[0048] (2) Cross, the line-following result returns the intersection point and the four straight lines formed by the four directions.

[0049] (3) Three-way intersection: the line search results return to the intersection and the three straight lines formed by the three directions.

[0050] (4) Multiple forks: The line search results return the intersection points and multiple straight lines composed of multiple directions.

[0051] (5) Broken line, the line-following result returns the intersection point and two straight lines formed by the two directions.

[0052] (6) Breakpoint: The line tracing result returns the breakpoint and a straight line consisting of one direction.

[0053] The above six types of line-following detection results can all be described using one vertex plus several directions. The case of detecting a single straight line corresponds to... Figure 3 The first state corresponds to the line-following state, while the other five states correspond to the intersection state. When the robot leaves the topology map, i.e., when the downward-looking texture camera cannot detect intersections or straight lines, it corresponds to the roaming state.

[0054] During the mapping process, the line-following module continuously sends the line-following detection results to the texture mapping module. The line-following detection results include, but are not limited to, the following: (1) The topological state corresponding to the current image.

[0055] (2) Vertex coordinates.

[0056] (3) The direction of one or more straight lines.

[0057] The mapping module continuously receives and caches images captured by the downward-looking texture camera, odometer data, and line-following detection results, and then... Figure 5 The calculation process and subsequent steps shown illustrate the creation of the texture map and topological road network. Figure 5 This is a schematic diagram of the computational process for simultaneously constructing a texture map and a topological road network, as provided in this application.

[0058] like Figure 5 As shown, before mapping, the map-building device needs to initialize the robot's pose: (1) First, push the robot to the intersection of the ground guide lines so that the texture camera can scan the intersection.

[0059] (2) Then the robot pose is initialized to [0, 0, 0] by default, and the robot's topology state is initialized to the intersection state.

[0060] (3) The initial topology map has only one node, which is the intersection detected by the current robot texture camera.

[0061] Step S13: Generate the current predicted pose at the current moment based on the odometry data of the mobile robot.

[0062] In the embodiments of this application, such as Figure 5 The predicted pose and topology state are shown. The map building device predicts the robot's pose and topology state based on odometry data.

[0063] Specifically, assuming the robot pose corresponding to the previous keyframe is , representing the pose of the robot body relative to the map reference frame at time i. Upon receiving the j-th frame image, the odometry sequence from time i to time j is retrieved from the cached odometry data. , , ,…, }, and iteratively perform the following calculations: (1) Calculate the robot pose:

[0064]

[0065]

[0066] in, This represents the time interval from time i to time i+1.

[0067] Step S14: Based on the current topology map generated by the mobile robot's line-following detection results, generate the current predicted topology state at the current moment.

[0068] In this embodiment of the application, the map building device further predicts the topological state of the robot based on the currently generated topological map.

[0069] Specifically, if the robot is at a crossroads at time i, then check the robot's position at time i+1. , Check if the distance to the corresponding intersection point exceeds a threshold. If it does not exceed the threshold, maintain the intersection point state; if it exceeds the threshold, select one of the outgoing route directions from all directions of that intersection point. The closest route is used as the robot's reference route, and the robot's state is changed to line-following state.

[0070] If the robot is in line-following state at time i, then check the robot's position at time i+1. , Check if the perpendicular distance to the corresponding straight line exceeds a threshold. If it does not exceed the threshold, maintain the line-following state; if it exceeds the threshold, change the robot state to roaming state.

[0071] If the robot is in a roaming state at time i, then use the robot's position at time i+1. , The robot searches for the nearest intersection point in the topology map. If the distance between the robot and the nearest intersection point is less than a threshold, the robot's state is changed to intersection point state. Otherwise, the robot searches for the line with the smallest vertical distance in the topology map. If the smallest vertical distance is less than a threshold, the robot's state is changed to line-following state. If no intersection point or line satisfying the threshold is found, the robot remains in roaming state.

[0072] It should be noted that the above search methods can use publicly available and mature methods. For example, the KD-Tree algorithm can be used to find the nearest intersection, and the RTree algorithm can be used to find the line with the smallest vertical distance.

[0073] The map building device repeats steps S13 and S14 until the robot's pose and state are updated to time j, i.e. .

[0074] Step S15: Update the current predicted pose based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual pose.

[0075] In the embodiments of this application, such as Figure 5 The updated pose and topology state are shown. The map building device finds the line-following detection result at time j in the cache and uses it to update the robot's pose and topology state.

[0076] Specifically, if the line-following detection result at time j indicates the existence of an intersection point, then the topology is updated based on the predicted topology state at time j as follows: (1) If the topology state at time j is predicted to be the intersection state, then the matchCross (road matching rule) is directly executed to calculate and update the robot pose without changing the robot topology state.

[0077] (2) If the topology state at time j is predicted to be a line-following state, then first execute matchCrossToLane (road-to-lane matching rule) to calculate and update the robot pose. And the coordinates of the intersection points detected by the current texture camera. Combined with the robot's pose The pose of the texture camera relative to the robot It can calculate the coordinates of the intersection point on the map. .

[0078] like Figure 6 As shown, at this point, a new topology point can be added, specifically by retrieving... The x and y components are used to add a new topology node in the topology map. A new topology path (represented by a solid line) connects the previous topology node to the current topology node; additionally, based on the angles of the outgoing lines at the intersection, an equal number of topology paths (represented by dashed lines) are generated on the newly added topology node; the robot state is changed to intersection state. Figure 6 This is a schematic diagram of the scenario of the newly added topology node provided in this application.

[0079] (3) If the topological state at time j is predicted to be a roaming state, then the current robot state is used directly. Combined with the coordinates of the intersection points detected by the texture camera and the pose of the texture camera relative to the robot. Calculate the coordinates of the intersection point on the map. .take out The x and y components are used to add a new topological node in the topological map; in addition, based on the angles of the outgoing straight lines at the intersection, an equal number of topological lines (represented by dashed lines) are generated on the newly added topological node; the robot state is changed to the intersection state.

[0080] If the line-following detection result at time j is a single straight line, then the topology is updated according to the predicted topology state at time j as follows: (1) If the topology state at time j is predicted to be the intersection state, then select the line that is closest to the robot’s current pose angle from all the connecting lines of the topology node, and perform matchLane (lane matching rule) calculation to update the robot’s pose, and change the robot’s topology state to the line-following state.

[0081] (2) If the topology state at time j is predicted to be the line-following state, then the current topology line is directly obtained, and the matchLane (lane matching rule) calculation is performed to update the robot's pose, while keeping the robot's topology state as the line-following state.

[0082] (3) If the topological state at time j is predicted to be a roaming state, then the robot's pose and topological state are not updated.

[0083] If neither a straight line nor an intersection is detected at time j, the robot switches to a roaming state.

[0084] The calculation processes for matchCross (road matching rule), matchCrossToLane (road to lane matching rule), and matchLane (lane matching rule) are described below: Please refer to details. Figure 7 , Figure 7 This is a schematic diagram of the matchCross calculation scenario provided in this application. For example... Figure 7As shown, when the robot is located at intersection point P, intersection point P is observed in the image, and it has several outgoing directions. Taking a crossroads intersection as an example, there are four directions. First, choose any direction of a line at intersection point P, such as the direction from P to E, as the main direction of the intersection point, thus forming the intersection point pose. Secondly, obtain the mounting pose of the texture camera on the robot. Then, iterate through the four directions of point p in the image, forming the pose of the intersection point p in the camera reference frame, and set it as follows: Therefore, the robot's pose on the map can be calculated as follows:

[0085] Iterate through all directions of the image intersections, calculating the robot's pose on the map for each direction using the method described above. Then, select the robot's pose angle and compare it with the pose angle predicted in step S13. The result with the smallest difference is taken as the corrected robot pose.

[0086] Please refer to details. Figure 8 , Figure 8 This is a schematic diagram of the matchLane calculation scenario provided in this application. For example... Figure 8 As shown, when the robot is positioned on a straight line, the robot's center B is first projected onto the line to obtain the projection point Q. Then, one direction of the line (such as from Q to E) is arbitrarily selected as the main direction of the line to obtain the pose of the line on the map. Secondly, obtain the mounting pose of the texture phase on the robot. ; then according to Projecting the robot's center point B onto the camera reference frame yields projection point b, and further projecting b onto a straight line in the image yields point q. Traversing the two directions of the straight line in the image, we construct the pose of the line in the camera reference frame, denoted as q. Therefore, the robot's pose on the map can be calculated as follows:

[0087] The robot's pose on the map is calculated for each direction of the straight line in the image using the method described above. Then, the robot's pose angle is selected and compared with the pose angle predicted in step S13. The result with the smallest difference is taken as the corrected robot pose.

[0088] Please refer to details. Figure 9 , Figure 9 This is a schematic diagram of the matchCrossToLane calculation scenario provided in this application. For example... Figure 9As shown, when the robot detects an intersection and its several outgoing directions (taking three directions as an example) during line following, its pose can be corrected using the equation of the line it is currently on. The specific process is as follows: First, obtain the orientation of the current topology line the robot is on. Next, the intersection points detected by the robot are projected onto the map reference system to obtain point E. Then, a perpendicular line is drawn from E to the current route to obtain the foot of the perpendicular point Q. Finally, the pose is formed by using the coordinates of Q and the orientation of the topological route. Then, iterate through the three directions of point e in the image, forming the pose of the intersection point p in the camera reference frame, and set it as follows: Therefore, the robot's pose on the map can be calculated as follows:

[0089] Traverse all outgoing ray segments from the image intersection point e, and calculate the robot's pose on the map for each direction using the method described above. Then, select the pose angle from these directions and compare it with the pose angle predicted in step S13. The result with the smallest difference is taken as the corrected robot pose.

[0090] Step S16: Update the current predicted topology state based on the current line-following detection result of the mobile robot at the current moment, obtain the current actual topology state, and generate topology nodes.

[0091] In the embodiments of this application, the topology state update in step S15 has been described in detail, and will not be repeated here.

[0092] Step S17: Select keyframes from all texture images based on the pose or line-following detection results of the mobile robot.

[0093] In the embodiments of this application, such as Figure 5 The keyframes shown are filtered in two ways by the map building device: line-following keyframes and intersection keyframes.

[0094] (1) Keyframes are selected by relative motion in line-following mode, specifically: calculate the relative displacement and rotation of the current image frame j compared to the previous keyframe i, that is:

[0095]

[0096] when or If the threshold is exceeded, image frame j is selected as the new keyframe to proceed to the next step; otherwise, image frame j is discarded.

[0097] (2) The keyframe selection method when the camera scans the intersection is as follows: cache all image frames that scan the same intersection, and record the pixel distance between the intersection and the center point of the image in each image frame. Select the image frame with the smallest pixel distance between the intersection and the center point of the image from all cached image frames as the keyframe associated with the intersection.

[0098] Furthermore, assuming the selected keyframe is frame j, the pose of the texture camera capturing this image in the map is used as the keyframe pose. The robot's pose in the map at the keyframe acquisition time is calculated based on steps S13 and S14. Combined with the pose of the texture camera relative to the robot This allows us to obtain the pose of the keyframes on the map. .

[0099] In addition, the intersection keyframe is also associated with the topology nodes, in Figure 6 In the corresponding implementation description, only the x and y coordinates of the newly added topology nodes were calculated, while their attitude angles were specified. To incorporate the topology nodes into the global optimization later, their attitude angles need to be specified. Since each topology node corresponds to one intersection point and one unique selected keyframe, the attitude angle of the associated intersection point keyframe is used as the attitude angle of the topology node, thus obtaining the pose of the topology node on the map. .

[0100] Step S18: Add the constraints of keyframes and / or topology nodes to the pose graph model for optimization, and obtain the optimized keyframe pose.

[0101] In the embodiments of this application, such as Figure 5 The loop closure detection shown is performed by the map building device only on keyframes of associated intersections.

[0102] Specifically, please refer to the loop closure detection solution provided in this application. Figure 10 , Figure 10 This is a flowchart illustrating the loop closure detection scheme provided in this application.

[0103] like Figure 10 As shown, the specific steps are as follows: Step S21: When an associated intersection is detected in the current keyframe, obtain the historical keyframe set of the associated intersection.

[0104] In this embodiment of the application, after selecting the current frame j of an associated intersection point, a set of keyframes whose distance to the selected keyframe is less than a certain threshold is searched from all historical intersection keyframes, denoted as . .

[0105] Step S22: Traverse each historical keyframe in the historical keyframe set and perform loop closure matching with the current keyframe.

[0106] In the embodiments of this application, traversal For each keyframe in the sequence, perform a loop-closing match between it and the current frame j, from steps S23 to S210: Step S23: Extract the current feature points of the current keyframe and the historical feature points of the historical keyframes.

[0107] In this embodiment, the number of outgoing ray segments detected in j and k is first checked to be equal. After the check passes, feature points, such as orb feature points or superpoint feature points, are extracted from j and k respectively.

[0108] Step S24: Obtain feature point pairs that are successfully matched between the current feature point and historical feature points.

[0109] In this embodiment, feature points j and k are paired using a feature matching method to obtain a set of matching point pairs. Please refer to [link to details]. Figure 11 , Figure 11 This is a schematic diagram of the intersection loop closure detection provided in this application. For example... Figure 11 As shown, this application uses different shapes, such as squares, triangles and circles in the figure, to represent paired feature point pairs.

[0110] Step S25: Determine the historical pose based on the coordinates of the associated intersection point in the camera coordinate system of the historical keyframe and the direction of any outgoing ray segment of the associated intersection point in the historical keyframe.

[0111] In this embodiment, reference frame k detects the coordinates of the intersection point in the camera reference frame. And several outgoing ray segments, then choose any one of the ray segments and its direction to form the pose of the intersection point in the camera reference frame with q. .

[0112] Step S26: Determine several current poses based on the coordinates of the associated intersection points in the camera coordinate system of the current keyframe, and the direction of each outgoing ray segment of the associated intersection points in the current keyframe.

[0113] In this embodiment, the current frame j also has intersection points in the coordinates of the current frame camera reference frame. And several outgoing ray segments. Traverse each initially defined line segment of p, using the direction of the current line segment... The pose of the intersection point formed by point p in the current frame camera reference frame. .

[0114] Step S27: Determine the relative pose of the current keyframe with respect to the historical keyframes based on the historical pose and the current pose.

[0115] In this embodiment, the pose of the current frame relative to the reference frame is calculated. .

[0116] Step S28: Project the current feature point onto the historical keyframe camera coordinate system using the relative pose, and calculate the distance between the projected point and the historical keyframe of the feature point pair.

[0117] In the embodiments of this application, using Project all feature points of the current frame j onto the reference frame of the reference frame k, and calculate the distance between each feature point and its paired point in the reference frame k. This distance represents the relative pose of each feature point. Reprojection error under certain conditions.

[0118] Step S29: Count the number of valid matching point pairs whose distance is less than the preset reprojection error threshold.

[0119] In this embodiment of the application, a reprojection error threshold is set. The statistical reprojection error in the previous step is less than The number of point pairs is called the number of valid matching point pairs.

[0120] Step S210: Select the relative pose corresponding to the outgoing ray segment direction with the largest number of valid matching point pairs as the loop closure matching result of the current keyframe relative to the historical keyframes.

[0121] In this embodiment, each initial line segment of p is traversed, and steps S27 to S29 are repeated. Then, the result with the largest number of valid matching point pairs is selected. A minimum threshold for the number of valid matching point pairs is set. If the maximum number of selected point pairs is greater than Then the corresponding pose The result is used as the loop closure match result of the current frame relative to the reference frame; otherwise, it is determined that the current frame j and the reference frame k do not form a loop.

[0122] Step S211: Compare the loop closure matching results of all historical keyframes, select the historical keyframe with the largest number of valid matching point pairs as the loop closure keyframe of the current keyframe, and use the relative pose corresponding to the loop closure keyframe to generate loop closure constraints.

[0123] In this embodiment of the application, the map building device for For each frame, the loop closure matching result is calculated using the method described above. The reference frame k with the largest number of valid matching points is selected as the key frame that forms a loop with the current frame j, and their relative poses are recorded. .

[0124] In the embodiments of this application, such as Figure 5As shown in the diagram, the map building device needs to optimize two types of variables: keyframes and topological nodes. There are four types of constraints between them, as detailed below. Figure 12 The optimization model is shown as follows: adjacent frame constraints, adjacent node constraints, constraints of key frames and nodes, and loop closure constraints.

[0125] The following section elaborates on these four types of constraints: Adjacent frame constraint: using the poses of two adjacent frames , Directly calculate their relative poses .

[0126] Keyframes and node constraints: Let the topology node be... It is associated with only one intersection keyframe. and keyframes The intersection point was detected with coordinates x and y in the camera reference frame. Since the pose angle of the topology node was specified to be equal to the pose angle of the intersection point's keyframe during the keyframe selection step, therefore... relatively The included angle is 0. Therefore, the relative pose constraints of the keyframe relative to the topological nodes can be obtained. .

[0127] Cycle constraint: Figure 10 The relative poses of the two frames that constitute a loop relationship are calculated. As a closure constraint.

[0128] Adjacent node constraints: such as Figure 13 As shown, with the help of topology nodes , Associated keyframes , To calculate the relative pose of two topological nodes. Figure 13 The solid black line in the image is the straight line detected in the image, the gray dots represent topological nodes, and the gray arrows represent the keyframe pose angle, which is also equivalent to the direction of the topological node.

[0129] The distance between two topological nodes is d, and the line connecting the topological nodes is perpendicular to the line connecting them. The angle between the directions is α, and The angle between the directions is β; therefore relatively The relative pose constraint is .

[0130] Step S19: Project all keyframes and all topological nodes onto the map coordinate system based on the keyframe poses to obtain the final texture map and topological road network.

[0131] In this embodiment, the map building device incorporates the four types of constraints calculated in the above process into the pose graph model for optimization. The pose graph optimization algorithm can optimize the pose of all keyframes to obtain the final result.

[0132] After obtaining the poses of all keyframes and topological nodes after global optimization, the map building device can project the keyframes and topological nodes onto the map reference frame to obtain the final texture map and topological road network. For example... Figure 14 and Figure 15 As shown in the comparison, global optimization corrected the misalignment of keyframes and topology nodes, resulting in a texture map without ghosting and a perfectly closed topology network.

[0133] Finally, in the embodiments of this application, such as Figure 5 The deduplication of the map shown shows that the texture map and topology map obtained by global optimization have duplicate keyframes and topology nodes at loop closures, so further map deduplication processing is required.

[0134] Texture map deduplication: Iterate through all keyframes, and for each keyframe, search for its nearest neighbor keyframe in the map. If the distance between two frames is less than a threshold, delete the current keyframe and keep the searched keyframe.

[0135] Deduplication of topology map: Traverse all topology nodes, and for each topology node, search for its nearest neighbor in the map. If the distance between two nodes is less than a threshold, delete either of them.

[0136] After deduplication, the final texture map and topological road network are obtained.

[0137] The map construction method provided in this application can simultaneously construct texture maps and topological road networks. The method employs a textured SLAM architecture and incorporates topological nodes as variables into the global optimization, thereby generating high-precision texture maps and topological road networks without pre-drawing the topological road network. Furthermore, the method exhibits high robustness to conditions such as wheel slippage.

[0138] The map building method provided in this application is compatible with three scenarios: the robot is on a line, at an intersection, and roaming off the guide line. Because it uses a pose prediction and update framework, it can continue to calculate its pose even if the robot leaves the guide line. Once the robot returns to the intersection, the topology nodes can be regenerated. After global optimization, the cumulative error caused by roaming can be eliminated.

[0139] The map building method provided in this application does not rely on other sensors such as 2D or 3D LiDAR, and is low in cost; it only uses a downward-looking texture camera and does not rely on other sensors such as LiDAR.

[0140] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0141] To implement the above map building method, this application also proposes a map building apparatus, for details please refer to [link / reference needed]. Figure 16 , Figure 16 This is a schematic diagram of an embodiment of the map building apparatus provided in this application.

[0142] The map building apparatus 400 of this embodiment includes a processor 41, a memory 42, an input / output device 43, and a bus 44.

[0143] The processor 41, memory 42, and input / output device 43 are respectively connected to the bus 44. The memory 42 stores program data, and the processor 41 is used to execute the program data to implement the map construction method described in the above embodiments.

[0144] In this embodiment, processor 41 can also be referred to as a CPU (Central Processing Unit). Processor 41 may be an integrated circuit chip with signal processing capabilities. Processor 41 can also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. The general-purpose processor can be a microprocessor, or processor 41 can be any conventional processor.

[0145] This application also provides a computer storage medium; please refer to the following: Figure 17 , Figure 17 This is a schematic diagram of a computer storage medium according to an embodiment of the present application. The computer storage medium 600 stores a computer program 61, which, when executed by a processor, is used to implement the map construction method of the above embodiment.

[0146] When the embodiments of this application are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0147] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A map construction method, characterized in that, The map building method is applied to a mobile robot, and the map building method includes: The mobile robot is controlled to move along a guide line and to acquire texture images; During the movement of the mobile robot, the texture image, odometry data, and line-following detection results of the mobile robot are recorded; Based on the odometry data of the mobile robot, the current predicted pose is generated at the current moment; Based on the current topology map generated by the mobile robot's line-following detection results, the current predicted topology state at the current moment is generated; The current predicted pose is updated based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual pose; The current predicted topology state is updated based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state and generate topology nodes; Keyframes are selected from all texture images based on the pose or line-following detection results of the mobile robot. The keyframes and / or the constraints of the topology nodes are added to the pose graph model for optimization to obtain the optimized keyframe poses. Based on the keyframe pose, all keyframes and all topological nodes are projected onto the map coordinate system to obtain the final texture map and topological road network.

2. The map construction method according to claim 1, characterized in that, The step of generating the current predicted topology state at the current moment based on the current topology map generated by the mobile robot's line-following detection results includes: The robot's position at a later time step is used to update the line-following detection results at an earlier time step: In response to the earlier line-following detection result being an intersection state, the distance between the robot's position at a later time and the intersection at the earlier time is checked to see if it is greater than a first preset threshold; if so, the earlier line-following detection result is updated to a line-following state. In response to the earlier line-following detection result being in line-following state, the robot's position at a later time step is checked to see if the perpendicular distance between the robot's position at a later time step and the straight line at the earlier time step is greater than a second preset threshold; if so, the earlier line-following detection result is updated to roaming state. In response to the earlier line-following detection result being in a roaming state, the system checks whether the distance between the robot's position at a later time and the nearest intersection point to the mobile robot on the topology map at the earlier time is greater than a third preset threshold; if not, the earlier line-following detection result is updated to an intersection point state.

3. The map construction method according to claim 2, characterized in that, The map construction method also includes: In response to the earlier line-following detection result being in a roaming state, and the distance between the robot position in the later time and the nearest intersection point to the mobile robot on the topology map in the earlier time being greater than a third preset threshold, it is detected whether the distance between the robot position in the later time and the straight line with the smallest vertical distance to the mobile robot on the topology map in the earlier time being less than a fourth preset threshold. If so, update the previous line-following detection result to the line-following status.

4. The map construction method according to claim 1, characterized in that, The step of updating the current predicted pose based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual pose includes: In response to the current line detection result indicating the existence of an intersection point and the current predicted topology state being an intersection point state, the current predicted pose is updated according to the road matching rules to obtain the current actual pose. In response to the current line-following detection result indicating the existence of an intersection point, and the current predicted topology state being a line-following state, the current predicted pose is updated according to the road-to-lane matching rules to obtain the current actual pose; In response to the current line-following detection result indicating the existence of an intersection point and the current predicted topology state being a roaming state, the map coordinates of the intersection point are determined based on the current pose of the mobile robot, the coordinates of the intersection point identified by the current texture image, and the pose of the texture camera relative to the mobile robot; a new topology node is added based on the map coordinates, and the same number of topology lines are generated based on the newly added topology node according to the straight-line emission angle of the intersection point.

5. The map construction method according to claim 4, characterized in that, The step of updating the current predicted pose based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual pose includes: In response to the current lane detection result being a single straight line, the current predicted pose is updated according to the lane matching rules to obtain the current actual pose.

6. The map construction method according to claim 5, characterized in that, The road matching rule is as follows: Obtain several line directions at the current intersection; Determine the map intersection pose and camera intersection pose of the current intersection point in each line direction, and determine the current candidate pose of the mobile robot on the map based on the map intersection pose, the camera intersection pose, and the pose of the texture camera relative to the mobile robot. The current candidate pose corresponding to the minimum difference between each current candidate pose and the predicted pose angle of the current predicted pose is determined as the current pose of the mobile robot.

7. The map construction method according to claim 5, characterized in that, The lane matching rule is as follows: Obtain the first projection point of the center point of the mobile robot onto the current straight line; The center point of the mobile robot is projected onto the camera coordinate system according to the pose of the texture camera relative to the mobile robot to obtain the second projection point; The second projection point is projected onto the current straight line in the texture image to obtain the third projection point; Based on the third projection point and the two directions of the current line, the camera line pose of the current line in the camera reference frame is obtained; Based on the first projection point and the two directions of the current line, the map line pose of the current line in the map coordinate system is obtained; Based on the camera's linear pose, the map's linear pose, and the texture camera's pose relative to the mobile robot, determine the mobile robot's current candidate pose on the map; The current candidate pose corresponding to the minimum difference between each current candidate pose and the predicted pose angle of the current predicted pose is determined as the current pose of the mobile robot.

8. The map construction method according to claim 5, characterized in that, The road-to-lane matching rule is as follows: Obtain the current orientation of the current topology route where the mobile robot is located; Project the current intersection point detected from the current texture image onto the map coordinate system to obtain the projection point; Determine the foot of the perpendicular from the projection point to the topological line; The pose of the topology line is determined based on the coordinates of the perpendicular point and the current orientation. Traverse several line directions of the projection points and obtain the camera intersection pose in the camera coordinate system for each line direction. Based on the camera intersection pose, the topology line pose, and the pose of the texture camera relative to the mobile robot, the current candidate pose of the mobile robot on the map is determined; The current candidate pose corresponding to the minimum difference between each current candidate pose and the predicted pose angle of the current predicted pose is determined as the current pose of the mobile robot.

9. The map construction method according to claim 1, characterized in that, The step of updating the current predicted topology state based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state includes: In response to the current line inspection result indicating the existence of an intersection point, and the current predicted topology state being an intersection point state, the current actual topology state is determined to be an intersection point state. In response to the current line inspection result indicating the existence of an intersection point, and the current predicted topology state being a line inspection state, the current actual topology state is determined to be an intersection point state. In response to the current line inspection result indicating the existence of an intersection point and the current predicted topology state being a roaming state, the current actual topology state is determined to be an intersection point state.

10. The map construction method according to claim 1, characterized in that, The step of updating the current predicted topology state based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state includes: In response to the current line-following detection result being a single straight line and the current predicted topology state being an intersection state, the current actual topology state is determined to be a line-following state. In response to the current line-following detection result being a single straight line and the current predicted topology state being a line-following state, the current actual topology state is determined to be a line-following state. In response to the current line inspection result being a single straight line and the current predicted topology state being a roaming state, the current actual topology state is determined to be a roaming state.

11. The map construction method according to claim 1, characterized in that, The step of updating the current predicted topology state based on the current line-following detection result of the mobile robot at the current moment to obtain the current actual topology state includes: In response to the current line patrol detection result indicating that no straight lines or intersections were detected, the current actual topology state is determined to be a roaming state.

12. The map construction method according to claim 1, characterized in that, The constraints of the keyframe and / or the topology node include at least one of the following constraints: Constraints include adjacent keyframes, adjacent topology nodes, keyframe and topology node constraints, and loop closure constraints.

13. The map construction method according to claim 12, characterized in that, The map construction method further includes: When an associated intersection is detected in the current keyframe, the historical keyframe set of the associated intersection is obtained; Iterate through each historical keyframe in the set of historical keyframes and perform a loopback match with the current keyframe: Extract the current feature points of the current keyframe and the historical feature points of the historical keyframes; Obtain the feature point pairs that are successfully matched between the current feature point and the historical feature points; The historical pose is determined based on the coordinates of the associated intersection point in the camera coordinate system of the historical keyframe, and the direction of any outgoing ray segment of the associated intersection point in the historical keyframe. Based on the coordinates of the associated intersection point in the camera coordinate system of the current keyframe, and the direction of each outgoing ray segment of the associated intersection point in the current keyframe, several current poses are determined. Based on the historical pose and the current pose, determine the relative pose of the current keyframe with respect to the historical keyframe; The current feature point is projected onto the historical keyframe camera coordinate system using the relative pose, and the distance between the projected point and the historical keyframe of the feature point pair is calculated. Count the number of valid matching point pairs whose distance is less than the preset reprojection error threshold; The relative pose corresponding to the outgoing ray direction with the largest number of valid matching point pairs is selected as the loop closure matching result of the current keyframe relative to the historical keyframe. Compare the loop closure matching results of all historical keyframes, select the historical keyframe with the largest number of valid matching point pairs as the loop closure keyframe of the current keyframe, and use the relative pose corresponding to the loop closure keyframe to generate loop closure constraints.

14. The map construction method according to claim 12, characterized in that, The map construction method further includes: Based on the poses of two adjacent keyframes, the relative poses are calculated to generate constraints for adjacent keyframes.

15. The map construction method according to claim 12, characterized in that, The map construction method further includes: Obtain the associated topology nodes and keyframes; Determine the coordinates of the intersection points detected in the keyframe in the camera coordinate system; The relative pose of the keyframe with respect to the topology node is generated based on the coordinate values ​​to generate constraints between the keyframe and the topology node.

16. The map construction method according to claim 12, characterized in that, The map construction method further includes: Obtain the first and second keyframes corresponding to each of two adjacent topology nodes. Obtain the first angle between the attitude angle direction of the first keyframe and the first angle between the line connecting the two adjacent topology nodes; Obtain the second included angle between the attitude angle direction of the second keyframe and the line connecting the two adjacent topology nodes; The relative poses of the two adjacent topological nodes are generated based on the length of the line connecting the two adjacent topological nodes, the first included angle, and the second included angle, and are used to generate the constraints of the adjacent topological nodes.

17. A map building device, characterized in that, The map building apparatus includes a memory and a processor coupled to the memory; The memory is used to store program data, and the processor is used to execute the program data to implement the map construction method as described in any one of claims 1 to 16.

18. A computer storage medium, characterized in that, The computer storage medium is used to store program data, which, when executed by the computer, is used to implement the map construction method as described in any one of claims 1 to 16.