WO2022016320A1 - Map update method and apparatus, computer device, and storage medium - Google Patents

Map update method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2022016320A1
WO2022016320A1 PCT/CN2020/103042 CN2020103042W WO2022016320A1 WO 2022016320 A1 WO2022016320 A1 WO 2022016320A1 CN 2020103042 W CN2020103042 W CN 2020103042W WO 2022016320 A1 WO2022016320 A1 WO 2022016320A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
map
updated
new
historical
Prior art date
Application number
PCT/CN2020/103042
Other languages
French (fr)
Chinese (zh)
Inventor
解婧玮
Original Assignee
深圳元戎启行科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳元戎启行科技有限公司 filed Critical 深圳元戎启行科技有限公司
Priority to CN202080093044.7A priority Critical patent/CN114930391A/en
Priority to PCT/CN2020/103042 priority patent/WO2022016320A1/en
Publication of WO2022016320A1 publication Critical patent/WO2022016320A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/33Determination of transform parameters for the alignment of images, i.e. image registration using feature-based methods

Definitions

  • the present application relates to the technical field of map processing, and in particular, to a map updating method, apparatus, computer equipment and storage medium.
  • Map data is an important supporting element in autonomous driving technology, which is used to provide a priori information of driving scenarios to perception, planning and other modules; in order to ensure the timeliness of map data, the map needs to be updated continuously.
  • the current map update method generally matches the newly added map data to the old map data as a whole, and then performs incremental update; however, the new map data is directly matched to the old map data as a whole, and the old map data is The accuracy will limit the accuracy of the mapping, resulting in lower accuracy of the updated map data, resulting in lower accuracy of the map update.
  • a map update method includes:
  • the map area corresponding to the node to be updated in the map to be updated is updated.
  • adding the new key frame as a new node to the historical pose graph to obtain a new pose graph including:
  • the new node is added to the corresponding position in the historical pose graph to obtain a new pose graph.
  • the loopback detection is performed between the new node and the historical nodes in the historical pose graph to obtain the difference between the new node and the historical nodes in the historical pose graph. constraints, including:
  • the constraint relationship between the new node and the historical node in the historical pose graph is obtained according to the historical nodes adjacent to the new node in time or position.
  • the identifying the node to be updated in the new pose graph includes:
  • a first node set, a second node set and a third node set are constructed;
  • the first node set is the A set composed of new nodes,
  • the second node set is a set composed of historical nodes that have a constraint relationship with the new node and do not belong to the first node set, and
  • the third node set is a set of The historical nodes in the second node set have a constraint relationship, and do not belong to the set formed by the historical nodes of the first node set and the second node set;
  • the carrier state quantities in the first node set, the second node set and the third node set are optimized until the number of nodes in the first node set reaches a second preset number;
  • the nodes in the first node set are used as nodes to be updated.
  • the updating the map area corresponding to the node to be updated in the map to be updated includes:
  • the map area in the to-be-updated map is updated.
  • the acquiring a new key frame of the map to be updated includes:
  • an initial carrier state quantity that satisfies a preset condition is screened out as a new key frame of the map to be updated.
  • the method further includes:
  • the automatic driving map is sent to the automatic driving vehicle terminal, and the automatic driving vehicle terminal is triggered to control the driving of the corresponding automatic driving vehicle.
  • a map update device includes:
  • an acquisition module for acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated;
  • An adding module is used to add the new key frame as a new node to the historical pose graph to obtain a new pose graph
  • an identification module for identifying the node to be updated in the new pose graph
  • An update module configured to update the map area corresponding to the node to be updated in the map to be updated.
  • a computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
  • an acquisition module for acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated;
  • An adding module is used to add the new key frame as a new node to the historical pose graph to obtain a new pose graph
  • an identification module for identifying the node to be updated in the new pose graph
  • An update module configured to update the map area corresponding to the node to be updated in the map to be updated.
  • an acquisition module for acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated;
  • An adding module is used to add the new key frame as a new node to the historical pose graph to obtain a new pose graph
  • an identification module for identifying the node to be updated in the new pose graph
  • An update module configured to update the map area corresponding to the node to be updated in the map to be updated.
  • the above-mentioned map updating method, device, computer equipment and storage medium by acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated; adding the new key frame as a new node to the historical pose graph, Obtain a new pose graph; identify the node to be updated in the new pose graph; update the map area corresponding to the node to be updated in the to-be-updated map; realize the new key frame of the to-be-updated map and the history of the to-be-updated map Pose map, the purpose of updating the map to be updated, avoids the defect of directly matching the new map data to the old map data, resulting in the low accuracy of the updated map data, thereby improving the accuracy of the map update;
  • the new key frame is first added as a new node to the historical pose graph to obtain a new pose graph, and then the nodes to be updated in the new pose graph are identified, and then the to-be-updated map is updated.
  • Fig. 1 is the application environment diagram of the map update method in one embodiment
  • FIG. 2 is a schematic flowchart of a map update method in one embodiment
  • FIG. 3 is a schematic flowchart of a step of identifying a node to be updated in a new pose graph in one embodiment
  • FIG. 4 is a schematic flowchart of a step of obtaining a new key frame of a map to be updated in one embodiment
  • FIG. 5 is a schematic flowchart of a map update method in another embodiment
  • FIG. 6 is a schematic flowchart of a map update method in yet another embodiment
  • FIG. 7 is a structural block diagram of a map updating apparatus in one embodiment
  • FIG. 8 is a diagram of the internal structure of a computer device in one embodiment.
  • the map update method provided in this application can be applied to the application environment shown in FIG. 1 .
  • the sensor 110 communicates with the server 120 through the network, and the sensor 110 is arranged on the carrier device to collect the corresponding sensor data during the movement of the carrier device on the target route of the map to be updated, and transfer the sensor data through the network.
  • the server 120 determines the new key frame of the map to be updated according to the received sensor data, and obtains the historical pose graph of the map to be updated; adds the new key frame as a new node to the historical pose graph , obtain a new pose graph; identify the node to be updated in the new pose graph; update the map area corresponding to the node to be updated in the to-be-updated map to obtain the updated map.
  • the sensors can be, but are not limited to, various cameras, GPS (Global Positioning System) receivers, lidars, IMUs (Inertial Measurement Unit, inertial measurement units), wheel speedometers, etc.
  • the server 120 can use an independent It is implemented by a server or a server cluster composed of multiple servers.
  • a map updating method is provided, which is described by taking the method applied to the server in FIG. 1 as an example, including the following steps:
  • Step S201 acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated.
  • the map to be updated refers to a map that needs to be updated, such as a point cloud map, a grid map, a semantic map, and the like.
  • the new key frame refers to the carrier state quantity determined by the newly collected sensor data, and specifically refers to the carrier state quantity at a certain moment, which may include position and attitude values, and may also include other carrier state quantities to be optimized.
  • the constraints between key frames refer to the relationship between the state quantities of the carrier at different times (such as the relative motion relationship between key frames measured by sensors, or the relative position relationship between key frames obtained from loop closure detection, which can be used as constraints) .
  • Pose graph refers to a graph optimization model composed of key frames as nodes and constraints between key frames as edges.
  • the historical pose graph refers to a graph composed of historical keyframes as nodes and constraints between historical keyframes as edges.
  • the server receives the new sensor data collected by the sensor, and determines the carrier state quantity at the critical moment according to the new sensor data as a new key frame of the map to be updated; obtains the map identifier of the map to be updated, such as map number, map Name, etc., according to the map identification query and store the historical pose graph corresponding to multiple map identifications, obtain the historical pose graph corresponding to the map identification of the map to be updated, as the historical pose graph of the map to be updated.
  • the server receives the new sensor data collected by the sensor, and determines the carrier state quantity at the critical moment according to the new sensor data as a new key frame of the map to be updated; obtains the map identifier of the map to be updated, such as map number, map Name, etc., according to the map identification query and store the historical pose graph corresponding to multiple map identifications, obtain the historical pose graph corresponding to the map identification of the map to be updated, as the historical pose graph of the map to be updated.
  • the server can also obtain the historical pose graph in the following manner: obtain the historical sensor data collected by the sensor installed on the carrier device on the target route; according to the historical sensor data, determine the initial carrier state quantity of the carrier device at each historical moment. ; From the initial carrier state quantities of the carrier device at each historical moment, the initial carrier state quantities that meet the preset conditions are screened out as historical key frames; the historical key frames are used as nodes to construct a historical pose graph.
  • Step S202 adding the new key frame as a new node to the historical pose graph to obtain a new pose graph.
  • the new pose graph refers to a pose graph formed by adding nodes corresponding to new key frames on the basis of the historical pose graph.
  • the server uses the new key frame as a new node, and obtains the historical nodes in the historical pose graph; obtains a preset loopback detection instruction, and determines the new node and the historical pose graph according to the preset loopback detection instruction
  • the constraint relationship between the historical nodes in according to the constraint relationship, new nodes are added to the historical pose graph to obtain a new pose graph.
  • a new pose graph is obtained, which is beneficial to comprehensively consider the nodes in the new pose graph later to determine the new pose graph. Node to be updated.
  • Step S203 identifying the node to be updated in the new pose graph.
  • the node to be updated refers to a node that needs to be updated.
  • the server obtains the carrier state quantity of the node in the new pose graph, and optimizes the carrier state quantity of the node in the new pose graph through the pre-trained optimization model, and obtains the state quantity of the node in the new pose graph.
  • the node to be optimized is used as the node to be updated in the new pose graph. In this way, it is beneficial to update the map area corresponding to the to-be-updated node in the to-be-updated map, comprehensively considering the to-be-updated node in the new pose graph, instead of directly using the new node to update the to-be-updated map. Further improved the accuracy of map updates.
  • the server may also obtain a preset identification instruction of the node to be updated, and analyze and process the nodes in the new pose graph according to the preset identification instruction of the node to be updated, so as to obtain the node to be updated in the new pose graph;
  • the preset identification instruction of the node to be updated is an instruction that can automatically identify the node to be updated in the pose graph.
  • Step S204 update the map area corresponding to the node to be updated in the to-be-updated map.
  • the server obtains the node corresponding to the node to be updated in the map to be updated, and determines the map area to be updated in the map to be updated according to the node corresponding to the node to be updated in the map to be updated; Update the updated map area to get the updated map. In this way, the defect of directly matching the new map data to the old map data, resulting in low accuracy of the updated map data, is avoided, thereby improving the accuracy of map update.
  • the above map update method obtains a new key frame of the map to be updated and a historical pose graph of the map to be updated; adds the new key frame as a new node to the historical pose graph to obtain a new pose graph; recognizes The node to be updated in the new pose graph; the map area corresponding to the node to be updated in the map to be updated is updated; it is realized that the map to be updated is updated according to the new key frame of the map to be updated and the historical pose graph of the map to be updated.
  • the purpose of the update is to avoid the defect of directly matching the new map data to the old map data, resulting in the low accuracy of the updated map data, thereby improving the accuracy of the map update; Add it to the historical pose graph as a new node, obtain a new pose graph, identify the nodes to be updated in the new pose graph, and then update the to-be-updated map, taking into account the to-be-updated map in the new pose graph Updating the node does not directly use the new node to update the map to be updated, which further improves the accuracy of the map update.
  • a new key frame is added to the historical pose graph as a new node to obtain a new pose graph, including: taking the new key frame as a new node; Perform loopback detection with the historical nodes in the historical pose graph to obtain the constraint relationship between the new node and the historical nodes in the historical pose graph; according to the constraint relationship, add the new node to the historical pose graph. Corresponding position, get a new pose graph.
  • the constraint relationship refers to the positional relationship between nodes, or the relationship between the times corresponding to the nodes.
  • the server obtains a preset loopback detection instruction and a historical node in the historical pose graph; uses the new key frame as a new node, and uses the preset loopback detection instruction to display the new node and historical pose graph in the new node and the historical pose graph.
  • the loopback detection is performed between the historical nodes in the past, and if a constraint relationship between the new node and the historical node in the historical pose graph is detected, the constraint relationship between the new node and the historical node in the historical pose graph is constructed; According to the constraint relationship, the corresponding position of the new node in the historical pose graph is determined; the new node is added to the corresponding position in the historical pose graph to obtain a new pose graph.
  • the server when a new keyframe is added to the historical pose graph, that is, the new keyframe is used as a newly created node in the historical pose graph, the server will add the newly created node and the historical node in the historical pose graph Perform loopback detection between the nodes, try to establish a constraint relationship between the newly added node and the historical node in the historical pose graph, so as to add the new node to the corresponding position in the historical pose graph to obtain a new pose graph.
  • a new pose graph is obtained, which is conducive to the subsequent comprehensive consideration of the nodes in the new pose graph to determine the new pose graph.
  • loop closure detection is performed between the new node and the historical node in the historical pose graph to obtain the constraint relationship between the new node and the historical node in the historical pose graph, including: in the new node Perform loopback detection with the historical nodes in the historical pose graph to obtain the historical nodes adjacent to the new node time or position; obtain the new node and historical position according to the historical nodes adjacent to the new node time or position Constraints between historical nodes in the pose graph.
  • a newly established node it can construct two types of edges with other nodes, one is the edge between adjacent time nodes, and the relationship between the adjacent time frames provided by the local database; the other One is the edge between nodes at related locations, from the relationship between spatially adjacent frames provided by the local database.
  • the module S04 compares the point cloud data contained in key frame T4 and key frame T1
  • a loopback is detected between them, and the loop is detected by ICP (Iterative Closest Point , iterative closest point) algorithm to obtain the observation value Trans_14_icp of the coordinate transformation relationship between the two frames and the covariance matrix of this observation value is Cov_14_icp
  • the observation value Trans_14_icp can be transformed between V1 and V4 according to the space between the two key frames.
  • the constraint relationship between the new node and the historical node in the historical pose graph is obtained, which is conducive to the follow-up according to the constraint relationship, Add the new node to the corresponding position in the historical pose graph to get a new pose graph.
  • step S203 identifying the node to be updated in the new pose graph, specifically includes the following steps:
  • Step S301 when the number of new nodes in the new pose graph reaches a first preset number, construct a first node set, a second node set and a third node set.
  • the first node set is a set composed of new nodes
  • the second node set is a set composed of historical nodes that have a constraint relationship with the new node and do not belong to the first node set
  • the third node set is related to the first node set.
  • the historical nodes in the two node sets have a constraint relationship, and do not belong to the set formed by the historical nodes of the first node set and the second node set.
  • Step S302 optimize the carrier state quantities in the first node set, the second node set and the third node set by using the pre-trained optimization model until the number of nodes in the first node set reaches a second preset number.
  • the pre-trained optimization model refers to a model that can optimize the nodes in the pose graph.
  • the server uses the residual items defined between the nodes in the first node set, the second node set and the third node set as constraints, and uses the first node set and the second node set as constraints.
  • the contained carrier state quantity is used as the carrier state quantity to be optimized, and the carrier state quantity contained in the third node set is set as a fixed variable, and the result is obtained by optimization; for the nodes contained in the second node set, compare the carrier state before and after optimization. If the updated value of the carrier state quantity for a node in the second node set exceeds the corresponding threshold, the node will be moved from the second node set to the first node set, and the third node set will be moved to the first node set.
  • the target node that has a constraint relationship with the node moves to the second node set, and finds from the new pose graph that there is a constraint relationship with the target node and does not belong to the first node set, and the nodes in the second node set are added to the third node set , and perform the above process again; if no update value of the carrier state quantity in the second node set is greater than the corresponding threshold, the optimization is ended, or the number of nodes in the first node set reaches the second preset number, the optimization is ended.
  • Step S303 if the number of nodes in the first node set reaches a second preset number, the nodes in the first node set are used as nodes to be updated.
  • the second preset number is greater than the first preset number.
  • the server selects the nodes that need to be optimized from the new pose graph, and optimizes the new pose graph at a certain frequency; in order to realize the continuous update of the map construction, it will involve the optimization of a large number of carrier state quantities, so by selecting some carriers
  • the state quantity is optimized, as follows:
  • Step 2 The set G1 is the node that needs to be updated for this round of optimization, and is initialized as a set composed of these K newly added nodes.
  • Set G2 is a node that may need to be updated in this round of optimization. It is initialized as a node that has a constraint relationship with the K newly added nodes, but is not in set G1.
  • Set G3 is a node that does not need to be updated in this round of optimization. Initialized There is a constraint relationship with the nodes in the set G2, but not the nodes in G1 and G2. After initialization, go to Step3.
  • Step3 Using the optimization algorithm, the residual term defined between the nodes in G1, G2 and G3 is used as a constraint, the state quantities contained in G1 and G2 are set as the variables to be optimized, and the state quantities contained in G3 are set as fixed variables, Optimizing to get the result.
  • the nodes that are constrained and not in G1 and G2 are added to G3, and Step3 is executed again. If no update value of the state quantity in G2 is greater than the threshold, the optimization ends.
  • the optimization algorithm can use linear or nonlinear least squares, such as Gauss-Newton's method, etc., and existing optimization algorithm libraries, such as ceres solver, g2o, etc., can be directly used in the implementation.
  • the traditional back-end optimization method can be used to optimize the entire pose graph after waiting for all new keyframes to be added to the pose graph. For example, using an optimization algorithm library such as ceres, the previously defined carrier state quantities and residual items are input into the optimization model, and all carrier state quantities are optimally estimated to obtain the optimized state quantities.
  • the continuous updating of the map it may also be necessary to simplify the pose graph, delete outdated data, or thin the keyframe nodes again to reduce the amount of data that needs to be stored and calculated; When the time difference between the pose graph node and the newly added pose graph node is greater than 1 year, the data is removed from the pose graph.
  • updating the map area corresponding to the node to be updated in the map to be updated includes: acquiring map data corresponding to the node to be updated; determining the map area covered by the map data; the map area in the map to be updated to update.
  • map data can be point cloud data, two-dimensional color grid maps represented by RGB three colors, or two-dimensional grayscale maps; of course, map data can also be Other types of data are not specifically limited here.
  • the server obtains the map data corresponding to the node to be updated, performs statistical analysis on the map area covered by the map data corresponding to the node to be updated, and obtains the map area covered by the map data; reuses the map data and the pose track, and performs a statistical analysis on the map area covered by the map data corresponding to the node to be updated.
  • the updated map area is updated to obtain the updated map as a high-precision map for autonomous driving. For example, using the optimized pose trajectory, the pose of each frame of point cloud data is interpolated to obtain the updated 3D point cloud map.
  • step S201 acquiring a new key frame of the map to be updated, specifically includes the following steps:
  • Step S401 acquiring sensor data collected by sensors installed on the carrier device on the target route of the map to be updated.
  • sensors such as cameras, GPS receivers, lidars, IMUs, wheel speedometers, etc.
  • carrier devices such as cars, drones, etc.
  • the sensor data can include the data collection time in addition to the data output by the sensor itself.
  • the timeline of individual sensor data should remain consistent.
  • the car use the lidar and GPS receiver installed on the car as the sensor, carry out driving and data collection on the target route, and transmit the sensor data obtained by the sensor through the network in real time during the driving process.
  • the server in the cloud reads the sensor data collected this time from the server after the collection.
  • Step S402 according to the sensor data, determine the initial carrier state quantity of the carrier device at each moment.
  • the carrier state quantity can include the position, attitude, speed, acceleration and other information of the carrier device at a specific time in a specific reference coordinate system (such as the ENU global coordinate system, or a local coordinate system with the initial position of the carrier as the origin, etc.), It can also contain the status information of the sensor at different times (such as IMU zero offset, wheel radius, etc.).
  • a specific reference coordinate system such as the ENU global coordinate system, or a local coordinate system with the initial position of the carrier as the origin, etc.
  • the status information of the sensor at different times (such as IMU zero offset, wheel radius, etc.).
  • the mileage calculation method used in this step is selected according to the actual application scene and sensor configuration as needed; based on the camera sensor, visual odometry calculation methods such as feature point method, direct method, and optical flow method can be used; based on laser sensor, ICP can be used , NDT and other point cloud matching algorithms to calculate the relative position relationship of point clouds at adjacent times; GPS sensors can also be used to directly use the sensor position information output by GPS to obtain the initial position value of the download tool at each time through interpolation.
  • the server estimates the change relationship of the carrier state quantities at adjacent moments; and determines the initial carrier state quantities of the carrier device at each time according to the change relationship of the carrier state quantities at adjacent times.
  • the carrier coordinate system is defined as a Cartesian coordinate system with the center of the four wheels of the car as the origin of the coordinate system, and the xyz axes point to the front, left, and top of the car, respectively.
  • the carrier coordinate system at time t is denoted by Ft.
  • Use Trans_mn [p_mn, R_mn] to represent the coordinate conversion relationship from the coordinate system Fn to the coordinate system Fm
  • p_mn is the position of the coordinate origin of the coordinate system Fn in the coordinate system Fm
  • R_mn is the rotation from the coordinate system Fn to the coordinate system Fm. rotation matrix.
  • the laser point clouds pcd0, pcd1, pcd2 under the carrier coordinate systems F0, F1, and F2 are obtained by scanning with a laser scanner, and the coordinate transformations Trans_01 and pcd2 from pcd1 to pcd0 are obtained by using the ICP algorithm Coordinate transformation Trans12 to pcd1.
  • state_1 Trans01
  • a frame of state quantity is established at the time corresponding to the data.
  • another frame can be added at intervals such as 0.01s. state quantity.
  • Step S403 From the initial carrier state quantities of the carrier device at each moment, an initial carrier state quantity that satisfies a preset condition is screened out as a new key frame of the map to be updated.
  • the server selects the initial carrier state quantity that satisfies the preset conditions from the initial carrier state quantity of the carrier device as a new key frame of the map to be updated; in addition, the server can also use the key frame as the graph
  • the nodes in the node use sensor data to construct constraints between key frames as edges between nodes; add key frames to the historical pose graph in a certain order, select the nodes to be optimized to optimize the update of the carrier state quantity, and follow the Certain rules move the keyframes that no longer need to be optimized out of the historical pose graph, so as to obtain a new pose graph of the map to be updated.
  • the optimization process in order to reduce the amount of calculation during optimization, in the optimization process, according to certain rules, from the initial carrier state quantities at all times, select a part of the initial carrier state quantities as key frames, and input the pose graph for optimization.
  • the specific selection method can use a fixed time interval, such as selecting a key frame every 0.1s from a series of initial carrier state quantities with a time interval of 0.01s; it can also be obtained by setting the pose change threshold and other methods, such as with When the Euclidean distance of the previous key frame is greater than 0.1m, a new key frame is established; when the total initial carrier state quantity is small, the initial carrier state quantity at all times can also be directly used as the key frame.
  • the selection method of keyframes in the historical pose graph is the same as the above process; in addition, if the pose graph is initially empty, after the keyframe is obtained, the keyframe can be added as a node to the pose graph , as the historical pose graph, and store it; the next time the mapping operation is performed, the existing historical pose graph can be loaded and updated based on it.
  • the above step S204 after updating the map area corresponding to the node to be updated in the map to be updated, further includes: acquiring the updated map; converting the updated map into a preset type of automatic driving map; Send the autopilot map to the autopilot vehicle terminal, and trigger the autopilot vehicle terminal to control the corresponding autopilot vehicle to drive.
  • automatic driving maps refer to high-precision maps that can be used for automatic driving, including various types.
  • the server obtains the updated map, and according to the preset map conversion instruction, converts the updated map into a preset type of automatic driving map, such as adding traffic signs, road signs, etc.; and sends the automatic driving map to the corresponding The self-driving vehicle terminal; the self-driving vehicle terminal displays the self-driving map through the terminal interface, and controls the corresponding self-driving vehicle to drive safely, such as stop at red light, go at green light, etc.
  • a preset type of automatic driving map such as adding traffic signs, road signs, etc.
  • FIG. 5 another method for updating a map is provided, which is described by taking the method applied to the server in FIG. 1 as an example, including the following steps:
  • Step S501 acquiring sensor data collected by sensors installed on the carrier device on the target route of the map to be updated.
  • Step S502 according to the sensor data, determine the initial carrier state quantity of the carrier device at each moment.
  • Step S503 From the initial carrier state quantities of the carrier device at each moment, an initial carrier state quantity that satisfies a preset condition is screened out as a new key frame of the map to be updated.
  • Step S504 obtaining the historical pose graph of the map to be updated, and using the new key frame as a new node.
  • step S505 loopback detection is performed between the new node and the historical nodes in the historical pose graph to obtain historical nodes adjacent to the new node in time or position.
  • Step S506 obtaining the constraint relationship between the new node and the historical node in the historical pose graph according to the historical node adjacent to the new node in time or position.
  • Step S507 add a new node to the corresponding position in the historical pose graph to obtain a new pose graph.
  • Step S508 when the number of new nodes in the new pose graph reaches a first preset number, construct a first node set, a second node set and a third node set.
  • the first node set is a set composed of new nodes
  • the second node set is a set composed of historical nodes that have a constraint relationship with the new node and do not belong to the first node set
  • the third node set is related to the first node set.
  • the historical nodes in the two node sets have a constraint relationship, and do not belong to the set formed by the historical nodes of the first node set and the second node set.
  • Step S509 optimize the carrier state quantities in the first node set, the second node set and the third node set by using the pre-trained optimization model, until the number of nodes in the first node set reaches a second preset number.
  • Step S510 if the number of nodes in the first node set reaches the second preset number, the nodes in the first node set are used as nodes to be updated.
  • Step S511 Obtain map data corresponding to the node to be updated; determine a map area covered by the map data; and update the map area in the map to be updated.
  • the above map update method realizes the purpose of updating the map to be updated according to the new key frame of the map to be updated and the historical pose graph of the map to be updated, and avoids directly matching the new map data to the old map data, resulting in The updated map data has a low accuracy defect, thereby improving the accuracy of the map update.
  • the present application further provides an application scenario where the above-mentioned map update method is applied.
  • the application steps of the map update method in this application scenario are as follows:
  • Step S601 acquiring sensor data collected by sensors installed on the carrier device on the target route of the map to be updated.
  • Step S602 according to the sensor data, perform an initial estimation on the state quantity of the carrier at each moment.
  • the server estimates the change relationship of the carrier state quantities at adjacent times, and performs initial estimation of the carrier states at different times.
  • Step S603 selecting a carrier state quantity that meets the preset condition as a key frame; using the key frame as a node, a pose graph is constructed, and the pose that needs to be updated is optimized.
  • the server selects key frames from the initial state set of the carrier as nodes in the pose graph, and uses sensor data to construct constraints between key frames as edges between nodes; in a certain order Add keyframes to the pose graph, select the nodes that need to be optimized to optimize and update the state quantity, and move the keyframes that no longer need to be optimized out of the pose graph according to certain rules.
  • Step S604 using the optimized key frame pose to construct or update map data.
  • Step S605 save the mapping data to the storage in a certain format, or read the data from the storage for back-end optimization and update.
  • mapping data refers to various data required for map construction and pose graph optimization, including pose graph data and related sensor data, and pose graph data includes nodes
  • pose graph data includes nodes
  • the state quantity of the edge, the node information connected to the edge, and the constraint information contained in the edge, the sensor data can include the photos taken by the camera, the point cloud scanned by the laser scanner, etc.
  • the node For example, for each node NodeM of the pose graph, use the node to collect the vehicle license plate number and the acquisition time accurate to microseconds to set the node's unique id, and use the node id as the file name. For example, the key frame collected by the car with the license plate number "Guangdong A12345" at 13:15:17.1866 on January 1, 2020 can be set as YUE_A12345_20200101131517186600. Save the state quantity and time of the node in the file in text form. For each constraint EdgeMN related to NodeM (i.e. edges in the pose graph) is also saved in this file as text.
  • EdgeMN related to NodeM i.e. edges in the pose graph
  • NodeM and NodeN each contain a set of point cloud data
  • use the ICP algorithm to obtain the coordinate system transformation relationship between the two point clouds, and obtain the carrier coordinate system transformation relationship TransMN and covariance matrix CovIcpMN of NodeM and NodeN, then record the constraint.
  • the type is ICP coordinate transformation, and the parameters p_MN and R_MN of the coordinate system transformation TransMN are recorded, and the covariance matrix CovIcpMN of the transformation relationship is recorded.
  • the mapping data can be divided into blocks according to certain rules, and the data block id can be used as the folder name to save in blocks to speed up the processing speed of reading nodes by coordinates. Blocking is carried out based on the coordinates of the data, and the id of each block obtained is related to the coordinates.
  • the id range of the block can be determined by the input coordinate range, and only the nodes that meet the coordinate range to be read are searched in these blocks.
  • the precision value range is from 0 to 360 degrees
  • the latitude value range is -90 to 90 degrees
  • the grid number is determined by the precision grid number and the latitude grid number.
  • the longitude grid number ranges from 0 to 179, and the latitude grid number ranges from 0 to 180.
  • G2 When G2 is not an empty set, take out and remove grid B from G2, check whether B overlaps with the target latitude and longitude range, if so, add the eight neighbor grids of grid B to G2 set, and add the grid Lattice B joins set G1.
  • the grids contained in G1 are the grids that may contain the target keyframe. Traverse the keyframes in all grids contained in G1, and output the coordinate range that meets the requirements.
  • step S604 After the update of the pose graph is performed in step S604, the updated nodes and the constraints between the nodes need to be updated. Yes; if the block id to which the node belongs changes, you need to delete the node from the old block folder first, and then add the file corresponding to the node in the new block folder.
  • step S606 a constraint relationship is established between relevant key frames that are discontinuous in time through loop closure detection.
  • the server searches for possible loops for each initialized key frame, and the search for loops can be based on bag-of-words method, feature point matching, and geographic proximity.
  • the search for loops can be based on bag-of-words method, feature point matching, and geographic proximity.
  • use point cloud or camera data use algorithms such as ICP, NDT, and feature points to estimate the relative positional relationship between the two frames, and use the relative positional relationship as a constraint to add an edge between the two nodes.
  • the initial geographic location of the node is used to calculate the id of the mapping data block where the node is located, and the id of the adjacent data block is obtained, and the loopback search is performed in the map construction data blocks with close distances.
  • the above-mentioned map update method can achieve the following technical effects: (1) Make full use of the collected data, realize high-precision and high-efficiency map construction and incremental update, and reduce equipment and labor in the process of making maps for autonomous driving. (2) Reuse historical data to improve the accuracy and consistency of map construction, reduce manual inspection and adjustment by map producers in the map construction step, reduce the configuration requirements for map carts and internal production computers, and speed up map construction. Production speed; (3) Save the pose graph and sensor information for back-end optimization, loopback detection and map update; (4) Optimize both the new pose and the pose in the old map to fully Use historical data; (5) The optimization model uses local graph optimization of variable scale to reduce the configuration requirements for internal production computers.
  • steps in the flowcharts of FIGS. 2-6 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-6 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
  • a map updating apparatus including: an acquiring module 710, an adding module 720, an identifying module 730 and an updating module 740, wherein:
  • the obtaining module 710 is configured to obtain a new key frame of the map to be updated and a historical pose graph of the map to be updated.
  • the adding module 720 is configured to add the new key frame as a new node to the historical pose graph to obtain a new pose graph.
  • the identification module 730 is configured to identify the node to be updated in the new pose graph.
  • the updating module 740 is configured to update the map area corresponding to the node to be updated in the map to be updated.
  • the above-mentioned adding module 720 is further configured to use the new key frame as a new node; perform loopback detection between the new node and the historical node in the historical pose graph to obtain the new node and historical position The constraint relationship between the historical nodes in the pose graph; according to the constraint relationship, new nodes are added to the corresponding positions in the historical pose graph to obtain a new pose graph.
  • the above-mentioned adding module 720 is further configured to perform loopback detection between the new node and the historical nodes in the historical pose graph to obtain historical nodes adjacent to the new node in time or position; The node time or position is adjacent to the historical node, and the constraint relationship between the new node and the historical node in the historical pose graph is obtained.
  • the above identification module 730 is further configured to construct a first node set, a second node set and a third node set when the number of new nodes in the new pose graph reaches a first preset number ;
  • the first node set is a set composed of new nodes
  • the second node set is a set of historical nodes that have a constraint relationship with the new node and do not belong to the first node set
  • the third node set is a set of historical nodes with the second node set.
  • the historical nodes in the node set have a constraint relationship and do not belong to the set formed by the historical nodes of the first node set and the second node set; through the pre-trained optimization model, the first node set, the second node set and the third node set are The carrier state quantity in the node set is optimized until the number of nodes in the first node set reaches the second preset number; if the number of nodes in the first node set reaches the second preset number, the first node set is The nodes in are the nodes to be updated.
  • the above updating module 740 is further configured to acquire map data corresponding to the node to be updated; determine the map area covered by the map data; and update the map area in the map to be updated.
  • the above acquisition module 710 is further configured to acquire sensor data collected by sensors installed on the carrier device on the target route of the map to be updated; according to the sensor data, determine the initial carrier state quantity of the carrier device at each moment; From the initial carrier state quantities of the carrier device at each moment, the initial carrier state quantities that meet the preset conditions are screened out as new key frames of the map to be updated.
  • the map update device of the present application further includes a sending module for acquiring the updated map; converting the updated map into a preset type of automatic driving map; sending the automatic driving map to the terminal of the automatic driving vehicle , triggering the terminal of the autonomous driving vehicle to control the driving of the corresponding autonomous driving vehicle.
  • Each module in the above-mentioned map updating apparatus may be implemented in whole or in part by software, hardware and combinations thereof.
  • the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in FIG. 8 .
  • the computer device includes a processor, memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the nonvolatile storage medium stores an operating system, a computer program, and a database.
  • the internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer device is used to store data such as historical pose graphs, new pose graphs, and the like.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program when executed by the processor, implements a map update method.
  • FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • a computer device including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
  • a computer-readable storage medium which stores a computer program, and when the computer program is executed by a processor, implements the steps in the foregoing method embodiments.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

Abstract

A map update method and apparatus, a computer device, and a storage medium. The method comprises: acquiring a new key frame of a map to be updated and a historical pose graph of the map to be updated (S201); taking the new key frame as a new node and adding same to the historical pose graph to obtain a new pose graph (S202); identifying a node to be updated in the new pose graph (S203); and, in the map to be updated, updating a map area corresponding to the node to be updated (S204). By using the method, the purpose of updating a map to be updated according to a new key frame of said map and a historical pose graph of the map to be updated is achieved, thereby avoiding the defect of the low accuracy of updated map data caused by directly matching new map data to old map data, and thus improving the accuracy of map updating.

Description

地图更新方法、装置、计算机设备和存储介质Map update method, device, computer equipment and storage medium 技术领域technical field
本申请涉及地图处理技术领域,特别是涉及一种地图更新方法、装置、计算机设备和存储介质。The present application relates to the technical field of map processing, and in particular, to a map updating method, apparatus, computer equipment and storage medium.
背景技术Background technique
地图数据是自动驾驶技术中的重要支撑元素,用于向感知、规划等模块提供驾驶场景的先验信息;为了保证地图数据的时效性,需要对地图进行不断更新。Map data is an important supporting element in autonomous driving technology, which is used to provide a priori information of driving scenarios to perception, planning and other modules; in order to ensure the timeliness of map data, the map needs to be updated continuously.
然而,目前的地图更新方法,一般是将新增的地图数据整体匹配到旧地图数据,然后进行增量式更新;但是,直接将新的地图数据整体匹配到旧地图数据上,旧地图数据的精度就会限制建图的精度,导致更新后的地图数据的准确度较低,从而造成地图更新的准确度较低。However, the current map update method generally matches the newly added map data to the old map data as a whole, and then performs incremental update; however, the new map data is directly matched to the old map data as a whole, and the old map data is The accuracy will limit the accuracy of the mapping, resulting in lower accuracy of the updated map data, resulting in lower accuracy of the map update.
发明内容SUMMARY OF THE INVENTION
基于此,有必要针对上述技术问题,提供一种能够地图更新的准确度的地图更新方法、装置、计算机设备和存储介质。Based on this, it is necessary to provide a map update method, device, computer equipment and storage medium capable of map update accuracy in response to the above technical problems.
一种地图更新方法,所述方法包括:A map update method, the method includes:
获取待更新地图的新的关键帧和所述待更新地图的历史位姿图;Obtain the new key frame of the map to be updated and the historical pose graph of the map to be updated;
将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图;adding the new key frame as a new node to the historical pose graph to obtain a new pose graph;
识别所述新的位姿图中的待更新节点;Identifying nodes to be updated in the new pose graph;
对所述待更新地图中所述待更新节点对应的地图区域进行更新。The map area corresponding to the node to be updated in the map to be updated is updated.
在其中一个实施例中,所述将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图,包括:In one embodiment, adding the new key frame as a new node to the historical pose graph to obtain a new pose graph, including:
将所述新的关键帧作为新的节点;Use the new key frame as a new node;
在所述新的节点和所述历史位姿图中的历史节点之间进行回环检测,得到所述新的节点和所述历史位姿图中的历史节点之间的约束关系;Performing loop closure detection between the new node and the historical nodes in the historical pose graph to obtain the constraint relationship between the new node and the historical nodes in the historical pose graph;
根据所述约束关系,将所述新的节点添加到所述历史位姿图中的对应位置,得到新的 位姿图。According to the constraint relationship, the new node is added to the corresponding position in the historical pose graph to obtain a new pose graph.
在其中一个实施例中,所述在所述新的节点和所述历史位姿图中的历史节点之间进行回环检测,得到所述新的节点和所述历史位姿图中的历史节点之间的约束关系,包括:In one of the embodiments, the loopback detection is performed between the new node and the historical nodes in the historical pose graph to obtain the difference between the new node and the historical nodes in the historical pose graph. constraints, including:
在所述新的节点和所述历史位姿图中的历史节点之间进行回环检测,得到与所述新的节点时间或位置相邻的历史节点;Perform loopback detection between the new node and the historical node in the historical pose graph to obtain a historical node adjacent to the new node in time or position;
根据与所述新的节点时间或位置相邻的历史节点,得到所述新的节点和所述历史位姿图中的所述历史节点之间的约束关系。The constraint relationship between the new node and the historical node in the historical pose graph is obtained according to the historical nodes adjacent to the new node in time or position.
在其中一个实施例中,所述识别所述新的位姿图中的待更新节点,包括:In one embodiment, the identifying the node to be updated in the new pose graph includes:
当所述新的位姿图中的所述新的节点的数量达到第一预设数量时,构建第一节点集合、第二节点集合和第三节点集合;所述第一节点集合为所述新的节点所构成的集合,所述第二节点集合为与所述新的节点存在约束关系,且不属于所述第一节点集合的历史节点所构成的集合,所述第三节点集合为与所述第二节点集合中的历史节点存在约束关系,且不属于所述第一节点集合和所述第二节点集合的历史节点所构成的集合;When the number of the new nodes in the new pose graph reaches a first preset number, a first node set, a second node set and a third node set are constructed; the first node set is the A set composed of new nodes, the second node set is a set composed of historical nodes that have a constraint relationship with the new node and do not belong to the first node set, and the third node set is a set of The historical nodes in the second node set have a constraint relationship, and do not belong to the set formed by the historical nodes of the first node set and the second node set;
通过预先训练的优化模型,对第一节点集合、第二节点集合和第三节点集合中的载体状态量进行优化,直到所述第一节点集合中的节点的数量达到第二预设数量;By using the pre-trained optimization model, the carrier state quantities in the first node set, the second node set and the third node set are optimized until the number of nodes in the first node set reaches a second preset number;
若所述第一节点集合中的节点的数量达到所述第二预设数量,则将所述第一节点集合中的节点作为待更新节点。If the number of nodes in the first node set reaches the second preset number, the nodes in the first node set are used as nodes to be updated.
在其中一个实施例中,所述对所述待更新地图中所述待更新节点对应的地图区域进行更新,包括:In one embodiment, the updating the map area corresponding to the node to be updated in the map to be updated includes:
获取所述待更新节点对应的地图数据;obtaining the map data corresponding to the node to be updated;
确定所述地图数据覆盖的地图区域;determining the map area covered by the map data;
对所述待更新地图中的所述地图区域进行更新。The map area in the to-be-updated map is updated.
在其中一个实施例中,所述获取待更新地图的新的关键帧,包括:In one embodiment, the acquiring a new key frame of the map to be updated includes:
获取载体设备上安装的传感器在待更新地图的目标路线上采集的传感器数据;Obtain the sensor data collected by the sensor installed on the carrier device on the target route of the map to be updated;
根据所述传感器数据,确定所述载体设备在各个时刻的初始载体状态量;According to the sensor data, determine the initial carrier state quantity of the carrier device at each moment;
从所述载体设备在各个时刻的初始载体状态量中,筛选出满足预设条件的初始载体状态量,作为所述待更新地图的新的关键帧。From the initial carrier state quantities of the carrier device at each moment, an initial carrier state quantity that satisfies a preset condition is screened out as a new key frame of the map to be updated.
在其中一个实施例中,在对所述待更新地图中所述待更新节点对应的地图区域进行更新之后,还包括:In one embodiment, after updating the map area corresponding to the node to be updated in the map to be updated, the method further includes:
获取更新后的地图;Get the updated map;
将所述更新后的地图转化为预设类型的自动驾驶地图;converting the updated map into a preset type of autopilot map;
将所述自动驾驶地图发送至自动驾驶车辆终端,触发所述自动驾驶车辆终端控制对应的自动驾驶车辆驾驶。The automatic driving map is sent to the automatic driving vehicle terminal, and the automatic driving vehicle terminal is triggered to control the driving of the corresponding automatic driving vehicle.
一种地图更新装置,所述装置包括:A map update device, the device includes:
获取模块,用于获取待更新地图的新的关键帧和所述待更新地图的历史位姿图;an acquisition module for acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated;
添加模块,用于将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图;An adding module is used to add the new key frame as a new node to the historical pose graph to obtain a new pose graph;
识别模块,用于识别所述新的位姿图中的待更新节点;an identification module for identifying the node to be updated in the new pose graph;
更新模块,用于对所述待更新地图中所述待更新节点对应的地图区域进行更新。An update module, configured to update the map area corresponding to the node to be updated in the map to be updated.
一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:A computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
获取模块,用于获取待更新地图的新的关键帧和所述待更新地图的历史位姿图;an acquisition module for acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated;
添加模块,用于将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图;An adding module is used to add the new key frame as a new node to the historical pose graph to obtain a new pose graph;
识别模块,用于识别所述新的位姿图中的待更新节点;an identification module for identifying the node to be updated in the new pose graph;
更新模块,用于对所述待更新地图中所述待更新节点对应的地图区域进行更新。An update module, configured to update the map area corresponding to the node to be updated in the map to be updated.
一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
获取模块,用于获取待更新地图的新的关键帧和所述待更新地图的历史位姿图;an acquisition module for acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated;
添加模块,用于将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图;An adding module is used to add the new key frame as a new node to the historical pose graph to obtain a new pose graph;
识别模块,用于识别所述新的位姿图中的待更新节点;an identification module for identifying the node to be updated in the new pose graph;
更新模块,用于对所述待更新地图中所述待更新节点对应的地图区域进行更新。An update module, configured to update the map area corresponding to the node to be updated in the map to be updated.
上述地图更新方法、装置、计算机设备和存储介质,通过获取待更新地图的新的关键帧和待更新地图的历史位姿图;将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图;识别新的位姿图中的待更新节点;对待更新地图中待更新节点对应的地图区域进行更新;实现了根据待更新地图的新的关键帧和待更新地图的历史位姿图,对待更新地图进行更新的目的,避免了直接将新的地图数据匹配到旧地图数据上,导致更新后的地图数据的准确度较低的缺陷,从而提高了地图更新的准确度;同时,先将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图,再识别新的位姿图中的待更新节点,进而 对待更新地图进行更新,综合考虑了新的位姿图中的待更新节点,并非直接利用新的节点对待更新地图进行更新,进一步提高了地图更新的准确度。The above-mentioned map updating method, device, computer equipment and storage medium, by acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated; adding the new key frame as a new node to the historical pose graph, Obtain a new pose graph; identify the node to be updated in the new pose graph; update the map area corresponding to the node to be updated in the to-be-updated map; realize the new key frame of the to-be-updated map and the history of the to-be-updated map Pose map, the purpose of updating the map to be updated, avoids the defect of directly matching the new map data to the old map data, resulting in the low accuracy of the updated map data, thereby improving the accuracy of the map update; At the same time, the new key frame is first added as a new node to the historical pose graph to obtain a new pose graph, and then the nodes to be updated in the new pose graph are identified, and then the to-be-updated map is updated. The nodes to be updated in the new pose graph do not directly use the new nodes to update the map to be updated, which further improves the accuracy of map update.
附图说明Description of drawings
图1为一个实施例中地图更新方法的应用环境图;Fig. 1 is the application environment diagram of the map update method in one embodiment;
图2为一个实施例中地图更新方法的流程示意图;2 is a schematic flowchart of a map update method in one embodiment;
图3为一个实施例中识别新的位姿图中的待更新节点的步骤的流程示意图;3 is a schematic flowchart of a step of identifying a node to be updated in a new pose graph in one embodiment;
图4为一个实施例中获取待更新地图的新的关键帧的步骤的流程示意图;4 is a schematic flowchart of a step of obtaining a new key frame of a map to be updated in one embodiment;
图5为另一个实施例中地图更新方法的流程示意图;5 is a schematic flowchart of a map update method in another embodiment;
图6为又一个实施例中地图更新方法的流程示意图;6 is a schematic flowchart of a map update method in yet another embodiment;
图7为一个实施例中地图更新装置的结构框图;7 is a structural block diagram of a map updating apparatus in one embodiment;
图8为一个实施例中计算机设备的内部结构图。FIG. 8 is a diagram of the internal structure of a computer device in one embodiment.
具体实施方式detailed description
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请提供的地图更新方法,可以应用于如图1所示的应用环境中。其中,传感器110通过网络与服务器120进行通信,传感器110设置在载体设备上,用于在载体设备在待更新地图的目标路线上的移动过程中,采集相应的传感器数据,并通过网络将传感器数据上传至服务器120;服务器120根据接收的传感器数据,确定待更新地图的新的关键帧,并获取待更新地图的历史位姿图;将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图;识别新的位姿图中的待更新节点;对待更新地图中待更新节点对应的地图区域进行更新,得到更新后的地图。其中,传感器可以但不限于是各种相机、GPS(Global Positioning System,全球定位系统)接收机、激光雷达、IMU(Inertial Measurement Unit,惯性测量单元)、轮速计等,服务器120可以用独立的服务器或者是多个服务器组成的服务器集群来实现。The map update method provided in this application can be applied to the application environment shown in FIG. 1 . Among them, the sensor 110 communicates with the server 120 through the network, and the sensor 110 is arranged on the carrier device to collect the corresponding sensor data during the movement of the carrier device on the target route of the map to be updated, and transfer the sensor data through the network. Upload to the server 120; the server 120 determines the new key frame of the map to be updated according to the received sensor data, and obtains the historical pose graph of the map to be updated; adds the new key frame as a new node to the historical pose graph , obtain a new pose graph; identify the node to be updated in the new pose graph; update the map area corresponding to the node to be updated in the to-be-updated map to obtain the updated map. Wherein, the sensors can be, but are not limited to, various cameras, GPS (Global Positioning System) receivers, lidars, IMUs (Inertial Measurement Unit, inertial measurement units), wheel speedometers, etc. The server 120 can use an independent It is implemented by a server or a server cluster composed of multiple servers.
在一个实施例中,如图2所示,提供了一种地图更新方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2 , a map updating method is provided, which is described by taking the method applied to the server in FIG. 1 as an example, including the following steps:
步骤S201,获取待更新地图的新的关键帧和待更新地图的历史位姿图。Step S201, acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated.
其中,待更新地图是指需要更新的地图,比如点云地图、栅格地图、语义地图等。新的关键帧是指通过新采集的传感器数据所确定的载体状态量,具体是指某一时刻下的载体状态量,可以包含位置、姿态值,也可包含其他待优化的载体状态量。关键帧之间的约束是指不同时刻的载体状态量的关系(比如传感器测量得到的关键帧之间的相对运动关系,或从回环检测得到的关键帧之间的相对位置关系,可以作为约束)。位姿图是指将关键帧作为节点,关键帧之间的约束作为边所构成的图优化模型,具体是指包含载体设备的位置和姿态等状态信息,及不同时间之间载体状态量变化关系的图模型,历史位姿图是指将历史的关键帧作为节点,历史关键帧之间的约束作为边所构成的图。The map to be updated refers to a map that needs to be updated, such as a point cloud map, a grid map, a semantic map, and the like. The new key frame refers to the carrier state quantity determined by the newly collected sensor data, and specifically refers to the carrier state quantity at a certain moment, which may include position and attitude values, and may also include other carrier state quantities to be optimized. The constraints between key frames refer to the relationship between the state quantities of the carrier at different times (such as the relative motion relationship between key frames measured by sensors, or the relative position relationship between key frames obtained from loop closure detection, which can be used as constraints) . Pose graph refers to a graph optimization model composed of key frames as nodes and constraints between key frames as edges. Specifically, it refers to the state information such as the position and attitude of the carrier device, and the change relationship of the state quantity of the carrier between different times. The historical pose graph refers to a graph composed of historical keyframes as nodes and constraints between historical keyframes as edges.
具体地,服务器接收传感器采集的新的传感器数据,根据新的传感器数据,确定关键时刻的载体状态量,作为待更新地图的新的关键帧;获取待更新地图的地图标识,比如地图编号、地图名称等,根据地图标识查询存储有多个地图标识对应的历史位姿图,得到待更新地图的地图标识对应的历史位姿图,作为待更新地图的历史位姿图。这样,通过获取待更新地图的新的关键帧和历史位姿图,有利于后续将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图。Specifically, the server receives the new sensor data collected by the sensor, and determines the carrier state quantity at the critical moment according to the new sensor data as a new key frame of the map to be updated; obtains the map identifier of the map to be updated, such as map number, map Name, etc., according to the map identification query and store the historical pose graph corresponding to multiple map identifications, obtain the historical pose graph corresponding to the map identification of the map to be updated, as the historical pose graph of the map to be updated. In this way, by acquiring new keyframes and historical pose graphs of the map to be updated, it is beneficial to subsequently add new keyframes as new nodes to the historical pose graph to obtain a new pose graph.
进一步地,服务器还可以通过下述方式获取历史位姿图:获取载体设备上安装的传感器在目标路线上采集的历史传感器数据;根据历史传感器数据,确定载体设备在各个历史时刻的初始载体状态量;从载体设备在各个历史时刻的初始载体状态量中,筛选出满足预设条件的初始载体状态量,作为历史关键帧;以历史关键帧为节点,构建历史位姿图。Further, the server can also obtain the historical pose graph in the following manner: obtain the historical sensor data collected by the sensor installed on the carrier device on the target route; according to the historical sensor data, determine the initial carrier state quantity of the carrier device at each historical moment. ; From the initial carrier state quantities of the carrier device at each historical moment, the initial carrier state quantities that meet the preset conditions are screened out as historical key frames; the historical key frames are used as nodes to construct a historical pose graph.
步骤S202,将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图。Step S202, adding the new key frame as a new node to the historical pose graph to obtain a new pose graph.
其中,新的位姿图是指在历史位姿图的基础上添加了新的关键帧所对应的节点后所构成的位姿图。The new pose graph refers to a pose graph formed by adding nodes corresponding to new key frames on the basis of the historical pose graph.
具体地,服务器将新的关键帧作为新的节点,并获取历史位姿图中的历史节点;获取预设的回环检测指令,根据预设的回环检测指令,确定新的节点与历史位姿图中的历史节点之间的约束关系;根据约束关系,将新的节点添加到历史位姿图中,得到新的位姿图。这样,通过将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图,有利于后续综合考虑新的位姿图中的节点,以确定新的位姿图中的待更新节点。Specifically, the server uses the new key frame as a new node, and obtains the historical nodes in the historical pose graph; obtains a preset loopback detection instruction, and determines the new node and the historical pose graph according to the preset loopback detection instruction The constraint relationship between the historical nodes in ; according to the constraint relationship, new nodes are added to the historical pose graph to obtain a new pose graph. In this way, by adding a new key frame as a new node to the historical pose graph, a new pose graph is obtained, which is beneficial to comprehensively consider the nodes in the new pose graph later to determine the new pose graph. Node to be updated.
步骤S203,识别新的位姿图中的待更新节点。Step S203, identifying the node to be updated in the new pose graph.
其中,待更新节点是指需要更新的节点。The node to be updated refers to a node that needs to be updated.
具体地,服务器获取新的位姿图中的节点的载体状态量,通过预先训练的优化模型,对新的位姿图中的节点的载体状态量进行优化处理,得到新的位姿图中的待优化节点,作 为新的位姿图中的待更新节点。这样,有利于后续对所述待更新地图中所述待更新节点对应的地图区域进行更新,综合考虑了新的位姿图中的待更新节点,并非直接利用新的节点对待更新地图进行更新,进一步提高了地图更新的准确度。Specifically, the server obtains the carrier state quantity of the node in the new pose graph, and optimizes the carrier state quantity of the node in the new pose graph through the pre-trained optimization model, and obtains the state quantity of the node in the new pose graph. The node to be optimized is used as the node to be updated in the new pose graph. In this way, it is beneficial to update the map area corresponding to the to-be-updated node in the to-be-updated map, comprehensively considering the to-be-updated node in the new pose graph, instead of directly using the new node to update the to-be-updated map. Further improved the accuracy of map updates.
进一步地,服务器还可以获取预设的待更新节点识别指令,根据预设的待更新节点识别指令对新的位姿图中的节点进行分析处理,得到新的位姿图中的待更新节点;其中,预设的待更新节点识别指令是一种能够自动识别位姿图中的待更新节点的指令。Further, the server may also obtain a preset identification instruction of the node to be updated, and analyze and process the nodes in the new pose graph according to the preset identification instruction of the node to be updated, so as to obtain the node to be updated in the new pose graph; Wherein, the preset identification instruction of the node to be updated is an instruction that can automatically identify the node to be updated in the pose graph.
步骤S204,对待更新地图中待更新节点对应的地图区域进行更新。Step S204, update the map area corresponding to the node to be updated in the to-be-updated map.
具体地,服务器获取待更新节点在待更新地图中所对应的节点,根据待更新节点在待更新地图中所对应的节点,确定待更新地图中的待更新的地图区域;对待更新地图中的待更新的地图区域进行更新,得到更新后的地图。这样,避免了直接将新的地图数据匹配到旧地图数据上,导致更新后的地图数据的准确度较低的缺陷,从而提高了地图更新的准确度。Specifically, the server obtains the node corresponding to the node to be updated in the map to be updated, and determines the map area to be updated in the map to be updated according to the node corresponding to the node to be updated in the map to be updated; Update the updated map area to get the updated map. In this way, the defect of directly matching the new map data to the old map data, resulting in low accuracy of the updated map data, is avoided, thereby improving the accuracy of map update.
上述地图更新方法,通过获取待更新地图的新的关键帧和待更新地图的历史位姿图;将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图;识别新的位姿图中的待更新节点;对待更新地图中待更新节点对应的地图区域进行更新;实现了根据待更新地图的新的关键帧和待更新地图的历史位姿图,对待更新地图进行更新的目的,避免了直接将新的地图数据匹配到旧地图数据上,导致更新后的地图数据的准确度较低的缺陷,从而提高了地图更新的准确度;同时,先将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图,再识别新的位姿图中的待更新节点,进而对待更新地图进行更新,综合考虑了新的位姿图中的待更新节点,并非直接利用新的节点对待更新地图进行更新,进一步提高了地图更新的准确度。The above map update method obtains a new key frame of the map to be updated and a historical pose graph of the map to be updated; adds the new key frame as a new node to the historical pose graph to obtain a new pose graph; recognizes The node to be updated in the new pose graph; the map area corresponding to the node to be updated in the map to be updated is updated; it is realized that the map to be updated is updated according to the new key frame of the map to be updated and the historical pose graph of the map to be updated. The purpose of the update is to avoid the defect of directly matching the new map data to the old map data, resulting in the low accuracy of the updated map data, thereby improving the accuracy of the map update; Add it to the historical pose graph as a new node, obtain a new pose graph, identify the nodes to be updated in the new pose graph, and then update the to-be-updated map, taking into account the to-be-updated map in the new pose graph Updating the node does not directly use the new node to update the map to be updated, which further improves the accuracy of the map update.
在一个实施例中,上述步骤S202,将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图,包括:将新的关键帧作为新的节点;在新的节点和历史位姿图中的历史节点之间进行回环检测,得到新的节点和历史位姿图中的历史节点之间的约束关系;根据约束关系,将新的节点添加到历史位姿图中的对应位置,得到新的位姿图。In one embodiment, in the above step S202, a new key frame is added to the historical pose graph as a new node to obtain a new pose graph, including: taking the new key frame as a new node; Perform loopback detection with the historical nodes in the historical pose graph to obtain the constraint relationship between the new node and the historical nodes in the historical pose graph; according to the constraint relationship, add the new node to the historical pose graph. Corresponding position, get a new pose graph.
其中,约束关系是指节点之间的位置关系,或者节点所对应时间之间的关系。The constraint relationship refers to the positional relationship between nodes, or the relationship between the times corresponding to the nodes.
具体地,服务器获取预设的回环检测指令以及历史位姿图中的历史节点;将新的关键帧作为新的节点,并通过预设的回环检测指令,在新的节点和历史位姿图中的历史节点之间进行回环检测,若检测到新的节点和历史位姿图中的历史节点之间存在约束关系,则构建新的节点和历史位姿图中的历史节点之间的约束关系;根据约束关系,确定新的节点在 历史位姿图中的对应位置;将新的节点添加到历史位姿图中的对应位置,得到新的位姿图。Specifically, the server obtains a preset loopback detection instruction and a historical node in the historical pose graph; uses the new key frame as a new node, and uses the preset loopback detection instruction to display the new node and historical pose graph in the new node and the historical pose graph. The loopback detection is performed between the historical nodes in the past, and if a constraint relationship between the new node and the historical node in the historical pose graph is detected, the constraint relationship between the new node and the historical node in the historical pose graph is constructed; According to the constraint relationship, the corresponding position of the new node in the historical pose graph is determined; the new node is added to the corresponding position in the historical pose graph to obtain a new pose graph.
举例说明,当一个新的关键帧添加到历史位姿图时,即将新的关键帧作为历史位姿图中新建立的节点时,服务器会在新建立的节点与历史位姿图中的历史节点之间进行回环检测,尝试在新加入的节点与历史位姿图中的历史节点之间建立约束关系,从而将新的节点添加到历史位姿图中的对应位置,得到新的位姿图。For example, when a new keyframe is added to the historical pose graph, that is, the new keyframe is used as a newly created node in the historical pose graph, the server will add the newly created node and the historical node in the historical pose graph Perform loopback detection between the nodes, try to establish a constraint relationship between the newly added node and the historical node in the historical pose graph, so as to add the new node to the corresponding position in the historical pose graph to obtain a new pose graph.
上述实施例,通过将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图,有利于后续综合考虑新的位姿图中的节点,以确定新的位姿图中的待更新节点。In the above embodiment, by adding a new key frame as a new node to the historical pose graph, a new pose graph is obtained, which is conducive to the subsequent comprehensive consideration of the nodes in the new pose graph to determine the new pose graph. The node to be updated in .
在一个实施例中,在新的节点和历史位姿图中的历史节点之间进行回环检测,得到新的节点和历史位姿图中的历史节点之间的约束关系,包括:在新的节点和历史位姿图中的历史节点之间进行回环检测,得到与新的节点时间或位置相邻的历史节点;根据与新的节点时间或位置相邻的历史节点,得到新的节点和历史位姿图中的历史节点之间的约束关系。In one embodiment, loop closure detection is performed between the new node and the historical node in the historical pose graph to obtain the constraint relationship between the new node and the historical node in the historical pose graph, including: in the new node Perform loopback detection with the historical nodes in the historical pose graph to obtain the historical nodes adjacent to the new node time or position; obtain the new node and historical position according to the historical nodes adjacent to the new node time or position Constraints between historical nodes in the pose graph.
举例说明,对于一个新建立的节点,它可以和其他节点构建两种类型的边,一种是相邻时刻节点之间的边,来自本地数据库提供的相邻时间的帧之间的关系;另一种是相关位置的节点之间的边,来自本地数据库提供的空间上相邻的帧之间的关系。例如,如果在时刻T1和时刻T2分别有一个关键帧,对应图中的节点V1、V2,且含有状态量state_1和state_2,当使用轮速计数据时,可以测得车辆从T1到T2时刻,基于载体坐标系frame1发生了Trans_12_wheel的移动,且这个观测值Trans_12_wheel的协方差矩阵为Cov_12_wheel,则可以根据轮速计的测量值设置对关键帧T1和T2的约束,设残差为:Residual_12_wheel=Trans_12_wheel-1·Trans01-1·Tans02。则在相邻时间的关键帧T1和T2之间建立的约束是,希望优化后的状态量Trans01和Trans02可以使Residual_12_wheelT·Cov_12_wheel·Residual_12_wheel的值尽量小。如果对于T4时刻的关键帧,作为节点V4存入图中,且模块S04通过比较关键帧T4和关键帧T1所含有的点云数据,在他们之间检测到回环,并通过ICP(Iterative Closest Point,迭代最近点)算法得到这两帧之间的坐标转换关系的观测值Trans_14_icp和此观测值的协方差矩阵为Cov_14_icp,则可以根据两个关键帧之间的空间变换观测值Trans_14_icp在V1和V4两个位置相关的节点之间建立约束,设残差为Residual_14_icp=Trans_14_icp-1·Trans01-1·Tans04。希望优化后的状态量Trans01和Trans04可以使Residual_14_icpT·Cov_14_icp·Residual_14_icp的值尽量小。For example, for a newly established node, it can construct two types of edges with other nodes, one is the edge between adjacent time nodes, and the relationship between the adjacent time frames provided by the local database; the other One is the edge between nodes at related locations, from the relationship between spatially adjacent frames provided by the local database. For example, if there is a key frame at time T1 and time T2, respectively, corresponding to nodes V1 and V2 in the graph, and containing state quantities state_1 and state_2, when the wheel speedometer data is used, the vehicle can be measured from time T1 to time T2, Based on the movement of Trans_12_wheel based on the carrier coordinate system frame1, and the covariance matrix of the observed value Trans_12_wheel is Cov_12_wheel, the constraints on the key frames T1 and T2 can be set according to the measured value of the wheel speedometer, and the residual is set as: Residual_12_wheel=Trans_12_wheel -1·Trans01-1·Tans02. The constraint established between the key frames T1 and T2 at adjacent times is that the optimized state quantities Trans01 and Trans02 are expected to make the value of Residual_12_wheelT·Cov_12_wheel·Residual_12_wheel as small as possible. If the key frame at time T4 is stored in the graph as node V4, and the module S04 compares the point cloud data contained in key frame T4 and key frame T1, a loopback is detected between them, and the loop is detected by ICP (Iterative Closest Point , iterative closest point) algorithm to obtain the observation value Trans_14_icp of the coordinate transformation relationship between the two frames and the covariance matrix of this observation value is Cov_14_icp, then the observation value Trans_14_icp can be transformed between V1 and V4 according to the space between the two key frames. A constraint is established between two position-related nodes, and the residual is set as Residual_14_icp=Trans_14_icp-1·Trans01-1·Tans04. It is hoped that the optimized state quantities Trans01 and Trans04 can make the value of Residual_14_icpT·Cov_14_icp·Residual_14_icp as small as possible.
上述实施例,通过在新的节点和历史位姿图中的历史节点之间进行回环检测,得到新的节点和历史位姿图中的历史节点之间的约束关系,有利于后续根据约束关系,将新的节 点添加到历史位姿图中的对应位置,得到新的位姿图。In the above-mentioned embodiment, by performing loopback detection between the new node and the historical node in the historical pose graph, the constraint relationship between the new node and the historical node in the historical pose graph is obtained, which is conducive to the follow-up according to the constraint relationship, Add the new node to the corresponding position in the historical pose graph to get a new pose graph.
在一个实施例中,如图3所示,上述步骤S203,识别新的位姿图中的待更新节点,具体包括如下步骤:In one embodiment, as shown in FIG. 3, the above step S203, identifying the node to be updated in the new pose graph, specifically includes the following steps:
步骤S301,当新的位姿图中的新的节点的数量达到第一预设数量时,构建第一节点集合、第二节点集合和第三节点集合。Step S301, when the number of new nodes in the new pose graph reaches a first preset number, construct a first node set, a second node set and a third node set.
其中,第一节点集合为新的节点所构成的集合,第二节点集合为与新的节点存在约束关系,且不属于第一节点集合的历史节点所构成的集合,第三节点集合为与第二节点集合中的历史节点存在约束关系,且不属于第一节点集合和第二节点集合的历史节点所构成的集合。Among them, the first node set is a set composed of new nodes, the second node set is a set composed of historical nodes that have a constraint relationship with the new node and do not belong to the first node set, and the third node set is related to the first node set. The historical nodes in the two node sets have a constraint relationship, and do not belong to the set formed by the historical nodes of the first node set and the second node set.
步骤S302,通过预先训练的优化模型,对第一节点集合、第二节点集合和第三节点集合中的载体状态量进行优化,直到第一节点集合中的节点的数量达到第二预设数量。Step S302, optimize the carrier state quantities in the first node set, the second node set and the third node set by using the pre-trained optimization model until the number of nodes in the first node set reaches a second preset number.
其中,预先训练的优化模型是指能够对位姿图中的节点进行优化的模型。The pre-trained optimization model refers to a model that can optimize the nodes in the pose graph.
具体地,服务器通过预先训练的优化模型,将第一节点集合、第二节点集合和第三节点集合内的节点之间定义的残差项作为约束条件,将第一节点集合、第二节点集合所包含的载体状态量作为待优化的载体状态量,将第三节点集合包含的载体状态量设为固定变量,进行优化得到结果;对于第二节点集合包含的节点,比较其优化前后的载体状态量的差异,如果对于第二节点集合中的某个节点的载体状态量的更新值超过对应的阈值,则将该节点从第二节点集合移动到第一节点集合中,将第三节点集合中与该节点有约束关系的目标节点移动到第二节点集合,并从新的位姿图中找到与目标节点存在约束关系且不属于第一节点集合、第二节点集合中的节点加入第三节点集合,再次执行上述过程;若第二节点集合中没有载体状态量的更新值大于对应的阈值,则结束优化,或者第一节点集合中的节点的数量达到第二预设数量,则结束优化。Specifically, through the pre-trained optimization model, the server uses the residual items defined between the nodes in the first node set, the second node set and the third node set as constraints, and uses the first node set and the second node set as constraints. The contained carrier state quantity is used as the carrier state quantity to be optimized, and the carrier state quantity contained in the third node set is set as a fixed variable, and the result is obtained by optimization; for the nodes contained in the second node set, compare the carrier state before and after optimization. If the updated value of the carrier state quantity for a node in the second node set exceeds the corresponding threshold, the node will be moved from the second node set to the first node set, and the third node set will be moved to the first node set. The target node that has a constraint relationship with the node moves to the second node set, and finds from the new pose graph that there is a constraint relationship with the target node and does not belong to the first node set, and the nodes in the second node set are added to the third node set , and perform the above process again; if no update value of the carrier state quantity in the second node set is greater than the corresponding threshold, the optimization is ended, or the number of nodes in the first node set reaches the second preset number, the optimization is ended.
步骤S303,若第一节点集合中的节点的数量达到第二预设数量,则将第一节点集合中的节点作为待更新节点。Step S303, if the number of nodes in the first node set reaches a second preset number, the nodes in the first node set are used as nodes to be updated.
其中,第二预设数量大于第一预设数量。Wherein, the second preset number is greater than the first preset number.
举例说明,服务器从新的位姿图中选取需要优化的节点,以一定频率对新的位姿图进行优化;为了实现地图构建的持续更新,会涉及大量载体状态量的优化,故通过选取部分载体状态量进行优化,具体如下:For example, the server selects the nodes that need to be optimized from the new pose graph, and optimizes the new pose graph at a certain frequency; in order to realize the continuous update of the map construction, it will involve the optimization of a large number of carrier state quantities, so by selecting some carriers The state quantity is optimized, as follows:
Step1:每当位姿图中新增K=20个节点,进入step2。Step1: Whenever K=20 nodes are added to the pose graph, go to step2.
Step2:集合G1为本轮优化需要更新的节点,初始化为这K个新增节点组成的集合。 集合G2为本轮优化中可能需要更新的节点,初始化为与这K个新增节点之间存在约束关系,但不在集合G1中的节点,集合G3为本轮优化中不需要更新的节点,初始化为与集合G2中的节点之间存在约束关系,但不存在于G1和G2中的节点。初始化之后,进入Step3。Step 2: The set G1 is the node that needs to be updated for this round of optimization, and is initialized as a set composed of these K newly added nodes. Set G2 is a node that may need to be updated in this round of optimization. It is initialized as a node that has a constraint relationship with the K newly added nodes, but is not in set G1. Set G3 is a node that does not need to be updated in this round of optimization. Initialized There is a constraint relationship with the nodes in the set G2, but not the nodes in G1 and G2. After initialization, go to Step3.
Step3:使用优化算法,将G1、G2和G3内的节点之间定义的残差项作为约束,将G1和G2含有的状态量设为待优化变量,将G3含有的状态量设为固定变量,进行优化得到结果。对于G2所含的节点,比较其优化前后状态量的差异,如果对于G2中的某个节点Vn,其状态量的更新值超过阈值d_threshold=[0.05m,0.05m,0.05m,0.1degree,0.1degree,0.1degree],则将节点Vn从集合G2移到G1,将与Vn直接有约束关系的G3中的每个节点Vn’移到G2,并从位姿图中找到与每个Vn’存在约束关系且不在G1、G2中的节点加入G3,再次执行Step3。若G2中没有状态量的更新值大于阈值,则结束优化。为了控制优化时的计算量,可以对集合G1的元素个数设置上限,比如当集合G1内的节点数量大于阈值n_max_node=10000时,则停止循环。Step3: Using the optimization algorithm, the residual term defined between the nodes in G1, G2 and G3 is used as a constraint, the state quantities contained in G1 and G2 are set as the variables to be optimized, and the state quantities contained in G3 are set as fixed variables, Optimizing to get the result. For the nodes contained in G2, compare the difference between the state quantities before and after optimization, if for a node Vn in G2, the update value of its state quantity exceeds the threshold d_threshold=[0.05m, 0.05m, 0.05m, 0.1degree, 0.1 degree, 0.1degree], then move the node Vn from the set G2 to G1, move each node Vn' in G3 that has a direct constraint relationship with Vn to G2, and find the existence of each Vn' from the pose graph The nodes that are constrained and not in G1 and G2 are added to G3, and Step3 is executed again. If no update value of the state quantity in G2 is greater than the threshold, the optimization ends. In order to control the amount of computation during optimization, an upper limit can be set on the number of elements in the set G1. For example, when the number of nodes in the set G1 is greater than the threshold n_max_node=10000, the loop is stopped.
需要说明的是,优化算法可以使用线性或非线性最小二乘,常见的有高斯牛顿法等,在实现中可以直接使用现有的优化算法库,如ceres solver,g2o等。另外,当优化问题涉及的变量不多时,可以使用传统的后端优化方法,等待所有新的关键帧加入位姿图后,对整个位姿图进行优化。比如使用ceres等优化算法库,将之前定义好的载体状态量和残差项输入优化模型,对所有载体状态量进行最优估计,得到优化后的状态量。It should be noted that the optimization algorithm can use linear or nonlinear least squares, such as Gauss-Newton's method, etc., and existing optimization algorithm libraries, such as ceres solver, g2o, etc., can be directly used in the implementation. In addition, when there are not many variables involved in the optimization problem, the traditional back-end optimization method can be used to optimize the entire pose graph after waiting for all new keyframes to be added to the pose graph. For example, using an optimization algorithm library such as ceres, the previously defined carrier state quantities and residual items are input into the optimization model, and all carrier state quantities are optimally estimated to obtain the optimized state quantities.
进一步地,随着地图的持续更新,还可能需要简化位姿图,删去过于老旧的数据,或对关键帧节点进行再次抽稀,减少需要储存和计算的数据量;比如,旧的位姿图节点与新增的位姿图节点的时间差异大于1年时,从位姿图中移除该数据。Further, with the continuous updating of the map, it may also be necessary to simplify the pose graph, delete outdated data, or thin the keyframe nodes again to reduce the amount of data that needs to be stored and calculated; When the time difference between the pose graph node and the newly added pose graph node is greater than 1 year, the data is removed from the pose graph.
上述实施例,通过识别新的位姿图中的待更新节点,有利于后续对所述待更新地图中所述待更新节点对应的地图区域进行更新,综合考虑了新的位姿图中的待更新节点,并非直接利用新的节点对待更新地图进行更新,进一步提高了地图更新的准确度。In the above embodiment, by identifying the nodes to be updated in the new pose graph, it is beneficial to update the map area corresponding to the nodes to be updated in the to-be-updated map, and comprehensively consider the to-be-updated nodes in the new pose graph. Updating the node does not directly use the new node to update the map to be updated, which further improves the accuracy of the map update.
在一个实施例中,上述步骤S204,对待更新地图中待更新节点对应的地图区域进行更新,包括:获取待更新节点对应的地图数据;确定地图数据覆盖的地图区域;对待更新地图中的地图区域进行更新。In one embodiment, in the above step S204, updating the map area corresponding to the node to be updated in the map to be updated includes: acquiring map data corresponding to the node to be updated; determining the map area covered by the map data; the map area in the map to be updated to update.
其中,地图数据有多种类型,可以是指点云数据,也可以是指由RGB三色所表示的二维彩色栅格地图,还可以是指二维的灰度图;当然,地图数据还可以其他类型的数据,具体在此不做限定。Among them, there are many types of map data, which can be point cloud data, two-dimensional color grid maps represented by RGB three colors, or two-dimensional grayscale maps; of course, map data can also be Other types of data are not specifically limited here.
具体地,服务器获取待更新节点对应的地图数据,对待更新节点对应的地图数据所覆 盖的地图区域进行统计分析,得到地图数据覆盖的地图区域;重新利用地图数据和位姿轨迹,对待更新地图中的地图区域进行更新,得到更新后的地图,作为用于自动驾驶的高精度地图。举例说明,使用优化后的位姿轨迹,内插得到每一帧点云数据的位姿,从而更新后的三维点云地图。Specifically, the server obtains the map data corresponding to the node to be updated, performs statistical analysis on the map area covered by the map data corresponding to the node to be updated, and obtains the map area covered by the map data; reuses the map data and the pose track, and performs a statistical analysis on the map area covered by the map data corresponding to the node to be updated. The updated map area is updated to obtain the updated map as a high-precision map for autonomous driving. For example, using the optimized pose trajectory, the pose of each frame of point cloud data is interpolated to obtain the updated 3D point cloud map.
上述实施例,通过对待更新地图中待更新节点对应的地图区域进行更新,避免了直接将新的地图数据匹配到旧地图数据上,导致更新后的地图数据的准确度较低的缺陷,从而提高了地图更新的准确度。The above embodiment, by updating the map area corresponding to the node to be updated in the map to be updated, avoids directly matching the new map data to the old map data, resulting in the defect that the accuracy of the updated map data is low, thereby improving the accuracy of the updated map data. accuracy of map updates.
在一个实施例中,如图4所示,上述步骤S201,获取待更新地图的新的关键帧,具体包括如下步骤:In one embodiment, as shown in FIG. 4 , the above step S201, acquiring a new key frame of the map to be updated, specifically includes the following steps:
步骤S401,获取载体设备上安装的传感器在待更新地图的目标路线上采集的传感器数据。Step S401 , acquiring sensor data collected by sensors installed on the carrier device on the target route of the map to be updated.
具体地,通过安装各类传感器(比如相机、GPS接收机、激光雷达、IMU、轮速计等)的载体设备(如汽车、无人机等),沿着待更新地图的目标路线上驾驶并采集沿路的传感器数据,并将传感器数据通过网络发送至对应的服务器;或者将采集得到的传感器数据以特定格式保存在载体设备的存储器中,再通过服务器从存储器中读取这些以特定格式保存的传感器数据。Specifically, by installing various types of sensors (such as cameras, GPS receivers, lidars, IMUs, wheel speedometers, etc.) carrier devices (such as cars, drones, etc.), drive along the target route of the map to be updated and Collect the sensor data along the road, and send the sensor data to the corresponding server through the network; or save the collected sensor data in the memory of the carrier device in a specific format, and then read the data stored in the specific format from the memory through the server. sensor data.
当然,也可以通过安装在目标路线的固定位置的传感器进行测量,并将测量得到的传感器数据通过网络发送至对应的服务器;传感器数据除了传感器本身输出的数据,还可以包含该数据的采集时间,单个传感器数据的时间轴应该保持一致。Of course, it is also possible to measure by a sensor installed at a fixed position on the target route, and send the measured sensor data to the corresponding server through the network; the sensor data can include the data collection time in addition to the data output by the sensor itself. The timeline of individual sensor data should remain consistent.
举例来说,使用汽车作为载体设备,使用安装在汽车上的激光雷达和GPS接收机作为传感器,在目标路线上进行驾驶和数据采集,驾驶过程中将传感器获取到的传感器数据通过网络实时传送到云端的服务器,采集结束后从服务器将本次采集得到的传感器数据读取出来。For example, use the car as the carrier device, use the lidar and GPS receiver installed on the car as the sensor, carry out driving and data collection on the target route, and transmit the sensor data obtained by the sensor through the network in real time during the driving process. The server in the cloud reads the sensor data collected this time from the server after the collection.
需要说明的是,通过搭配使用高精度和低精度的地图采集车,在高覆盖率的情况下,降低采集成本。It should be noted that, by using high-precision and low-precision map acquisition vehicles, the acquisition cost is reduced in the case of high coverage.
步骤S402,根据传感器数据,确定载体设备在各个时刻的初始载体状态量。Step S402, according to the sensor data, determine the initial carrier state quantity of the carrier device at each moment.
其中,载体状态量可以包含载体设备在特定时刻在特定参考坐标系(如ENU全局坐标系,或以载体初始时刻位置为原点的局部坐标系等)下的位置、姿态、速度、加速度等信息,还可以包含传感器在不同时刻下的状态信息(比如IMU零偏、车轮半径等)。本步骤中使用的里程计算法,根据实际的应用场景和传感器配置按需选取;基于相机传感器,可 以使用特征点法、直接法、光流法等视觉里程计算法;基于激光传感器,可以使用ICP、NDT等点云匹配算法计算相邻时刻的点云相对位置关系;还可以使用GPS传感器,直接使用GPS输出的传感器位置信息,通过内插得到每个时刻下载体工具的位置初始值。Among them, the carrier state quantity can include the position, attitude, speed, acceleration and other information of the carrier device at a specific time in a specific reference coordinate system (such as the ENU global coordinate system, or a local coordinate system with the initial position of the carrier as the origin, etc.), It can also contain the status information of the sensor at different times (such as IMU zero offset, wheel radius, etc.). The mileage calculation method used in this step is selected according to the actual application scene and sensor configuration as needed; based on the camera sensor, visual odometry calculation methods such as feature point method, direct method, and optical flow method can be used; based on laser sensor, ICP can be used , NDT and other point cloud matching algorithms to calculate the relative position relationship of point clouds at adjacent times; GPS sensors can also be used to directly use the sensor position information output by GPS to obtain the initial position value of the download tool at each time through interpolation.
具体地,服务器基于传感器数据,估算相邻时刻下的载体状态量的变化关系;根据相邻时刻下的载体状态量的变化关系,确定载体设备在各个时刻的初始载体状态量。Specifically, based on the sensor data, the server estimates the change relationship of the carrier state quantities at adjacent moments; and determines the initial carrier state quantities of the carrier device at each time according to the change relationship of the carrier state quantities at adjacent times.
举例说明,使用汽车作为载体设备,载体坐标系定义为以汽车四轮中心为坐标系原点的直角坐标系,xyz轴分别指向车的前、左、上方。用Ft表示t时刻时的载体坐标系。以初始时刻t=0时的载体坐标系F0作为参考坐标系。用Trans_mn=[p_mn,R_mn]表示从坐标系Fn到坐标系Fm的坐标转换关系,p_mn为坐标系Fn的坐标原点在坐标系Fm中的位置,R_mn为从坐标系Fn旋转到坐标系Fm的旋转矩阵。则载体坐标系Fn中的一点P_Fn=(x,y,z)在Fm中的坐标P_Fm=p_mn+R_mn·P_Fn。设置t时刻的载体状态值state_t为从Ft到F0的坐标转换关系,即state_t=Trans_0t,则p_0t是t时刻的汽车四轮中心在参考系F0中的坐标,R_0t表示从Ft到F0的旋转。p_00=[0,0,0],R_00=I。在t=0,1,2三个时刻,使用激光扫描仪扫描得到载体坐标系F0、F1、F2下的激光点云pcd0,pcd1,pcd2,使用ICP算法得到pcd1到pcd0的坐标转换Trans_01和pcd2到pcd1的坐标转换Trans12。则可得state_1=Trans01,state_2=Trans02=[p_02,R_02]=[p_01+R_01·p_12,R_01·R_12]。以此类推state_k=[p_0k,R_0k]=[p_01+R_01·p_12+…+R_0,k-1·p_k-1,k,R_01·R_12...·R_k-1,k]。由此完成state_0到state_k的初始化。For example, using a car as a carrier device, the carrier coordinate system is defined as a Cartesian coordinate system with the center of the four wheels of the car as the origin of the coordinate system, and the xyz axes point to the front, left, and top of the car, respectively. The carrier coordinate system at time t is denoted by Ft. The carrier coordinate system F0 at the initial time t=0 is used as the reference coordinate system. Use Trans_mn=[p_mn, R_mn] to represent the coordinate conversion relationship from the coordinate system Fn to the coordinate system Fm, p_mn is the position of the coordinate origin of the coordinate system Fn in the coordinate system Fm, and R_mn is the rotation from the coordinate system Fn to the coordinate system Fm. rotation matrix. Then the coordinates of a point P_Fn=(x, y, z) in Fm in the carrier coordinate system Fn are P_Fm=p_mn+R_mn·P_Fn. Set the carrier state value state_t at time t as the coordinate conversion relationship from Ft to F0, that is, state_t=Trans_0t, then p_0t is the coordinate of the center of the four wheels of the car in the reference frame F0 at time t, and R_0t represents the rotation from Ft to F0. p_00=[0,0,0], R_00=I. At t=0, 1, 2, the laser point clouds pcd0, pcd1, pcd2 under the carrier coordinate systems F0, F1, and F2 are obtained by scanning with a laser scanner, and the coordinate transformations Trans_01 and pcd2 from pcd1 to pcd0 are obtained by using the ICP algorithm Coordinate transformation Trans12 to pcd1. Then state_1=Trans01, state_2=Trans02=[p_02, R_02]=[p_01+R_01·p_12, R_01·R_12]. And so on state_k=[p_0k, R_0k]=[p_01+R_01·p_12+...+R_0,k-1·p_k-1,k, R_01·R_12...·R_k-1,k]. This completes the initialization of state_0 to state_k.
需要说明的是,对于相机和激光雷达数据,每得到一个数据就在该数据对应的时间建立一帧状态量,对于Imu等输入频率较高的数据,可以隔一段时间如0.01s再添加一帧状态量。It should be noted that for camera and lidar data, each time a data is obtained, a frame of state quantity is established at the time corresponding to the data. For data with high input frequency such as Imu, another frame can be added at intervals such as 0.01s. state quantity.
步骤S403,从载体设备在各个时刻的初始载体状态量中,筛选出满足预设条件的初始载体状态量,作为待更新地图的新的关键帧。Step S403: From the initial carrier state quantities of the carrier device at each moment, an initial carrier state quantity that satisfies a preset condition is screened out as a new key frame of the map to be updated.
具体地,服务器基于图优化理论,从载体设备的初始载体状态量中,选取满足预设条件的初始载体状态量,作为待更新地图的新的关键帧;此外,服务器还可以将关键帧作为图中的节点,用传感器数据构建关键帧之间的约束,作为节点之间的边;按照一定的顺序将关键帧加入历史位姿图,选取需要优化的节点进行载体状态量的优化更新,并按照一定的规则将不再需要优化的关键帧移出历史位姿图,从而得到待更新地图的新的位姿图。Specifically, based on the graph optimization theory, the server selects the initial carrier state quantity that satisfies the preset conditions from the initial carrier state quantity of the carrier device as a new key frame of the map to be updated; in addition, the server can also use the key frame as the graph The nodes in the node, use sensor data to construct constraints between key frames as edges between nodes; add key frames to the historical pose graph in a certain order, select the nodes to be optimized to optimize the update of the carrier state quantity, and follow the Certain rules move the keyframes that no longer need to be optimized out of the historical pose graph, so as to obtain a new pose graph of the map to be updated.
举例说明,为了降低优化时的计算量,在优化过程中,按照一定的规则,从所有时刻 的初始载体状态量中,选取一部分初始载体状态量作为关键帧,输入位姿图进行优化。具体的选取方法,可以使用固定的时间间隔,比如从一系列时间间隔为0.01s的初始载体状态量中,每隔0.1s选取一个关键帧;也可以设置位姿变化阈值等方法得到,比如与上一个关键帧的欧氏距离大于0.1m时就建立新关键帧;在总的初始载体状态量的数量较小时,也可以直接使用全部时刻的初始载体状态量作为关键帧。For example, in order to reduce the amount of calculation during optimization, in the optimization process, according to certain rules, from the initial carrier state quantities at all times, select a part of the initial carrier state quantities as key frames, and input the pose graph for optimization. The specific selection method can use a fixed time interval, such as selecting a key frame every 0.1s from a series of initial carrier state quantities with a time interval of 0.01s; it can also be obtained by setting the pose change threshold and other methods, such as with When the Euclidean distance of the previous key frame is greater than 0.1m, a new key frame is established; when the total initial carrier state quantity is small, the initial carrier state quantity at all times can also be directly used as the key frame.
需要说明的是,除了选取关键帧,还需要将点云数据和相机数据从非关键帧中移到关键帧中;具体方法是找到与点云帧Frame_pcd时间差异最小的关键帧Frame_key,根据他们的初始状态计从Frame_pcd转到Frame_key的空间变换关系,Trans_key_pcd=Trans_0_key-1·Trans_0_pcd;然后将点云从点云帧的载体坐标系转换到关键帧的载体坐标系,同理可以得到关键帧中的相机外参。It should be noted that, in addition to selecting key frames, it is also necessary to move point cloud data and camera data from non-key frames to key frames; the specific method is to find the key frame Frame_key with the smallest time difference from the point cloud frame Frame_pcd, according to their The initial state meter is converted from Frame_pcd to the spatial transformation relationship of Frame_key, Trans_key_pcd=Trans_0_key-1·Trans_0_pcd; then the point cloud is converted from the carrier coordinate system of the point cloud frame to the carrier coordinate system of the key frame. Similarly, the value in the key frame can be obtained. Camera external parameters.
需要说明的是,历史位姿图中的关键帧的选择方法同上述过程一致;此外,若位姿图初始情况下是空的,在得到关键帧之后,可以将关键帧作为节点添加到位姿图中,作为历史位姿图,并存储起来;下一次进行建图操作时可以载入已有的历史位姿图,在它的基础上进行更新。It should be noted that the selection method of keyframes in the historical pose graph is the same as the above process; in addition, if the pose graph is initially empty, after the keyframe is obtained, the keyframe can be added as a node to the pose graph , as the historical pose graph, and store it; the next time the mapping operation is performed, the existing historical pose graph can be loaded and updated based on it.
上述实施例,通过获取待更新地图的新的关键帧,有利于后续将新的关键帧作为新的节点添加到历史位姿图中,得到新的位姿图。In the above embodiment, by acquiring a new key frame of the map to be updated, it is beneficial to subsequently add the new key frame as a new node to the historical pose graph to obtain a new pose graph.
在一个实施例中,上述步骤S204,在对待更新地图中待更新节点对应的地图区域进行更新之后,还包括:获取更新后的地图;将更新后的地图转化为预设类型的自动驾驶地图;将自动驾驶地图发送至自动驾驶车辆终端,触发自动驾驶车辆终端控制对应的自动驾驶车辆驾驶。In one embodiment, the above step S204, after updating the map area corresponding to the node to be updated in the map to be updated, further includes: acquiring the updated map; converting the updated map into a preset type of automatic driving map; Send the autopilot map to the autopilot vehicle terminal, and trigger the autopilot vehicle terminal to control the corresponding autopilot vehicle to drive.
其中,自动驾驶地图是指可以用于自动驾驶的高精度地图,包括多种类型。Among them, automatic driving maps refer to high-precision maps that can be used for automatic driving, including various types.
具体地,服务器获取更新后的地图,根据预设的地图转化指令,将更新后的地图转化为预设类型的自动驾驶地图,比如添加上交通标志、道路标识等;将自动驾驶地图发送至对应的自动驾驶车辆终端;自动驾驶车辆终端通过终端界面显示自动驾驶地图,并控制对应的自动驾驶车辆安全驾驶,比如红灯停、绿灯行等。Specifically, the server obtains the updated map, and according to the preset map conversion instruction, converts the updated map into a preset type of automatic driving map, such as adding traffic signs, road signs, etc.; and sends the automatic driving map to the corresponding The self-driving vehicle terminal; the self-driving vehicle terminal displays the self-driving map through the terminal interface, and controls the corresponding self-driving vehicle to drive safely, such as stop at red light, go at green light, etc.
上述实施例,通过将更新后的地图转化为高精度的自动驾驶地图,并发送至自动驾驶车辆终端,有利于提高自动驾驶车辆的自动驾驶安全性。In the above embodiment, by converting the updated map into a high-precision automatic driving map and sending it to the terminal of the automatic driving vehicle, it is beneficial to improve the automatic driving safety of the automatic driving vehicle.
在一个实施例中,如图5所示,提供了另一种地图更新方法,以该方法应用于图1中的服务器为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 5 , another method for updating a map is provided, which is described by taking the method applied to the server in FIG. 1 as an example, including the following steps:
步骤S501,获取载体设备上安装的传感器在待更新地图的目标路线上采集的传感器 数据。Step S501, acquiring sensor data collected by sensors installed on the carrier device on the target route of the map to be updated.
步骤S502,根据传感器数据,确定载体设备在各个时刻的初始载体状态量。Step S502, according to the sensor data, determine the initial carrier state quantity of the carrier device at each moment.
步骤S503,从载体设备在各个时刻的初始载体状态量中,筛选出满足预设条件的初始载体状态量,作为待更新地图的新的关键帧。Step S503: From the initial carrier state quantities of the carrier device at each moment, an initial carrier state quantity that satisfies a preset condition is screened out as a new key frame of the map to be updated.
步骤S504,获取待更新地图的历史位姿图,并将新的关键帧作为新的节点。Step S504, obtaining the historical pose graph of the map to be updated, and using the new key frame as a new node.
步骤S505,在新的节点和历史位姿图中的历史节点之间进行回环检测,得到与新的节点时间或位置相邻的历史节点。In step S505, loopback detection is performed between the new node and the historical nodes in the historical pose graph to obtain historical nodes adjacent to the new node in time or position.
步骤S506,根据与新的节点时间或位置相邻的历史节点,得到新的节点和历史位姿图中的历史节点之间的约束关系。Step S506 , obtaining the constraint relationship between the new node and the historical node in the historical pose graph according to the historical node adjacent to the new node in time or position.
步骤S507,根据约束关系,将新的节点添加到历史位姿图中的对应位置,得到新的位姿图。Step S507, according to the constraint relationship, add a new node to the corresponding position in the historical pose graph to obtain a new pose graph.
步骤S508,当新的位姿图中的新的节点的数量达到第一预设数量时,构建第一节点集合、第二节点集合和第三节点集合。Step S508, when the number of new nodes in the new pose graph reaches a first preset number, construct a first node set, a second node set and a third node set.
其中,第一节点集合为新的节点所构成的集合,第二节点集合为与新的节点存在约束关系,且不属于第一节点集合的历史节点所构成的集合,第三节点集合为与第二节点集合中的历史节点存在约束关系,且不属于第一节点集合和第二节点集合的历史节点所构成的集合。Among them, the first node set is a set composed of new nodes, the second node set is a set composed of historical nodes that have a constraint relationship with the new node and do not belong to the first node set, and the third node set is related to the first node set. The historical nodes in the two node sets have a constraint relationship, and do not belong to the set formed by the historical nodes of the first node set and the second node set.
步骤S509,通过预先训练的优化模型,对第一节点集合、第二节点集合和第三节点集合中的载体状态量进行优化,直到第一节点集合中的节点的数量达到第二预设数量。Step S509, optimize the carrier state quantities in the first node set, the second node set and the third node set by using the pre-trained optimization model, until the number of nodes in the first node set reaches a second preset number.
步骤S510,若第一节点集合中的节点的数量达到第二预设数量,则将第一节点集合中的节点作为待更新节点。Step S510, if the number of nodes in the first node set reaches the second preset number, the nodes in the first node set are used as nodes to be updated.
步骤S511,获取待更新节点对应的地图数据;确定地图数据覆盖的地图区域;对待更新地图中的地图区域进行更新。Step S511: Obtain map data corresponding to the node to be updated; determine a map area covered by the map data; and update the map area in the map to be updated.
上述地图更新方法,实现了根据待更新地图的新的关键帧和待更新地图的历史位姿图,对待更新地图进行更新的目的,避免了直接将新的地图数据匹配到旧地图数据上,导致更新后的地图数据的准确度较低的缺陷,从而提高了地图更新的准确度。The above map update method realizes the purpose of updating the map to be updated according to the new key frame of the map to be updated and the historical pose graph of the map to be updated, and avoids directly matching the new map data to the old map data, resulting in The updated map data has a low accuracy defect, thereby improving the accuracy of the map update.
在一个实施例中,如图6所示,本申请还提供一种应用场景,该应用场景应用上述的地图更新方法。具体地,该地图更新方法在该应用场景的应用步骤如下:In one embodiment, as shown in FIG. 6 , the present application further provides an application scenario where the above-mentioned map update method is applied. Specifically, the application steps of the map update method in this application scenario are as follows:
步骤S601,获取载体设备上安装的传感器在待更新地图的目标路线上采集的传感器数据。Step S601, acquiring sensor data collected by sensors installed on the carrier device on the target route of the map to be updated.
步骤S602,根据传感器数据,对每个时刻的载体状态量进行初始估计。Step S602, according to the sensor data, perform an initial estimation on the state quantity of the carrier at each moment.
举例说明,服务器基于传感器数据,估算相邻时刻下的载体状态量的变化关系,对不同时刻的载体状态进行初始估计。For example, based on the sensor data, the server estimates the change relationship of the carrier state quantities at adjacent times, and performs initial estimation of the carrier states at different times.
步骤S603,选取符合预设条件的载体状态量,作为关键帧;以关键帧为节点,构建位姿图,对需要更新的位姿进行优化。Step S603 , selecting a carrier state quantity that meets the preset condition as a key frame; using the key frame as a node, a pose graph is constructed, and the pose that needs to be updated is optimized.
举例说明,服务器基于图优化理论,从载体的初始状态集合中选取关键帧,作为位姿图中的节点,用传感器数据构建关键帧之间的约束,作为节点之间的边;按照一定的顺序将关键帧加入位姿图,选取需要优化的节点进行状态量的优化更新,并按照一定的规则将不再需要优化的关键帧移出位姿图。For example, based on graph optimization theory, the server selects key frames from the initial state set of the carrier as nodes in the pose graph, and uses sensor data to construct constraints between key frames as edges between nodes; in a certain order Add keyframes to the pose graph, select the nodes that need to be optimized to optimize and update the state quantity, and move the keyframes that no longer need to be optimized out of the pose graph according to certain rules.
步骤S604,使用优化后的关键帧位姿,构建或更新地图数据。Step S604, using the optimized key frame pose to construct or update map data.
需要说明的,关于步骤S601至步骤S604的具体描述可以参照上述相关的实施例,在此不再具体赘述。It should be noted that for the specific description of steps S601 to S604, reference may be made to the above-mentioned related embodiments, and details are not repeated here.
步骤S605,使用一定格式保存建图数据到储存器,或从储存器读数据用于后端优化更新。Step S605, save the mapping data to the storage in a certain format, or read the data from the storage for back-end optimization and update.
具体地,服务器负责建图数据的保存和读取;建图数据是指地图构建和位姿图优化所需的各种数据,包括位姿图数据和相关的传感器数据,位姿图数据包括节点的状态量,边所连接的节点信息,和边所含的约束信息,传感器数据可以含有相机所拍摄的相片、激光扫描仪扫描到的点云等。Specifically, the server is responsible for saving and reading mapping data; mapping data refers to various data required for map construction and pose graph optimization, including pose graph data and related sensor data, and pose graph data includes nodes The state quantity of the edge, the node information connected to the edge, and the constraint information contained in the edge, the sensor data can include the photos taken by the camera, the point cloud scanned by the laser scanner, etc.
举例来说,对于位姿图的每个节点NodeM,使用该节点采集车辆车牌号及精确到微秒的采集时间设置节点的唯一id,以节点id为文件名。比如由车牌号“粤A12345”的车采集于2020年1月1日13点15分17.1866秒的关键帧,可以设置其id为YUE_A12345_20200101131517186600。将该节点的状态量和时间用文本形式保存在文件中。对于与NodeM相关的每个约束EdgeMN(即位姿图中的边),也以文本形式保存在该文件中。需要记录通过EdgeMN与NodeM相连的NodeN的id,该约束的类型,以及该约束含有的数据。比如NodeM和NodeN各含有一组点云数据,使用ICP算法得到两个点云之间的坐标系转换关系,得到NodeM和NodeN的载体坐标系转换关系TransMN和协方差矩阵CovIcpMN,则记录该约束的类型为ICP坐标转换,记录坐标系转换TransMN的参数p_MN和R_MN,并记录该转换关系的协方差矩阵CovIcpMN。另外需要保存NodeM和NodeN所含有的激光点云数据,各以节点id作为文件名,保存为pcd格式的点云数据。读取传感器数据时,通过数据id号加载对应名称的文件即可。读取位姿图节点时,可以通过输入节 点id获取一个节点,也可以通过指定节点坐标范围读取若干节点。按坐标范围读取节点时,读取数据库中的每个节点,计算其坐标范围是否在指定范围内来决定是否返回该节点。当地图范围较大时,可以将建图数据按照一定规则分块,以数据块id作为文件夹名,进行分块保存,加快按坐标读取节点的处理速度。分块基于数据的坐标进行,得到的各块的id与坐标相关,则可以通过输入的坐标范围确定块的id范围,只在这些块中搜索需要读取的符合坐标范围的节点。For example, for each node NodeM of the pose graph, use the node to collect the vehicle license plate number and the acquisition time accurate to microseconds to set the node's unique id, and use the node id as the file name. For example, the key frame collected by the car with the license plate number "Guangdong A12345" at 13:15:17.1866 on January 1, 2020 can be set as YUE_A12345_20200101131517186600. Save the state quantity and time of the node in the file in text form. For each constraint EdgeMN related to NodeM (i.e. edges in the pose graph) is also saved in this file as text. It is necessary to record the id of the NodeN connected to the NodeM through the EdgeMN, the type of the constraint, and the data contained in the constraint. For example, NodeM and NodeN each contain a set of point cloud data, use the ICP algorithm to obtain the coordinate system transformation relationship between the two point clouds, and obtain the carrier coordinate system transformation relationship TransMN and covariance matrix CovIcpMN of NodeM and NodeN, then record the constraint. The type is ICP coordinate transformation, and the parameters p_MN and R_MN of the coordinate system transformation TransMN are recorded, and the covariance matrix CovIcpMN of the transformation relationship is recorded. In addition, it is necessary to save the laser point cloud data contained in NodeM and NodeN, each with the node id as the file name, and save it as point cloud data in pcd format. When reading sensor data, just load the file with the corresponding name through the data id number. When reading a pose graph node, you can get a node by inputting the node id, or you can read several nodes by specifying the node coordinate range. When reading nodes by coordinate range, read each node in the database, and calculate whether its coordinate range is within the specified range to decide whether to return the node. When the range of the map is large, the mapping data can be divided into blocks according to certain rules, and the data block id can be used as the folder name to save in blocks to speed up the processing speed of reading nodes by coordinates. Blocking is carried out based on the coordinates of the data, and the id of each block obtained is related to the coordinates. The id range of the block can be determined by the input coordinate range, and only the nodes that meet the coordinate range to be read are searched in these blocks.
举例来说,按照精度2度,纬度1度为单位进行分块,按照整数经纬度划分格网,并以经纬度最小值为该格网命名。则对于经度、纬度分别为longitude,latitude的关键帧,精度取值范围为0到360度,纬度取值范围为-90到90度时,其格网号由精度格网号和纬度格网号组成,计算方法为:精度网格号grid_id_longitude=floor(longitude/2.0),纬度网格号grid_id_latitude=floor(latitude+90)。floor是向下取整函数,经度格网编号的取值范围为0到179,纬度格网号的取值范围为0到180。对于经度为36.3度,纬度为66.1度的关键帧,其格网号为(经度格网号18,纬度格网号66)。它所属格网的8邻域相邻格网有八个,经纬格网编号分别为(17,65),(17,66),(17,67),(18,65),(18,67),(19,65),(19,66),(19,67)。当搜索精度范围为35.7-36.5,纬度范围为65.8-66.8的关键帧时,首先计算经纬度范围的均值,为精度36.1,纬度66.3,此坐标对应的网格A的编号为精度18,纬度66,将网格A加入待搜索的网格集合G1,将A的八个邻居网格加入待检查的网格集合G2。当G2不为空集合时,从G2中取出并剔除网格B,检查B是否与目标经纬度范围有重叠,若有,则将网格B的八个邻居网格也加入G2集合,并将网格B加入集合G1。当G2集合清空以后,G1所含有的网格就是可能含有目标关键帧的网格。遍历G1含有的所有网格中的关键帧,将坐标范围满足要求的进行输出。For example, divide into blocks according to the precision of 2 degrees and the latitude of 1 degree, divide the grid according to the integer longitude and latitude, and name the grid with the minimum longitude and latitude. Then for a key frame whose longitude and latitude are longitude and latitude respectively, the precision value range is from 0 to 360 degrees, and when the latitude value range is -90 to 90 degrees, the grid number is determined by the precision grid number and the latitude grid number. The calculation method is: precision grid number grid_id_longitude=floor(longitude/2.0), latitude grid number grid_id_latitude=floor(latitude+90). floor is a round-down function. The longitude grid number ranges from 0 to 179, and the latitude grid number ranges from 0 to 180. For a keyframe with a longitude of 36.3 degrees and a latitude of 66.1 degrees, its grid number is (longitude grid number 18, latitude grid number 66). There are eight adjacent grids in the 8-neighborhood of the grid to which it belongs. ), (19, 65), (19, 66), (19, 67). When searching for key frames with an accuracy range of 35.7-36.5 and a latitude range of 65.8-66.8, first calculate the average of the latitude and longitude ranges, which is the accuracy of 36.1 and the latitude of 66.3. The number of grid A corresponding to this coordinate is accuracy 18, latitude 66, Grid A is added to the grid set G1 to be searched, and eight neighboring grids of A are added to the grid set G2 to be checked. When G2 is not an empty set, take out and remove grid B from G2, check whether B overlaps with the target latitude and longitude range, if so, add the eight neighbor grids of grid B to G2 set, and add the grid Lattice B joins set G1. When the G2 set is cleared, the grids contained in G1 are the grids that may contain the target keyframe. Traverse the keyframes in all grids contained in G1, and output the coordinate range that meets the requirements.
需要说明的是,在步骤S604执行完位姿图更新后,需要将被更新后的节点及节点之间的约束进行更新,若节点所属的分块没有改变,只需改变节点文件保存的内容即可;若该节点所属的块id发生变化,则需要将该节点从旧的分块文件夹中先删除,再在新分块的文件夹中添加该节点对应的文件。It should be noted that, after the update of the pose graph is performed in step S604, the updated nodes and the constraints between the nodes need to be updated. Yes; if the block id to which the node belongs changes, you need to delete the node from the old block folder first, and then add the file corresponding to the node in the new block folder.
步骤S606,通过回环检测,在时间上不连续的相关关键帧之间建立约束关系。In step S606, a constraint relationship is established between relevant key frames that are discontinuous in time through loop closure detection.
具体地,服务器为每个初始化后的关键帧搜索可能的回环,回环的搜索可以基于词袋法,特征点匹配,和地理位置的接近。找到回环后,使用点云或相机数据,使用ICP,NDT,特征点等算法对两帧的相对位置关系进行估算,并使用相对位置关系作为约束,在两个节点之间增加一条边。Specifically, the server searches for possible loops for each initialized key frame, and the search for loops can be based on bag-of-words method, feature point matching, and geographic proximity. After finding the loopback, use point cloud or camera data, use algorithms such as ICP, NDT, and feature points to estimate the relative positional relationship between the two frames, and use the relative positional relationship as a constraint to add an edge between the two nodes.
此外,若地图范围较大时,使用该节点的初始地理位置,计算该节点所在的建图数据块id,并且获得相邻的数据块id,在距离接近的地图构建数据块中进行回环搜索。In addition, if the map range is large, the initial geographic location of the node is used to calculate the id of the mapping data block where the node is located, and the id of the adjacent data block is obtained, and the loopback search is performed in the map construction data blocks with close distances.
上述地图更新方法,可以达到以下技术效果:(1)充分地利用采集到的数据,实现了高精度、高效率的地图构建和增量式更新,减少了自动驾驶地图制作过程中的设备、人工和时间成本;(2)重复利用历史数据,提高地图构建精度和一致性,减少地图生产人员再地图构建步骤中的人工检查和调整,降低对于地图车和内业生产电脑的配置要求,加快地图生产速度;(3)将位姿图和传感器信息保存下来,用于后端优化、回环检测和地图更新;(4)将新增的位姿和旧的地图中的位姿都进行优化,充分利用历史数据;(5)优化模型使用不固定规模的局部图优化,降低对于内业生产电脑的配置要求。The above-mentioned map update method can achieve the following technical effects: (1) Make full use of the collected data, realize high-precision and high-efficiency map construction and incremental update, and reduce equipment and labor in the process of making maps for autonomous driving. (2) Reuse historical data to improve the accuracy and consistency of map construction, reduce manual inspection and adjustment by map producers in the map construction step, reduce the configuration requirements for map carts and internal production computers, and speed up map construction. Production speed; (3) Save the pose graph and sensor information for back-end optimization, loopback detection and map update; (4) Optimize both the new pose and the pose in the old map to fully Use historical data; (5) The optimization model uses local graph optimization of variable scale to reduce the configuration requirements for internal production computers.
应该理解的是,虽然图2-6的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2-6中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 2-6 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 2-6 may include multiple steps or multiple stages. These steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. The execution of these steps or stages The order is also not necessarily sequential, but may be performed alternately or alternately with other steps or at least a portion of the steps or phases within the other steps.
在一个实施例中,如图7所示,提供了一种地图更新装置,包括:获取模块710、添加模块720、识别模块730和更新模块740,其中:In one embodiment, as shown in FIG. 7 , a map updating apparatus is provided, including: an acquiring module 710, an adding module 720, an identifying module 730 and an updating module 740, wherein:
获取模块710,用于获取待更新地图的新的关键帧和待更新地图的历史位姿图。The obtaining module 710 is configured to obtain a new key frame of the map to be updated and a historical pose graph of the map to be updated.
添加模块720,用于将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图。The adding module 720 is configured to add the new key frame as a new node to the historical pose graph to obtain a new pose graph.
识别模块730,用于识别所述新的位姿图中的待更新节点。The identification module 730 is configured to identify the node to be updated in the new pose graph.
更新模块740,用于对所述待更新地图中所述待更新节点对应的地图区域进行更新。The updating module 740 is configured to update the map area corresponding to the node to be updated in the map to be updated.
在一个实施例中,上述添加模块720,还用于将新的关键帧作为新的节点;在新的节点和历史位姿图中的历史节点之间进行回环检测,得到新的节点和历史位姿图中的历史节点之间的约束关系;根据约束关系,将新的节点添加到历史位姿图中的对应位置,得到新的位姿图。In one embodiment, the above-mentioned adding module 720 is further configured to use the new key frame as a new node; perform loopback detection between the new node and the historical node in the historical pose graph to obtain the new node and historical position The constraint relationship between the historical nodes in the pose graph; according to the constraint relationship, new nodes are added to the corresponding positions in the historical pose graph to obtain a new pose graph.
在一个实施例中,上述添加模块720,还用于在新的节点和历史位姿图中的历史节点之间进行回环检测,得到与新的节点时间或位置相邻的历史节点;根据与新的节点时间或位置相邻的历史节点,得到新的节点和历史位姿图中的历史节点之间的约束关系。In one embodiment, the above-mentioned adding module 720 is further configured to perform loopback detection between the new node and the historical nodes in the historical pose graph to obtain historical nodes adjacent to the new node in time or position; The node time or position is adjacent to the historical node, and the constraint relationship between the new node and the historical node in the historical pose graph is obtained.
在一个实施例中,上述识别模块730,还用于当新的位姿图中的新的节点的数量达到 第一预设数量时,构建第一节点集合、第二节点集合和第三节点集合;第一节点集合为新的节点所构成的集合,第二节点集合为与新的节点存在约束关系,且不属于第一节点集合的历史节点所构成的集合,第三节点集合为与第二节点集合中的历史节点存在约束关系,且不属于第一节点集合和第二节点集合的历史节点所构成的集合;通过预先训练的优化模型,对第一节点集合、第二节点集合和第三节点集合中的载体状态量进行优化,直到第一节点集合中的节点的数量达到第二预设数量;若第一节点集合中的节点的数量达到第二预设数量,则将第一节点集合中的节点作为待更新节点。In one embodiment, the above identification module 730 is further configured to construct a first node set, a second node set and a third node set when the number of new nodes in the new pose graph reaches a first preset number ; The first node set is a set composed of new nodes, the second node set is a set of historical nodes that have a constraint relationship with the new node and do not belong to the first node set, and the third node set is a set of historical nodes with the second node set. The historical nodes in the node set have a constraint relationship and do not belong to the set formed by the historical nodes of the first node set and the second node set; through the pre-trained optimization model, the first node set, the second node set and the third node set are The carrier state quantity in the node set is optimized until the number of nodes in the first node set reaches the second preset number; if the number of nodes in the first node set reaches the second preset number, the first node set is The nodes in are the nodes to be updated.
在一个实施例中,上述更新模块740,还用于获取待更新节点对应的地图数据;确定地图数据覆盖的地图区域;对待更新地图中的地图区域进行更新。In one embodiment, the above updating module 740 is further configured to acquire map data corresponding to the node to be updated; determine the map area covered by the map data; and update the map area in the map to be updated.
在一个实施例中,上述获取模块710,还用于获取载体设备上安装的传感器在待更新地图的目标路线上采集的传感器数据;根据传感器数据,确定载体设备在各个时刻的初始载体状态量;从载体设备在各个时刻的初始载体状态量中,筛选出满足预设条件的初始载体状态量,作为待更新地图的新的关键帧。In one embodiment, the above acquisition module 710 is further configured to acquire sensor data collected by sensors installed on the carrier device on the target route of the map to be updated; according to the sensor data, determine the initial carrier state quantity of the carrier device at each moment; From the initial carrier state quantities of the carrier device at each moment, the initial carrier state quantities that meet the preset conditions are screened out as new key frames of the map to be updated.
在一个实施例中,本申请的地图更新装置还包括发送模块,用于获取更新后的地图;将更新后的地图转化为预设类型的自动驾驶地图;将自动驾驶地图发送至自动驾驶车辆终端,触发自动驾驶车辆终端控制对应的自动驾驶车辆驾驶。In one embodiment, the map update device of the present application further includes a sending module for acquiring the updated map; converting the updated map into a preset type of automatic driving map; sending the automatic driving map to the terminal of the automatic driving vehicle , triggering the terminal of the autonomous driving vehicle to control the driving of the corresponding autonomous driving vehicle.
关于地图更新装置的具体限定可以参见上文中对于地图更新方法的限定,在此不再赘述。上述地图更新装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitation of the map updating apparatus, please refer to the limitation on the map updating method above, which will not be repeated here. Each module in the above-mentioned map updating apparatus may be implemented in whole or in part by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是服务器,其内部结构图可以如图8所示。该计算机设备包括通过系统总线连接的处理器、存储器和网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储历史位姿图、新的位姿图等数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种地图更新方法。In one embodiment, a computer device is provided, and the computer device may be a server, and its internal structure diagram may be as shown in FIG. 8 . The computer device includes a processor, memory, and a network interface connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store data such as historical pose graphs, new pose graphs, and the like. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program, when executed by the processor, implements a map update method.
本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 8 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, a computer device is also provided, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
在一个实施例中,提供了一种计算机可读存储介质,存储有计算机程序,该计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, implements the steps in the foregoing method embodiments.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those skilled in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium , when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above examples only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

  1. 一种地图更新方法,其特征在于,所述方法包括:A map update method, characterized in that the method comprises:
    获取待更新地图的新的关键帧和所述待更新地图的历史位姿图;Obtain the new key frame of the map to be updated and the historical pose graph of the map to be updated;
    将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图;adding the new key frame as a new node to the historical pose graph to obtain a new pose graph;
    识别所述新的位姿图中的待更新节点;Identifying nodes to be updated in the new pose graph;
    对所述待更新地图中所述待更新节点对应的地图区域进行更新。The map area corresponding to the node to be updated in the map to be updated is updated.
  2. 根据权利要求1所述的方法,其特征在于,所述将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图,包括:The method according to claim 1, wherein, adding the new key frame as a new node to the historical pose graph to obtain a new pose graph, comprising:
    将所述新的关键帧作为新的节点;Use the new key frame as a new node;
    在所述新的节点和所述历史位姿图中的历史节点之间进行回环检测,得到所述新的节点和所述历史位姿图中的历史节点之间的约束关系;Performing loop closure detection between the new node and the historical nodes in the historical pose graph to obtain the constraint relationship between the new node and the historical nodes in the historical pose graph;
    根据所述约束关系,将所述新的节点添加到所述历史位姿图中的对应位置,得到新的位姿图。According to the constraint relationship, the new node is added to the corresponding position in the historical pose graph to obtain a new pose graph.
  3. 根据权利要求2所述的方法,其特征在于,所述在所述新的节点和所述历史位姿图中的历史节点之间进行回环检测,得到所述新的节点和所述历史位姿图中的历史节点之间的约束关系,包括:The method according to claim 2, characterized in that, performing loop closure detection between the new node and the historical node in the historical pose graph to obtain the new node and the historical pose Constraints between historical nodes in the graph, including:
    在所述新的节点和所述历史位姿图中的历史节点之间进行回环检测,得到与所述新的节点时间或位置相邻的历史节点;Perform loopback detection between the new node and the historical node in the historical pose graph to obtain a historical node adjacent to the new node in time or position;
    根据与所述新的节点时间或位置相邻的历史节点,得到所述新的节点和所述历史位姿图中的所述历史节点之间的约束关系。The constraint relationship between the new node and the historical node in the historical pose graph is obtained according to the historical nodes adjacent to the new node in time or position.
  4. 根据权利要求1所述的方法,其特征在于,所述识别所述新的位姿图中的待更新节点,包括:The method according to claim 1, wherein the identifying the node to be updated in the new pose graph comprises:
    当所述新的位姿图中的所述新的节点的数量达到第一预设数量时,构建第一节点集合、第二节点集合和第三节点集合;所述第一节点集合为所述新的节点所构成的集合,所述第二节点集合为与所述新的节点存在约束关系,且不属于所述第一节点集合的历史节点所构成的集合,所述第三节点集合为与所述第二节点集合中的历史节点存在约束关系,且不属于所述第一节点集合和所述第二节点集合的历史节点所构成的集合;When the number of the new nodes in the new pose graph reaches a first preset number, a first node set, a second node set and a third node set are constructed; the first node set is the A set composed of new nodes, the second node set is a set composed of historical nodes that have a constraint relationship with the new node and do not belong to the first node set, and the third node set is a set of The historical nodes in the second node set have a constraint relationship, and do not belong to the set formed by the historical nodes of the first node set and the second node set;
    通过预先训练的优化模型,对第一节点集合、第二节点集合和第三节点集合中的载体状态量进行优化,直到所述第一节点集合中的节点的数量达到第二预设数量;By using the pre-trained optimization model, the carrier state quantities in the first node set, the second node set and the third node set are optimized until the number of nodes in the first node set reaches a second preset number;
    若所述第一节点集合中的节点的数量达到所述第二预设数量,则将所述第一节点集合中的节点作为待更新节点。If the number of nodes in the first node set reaches the second preset number, the nodes in the first node set are used as nodes to be updated.
  5. 根据权利要求1所述的方法,其特征在于,所述对所述待更新地图中所述待更新节点对应的地图区域进行更新,包括:The method according to claim 1, wherein the updating the map area corresponding to the node to be updated in the map to be updated comprises:
    获取所述待更新节点对应的地图数据;obtaining the map data corresponding to the node to be updated;
    确定所述地图数据覆盖的地图区域;determining the map area covered by the map data;
    对所述待更新地图中的所述地图区域进行更新。The map area in the to-be-updated map is updated.
  6. 根据权利要求1至5任一项所述的方法,其特征在于,所述获取待更新地图的新的关键帧,包括:The method according to any one of claims 1 to 5, wherein the acquiring a new key frame of the map to be updated comprises:
    获取载体设备上安装的传感器在待更新地图的目标路线上采集的传感器数据;Obtain the sensor data collected by the sensor installed on the carrier device on the target route of the map to be updated;
    根据所述传感器数据,确定所述载体设备在各个时刻的初始载体状态量;According to the sensor data, determine the initial carrier state quantity of the carrier device at each moment;
    从所述载体设备在各个时刻的初始载体状态量中,筛选出满足预设条件的初始载体状态量,作为所述待更新地图的新的关键帧。From the initial carrier state quantities of the carrier device at each moment, an initial carrier state quantity that satisfies a preset condition is screened out as a new key frame of the map to be updated.
  7. 根据权利要求6所述的方法,其特征在于,在对所述待更新地图中所述待更新节点对应的地图区域进行更新之后,还包括:The method according to claim 6, wherein after updating the map area corresponding to the node to be updated in the map to be updated, the method further comprises:
    获取更新后的地图;Get the updated map;
    将所述更新后的地图转化为预设类型的自动驾驶地图;converting the updated map into a preset type of autopilot map;
    将所述自动驾驶地图发送至自动驾驶车辆终端,触发所述自动驾驶车辆终端控制对应的自动驾驶车辆驾驶。The automatic driving map is sent to the automatic driving vehicle terminal, and the automatic driving vehicle terminal is triggered to control the driving of the corresponding automatic driving vehicle.
  8. 一种地图更新装置,其特征在于,所述装置包括:A map updating device, characterized in that the device comprises:
    获取模块,用于获取待更新地图的新的关键帧和所述待更新地图的历史位姿图;an acquisition module for acquiring a new key frame of the map to be updated and a historical pose graph of the map to be updated;
    添加模块,用于将所述新的关键帧作为新的节点添加到所述历史位姿图中,得到新的位姿图;An adding module is used to add the new key frame as a new node to the historical pose graph to obtain a new pose graph;
    识别模块,用于识别所述新的位姿图中的待更新节点;an identification module for identifying the node to be updated in the new pose graph;
    更新模块,用于对所述待更新地图中所述待更新节点对应的地图区域进行更新。An update module, configured to update the map area corresponding to the node to be updated in the map to be updated.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述的方法的步骤。A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein the processor implements the steps of the method according to any one of claims 1 to 7 when the processor executes the computer program.
  10. 一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至7中任一项所述的方法的步骤。A computer-readable storage medium on which a computer program is stored, characterized in that, when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
PCT/CN2020/103042 2020-07-20 2020-07-20 Map update method and apparatus, computer device, and storage medium WO2022016320A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202080093044.7A CN114930391A (en) 2020-07-20 2020-07-20 Map updating method, map updating device, computer equipment and storage medium
PCT/CN2020/103042 WO2022016320A1 (en) 2020-07-20 2020-07-20 Map update method and apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/103042 WO2022016320A1 (en) 2020-07-20 2020-07-20 Map update method and apparatus, computer device, and storage medium

Publications (1)

Publication Number Publication Date
WO2022016320A1 true WO2022016320A1 (en) 2022-01-27

Family

ID=79729594

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/103042 WO2022016320A1 (en) 2020-07-20 2020-07-20 Map update method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN114930391A (en)
WO (1) WO2022016320A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115406434A (en) * 2022-08-17 2022-11-29 南京领鹊科技有限公司 Navigation map autonomous updating method, device and storage medium for indoor robot
CN115984504A (en) * 2023-03-21 2023-04-18 上海仙工智能科技有限公司 Map automatic updating method and system and storage medium
CN115979248A (en) * 2023-03-17 2023-04-18 上海仙工智能科技有限公司 Map updating method and system based on positioning pose as constraint and storage medium
CN116539026A (en) * 2023-07-06 2023-08-04 杭州华橙软件技术有限公司 Map construction method, device, equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127739A (en) * 2016-06-16 2016-11-16 华东交通大学 A kind of RGB D SLAM method of combination monocular vision
US20180276885A1 (en) * 2017-03-27 2018-09-27 3Dflow Srl Method for 3D modelling based on structure from motion processing of sparse 2D images
CN108682027A (en) * 2018-05-11 2018-10-19 北京华捷艾米科技有限公司 VSLAM realization method and systems based on point, line Fusion Features
CN109887053A (en) * 2019-02-01 2019-06-14 广州小鹏汽车科技有限公司 A kind of SLAM map joining method and system
CN110570465A (en) * 2018-06-05 2019-12-13 杭州海康机器人技术有限公司 real-time positioning and map construction method and device and computer readable storage medium
CN111210475A (en) * 2020-04-21 2020-05-29 浙江欣奕华智能科技有限公司 Map updating method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106127739A (en) * 2016-06-16 2016-11-16 华东交通大学 A kind of RGB D SLAM method of combination monocular vision
US20180276885A1 (en) * 2017-03-27 2018-09-27 3Dflow Srl Method for 3D modelling based on structure from motion processing of sparse 2D images
CN108682027A (en) * 2018-05-11 2018-10-19 北京华捷艾米科技有限公司 VSLAM realization method and systems based on point, line Fusion Features
CN110570465A (en) * 2018-06-05 2019-12-13 杭州海康机器人技术有限公司 real-time positioning and map construction method and device and computer readable storage medium
CN109887053A (en) * 2019-02-01 2019-06-14 广州小鹏汽车科技有限公司 A kind of SLAM map joining method and system
CN111210475A (en) * 2020-04-21 2020-05-29 浙江欣奕华智能科技有限公司 Map updating method and device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115406434A (en) * 2022-08-17 2022-11-29 南京领鹊科技有限公司 Navigation map autonomous updating method, device and storage medium for indoor robot
CN115406434B (en) * 2022-08-17 2024-05-07 南京领鹊科技有限公司 Autonomous update method, device and storage medium for navigation map of indoor robot
CN115979248A (en) * 2023-03-17 2023-04-18 上海仙工智能科技有限公司 Map updating method and system based on positioning pose as constraint and storage medium
CN115979248B (en) * 2023-03-17 2023-08-18 上海仙工智能科技有限公司 Map updating method and system based on positioning pose as constraint and storage medium
CN115984504A (en) * 2023-03-21 2023-04-18 上海仙工智能科技有限公司 Map automatic updating method and system and storage medium
CN115984504B (en) * 2023-03-21 2023-07-04 上海仙工智能科技有限公司 Automatic map updating method and system and storage medium
CN116539026A (en) * 2023-07-06 2023-08-04 杭州华橙软件技术有限公司 Map construction method, device, equipment and storage medium
CN116539026B (en) * 2023-07-06 2023-09-29 杭州华橙软件技术有限公司 Map construction method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN114930391A (en) 2022-08-19

Similar Documents

Publication Publication Date Title
WO2022016320A1 (en) Map update method and apparatus, computer device, and storage medium
KR102235827B1 (en) Method and apparatus for generating grid maps
US11747477B2 (en) Data collecting method and system
CN111536964B (en) Robot positioning method and device, and storage medium
KR20190082071A (en) Method, apparatus, and computer readable storage medium for updating electronic map
US11898849B2 (en) Systems and methods for updating an electronic map
CN107677279A (en) It is a kind of to position the method and system for building figure
CN108280866B (en) Road point cloud data processing method and system
US20200271787A1 (en) Grid occupancy mapping using error range distribution
IL269560A (en) Distributed device mapping
CN113593017A (en) Method, device and equipment for constructing surface three-dimensional model of strip mine and storage medium
CN114485619A (en) Multi-robot positioning and navigation method and device based on air-ground cooperation
JP2020144710A (en) Self-position estimation device, self-position estimation method and program
EP4180895B1 (en) Autonomous mobile robots for coverage path planning
CN111460866B (en) Lane line detection and driving control method and device and electronic equipment
CN109238296B (en) High-precision indoor navigation method and device
WO2022099620A1 (en) Three-dimensional point cloud segmentation method and apparatus, and mobile platform
CN116576868A (en) Multi-sensor fusion accurate positioning and autonomous navigation method
CN111376249A (en) Mobile equipment positioning system, method and device and mobile equipment
CN115494533A (en) Vehicle positioning method, device, storage medium and positioning system
CN113108806A (en) Path planning method, device, equipment and medium
CN114067594B (en) Method and device for planning driving path, computer equipment and storage medium
CN116539026B (en) Map construction method, device, equipment and storage medium
US20230100699A1 (en) Systems and methods for surveying a manufacturing environment
TW201732231A (en) Navigation method, navigation system and recording medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20946384

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 14.06.2023)

122 Ep: pct application non-entry in european phase

Ref document number: 20946384

Country of ref document: EP

Kind code of ref document: A1