Vehicle pose calculation method and device, storage medium and electronic device
By acquiring and updating the vehicle's front view point cloud and positioning data in real time, combined with GPS and ICP matching optimization, the problem of insufficient positioning accuracy in the autonomous driving system is solved, and high-precision, real-time and robust vehicle positioning calculation is achieved.
Patent Information
- Application Number
- CN202510093860.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-16
AI Technical Summary
In the prior art, precise positioning in autonomous driving and robot navigation systems is difficult to achieve high accuracy in complex urban environments, and traditional methods are susceptible to interference and performance degradation.
By obtaining the current front view point cloud and positioning data of the vehicle in real time, updating the sliding window data structure, and using the sliding window data structure to calculate the vehicle position information, combining GPS data and ICP matching optimization to achieve high-precision positioning.
It realizes high-precision positioning of the vehicle, improves the real-time performance and robustness of the algorithm, and reduces the impact of single sensor failure on positioning accuracy.
Smart Images

Figure CN120014045A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of autonomous driving technology, and in particular to a method and device for calculating a vehicle posture, a storage medium, and an electronic device. Background Art
[0002] In related technologies, precise positioning is the key to achieving safe and efficient navigation in autonomous driving and robot navigation systems. Traditional methods often rely solely on GPS or visual sensors for positioning, but GPS is susceptible to interference in complex urban environments and has insufficient positioning accuracy, while pure visual positioning performance degrades in scenes where there are not enough feature points or large changes in lighting. Therefore, combining multiple sensor data for fusion positioning has become a research hotspot. The sliding window technology effectively balances the computational complexity and the integrity of data information by maintaining a fixed-size data set, but there is still room for further exploration in multi-source data fusion and optimization.
[0003] With respect to the above-mentioned problems existing in the related technologies, no efficient and accurate solutions have been found yet. Summary of the invention
[0004] The present invention provides a method and device for calculating vehicle posture, a storage medium, and an electronic device to solve technical problems in related technologies.
[0005] According to one embodiment of the present invention, a method for calculating a vehicle posture is provided, comprising: acquiring a current foresight point cloud and current positioning data of a vehicle in real time; using the current foresight point cloud and the current positioning data to update a sliding window data structure of the vehicle in a current period; and using the sliding window data structure to calculate the posture information of the vehicle in the current period.
[0006] Optionally, using the current front-view point cloud and the current positioning data to update the sliding window data structure of the vehicle in the current period includes: inserting the current front-view point cloud into the front-view point cloud time sequence in time sequence, and inserting the current positioning data into the positioning data sequence; selecting the front-view point cloud newly added in the current period in the front-view point cloud time sequence, and selecting the positioning data newly added in the current period in the positioning data sequence; arranging the front-view point cloud and the positioning data in time sequence to obtain the sliding window data structure of the vehicle in the current period.
[0007] Optionally, using the sliding window data structure to calculate the posture information of the vehicle in the current cycle includes: calculating the initial posture of the newly added foresight point cloud in the sliding window data structure; for the foresight point cloud in the sliding window data structure, calculating the matching distance between the corresponding foresight point cloud and the map point according to the initial posture; and calculating the first relative posture between each foresight point cloud and positioning data in the sliding window data structure and the second relative posture between adjacent frames; using the initial posture, the matching distance, and the first relative posture between frames and the second relative posture between frames to construct an optimization model of the sliding window data structure, and using the optimization model to update the posture information of the vehicle in the current cycle.
[0008] Optionally, it is characterized in that calculating the matching distance between the corresponding foresight point cloud and the map point according to the initial pose includes: projecting the foresight point cloud to a high-precision map according to the initial pose to obtain a first projection point; selecting two map points closest to the first projection point in the high-precision map, and generating a map segment between the two map points; determining whether a second projection point from the first projection point to the map segment is between the two map points; if the second projection point from the first projection point to the map segment is between the two map points, calculating the vertical distance between the foresight point cloud and the map segment; and determining the vertical distance as the matching distance between the foresight point cloud and the map point.
[0009] Optionally, calculating the initial pose of the newly added foresight point cloud in the sliding window data structure includes: selecting the newly added specified foresight point cloud in the sliding window data structure, and selecting the specified positioning data of the previous time of the specified foresight point cloud; and using the specified foresight point cloud and the specified positioning data to calculate the initial pose of the specified foresight point cloud.
[0010] Optionally, using the specified foresight point cloud and the specified positioning data to calculate the initial position and posture of the specified foresight point cloud includes: using the following formula to calculate the initial position and posture W of the specified foresight point cloud at time t: t :p t =p t-1 +R t-1 ·v t-1 Δt; Among them, p t-1 is the position at time t-1, p t is the position at time t, R t-1 is the rotation matrix at time t-1, R t is the rotation matrix at time t, v t-1 is the wheel speed at time t-1, is the angular velocity at time t-1, Δt is the time interval between the specified foresight point cloud and the specified positioning data, and T is the transposed sign.
[0011] Optionally, constructing an optimization model of the sliding window data structure using the initial posture, the matching distance, and the first relative posture between frames and the second relative posture between frames includes: adding each newly added foresight point cloud and each positioning data in the sliding window data structure as the first vertex and the second vertex to be optimized in the optimization model, respectively; for each first vertex, constructing a constraint edge using the initial posture, the first relative posture between frames, and the matching distance; for each second vertex, constructing a constraint edge using the GPS posture and the second relative posture between frames, to obtain the optimization model of the sliding window data structure.
[0012] According to another embodiment of the present invention, a device for calculating the posture of a vehicle is provided, comprising: an acquisition module for acquiring a current foresight point cloud and current positioning data of a vehicle in real time; an update module for updating a sliding window data structure of the vehicle in a current period using the current foresight point cloud and the current positioning data; and a calculation module for calculating the posture information of the vehicle in the current period using the sliding window data structure.
[0013] Optionally, the update module includes: an insertion unit, used to insert the current front-view point cloud into the front-view point cloud time sequence in time sequence, and to insert the current positioning data into the positioning data sequence; a selection unit, used to select the front-view point cloud newly added in the current period in the front-view point cloud time sequence, and to select the positioning data newly added in the current period in the positioning data sequence; an arrangement unit, used to arrange the front-view point cloud and the positioning data in time sequence to obtain the sliding window data structure of the vehicle in the current period.
[0014] Optionally, the calculation module includes: a first calculation unit, used to calculate the initial pose of the newly added foresight point cloud in the sliding window data structure; a second calculation unit, used to calculate the matching distance between the corresponding foresight point cloud and the map point according to the initial pose foresight point cloud in the sliding window data structure; and calculate the first relative pose between each foresight point cloud and positioning data in the sliding window data structure and the second relative pose between adjacent frames; a processing unit, used to construct an optimization model of the sliding window data structure using the initial pose, the matching distance, and the first relative pose between frames and the second relative pose between frames, and use the optimization model to update the pose information of the vehicle in the current cycle.
[0015] Optionally, the second calculation unit includes: a projection subunit, used to project the foresight point cloud to a high-precision map according to the initial posture to obtain a first projection point; a selection subunit, used to select two map points closest to the first projection point in the high-precision map, and generate a map segment between the two map points; a judgment subunit, used to judge whether the second projection point from the first projection point to the map segment is between the two map points; a calculation subunit, used to calculate the vertical distance between the foresight point cloud and the map segment if the second projection point from the first projection point to the map segment is between the two map points; and a determination subunit, used to determine the vertical distance as the matching distance between the foresight point cloud and the map point.
[0016] Optionally, the first computing unit includes: a selection subunit, used to select a newly added specified foresight point cloud in the sliding window data structure, and select specified positioning data at a previous time of the specified foresight point cloud; a computing subunit, used to calculate the initial pose of the specified foresight point cloud using the specified foresight point cloud and the specified positioning data.
[0017] Optionally, the calculation subunit is further used to calculate the initial pose W of the specified foresight point cloud at time t using the following formula: t :p t =p t-1 +R t-1 ·v t-1 Δt; Among them, p t-1 is the position at time t-1, p t is the position at time t, R t-1 is the rotation matrix at time t-1, R t is the rotation matrix at time t, v t-1 is the wheel speed at time t-1, is the angular velocity at time t-1, Δt is the time interval between the specified foresight point cloud and the specified positioning data, and T is the transposed sign.
[0018] Optionally, the processing unit includes: an adding subunit, used to add each newly added foresight point cloud and each positioning data in the sliding window data structure as the first vertex and the second vertex to be optimized in the optimization model; a construction subunit, used to construct a constraint edge for each first vertex using the initial posture, the first relative posture between frames, and the matching distance, and to construct a constraint edge for each second vertex using the GPS posture and the second relative posture between frames, so as to obtain the optimization model of the sliding window data structure.
[0019] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, and the above steps are executed when the program is run.
[0020] According to another aspect of an embodiment of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; wherein: the memory is used to store computer programs; the processor is used to execute the steps in the above method by running the program stored in the memory.
[0021] The embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps in the above method.
[0022] Beneficial effects of the present invention:
[0023] 1. High-precision positioning: By integrating the forward-view point cloud and GPS data and combining ICP matching optimization, high-precision positioning of the vehicle is achieved.
[0024] 2. Strong real-time performance: Sliding window technology effectively limits the amount of data processing and ensures the real-time performance of the algorithm.
[0025] 3. High robustness: Multi-source data fusion improves the adaptability and stability of the system in different environments and reduces the impact of single sensor failure on positioning accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 is a hardware structure block diagram of a car according to an embodiment of the present invention;
[0028] Figure 2 is a flow chart of a method for calculating vehicle posture according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of a sliding window data structure in an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of I CP point cloud matching in an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of the G2O structure in an embodiment of the present invention;
[0032] Figure 6 It is a schematic diagram of the overall process in an embodiment of the present invention;
[0033] Figure 7 It is a structural block diagram of a vehicle posture calculation device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0034] In order to enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only embodiments of a part of the present application, not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work should fall within the scope of protection of the present application. It should be noted that the embodiments in the present application and the features in the embodiments can be combined with each other without conflict.
[0035] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0036] Example 1
[0037] The method embodiment provided in the first embodiment of the present application can be executed in a car, a server, a processor, an automatic driving / assisted driving / intelligent driving controller or a similar processing device. Taking running on a car as an example, Figure 1 1 is a hardware structure diagram of a car according to an embodiment of the present invention. Figure 1 As shown, a car may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data. Optionally, the above-mentioned automobile may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the above-mentioned automobile. Figure 1 More or fewer components as shown, or with Figure 1Different configurations are shown.
[0038] The memory 104 can be used to store automobile programs, for example, software programs and modules of application software, such as an automobile program corresponding to a method for calculating the vehicle posture of an automobile in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the automobile program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the automobile via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0039] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the car. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0040] In this embodiment, a method for calculating vehicle posture is provided. Figure 2 is a flow chart of a method for calculating vehicle posture according to an embodiment of the present invention, such as Figure 2 As shown, the process includes the following steps:
[0041] Step S202, obtaining the current foresight point cloud and current positioning data of the vehicle in real time;
[0042] The forward-looking point cloud (forward-looking frame) of this embodiment is the point cloud data collected by the forward-looking radar of the vehicle, and the positioning data (such as GPS data, indoor positioning data) is the positioning data collected by the vehicle or the positioning software connected to the vehicle, and the positioning data includes position data and posture data.
[0043] In addition to the forward-looking point cloud, it is easy to introduce other sensor data (such as inertial measurement unit, lidar, etc.) or point cloud data in other directions to further improve the positioning performance.
[0044] Step S204, using the current foresight point cloud and the current positioning data to update the sliding window data structure of the vehicle in the current cycle;
[0045] Step S206, using the sliding window data structure to calculate the position information of the vehicle in the current cycle.
[0046] Through the above steps, the current foresight point cloud and current positioning data of the vehicle are obtained in real time, the current foresight point cloud and the current positioning data are used to update the sliding window data structure of the vehicle in the current period, the sliding window data structure is used to calculate the posture information of the vehicle in the current period, and the foresight point cloud and positioning data are used to accurately estimate the vehicle position and posture, thereby improving the positioning accuracy of the vehicle and solving the technical problem of inaccurate posture information of the vehicle in related technologies.
[0047] In one implementation of the present embodiment, using the current front-view point cloud and the current positioning data to update the sliding window data structure of the vehicle in the current period includes: inserting the current front-view point cloud into the front-view point cloud time sequence in time sequence, and inserting the current positioning data into the positioning data sequence; selecting the front-view point cloud newly added in the current period in the front-view point cloud time sequence, and selecting the positioning data newly added in the current period in the positioning data sequence; arranging the front-view point cloud and the positioning data in time sequence to obtain the sliding window data structure of the vehicle in the current period.
[0048] In this embodiment, a fixed-size sliding window is initialized to store observations arranged in time sequence: forward-looking frames (including point cloud data) and positioning data (including position and posture information). Whenever new forward-looking frames and positioning data are acquired, they are added to the sliding window and the oldest frame is removed to keep the sliding window size constant. Figure 3 It is a schematic diagram of the sliding window data structure in an embodiment of the present invention. All real-time GPS observations and foresight point cloud observations are arranged in chronological order, and observations of a fixed number of frames are selected as data in the sliding window. As the observations are updated, the sliding window moves along the time axis.
[0049] In this embodiment, using the sliding window data structure to calculate the posture information of the vehicle in the current cycle includes: calculating the initial posture of the newly added foresight point cloud in the sliding window data structure; for the foresight point cloud in the sliding window data structure, calculating the matching distance between the corresponding foresight point cloud and the map point according to the initial posture; and calculating the first relative posture between each foresight point cloud and positioning data in the sliding window data structure and the second relative posture between adjacent frames; using the initial posture, the matching distance, and the first relative posture between frames and the second relative posture between frames to construct an optimization model of the sliding window data structure, and using the optimization model to update the posture information of the vehicle in the current cycle.
[0050] In one example, calculating the initial pose of the newly added foresight point cloud in the sliding window data structure includes: selecting the newly added specified foresight point cloud in the sliding window data structure, and selecting the specified positioning data of the previous time of the specified foresight point cloud; and using the specified foresight point cloud and the specified positioning data to calculate the initial pose of the specified foresight point cloud.
[0051] The point cloud frames and positioning data in the sliding window are arranged in time sequence. When a new frame of forward-view point cloud is acquired, DR (dead reckoning) is performed using the GPS pose of the closest frame to provide an initial pose for each frame of forward-view point cloud. At the same time, the relative displacement and pose change between frames can be obtained by interpolating between continuous GPS poses.
[0052] Optionally, using the specified foresight point cloud and the specified positioning data to calculate the initial position and posture of the specified foresight point cloud includes: using the following formula to calculate the initial position and posture W of the specified foresight point cloud at time t: t :p t =p t-1 +R t-1 ·v t-1 Δt; Among them, p t-1 is the position at time t-1, p t is the position at time t, R t-1 is the rotation matrix at time t-1, R t is the rotation matrix at time t, v t-1 is the wheel speed at time t-1, is the angular velocity at time t-1, Δt is the time interval between the specified foresight point cloud and the specified positioning data, and T is the transposed sign. t-1 and R t-1 It is obtained by parsing the positioning data collected at time t-1 (i.e., the specified positioning data), v t-1 , Read from the vehicle controller.
[0053] The positioning data is dead-reckoned starting from time t-1, and the translation change and rotation change between frames are calculated using the wheel speed and angular velocity at time t-1, and the position W of the forward-looking frame at time t is calculated. t .
[0054] In one example, calculating the matching distance between the corresponding foresight point cloud and the map point according to the initial pose includes: projecting the foresight point cloud to a high-precision map according to the initial pose to obtain a first projection point; selecting two map points closest to the first projection point in the high-precision map, and generating a map segment between the two map points; determining whether a second projection point from the first projection point to the map segment is between the two map points; if the second projection point from the first projection point to the map segment is between the two map points, calculating the vertical distance between the foresight point cloud and the map segment; and determining the vertical distance as the matching distance between the foresight point cloud and the map point.
[0055] For each frame of the foresight point cloud p in the sliding window, according to the initial pose obtained by the dead reckoning algorithm (DR), it is projected onto the high-precision map, i.e., p'. Two map points closest to point p' are selected in the map point cloud. Assume that the straight line through these two points is l. Determine whether the projection of point p' on l is between these two points. If so, calculate the vertical distance d1 from the foresight point p' to l as the matching distance between the point and the corresponding point on the map. For each frame of the foresight point cloud in the sliding window, after obtaining the initial pose of the point cloud through DR, the ICP (Iterative Closest Point) algorithm is used to match it with the pre-loaded map point cloud. By minimizing the distance error between the point clouds, a more accurate position and attitude adjustment is obtained. The ICP matching result is used as a strong constraint to correct the error of the DR initial position estimate.
[0056] Figure 4 : is a schematic diagram of ICP point cloud matching in an embodiment of the present invention. Two map points closest to the foresight point p are selected in the map point cloud. Assume that the straight line passing through the two points is l. It is determined whether the projection of point p on l is between the two points. If so, it is considered that point p is successfully matched with l, and the matching error is the distance d1 from the point to the straight line.
[0057] In one example, constructing an optimization model of the sliding window data structure using the initial pose, the matching distance, and the first relative pose between frames and the second relative pose between frames includes: adding each newly added foresight point cloud and each positioning data in the sliding window data structure as the first vertex and the second vertex to be optimized in the optimization model, respectively; for each first vertex, constructing a constraint edge using the initial pose, the first relative pose between frames, and the matching distance; for each second vertex, constructing a constraint edge using the GPS pose and the second relative pose between frames, to obtain the optimization model of the sliding window data structure.
[0058] Optionally, the optimization model is a G2O (Graph Optimization) model. Figure 5It is a schematic diagram of the G2O structure in an embodiment of the present invention. The vertices of the G2O optimizer are the poses of all observations (including positioning data and foresight point cloud) in the sliding window. Among them, the constraint edges of the foresight frame include three types: DR pose constraint, ICP point cloud matching constraint, and relative DR pose constraint of the previous and next frames. The constraint edges of the positioning data include two types: GPS pose constraint and relative DR constraint of the previous and next frames.
[0059] The observed pose of each frame in the sliding window is added as the vertex to be optimized, including two types of foresight point cloud and positioning data.
[0060] Each forward-looking frame vertex contains the following three constraint edges: (1) DR pose constraint. The initial pose of each vertex is added to the current vertex as a GPS pose constraint. (2) Inter-frame relative pose constraint. For the observation frame at time t, the relative pose change between time t and time t-1, and the relative pose change between time t and time t+1 are obtained by track calculation. (3) ICP matching constraint. For each forward-looking frame in the sliding window, the map matching of each point cloud is obtained. The matching distance of each point cloud is added as a constraint edge to the vertex corresponding to the current forward-looking frame.
[0061] Each positioning data contains the following two types of constraint edges: (1) GPS pose constraint, which adds the GPS pose of each vertex to the current vertex as a GPS pose constraint. (2) Inter-frame relative pose constraint, which is the same as the forward-looking frame.
[0062] Combining the direct pose constraints provided by GPS, the relative pose constraints of DR, and the constraints obtained by ICP matching, a nonlinear optimizer is constructed. Using the G2O theory, the position and pose of all frames in the sliding window are jointly optimized to minimize the overall error and obtain the optimized pose information.
[0063] Update the position and posture information of each frame in the optimized sliding window. For the forward-looking frame, if the change in posture before and after optimization is within the threshold range and the point cloud matching effect is good, save the point cloud matching result. The matching calculated by the current sliding window is used in the next sliding window of the forward-looking frame to improve the efficiency of the algorithm and maintain the stability of long-term positioning.
[0064] Figure 6 It is a schematic diagram of the overall process in an embodiment of the present invention. First, a sliding window is constructed according to a period to determine whether the newly added frame is a forward-looking frame. If so, ICP search and match are performed and G2O is constructed. If it is positioning data, G2O is directly constructed, and the poses of all observations in the sliding window are updated based on the results of G2O.
[0065] The algorithm first defines a sliding window containing multiple timestamp data, including point cloud frames from the forward-looking sensor and positioning data, to ensure computational efficiency while making full use of historical data to improve positioning accuracy. As new data is added, the algorithm updates the sliding window content according to the set strategy, removes old data, and maintains the timeliness and relevance of the data in the sliding window. At the same time, the latest sliding window data is used to continuously optimize the vehicle's current position and attitude estimation to ensure the continuity and stability of the positioning results.
[0066] The point cloud frames and positioning data in the sliding window are arranged in time sequence. When a new frame of forward-view point cloud is acquired, the GPS pose of the closest frame is used for DR to provide an initial pose for each frame of forward-view point cloud. At the same time, the relative displacement and pose change between frames can be obtained by interpolating between continuous GPS poses.
[0067] For each frame of the forward point cloud in the sliding window, after obtaining the initial pose of the point cloud through DR, the ICP algorithm is used to match it with the pre-loaded map point cloud, and a more accurate position and pose adjustment is obtained by minimizing the distance error between the point clouds. The ICP matching result is used as a strong constraint to correct the error of the DR initial position estimate.
[0068] The graph optimization algorithm is used to continuously optimize and update the pose of all observation frames in the sliding window. Each observation in the sliding window is a vertex to be optimized, and each vertex contains the following three constraints: GPS dead reckoning constraint (initial pose constraint), mutual pose transformation constraint between previous and next frames, and ICP matching result constraint.
[0069] After the map is optimized, the position and posture information of each frame in the sliding window is updated. For the front view frame, the well-matched front view and map point cloud matching is retained, and in the next sliding window, the frame still uses the current matching. While reducing the algorithm calculation amount, the stability of the output result can also be maintained.
[0070] The solution of this embodiment solves the contradiction between the insufficient positioning accuracy and real-time requirements of autonomous driving vehicles and mobile robots in complex environments, and proposes a positioning sliding window algorithm based on the fusion of forward-looking point cloud and GPS pose. The algorithm cleverly integrates multiple sensor data, especially forward-looking point cloud data and the absolute position provided by GPS, and optimizes the pose graph by constructing and maintaining a real-time updated sliding window structure, combining DR and I CP matching technology, and direct pose constraints provided by GPS, thereby achieving continuous, high-precision and robust estimation of vehicle position and pose.
[0071] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0072] Example 2
[0073] In this embodiment, a vehicle posture calculation device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0074] Figure 7 is a structural block diagram of a vehicle posture calculation device according to an embodiment of the present invention, such as Figure 7 As shown, the device comprises:
[0075] An acquisition module 70 is used to acquire the current foresight point cloud and current positioning data of the vehicle in real time;
[0076] An updating module 72, configured to update a sliding window data structure of the vehicle in a current cycle using the current foresight point cloud and the current positioning data;
[0077] The calculation module 74 is used to calculate the position information of the vehicle in the current cycle using the sliding window data structure.
[0078] Optionally, the update module includes: an insertion unit, used to insert the current front-view point cloud into the front-view point cloud time sequence in time sequence, and to insert the current positioning data into the positioning data sequence; a selection unit, used to select the front-view point cloud newly added in the current period in the front-view point cloud time sequence, and to select the positioning data newly added in the current period in the positioning data sequence; an arrangement unit, used to arrange the front-view point cloud and the positioning data in time sequence to obtain the sliding window data structure of the vehicle in the current period.
[0079] Optionally, the calculation module includes: a first calculation unit, used to calculate the initial pose of the newly added foresight point cloud in the sliding window data structure; a second calculation unit, used to calculate the matching distance between the corresponding foresight point cloud and the map point according to the initial pose foresight point cloud in the sliding window data structure; and calculate the first relative pose between each foresight point cloud and positioning data in the sliding window data structure and the second relative pose between adjacent frames; a processing unit, used to construct an optimization model of the sliding window data structure using the initial pose, the matching distance, and the first relative pose between frames and the second relative pose between frames, and use the optimization model to update the pose information of the vehicle in the current cycle.
[0080] Optionally, the second calculation unit includes: a projection subunit, used to project the foresight point cloud to a high-precision map according to the initial posture to obtain a first projection point; a selection subunit, used to select two map points closest to the first projection point in the high-precision map, and generate a map segment between the two map points; a judgment subunit, used to judge whether the second projection point from the first projection point to the map segment is between the two map points; a calculation subunit, used to calculate the vertical distance between the foresight point cloud and the map segment if the second projection point from the first projection point to the map segment is between the two map points; and a determination subunit, used to determine the vertical distance as the matching distance between the foresight point cloud and the map point.
[0081] Optionally, the first computing unit includes: a selection subunit, used to select a newly added specified foresight point cloud in the sliding window data structure, and select specified positioning data at a previous time of the specified foresight point cloud; a computing subunit, used to calculate the initial pose of the specified foresight point cloud using the specified foresight point cloud and the specified positioning data.
[0082] Optionally, the calculation subunit is further used to calculate the initial pose W of the specified foresight point cloud at time t using the following formula: t :p t =p t-1 +R t-1 ·v t-1 Δt; Among them, p t-1 is the position at time t-1, p t is the position at time t, R t-1 is the rotation matrix at time t-1, R t is the rotation matrix at time t, v t-1 is the wheel speed at time t-1, is the angular velocity at time t-1, Δt is the time interval between the specified foresight point cloud and the specified positioning data, and T is the transposed sign.
[0083] Optionally, the processing unit includes: an adding subunit, used to add each newly added foresight point cloud and each positioning data in the sliding window data structure as the first vertex and the second vertex to be optimized in the optimization model; a construction subunit, used to construct a constraint edge for each first vertex using the initial posture, the first relative posture between frames, and the matching distance, and to construct a constraint edge for each second vertex using the GPS posture and the second relative posture between frames, so as to obtain the optimization model of the sliding window data structure.
[0084] It should be noted that the above modules can be implemented by software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0085] Example 3
[0086] An embodiment of the present invention further provides a storage medium, in which a computer program is stored, wherein the computer program is configured to execute the steps of any of the above method embodiments when running.
[0087] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0088] S1, real-time acquisition of the vehicle’s current foresight point cloud and current positioning data;
[0089] S2, using the current foresight point cloud and the current positioning data to update the sliding window data structure of the vehicle in the current cycle;
[0090] S3, using the sliding window data structure to calculate the position information of the vehicle in the current cycle.
[0091] Optionally, in this embodiment, the above-mentioned storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0092] An embodiment of the present invention further provides an electronic device, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.
[0093] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0094] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0095] S1, real-time acquisition of the vehicle’s current foresight point cloud and current positioning data;
[0096] S2, using the current foresight point cloud and the current positioning data to update the sliding window data structure of the vehicle in the current cycle;
[0097] S3, using the sliding window data structure to calculate the position information of the vehicle in the current cycle.
[0098] Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation modes, and this embodiment will not be described in detail here.
[0099] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0100] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0101] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.
[0102] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A method for calculating vehicle posture, characterized in that: include: Obtain the current foresight point cloud and current positioning data of the vehicle in real time; Using the current foresight point cloud and the current positioning data to update the sliding window data structure of the vehicle in the current cycle; The sliding window data structure is used to calculate the position and posture information of the vehicle in the current cycle.
2. The method according to claim 1, characterized in that Updating the sliding window data structure of the vehicle in the current cycle using the current foresight point cloud and the current positioning data includes: Inserting the current foresight point cloud into the foresight point cloud sequence according to the time sequence, and inserting the current positioning data into the positioning data sequence; Selecting the foresight point cloud newly added in the current period in the foresight point cloud time sequence, and selecting the positioning data newly added in the current period in the positioning data sequence; The foresight point cloud and the positioning data are arranged in time sequence to obtain a sliding window data structure of the vehicle in the current cycle.
3. The method according to claim 1, characterized in that Calculating the position information of the vehicle in the current cycle using the sliding window data structure includes: Calculating the initial pose of the newly added foresight point cloud in the sliding window data structure; For the foresight point cloud in the sliding window data structure, calculating the matching distance between the corresponding foresight point cloud and the map point according to the initial pose; and calculating the relative pose between the first frame and the second frame of each foresight point cloud and positioning data in the sliding window data structure and adjacent frames respectively; The initial posture, the matching distance, the first relative posture between frames, and the second relative posture between frames are used to construct an optimization model of the sliding window data structure, and the optimization model is used to update the posture information of the vehicle in the current cycle.
4. The method according to claim 3, characterized in that Calculating the matching distance between the corresponding foresight point cloud and the map point according to the initial pose includes: Projecting the foresight point cloud onto the high-precision map according to the initial posture to obtain a first projection point; Selecting two map points closest to the first projection point in the high-precision map, and generating a map line segment between the two map points; Determine whether a second projection point of the first projection point to the map line segment is between the two map points; If the second projection point of the first projection point to the map line segment is between the two map points, calculating the vertical distance between the foresight point cloud and the map line segment; The vertical distance is determined as the matching distance between the foresight point cloud and the map point.
5. The method according to claim 3, characterized in that: Calculating the initial pose of the newly added foresight point cloud in the sliding window data structure includes: Selecting a newly added designated foresight point cloud in the sliding window data structure, and selecting designated positioning data at a previous time of the designated foresight point cloud; The specified foresight point cloud and the specified positioning data are used to calculate an initial pose of the specified foresight point cloud.
6. The method according to claim 5, characterized in that Calculating the initial pose of the specified foresight point cloud using the specified foresight point cloud and the specified positioning data includes: The following formula is used to calculate the initial pose W of the specified foresight point cloud at time t: t : p t =p t-1 +R t-1 ·v t-1 ·Δt; Among them, p t-1 is the position at time t-1, p t is the position at time t, R t-1 is the rotation matrix at time t-1, R t is the rotation matrix at time t, v t-1 is the wheel speed at time t-1, is the angular velocity at time t-1, Δt is the time interval between the specified foresight point cloud and the specified positioning data, and T is the transposed sign.
7. The method according to claim 3, characterized in that The optimization model of constructing the sliding window data structure by using the initial posture, the matching distance, the first relative posture between frames, and the second relative posture between frames includes: Add each newly added foresight point cloud and each positioning data in the sliding window data structure as the first vertex and the second vertex to be optimized in the optimization model respectively; For each first vertex, the initial posture, the first relative posture between frames, and the matching distance are used to construct a constraint edge. For each second vertex, the GPS posture and the second relative posture between frames are used to construct a constraint edge to obtain an optimized model of the sliding window data structure.
8. A device for calculating vehicle posture, characterized in that: include: The acquisition module is used to obtain the current foresight point cloud and current positioning data of the vehicle in real time; An updating module, configured to update a sliding window data structure of the vehicle in a current cycle using the current foresight point cloud and the current positioning data; A calculation module is used to calculate the position information of the vehicle in the current cycle using the sliding window data structure.
9. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 7 when executed.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 7.