SQLite database-based positioning information issuing method and device
By using the SQLite database to dynamically load map information of key frames and motion compensation technology in the robot system, the problem of response speed and memory efficiency caused by the large amount of point cloud data is solved, the positioning accuracy and system stability are improved, and it is suitable for complex environments and Application scenarios.
Patent Information
- Application Number
- CN202410595378.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-08-23
AI Technical Summary
In the existing technology, due to the large amount of point cloud data in robot positioning, the system response speed and memory usage efficiency are not high. Especially in resource-constrained embedded systems, loading the entire point cloud atlas prolongs the processing time and increases memory consumption, which affects System performance.
Using a positioning information publishing method based on SQLite database, by dynamically loading map information of surrounding key frames, using inertial measurement data and wheel speedometer data for motion compensation, calculating the movement vector of the robot relative to the initial position, and publishing positioning information when the system starts , reduce memory usage and loading time, improve response speed and memory usage efficiency.
It improves system response speed and memory usage efficiency, enhances positioning accuracy, system stability, timeliness and user experience, and improves positioning robustness and applicability through multi-source positioning data such as RTK and WIFI positioning, which is suitable for complex applications. environment and application scenarios.
Smart Images

Figure CN118535664A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot positioning technology, and in particular to a positioning information publishing method and device based on an SQLite database. Background Art
[0002] With the development of technology, point cloud data poses a challenge to the positioning accuracy and efficiency of robot systems due to its huge data volume. At present, data management is mainly optimized through post-processing technology. The specific approach is to divide the point cloud map into several geometric shapes, and the complete point cloud data set can be loaded from the database at one time. However, in order to ensure smooth connection between different parts of the map, it is usually necessary to create overlapping areas between geometric shapes. Although this approach helps data continuity, it also increases invalid storage space. Especially in resource-constrained embedded systems, space utilization efficiency becomes particularly important.
[0003] Especially in the robot's SLAM process, loading the entire point cloud map set at one time will significantly reduce the loading speed, because the amount of data that needs to be processed in the point cloud matching process is extremely large, which not only prolongs the processing time, but also puts higher requirements on the performance of the algorithm. In addition, when it is necessary to switch between different maps, the inconvenience of this method is particularly obvious, because the system has to spend a lot of time loading new point cloud maps, and this process consumes a lot of memory resources, affecting the system response speed and memory usage efficiency.
[0004] Therefore, in order to improve the response speed and memory usage efficiency of the system and solve the above-mentioned technical problems, a positioning information publishing method and device based on SQLite database are urgently needed. Summary of the invention
[0005] The present application provides a method and device for publishing positioning information based on a SQLite database, which solves the problems of low system response speed and low memory usage efficiency in related technologies by optimizing the processing and publishing process of point cloud data.
[0006] To achieve the above objectives, this application is implemented through the following technical solutions:
[0007] The present application provides a method for publishing positioning information based on a SQLite database, which is applied to a robot system. The robot system includes a robot, a decision module, a data acquisition device, and a SQLite database. The positioning information publishing method includes:
[0008] When the robot system is started, decision task information is obtained from the decision module, and map information of surrounding key frames is dynamically loaded from the SQLite database according to the decision task information; the map information includes map data, posture data, point cloud data and fused positioning data;
[0009] Using the data acquisition device to acquire the surrounding environment data of the robot in real time, and obtaining the motion increment information of the robot by integrating the inertial measurement data and wheel speed meter data in the surrounding environment data;
[0010] Performing motion compensation for the robot using the motion increment information to obtain compensated point cloud data, and acquiring a movement vector of the robot relative to an initial position based on the compensated point cloud data;
[0011] When the position initialization of the robot is completed, the current position of the robot is obtained according to the movement vector, the positioning coordinates of the current position of the robot are expressed in standardized coordinates, and the positioning information is obtained and published to the decision module.
[0012] The beneficial effects of this technical solution are as follows: by dynamically loading map information according to task requirements (the loading area becomes smaller), the problems of memory usage and long loading time caused by switching maps or loading the entire map information set at one time when the system starts are avoided, the system's response speed and memory usage efficiency are improved, the system's timeliness is improved, and the user experience is good; the robot's positioning accuracy is improved through motion compensation and precise motion vector calculation; the use of the SQLite database for storage and retrieval of map information optimizes data management, improves data access speed and system stability; by dynamically loading map data of surrounding key frames from the SQLite database instead of directly loading from folders or files, this database storage method can provide more efficient data management and access methods, and help improve system stability; standardized coordinate representation enables the robot system to be compatible with various external systems and devices, facilitating data sharing and system integration.
[0013] A further technical solution is to determine whether the position initialization of the robot is completed, including:
[0014] By comparing the robot's sensor data with known map information, it is determined whether the robot's current position can be mapped to the UTM coordinate system; if so, it is considered that the robot's position initialization is complete;
[0015] The positioning information publishing method further includes:
[0016] When the position initialization of the robot fails, an initial priori position is provided for the robot according to the fused positioning data in the map information to achieve the fused positioning of the robot.
[0017] The beneficial effects of this technical solution are: when the robot's position initialization fails, the fused positioning data in the map information is used to provide the robot with an initial prior position, which can compensate for the uncertainty caused by the positioning failure and improve the accuracy of positioning; by fusing positioning data from different sources, the error and uncertainty caused by a single sensor or positioning algorithm can be reduced, the stability and robustness of the system can be enhanced, and the robot can be more reliably positioned and navigated; in the event of a position initialization failure, the fused positioning data in the map information is used in a timely manner to provide the robot with an initial position, which can quickly restore the robot's positioning function, improve the system's availability and applicability, and make it more suitable for various complex environments and application scenarios.
[0018] A further technical solution is that the fused positioning data includes RTK positioning data and WIFI positioning data, and providing an initial priori position for the robot according to the fused positioning data in the map information includes:
[0019] Determine whether the RTK positioning of the robot is normal according to the RTK positioning data, and initialize the position by using the RTK positioning data as a priori factor when it is normal;
[0020] When the RTK positioning of the robot is abnormal, it is determined whether the WIFI positioning of the robot is normal according to the WIFI positioning data, and when it is normal, the WIFI positioning data is used to initialize the position.
[0021] The beneficial effects of this technical solution are: using multi-source positioning data (RTK and WIFI) for positioning judgment and position initialization can improve the robustness of positioning. If a positioning system has a problem, it can still rely on other positioning systems to achieve position initialization, reducing the risk of positioning failure caused by a single failure; RTK positioning is usually applicable to open areas or within the coverage of base stations, while WIFI positioning can provide positioning information indoors or outside the coverage of base stations. The combination of the two can expand the scope of application of robot positioning and enhance the flexibility and applicability of positioning. The above technical solution can solve the problem of large amount of data loaded in point cloud maps during fusion positioning.
[0022] A further technical solution is that when the WIFI positioning of the robot is also abnormal, it is checked whether the working mode of the robot is an automatic inspection mode; when the working mode of the robot is the automatic inspection mode, the starting area corresponding to the positioning mode of the robot is used as the initialization area, and the point cloud of the initialization area is loaded to realize the position initialization of the robot;
[0023] When the working mode of the robot is not the automatic inspection mode, initialization failure information is generated and sent to the decision module.
[0024] The beneficial effects of this technical solution are: allowing automatic switching to a backup solution when WIFI positioning fails without human intervention; by using the robot's positioning mode in the automatic inspection mode to determine the initialization area, ensuring that the robot always has reliable position information when performing tasks, which helps to improve the stability and reliability of the robot system.
[0025] A further technical solution is that the positioning information publishing method further includes:
[0026] When the working mode of the robot is the automatic inspection mode and there is no start-up area, the position of the robot is constrained by using the motion increment information of the robot.
[0027] The beneficial effect of this technical solution is that the robot's position is constrained by using its motion increment information, so that the robot will not deviate from the range when in automatic inspection mode and without a predefined starting area.
[0028] A further technical solution is that, after providing the robot with an initial a priori position according to the fused positioning data and realizing position initialization, the positioning information publishing method further includes:
[0029] When the robot is SLAM mapping, a WIFI signal is obtained and first estimated UTM coordinate data of the robot is obtained through an LBS service; and the position information of the robot is obtained according to the first estimated UTM coordinate data;
[0030] When the RTK signal is acquired later, the UTM coordinate estimation data is reset using the RTK signal to obtain the second UTM coordinate estimation data; and the position information of the robot is updated based on the second UTM coordinate estimation data.
[0031] The beneficial effect of this technical solution is that by using WIFI signals and LBS services for initial position estimation, a position information can be quickly provided during the mapping process, while the subsequent RTK signal can provide more accurate position information, thereby ensuring that the established map has higher accuracy and reliability.
[0032] A further technical solution is that the positioning information publishing method further includes:
[0033] When the position initialization of the robot is completed, determining whether it is necessary to incrementally modify the local map around the current position;
[0034] When incremental modification of the local map is required and completed, a new key frame is created, the new key frame includes an index of the point cloud data, and the point cloud data is saved to a SQLite database.
[0035] The beneficial effects of this technical solution are: saving point cloud data and other data in the SQLite database solves the problem of point cloud data migration between different robots, because the SQLite database can be easily migrated to another robot and ensure the integrity of the data; creating a new key frame after completing the incremental modification of the local map solves the problem of a large number of invalid point clouds residing in the memory when SLAM is building a map, reducing the memory demand for the embedded system; by incrementally modifying the local map, the map information can be updated in time to keep the map consistent with the actual environment. At the same time, saving the updated point cloud data in the SQLite database can realize the persistent storage of map information, which is convenient for subsequent map management and application; saving the updated point cloud data in the SQLite database can also reduce memory usage.
[0036] In addition, embedded systems generally have memory limitations. Loading a large amount of data at one time may exceed the system's memory capacity, resulting in performance degradation or even system crashes. Loading a large amount of data at one time will occupy a large amount of memory resources and increase memory access pressure, thereby reducing the system's response speed and performance. Excessive data volume may cause memory fragmentation, affecting the speed of data reading and processing. The technical solution provided by this application can better manage system resources and improve the overall performance of the system by dynamically storing data in a database and reading and processing it as needed.
[0037] The present application also provides an electronic device, which includes a memory and a processor, wherein the memory stores a computer program, and the processor is configured to implement the steps of any one of the above methods when executing the computer program.
[0038] The present application also provides an electronic device, wherein the computer-readable storage medium includes a stored program, wherein the program executes any of the above methods when executed by the electronic device.
[0039] The present application also provides a computer program product, including a computer program / instruction, which implements the steps of the positioning information publishing method described in any one of the above items when executed by a processor. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 A schematic diagram of a flow chart of a method for publishing positioning information provided in an embodiment of the present application is shown;
[0041] Figure 2A schematic diagram of a process for providing a priori position provided in an embodiment of the present application is shown;
[0042] Figure 3 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown;
[0043] Figure 4 A schematic diagram of the structure of a computer program product provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0044] In order to facilitate the understanding of the present invention, the present invention will be described more fully below with reference to the relevant drawings. Preferred embodiments of the present invention are provided in the drawings. However, the present invention can be implemented in many other different forms and is not limited to the embodiments described herein. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present invention more thorough and comprehensive.
[0045] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used herein in the specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. The term "and / or" used herein includes any and all combinations of one or more related listed items.
[0046] The following is a brief description of the relevant terms in the embodiments of the present application.
[0047] SQLite database is a lightweight embedded relational database management system that does not require an independent server process and can directly operate standard database files.
[0048] RTK (Real-Time Kinematic) technology is a high-precision global positioning system (GNSS) technology. RTK achieves centimeter-level or sub-meter-level accuracy by comparing signals from the base station of the global satellite positioning system (such as GPS, GLONASS, etc.) and the receiver on the mobile device. Compared with standard GPS positioning, RTK technology provides higher accuracy and faster positioning speed.
[0049] WiFi is a wireless network technology based on the IEEE 802.11 series of standards that can transmit data through wireless signals. WiFi positioning uses WiFi signals to determine the location of a device by analyzing the strength of surrounding WiFi signals and MAC addresses.
[0050] Automatic inspection mode usually refers to the mode in which the robot automatically performs inspection, inspection or monitoring tasks at predetermined time intervals. The robot acts autonomously according to a pre-set path or task list to perform a series of inspection, measurement or monitoring tasks.
[0051] An inertial measurement unit (IMU) is a device that integrates multiple inertial sensors to measure and monitor the acceleration, angular velocity, and direction of an object. An IMU is usually composed of an accelerometer, a gyroscope, and a magnetometer.
[0052] A wheel odometer is a device used to measure the distance traveled by a robot and can be installed on the wheels of a robot. The wheel odometer calculates the distance traveled by the robot by detecting the number of rotations or rotation speed of the wheels, thereby tracking and monitoring the position and motion state of the robot. In the technical solution of the present application, the IMU and the Wheelodometer can be integrated as a motion model to dedistort the point cloud data to correct the point cloud data.
[0053] The UTM (Universal Transverse Mercator) coordinate system and the WGS-84 (World Geodetic System 1984) coordinate system are standard coordinate systems used for location identification and positioning on the earth's surface.
[0054] SLAM (Simultaneous Localization and Mapping) is a technology that simultaneously locates and maps a robot. SLAM mapping aims to solve the problem of self-localization and environmental mapping in an unknown environment. The SLAM process can be to collect data through sensors (such as cameras, lidar, etc.), and use these data to simultaneously determine the robot's position and posture (localization), as well as to build a map of the environment (mapping). The mapping process mainly relies on feature extraction and motion estimation. Feature extraction is to extract stable and reliable feature points from sensor data, while motion estimation is to calculate the relative motion of the robot between consecutive frames through the motion trajectory of these feature points.
[0055] The present application provides a method and device for publishing positioning information based on a SQLite database. The following will first describe the method for publishing positioning information, and then describe the device, etc.
[0056] Method embodiment.
[0057] See also Figure 1This embodiment provides a positioning information publishing method based on a SQLite database, which is applied to a robot system. The positioning information publishing method can be run on an electronic device, which can be a computer, a server (including a cloud server), or other device with computing capabilities.
[0058] The robot system includes a robot, a decision module, a data acquisition device and an SQLite database; the positioning information publishing method includes:
[0059] S101, acquiring decision task information from the decision module when the robot system is started, and dynamically loading map information of surrounding key frames from the SQLite database according to the decision task information; the map information includes map data, posture data, point cloud data and fused positioning data;
[0060] S102, using the data acquisition device to acquire the surrounding environment data of the robot in real time, and obtaining the motion increment information of the robot by integrating the inertial measurement data and the wheel speed meter data in the surrounding environment data;
[0061] S103, performing motion compensation for the robot using the motion increment information to obtain compensated point cloud data, and acquiring a movement vector of the robot relative to an initial position according to the compensated point cloud data;
[0062] S104, when the position initialization of the robot is completed, the current position of the robot is obtained according to the movement vector, the positioning coordinates of the current position of the robot are expressed in standardized coordinates, the positioning information is obtained and published to the decision module.
[0063] Among them, map data refers to data related to the map, such as data related to the map name, creation information, and scene. For example, map name-related data includes information such as the name and version of the map, which can be "City X Block Map v1.0". Creation information-related data records relevant information in the creation process of the map, such as the creation date, creator ID, etc., such as "April 15, 2024, user123". Scene-related data describes the characteristics and attributes of the actual scene represented by the map. For example, a city map includes the location, shape, and attribute information of geographic elements such as streets, buildings, and parks.
[0064] The pose data includes, for example, the GPS coordinates of the key frame point cloud (taking WGS-84 as an example, including longitude, latitude and elevation information), the pose and orientation, pitch, and yaw (roll, pitch, yaw) of the key point cloud in the UTM coordinate system, additional attribute information, indexes, charging points, key points or other functional points of this key point cloud, the map ID to which the key point cloud belongs, the pose attribute problems of the key point cloud (mainly the accuracy information of the current pose), and the point cloud data information of the key point cloud.
[0065] The point cloud data includes, for example, an ID and point cloud data stored in a Flat Buffers format. In the present application, during the SLAM process, the robot immediately writes the key point cloud into the SQLite database each time a key frame is completed, thereby reducing the memory requirements of the embedded system.
[0066] The fused positioning data can be a feature set of WIFI signals for the startup area, which is used to establish WIFI for the startup area. The data is updated after each successful startup and positioning convergence to prevent changes in surrounding WIFI information from affecting system operation. The fused positioning data includes, for example, map ID, startup area ID, WIFI MAC, WIFI information strength, and collection update time.
[0067] Among them, the robot system obtains decision task information from the decision module when it starts, and dynamically loads the map information of the surrounding key frames from the SQLite database according to the task information. This method of dynamically loading map information can only load necessary map information according to the needs of specific tasks, avoiding the problems of memory occupation and long loading time caused by loading the entire map information set at one time.
[0068] The decision module is responsible for the robot's mission planning and navigation instructions. The data acquisition module includes, for example, LiDAR, IMU, and wheel speed meter. The SQLite database is used to store map information. The decision task information is used to indicate the area information that the robot needs to navigate to, and the corresponding map information is loaded from the SQLite database according to the decision task information.
[0069] When the robot system starts, it receives decision task information from the decision module, which is used to indicate the specific task that the robot needs to perform. The data acquisition module collects the robot's surrounding environment data in real time (for example, including point cloud data obtained by using lidar, inertial measurement data provided by IMU, and wheel speed meter data recorded by wheel speed encoder). And by integrating the inertial measurement data provided by IMU and the wheel speed meter data recorded by wheel speed encoder, the robot's motion increment information, that is, the robot's movement change, is calculated.
[0070] Inertial measurement data includes, for example, the following: linear acceleration data, which refers to the acceleration change information of the robot on three axes (usually the x, y and z axes), indicating the acceleration of the robot during movement, such as acceleration, deceleration or maintaining uniform motion; angular velocity data, which refers to the angular velocity change information of the object on three axes, used to indicate the turning condition of the robot.
[0071] Use the motion increment information to perform motion compensation on the collected point cloud data, correct the deviation caused by the robot movement, and obtain the compensated point cloud data. According to the compensated point cloud data, calculate the robot's movement vector, and use the movement vector combined with the previous position information to determine the robot's current position. Convert the robot's current position coordinates into a standardized format (such as UTM or WGS-84 coordinate system) for system compatibility. Publish the positioning information to the decision module for task planning, path planning, or navigation command generation.
[0072] The effect of the above technical solution is that, by dynamically loading map information according to task requirements (the loading area becomes smaller), the problems of memory occupation and long loading time caused by switching maps or loading the entire map information set at one time when the system starts are avoided, the system's response speed and memory utilization efficiency are improved, the system's timeliness is improved, and the user experience is good; the positioning accuracy of the robot is improved through motion compensation and precise motion vector calculation; the use of SQLite database for storage and retrieval of map information optimizes data management, improves data access speed and system stability; by dynamically loading map data of surrounding key frames from the SQLite database instead of directly loading from folders or files, this database storage method can provide more efficient data management and access methods, which helps to improve the stability of the system; standardized coordinate representation enables the robot system to be compatible with various external systems and devices, facilitating data sharing and system integration.
[0073] In some implementations, the positioning information publishing method further includes:
[0074] When the position initialization of the robot fails, an initial a priori position is provided for the robot according to the fused positioning data in the map information, so as to realize the fused positioning of the robot and complete the position initialization of the robot. S104 can be executed subsequently.
[0075] In a robot system, position initialization refers to determining the initial position and posture of the robot in the environment. When the robot is starting or repositioning, if its initial position cannot be accurately determined, position initialization failure will occur. When the robot's position initialization fails, the robot can be provided with an initial prior position based on the fused positioning data in the map information.
[0076] Fusion positioning refers to the use of multiple positioning data sources, combining them through a certain fusion algorithm to obtain a more accurate and reliable position estimation result. In this case, the fusion positioning data in the map information can provide a more reliable initial position estimate for the robot, thereby achieving fusion positioning, and then obtaining positioning information and publishing it to the decision module.
[0077] Therefore, when the robot's position initialization fails, the fused positioning data in the map information is used to provide the robot with an initial prior position, which can make up for the uncertainty caused by the positioning failure and improve the accuracy of positioning; by fusing positioning data from different sources, the error and uncertainty caused by a single sensor or positioning algorithm can be reduced, the stability and robustness of the system can be enhanced, and the robot can be more reliably positioned and navigated; in the case of position initialization failure, the fused positioning data in the map information is used in a timely manner to provide the robot with an initial position, which can quickly restore the robot's positioning function, improve the system's availability and applicability, and make it more suitable for various complex environments and application scenarios.
[0078] See also Figure 2 In some embodiments, the fused positioning data includes RTK positioning data and WIFI positioning data, and providing an initial a priori position for the robot according to the fused positioning data in the map information includes:
[0079] S201, judging whether the RTK positioning of the robot is normal according to the RTK positioning data, and initializing the position by using the RTK positioning data as a priori factor when it is normal;
[0080] S202, when the RTK positioning of the robot is abnormal, judging whether the WIFI positioning of the robot is normal according to the WIFI positioning data, and using the WIFI positioning data to initialize the position when it is normal.
[0081] In this embodiment, RTK positioning data is used to determine whether the current positioning state of the robot is normal. Using RTK positioning data to determine whether the current positioning state of the robot is normal can check the quality of the signal received by the RTK positioning system, including signal-to-noise ratio, multipath effect, etc. High-quality signals usually mean more accurate positioning results and normal RTK positioning, while low-quality signals may cause positioning errors and abnormal RTK positioning. It is also possible to determine whether RTK positioning is normal by the number and geometric distribution of satellites.
[0082] If the RTK positioning is normal, it means that the robot is in a reliable positioning state. When the RTK positioning is normal, the RTK positioning data is used as a priori factor, that is, as the basis for initial position estimation, and the RTK positioning result is used as part of the robot's initial position, thereby realizing position initialization.
[0083] If RTK positioning is not normal, WIFI positioning data is used to determine the robot's positioning status. WIFI positioning usually uses the strength and location information of the WIFI signal for positioning. Although the accuracy may not be as high as RTK positioning, it can still provide a reliable position estimate to determine the initial position of the robot.
[0084] Therefore, using multi-source positioning data (RTK and WIFI) for positioning judgment and position initialization can improve the robustness of positioning. If a certain positioning system has a problem, it can still rely on other positioning systems to achieve position initialization, reducing the risk of positioning failure due to a single failure. RTK positioning is usually suitable for open areas or within the coverage of base stations, while WIFI positioning can provide positioning information indoors or outside the coverage of base stations. The combination of the two can expand the scope of application of robot positioning and enhance the flexibility and applicability of positioning.
[0085] The above technical solution can solve the problem of large amount of data loading in point cloud map during fusion positioning. The point cloud map only needs to load the map of the current location area. According to the location given by RTK, only the map of a certain length in all directions before, after, left and right of the current location can be loaded, which is fast. If it is indoors and RTK positioning is abnormal, the point cloud of the corresponding area is loaded according to the initial positioning information of WIFI. If the WIFI positioning is abnormal, the robot starts from the corresponding starting area.
[0086] In some embodiments, after providing the robot with an initial a priori position according to the fused positioning data and achieving position initialization, the positioning information publishing method further includes:
[0087] When the robot is SLAM mapping, a WIFI signal is obtained and first estimated UTM coordinate data of the robot is obtained through an LBS service; and the position information of the robot is obtained according to the first estimated UTM coordinate data;
[0088] When the RTK signal is acquired later, the UTM coordinate estimation data is reset using the RTK signal to obtain the second UTM coordinate estimation data; and the position information of the robot is updated based on the second UTM coordinate estimation data.
[0089] In the SLAM mapping process, the WIFI signal and LBS service can be used to make an initial position estimate, and then when the subsequent RTK signal is received, the previous position estimate is updated with more accurate position information. Specifically, in the SLAM mapping process, the WIFI signal around the robot is first used, and the first estimated data of the robot's UTM coordinates is obtained through the LBS (Location Based Services) service, providing a rough starting position estimate for initializing the mapping process. The position information of the robot's current position is determined using the obtained UTM coordinate first estimated data. In the SLAM mapping process, as time goes by, the robot receives subsequent RTK signals, and the RTK signals provide more accurate position information. The UTM coordinate estimation data is reset using the RTK signal to obtain more accurate UTM coordinate second estimated data. Using the obtained UTM coordinate second estimated data, the robot's position information is updated to ensure that the position information used in the mapping process is more accurate and reliable.
[0090] Therefore, by using WIFI signals and LBS services for initial position estimation, a location information can be quickly provided during the mapping process, while subsequent RTK signals can provide more accurate location information, thereby ensuring that the established map has higher accuracy and reliability.
[0091] As an example, during the mapping process, WIFI is first used to obtain a rough estimate of UTM coordinates. This is because the positioning accuracy of WIFI signals may be relatively low, but it can provide a rough location information. Then, if an RTK (GNSS) signal is received after WIFI positioning, and the accuracy of RTK is significantly higher than WIFI, the position will be re-evaluated and the previous rough estimate will be corrected based on the more accurate position information provided by RTK to ensure that the position information used in the mapping process is more accurate. Doing so can effectively improve the accuracy and precision of mapping and ensure the quality and reliability of map data.
[0092] In some embodiments, when the WIFI positioning of the robot is also abnormal, check whether the working mode of the robot is an automatic inspection mode; when the working mode of the robot is the automatic inspection mode, use the start area corresponding to the positioning mode of the robot as the initialization area, and load the point cloud of the initialization area to realize the position initialization of the robot;
[0093] When the working mode of the robot is not the automatic inspection mode, initialization failure information is generated and sent to the decision module.
[0094] If the WIFI positioning is not normal, it means that the WIFI signal cannot be relied on to determine the robot's position. The WIFI positioning data can be used to determine whether the WIFI positioning is normal. The WIFI signal strength indicated by the current WIFI signal data can be used to determine whether the WIFI positioning is normal. Then check whether the robot's working mode is automatic inspection mode. Automatic inspection mode refers to the mode in which the robot performs tasks according to a preset route or area. If the robot is in automatic inspection mode, determine the initialization area based on the robot's positioning mode. The initialization area can be a specific area associated with the robot's current task, and then load the point cloud data of the initialization area from the SQLite database. Finally, use the loaded point cloud data to initialize the robot's position.
[0095] This allows automatic switching to a backup plan when WiFi positioning fails without manual intervention; by using the robot's positioning mode to determine the initialization area in automatic inspection mode, it ensures that the robot always has reliable position information when performing tasks, which helps to improve the stability and reliability of the robot system.
[0096] In some implementations, the positioning information publishing method further includes:
[0097] When the working mode of the robot is the automatic inspection mode and there is no start-up area, the position of the robot is constrained by using the motion increment information of the robot.
[0098] When the robot is in automatic inspection mode and there is no start-up area, it can be considered that the robot is required to move in an unknown environment without a predefined start-up area. The robot system collects data provided by the data acquisition device in real time and records the robot's motion increment in space, that is, the robot's displacement and direction change in each time period. Using the robot's motion increment information, its current position can be constrained according to its current position and movement path.
[0099] Therefore, the robot's motion increment information is used to constrain its position, so that the robot will not deviate from the range when it is in automatic inspection mode and there is no predefined starting area.
[0100] In some implementations, the positioning information publishing method further includes:
[0101] When the position initialization of the robot is completed, determining whether it is necessary to incrementally modify the local map around the current position;
[0102] When incremental modification of the local map is required and completed, a new key frame is created, the new key frame includes an index of the point cloud data, and the point cloud data is saved to a SQLite database.
[0103] After the robot position is initialized, the local map around the current position is checked to see if incremental modification is required. If incremental modification is required and completed successfully, a new keyframe is created. The new keyframe includes the index of the point cloud data and saves the point cloud data to the SQLite database.
[0104] Therefore, saving point cloud data and other data in the SQLite database solves the problem of point cloud data migration between different robots, because the SQLite database can be easily migrated to another robot and ensure the integrity of the data; creating a new key frame after completing the incremental modification of the local map solves the problem of a large number of invalid point clouds residing in the memory when SLAM is building a map, reducing the memory demand for the embedded system; by incrementally modifying the local map, the map information can be updated in time to keep the map consistent with the actual environment. At the same time, saving the updated point cloud data in the SQLite database can realize the persistent storage of map information, which is convenient for subsequent map management and application; saving the updated point cloud data in the SQLite database can also reduce memory usage.
[0105] In addition, embedded systems generally have memory limitations. Loading a large amount of data at one time may exceed the system's memory capacity, resulting in performance degradation or even system crashes. Loading a large amount of data at one time will occupy a large amount of memory resources and increase memory access pressure, thereby reducing the system's response speed and performance. Excessive data volume may cause memory fragmentation, affecting the speed of data reading and processing. The technical solution provided by this application can better manage system resources and improve the overall performance of the system by dynamically storing data in a database and reading and processing it as needed.
[0106] In a specific application, a method for publishing positioning information based on a SQLite database is provided, which is applied to a robot system, wherein the robot system includes a robot, a decision module, a data acquisition device, and a SQLite database; the method for publishing positioning information includes:
[0107] When the robot system is started, decision task information is obtained from the decision module, and map information of surrounding key frames is dynamically loaded from the SQLite database according to the decision task information; the map information includes map data, posture data, point cloud data and fused positioning data;
[0108] Using the data acquisition device to acquire the surrounding environment data of the robot in real time, and obtaining the motion increment information of the robot by integrating the inertial measurement data and wheel speed meter data in the surrounding environment data;
[0109] Performing motion compensation for the robot using the motion increment information to obtain compensated point cloud data, and acquiring a movement vector of the robot relative to an initial position based on the compensated point cloud data;
[0110] When the position initialization of the robot is completed, the current position of the robot is obtained according to the movement vector, the positioning coordinates of the current position of the robot are expressed in standardized coordinates, and the positioning information is obtained and published to the decision module.
[0111] When the position initialization of the robot is completed, determining whether it is necessary to incrementally modify the local map around the current position;
[0112] When incremental modification of the local map is required and completed, a new key frame is created, the new key frame includes an index of the point cloud data, and the point cloud data is saved to a SQLite database.
[0113] The fused positioning data includes RTK positioning data and WIFI positioning data, and the method for determining whether the position initialization of the robot is completed includes:
[0114] By comparing the robot's sensor data with known map information, it is determined whether the robot's current position can be mapped to the UTM coordinate system; if so, the robot's position initialization is considered complete. The map information of the surrounding key frames is dynamically loaded from the SQLite database based on the decision task information, and the above steps are repeated.
[0115] The positioning information publishing method further includes:
[0116] When the position initialization of the robot fails, judging whether the RTK positioning of the robot is normal according to the RTK positioning data, and performing position initialization by using the RTK positioning data as a priori factor when it is normal;
[0117] When the RTK positioning of the robot is abnormal, judging whether the WIFI positioning of the robot is normal according to the WIFI positioning data, and using the WIFI positioning data to initialize the position when it is normal, so as to realize the fusion positioning of the robot;
[0118] After providing the robot with an initial a priori position according to the fused positioning data and realizing position initialization, the positioning information publishing method further includes:
[0119] When the robot is SLAM mapping, a WIFI signal is obtained and first estimated UTM coordinate data of the robot is obtained through an LBS service; and the position information of the robot is obtained according to the first estimated UTM coordinate data;
[0120] When the RTK signal is acquired later, the UTM coordinate estimation data is reset using the RTK signal to obtain the second UTM coordinate estimation data; and the position information of the robot is updated based on the second UTM coordinate estimation data.
[0121] When the WIFI positioning of the robot is also abnormal, check whether the working mode of the robot is the automatic inspection mode; when the working mode of the robot is the automatic inspection mode, use the starting area corresponding to the positioning mode of the robot as the initialization area, and load the point cloud of the initialization area to realize the position initialization of the robot;
[0122] When the working mode of the robot is the automatic inspection mode and there is no start-up area, the position of the robot is constrained by using the motion increment information of the robot;
[0123] When the working mode of the robot is not the automatic inspection mode, initialization failure information is generated and sent to the decision module.
[0124] The above technical solution will save the optimized keyframe point cloud to the SQLite database in a timely manner when the robot is building a map (SLAM), only save its corresponding index value in the memory, and associate it with its keyframe information, which optimizes its memory usage and enables timely building of maps on embedded systems. During fusion positioning, the prior position will be initialized according to the RTK or WIFI information, and then the prior position point cloud will be loaded, which increases the loading speed. If there is no RTK (GNSS) or WIFI information around, the startup area will be used as a supplement. After the integrated positioning is successful, the point cloud of the surrounding keyframes can be loaded in real time during the robot movement. Since the amount of loading each time is very small, it can be completed in less than 5ms during the test, and asynchronous processing is used, which will not affect the running speed of the system.
[0125] Electronic device embodiments.
[0126] This embodiment provides an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor is configured to implement the steps of any method in any one of the method embodiments when executing the computer program. The specific embodiments can refer to the above method embodiments and will not be repeated in this embodiment.
[0127] See also Figure 3 , Figure 3 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application.
[0128] The electronic device 10 may include, for example, at least one memory 11 , at least one processor 12 , and a bus 13 connecting different platform systems.
[0129] The memory 11 may include a (computer) readable medium in the form of a volatile memory, such as a random access memory (RAM) 111 and / or a cache memory 112 , and may further include a read-only memory (ROM) 113 .
[0130] The memory 11 also stores a computer program, which can be executed by the processor 12 so that the processor 12 implements the steps of any of the above methods.
[0131] The memory 11 may also include a utility 114 having at least one program module 115, such program module 115 including but not limited to: an operating system, one or more application programs, other program modules and program data, each of which or some combination may include the implementation of a network environment.
[0132] Accordingly, the processor 12 may execute the above-mentioned computer program, and may execute the utility 114 .
[0133] The processor 12 may adopt one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0134] The bus 13 may be a local bus representing one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or any of a variety of bus architectures.
[0135] The electronic device 10 may also communicate with one or more external devices such as a keyboard, a pointing device, a Bluetooth device, etc., and may also communicate with one or more devices that can interact with the electronic device 10, and / or communicate with any device (such as a router, a modem, etc.) that enables the electronic device 10 to communicate with one or more other computing devices. Such communication may be performed through an input / output interface 14. In addition, the electronic device 10 may also communicate with one or more networks (such as a local area network (LAN), a wide area network (WAN) and / or a public network, such as the Internet) through a network adapter 15. The network adapter 15 may communicate with other modules of the electronic device 10 through the bus 13. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 10 in actual applications, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms.
[0136] Storage Medium Embodiments.
[0137] This embodiment provides a computer-readable storage medium, and a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the methods provided in the above various optional implementations.
[0138] Program Product Embodiments.
[0139] The embodiment of the present application also provides a computer program product, the specific embodiments of which are consistent with the embodiments recorded in the above method embodiments and the technical effects achieved, and some contents will not be repeated here.
[0140] The computer program product comprises a computer program, and when the computer program is executed by at least one processor, the steps of any of the above methods or the functions of any of the above devices are implemented.
[0141] See also Figure 4 , Figure 4 It is a structural diagram of a computer program product provided in an embodiment of the present application.
[0142] The computer program product is used to implement the steps of any of the above methods. The computer program product may be a portable compact disk read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the computer program product of the present invention is not limited thereto, and the computer program product may be any combination of one or more computer-readable media.
[0143] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are configured to distinguish similar objects, and are not necessarily configured 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, system, 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.
[0144] This application is explained from the perspectives of purpose of use, effectiveness, progress and novelty, and has met the functional enhancement and usage requirements emphasized by the Patent Law. The above description and drawings of this application are only the preferred embodiments of this application, and are not intended to limit this application. Therefore, all structures, devices, features, etc. that are similar or identical to this application, that is, all equivalent replacements or modifications made in accordance with the scope of the patent application of this application, should fall within the scope of protection of the patent application of this application.
Claims
1. A method for publishing positioning information based on SQLite database, characterized in that: Applied to a robot system, the robot system includes a robot, a decision module, a data acquisition device and an SQLite database; the positioning information publishing method includes: When the robot system is started, decision task information is obtained from the decision module, and map information of surrounding key frames is dynamically loaded from the SQLite database according to the decision task information; the map information includes map data, posture data, point cloud data and fused positioning data; Using the data acquisition device to acquire the surrounding environment data of the robot in real time, and obtaining the motion increment information of the robot by integrating the inertial measurement data and wheel speed meter data in the surrounding environment data; Performing motion compensation for the robot using the motion increment information to obtain compensated point cloud data, and acquiring a movement vector of the robot relative to an initial position based on the compensated point cloud data; When the position initialization of the robot is completed, the current position of the robot is obtained according to the movement vector, the positioning coordinates of the current position of the robot are expressed in standardized coordinates, and the positioning information is obtained and published to the decision module.
2. The method for publishing positioning information based on SQLite database according to claim 1, characterized in that: The method of determining whether the position initialization of the robot is completed includes: By comparing the robot's sensor data with known map information, it is determined whether the robot's current position can be mapped to the UTM coordinate system; if so, it is considered that the robot's position initialization is complete; The positioning information publishing method further includes: When the position initialization of the robot fails, an initial priori position is provided for the robot according to the fused positioning data in the map information to achieve the fused positioning of the robot.
3. The method for publishing positioning information based on SQLite database according to claim 2, characterized in that: The fused positioning data includes RTK positioning data and WIFI positioning data, and providing an initial priori position for the robot according to the fused positioning data in the map information includes: Determine whether the RTK positioning of the robot is normal according to the RTK positioning data, and initialize the position by using the RTK positioning data as a priori factor when it is normal; When the RTK positioning of the robot is abnormal, it is determined whether the WIFI positioning of the robot is normal according to the WIFI positioning data, and when it is normal, the WIFI positioning data is used to initialize the position.
4. The method for publishing positioning information based on SQLite database according to claim 3, characterized in that: When the WIFI positioning of the robot is also abnormal, check whether the working mode of the robot is the automatic inspection mode; when the working mode of the robot is the automatic inspection mode, use the starting area corresponding to the positioning mode of the robot as the initialization area, and load the point cloud of the initialization area to realize the position initialization of the robot; When the working mode of the robot is not the automatic inspection mode, initialization failure information is generated and sent to the decision module.
5. The method for publishing positioning information based on SQLite database according to claim 4, characterized in that: The positioning information publishing method further includes: When the working mode of the robot is the automatic inspection mode and there is no start-up area, the position of the robot is constrained by using the motion increment information of the robot.
6. The method for publishing positioning information based on SQLite database according to claim 3, characterized in that: After providing the robot with an initial a priori position according to the fused positioning data and realizing position initialization, the positioning information publishing method further includes: When the robot is SLAM mapping, a WIFI signal is obtained and first estimated UTM coordinate data of the robot is obtained through an LBS service; and the position information of the robot is obtained according to the first estimated UTM coordinate data; When the RTK signal is acquired later, the UTM coordinate estimation data is reset using the RTK signal to obtain the second UTM coordinate estimation data; and the position information of the robot is updated based on the second UTM coordinate estimation data.
7. The method for publishing positioning information based on SQLite database according to claim 1, characterized in that: The positioning information publishing method further includes: When the position initialization of the robot is completed, determining whether it is necessary to incrementally modify the local map around the current position; When incremental modification of the local map is required and completed, a new key frame is created, the new key frame includes an index of the point cloud data, and the point cloud data is saved to a SQLite database.
8. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory storing a computer program, and the processor being configured to implement the steps of the method according to any one of claims 1 to 7 when executing the computer program.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program executes the method described in any one of claims 1 to 7 when executed by an electronic device.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by a processor, the steps of the method for publishing positioning information described in any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Robot motion control system based on ROS and SQLite and control method
CN109571485A
Robot mapping method and robot
CN113674351A
Robot and positioning method applied to robot
CN114102577A
Multi-sensor fusion positioning method and device, storage medium and electronic equipment
CN114111775A
Robot positioning quality judgment method and system, robot and readable storage medium
CN114689080A
