Mobile robot autonomous positioning method and device based on pose information fusion, and medium
By combining electronic compass calibration and 2D laser mapping with image feature matching, the robot's initial pose is automatically determined, solving the complexity and error problems caused by manual input by users in existing technologies, and realizing high-precision autonomous robot positioning and navigation.
Patent Information
- Application Number
- CN202411607504.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-11-11
- Estimated Expiration
- 2044-11-12
AI Technical Summary
In existing technologies, the user's manual input of the robot's initial pose increases the complexity and error of robot use, affecting the subsequent mapping, localization and navigation effects.
The robot's initial posture is calibrated using an electronic compass sensor. Combined with two-dimensional laser mapping and image feature matching, the robot's initial pose is automatically determined. The robot's initial position and posture are calculated by matching the global map with the local map.
It achieves both precision and simplicity in robot autonomous positioning, reduces the complexity of user operations, and improves positioning accuracy and navigation precision.
Smart Images

Figure CN119756357B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of mobile robot localization, and in particular to a method, device and medium for autonomous localization of mobile robots based on posture information fusion. Background Technology
[0002] With the rapid advancement of robotics technology and the rapid development of the indoor service robot industry, users have increasingly higher requirements for the intelligence level of mobile robots. Among these requirements, robot positioning technology is an important factor affecting the intelligence level of robots. As the first and most important step in robot positioning, the effectiveness of initial robot positioning greatly affects the positioning accuracy of the robot during subsequent movement.
[0003] Currently, 2D laser SLAM algorithms are widely used in mobile robot localization and navigation. Among them, Gmapping, HectorSLAM, and Cartographer are the most common robot localization algorithms on the market. However, without exception, using these algorithms requires providing the robot's initial pose, which is usually achieved by the user manually inputting it on the global map. This has the following limitations: 1) Manually inputting the robot's initial pose increases the complexity of robot use and is not user-friendly, especially when the user does not know the robot's current initial pose, which is very detrimental to the robot's subsequent mapping, localization, and navigation. 2) The robot's initial pose manually input by the user may have a large error, because the robot's position and attitude are not fixed when it is powered on. The user needs to "intuitively" provide the robot's current pose, which can easily lead to a large discrepancy between the pose provided by the user and the actual pose. Summary of the Invention
[0004] In order to at least partially solve one of the technical problems existing in the prior art, the purpose of this invention is to provide a method, device and medium for autonomous localization of mobile robots based on posture information fusion.
[0005] The first technical solution adopted in this invention is:
[0006] A method for autonomous localization of a mobile robot based on posture information fusion includes the following steps:
[0007] Select a coordinate point O on the global map M as the origin, select direction T0 as the reference direction, and calibrate the electronic compass sensor at coordinate point O to calibrate direction T0; the electronic compass sensor is installed on the robot.
[0008] A local map M0 is obtained at the initial position P0 after the robot is powered on using a two-dimensional laser mapping method, where the local map M0 is a part of the global map M.
[0009] The initial posture T1 of the robot after power-on is determined based on the reference direction T0 and the reading of the electronic compass sensor;
[0010] Rotate the local map M0 so that the robot's pose coincides with the reference direction T0, and calculate the initial position P0 on the local map M0, which is represented by pixel coordinates and denoted as (u0, v0); the robot's initial position P on the global map M is also calculated. * Represented by pixel coordinates, denoted as (u * ,v * );
[0011] By performing image feature matching between the local map M0 and the global map M, the robot's initial position P is obtained, with its pixel coordinates as (u,v), thus obtaining the robot's initial pose (P,T1).
[0012] Furthermore, the mobile robot autonomous localization method also includes the step of pre-establishing a global map M:
[0013] A global map M of the indoor environment where the robot is located is created using a two-dimensional laser mapping algorithm. This map is stored as an image in PGM format.
[0014] For a fixed indoor environment, the step of establishing a global map M only needs to be performed once before the robot's first initial localization. When the robot performs multiple initial pose localizations in the same environment, the global map can be used directly.
[0015] Furthermore, calibrating the electronic compass sensor at coordinate point O with respect to direction T0 includes:
[0016] Align the horizontal direction of the electronic compass sensor with the reference direction T0, and read the sensor reading at this point as θ0. Then, at any subsequent moment, the robot's posture corresponds to the electronic compass reading as θ. Obtain the robot's current posture T on the map based on the difference ε between θ and θ0.
[0017]
[0018] Furthermore, obtaining a local map M0 at the initial position P0 after the robot is powered on using a two-dimensional laser mapping method includes:
[0019] Keeping the robot's position and orientation unchanged when it is powered on, several frames of point cloud {P} of the robot's surrounding environment are collected using a two-dimensional LiDAR sensor. A local map M0 is then constructed with the two-dimensional LiDAR sensor mounted on the robot as the geometric center. This map is stored as a pgm format image.
[0020] Furthermore, the step of rotating the local map M0 to make the robot's pose coincide with the reference direction T0 includes:
[0021] The reading of the electronic compass sensor corresponding to the reference direction T0 is θ0, and the reading of the electronic compass sensor corresponding to the initial attitude T1 is θ1; the difference between θ0 and θ1 is ε1;
[0022] Based on ε1, perform a rotation operation on the local map M0 with the geometric center as the center, so that the orientation of the local map M0 is the same as that of the global map M.
[0023] Further, calculating the position of the initial position P0 on the local map M0 includes:
[0024] While preserving both obstacle-free and obstacle-free areas in the rotated image and ensuring the geometric center of the rotated image remains fixed, the rotated image is cropped to its original size to obtain the coordinates of the initial position P0 on the local map M0. Let h be the geometric center of the image, where h and w are the length and width of the image, respectively.
[0025] Further, the step of performing image feature matching between the local map M0 and the global map M to obtain the robot's initial position P includes:
[0026] There is an obstacle area {S} on the global map M. b}, Barrier-free area {S o} and unknown regions {S u On the local map M0, there is an obstacle area {S}. b0}, Barrier-free area {S o0} and unknown regions {S u0},and The three regions can be distinguished in the PGM format image by their pixel value. Using this feature, image matching is performed to find the coordinates (u,v) that make the local map M0 and the global map M have the highest degree of overlap. The position corresponding to this coordinate is the optimal initial position P of the robot.
[0027] Furthermore, the step of using this feature to perform image matching to find the coordinates (u,v) that maximize the overlap between the local map M0 and the global map M includes:
[0028] Using the obstacle areas {S} in the global map M and the local map M0 b0} and barrier-free areas {S o0 The pixel value of the corresponding pixel is a feature, and the weights of these two features are set to ω according to their importance. b and ω o ;
[0029] The local map M0 and the global map M are matched pixel by pixel. When the coordinates are (u,v), the current score is calculated according to the following formula:
[0030] Score(u,v)=ω b N b +ω0N0
[0031] In the formula, N b and N o The obstacle areas are {S} b0} and barrier-free areas {S o0 The number of overlapping pixels;
[0032] After traversing every pixel of the entire local map M, take the value that makes the Score... (u,v) The largest pixel coordinate (u,v) is located on the global map, which is the initial position P to be obtained.
[0033] The second technical solution adopted in this invention is:
[0034] An electronic device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to realize a mobile robot autonomous localization method based on attitude information fusion as described above.
[0035] The fourth technical solution adopted in this invention is:
[0036] A computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement a mobile robot autonomous localization method based on attitude information fusion as described above.
[0037] The fifth technical solution adopted in this invention is:
[0038] A computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the aforementioned method for autonomous localization of a mobile robot based on attitude information fusion.
[0039] The present invention has the following advantages and beneficial effects:
[0040] 1) The present invention provides a mobile robot autonomous localization method based on attitude information fusion, which uses an electronic compass sensor to accurately measure the robot's initial attitude, making up for the lack of attitude measurement in many initial localization algorithms, and providing more useful information for subsequent robot mapping and navigation.
[0041] 2) This invention uses image feature matching to find the optimal value of the robot's initial position pixel by pixel. The weight of each feature can be adjusted according to different environmental conditions to adapt to different environmental scenarios.
[0042] 3) Compared with existing technologies, this invention is not complicated, does not require high hardware computing power, and is easy to implement on various mobile robot platforms. Attached Figure Description
[0043] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following description is provided with accompanying drawings of the relevant technical solutions in the embodiments of the present invention or the prior art. It should be understood that the accompanying drawings described below are only for the purpose of clearly illustrating some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0044] Figure 1 This is an overall flowchart of the method of the present invention;
[0045] Figure 2 This is an example of a global map of a laboratory scene in this invention;
[0046] Figure 3 This is an example of a partial map of a laboratory scene in this invention;
[0047] Figure 4 This is an example of local map preprocessing for a laboratory scene in this invention;
[0048] Figure 5 This is the score for each pixel in the local map of the laboratory scene in this invention;
[0049] Figure 6 This is an example of a global map of a simulated indoor scene in this invention;
[0050] Figure 7 Example 1 is a local map of a simulated indoor scene in this invention;
[0051] Figure 8 The pixel scores are shown in Example 1 of the simulated indoor scene local map in this invention.
[0052] Figure 9 Example 2 is a partial map of a simulated indoor scene in this invention;
[0053] Figure 10The scores for each pixel in Example 2 of the simulated indoor scene local map in this invention are shown. Detailed Implementation
[0054] The embodiments of the present invention are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and should not be construed as limiting the present invention. The step numbers in the following embodiments are set only for ease of explanation, and there is no limitation on the order between the steps. The execution order of each step in the embodiments can be adaptively adjusted according to the understanding of those skilled in the art.
[0055] In the description of this invention, it should be understood that the orientation descriptions, such as up, down, front, back, left, right, etc., are based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limiting this invention.
[0056] In the description of this invention, "several" means one or more, "more than" means two or more, "greater than," "less than," and "exceeding" are understood to exclude the stated number, while "above," "below," and "within" are understood to include the stated number. The use of "first" and "second" in the description is merely for distinguishing technical features and should not be construed as indicating or implying relative importance, or implicitly indicating the number of indicated technical features, or implicitly indicating the order of the indicated technical features.
[0057] In the description of this invention, unless otherwise explicitly defined, terms such as "set up," "install," and "connect" should be interpreted broadly, and those skilled in the art can reasonably determine the specific meaning of the above terms in this invention in conjunction with the specific content of the technical solution.
[0058] Example 1
[0059] This embodiment provides a method for autonomous localization of a mobile robot based on posture information fusion, including the following steps:
[0060] S1. Select a coordinate point O on the global map M as the origin and select direction T0 as the reference direction. Calibrate the electronic compass sensor at coordinate point O to the direction T0. The electronic compass sensor is installed on the robot.
[0061] In some embodiments, the global map M is pre-built. A two-dimensional laser mapping algorithm is used to build a global map M of the indoor environment where the robot is located. The map is stored as a pgm format image. This step only needs to be performed once before the robot's first initial localization.
[0062] In the indoor environment where the robot moves, select a direction T0 as the reference direction, adjust the horizontal direction of the electronic compass to be consistent with the reference direction, and read the electronic compass reading at this time as θ0. Then, at any subsequent moment, the robot's posture corresponds to the electronic compass reading θ. Obtain the robot's current posture T on the map based on the difference ε between θ and θ0.
[0063]
[0064] S2. At the initial position P0 after the robot is powered on, a local map M0 is obtained using a two-dimensional laser mapping method, where the local map M0 is a part of the global map M.
[0065] In some embodiments, while keeping the robot's position and orientation unchanged when powered on, a point cloud {P} of several frames of the robot's surrounding environment is acquired using a 2D LiDAR sensor. A local map M0 is then constructed using the acquired point cloud, with the 2D LiDAR sensor mounted on the robot as its geometric center. This map is stored as a PGM format image. Specifically, the pixel value for obstacle areas is 0, the pixel value for obstacle-free areas is 254, and the pixel value for unknown areas is 205.
[0066] S3. Determine the initial posture T1 of the robot after it is powered on, based on the reference direction T0 and the reading of the electronic compass sensor.
[0067] For example, the reading of the electronic compass sensor corresponding to the reference direction T0 is θ0, and the reading of the electronic compass sensor corresponding to the initial attitude T1 is θ1; the difference between θ0 and θ1 is ε1; based on ε1, a rotation operation is performed on the local map M0 with the geometric center as the center, so that the orientation of the local map M0 is the same as that of the global map M.
[0068] To restore the rotated local map M0 to its original size, the specific steps are as follows:
[0069] While ensuring that all information of the local map M0 is preserved, the portion of the rotated M0 that exceeds the length or width of the original image is cropped. The portion of the rotated M0 that is shorter or narrower than the original image is filled with pixel values corresponding to unknown regions.
[0070] S4. Rotate the local map M0 so that the robot's pose coincides with the reference direction T0, and calculate the initial position P0 on the local map M0. This position is represented by pixel coordinates and denoted as (u0, v0). The robot's initial position P0 on the global map M0 is also calculated.* Represented by pixel coordinates, denoted as (u * ,v * ).
[0071] In some embodiments, when constructing the local map M0, the LiDAR is ensured to be located at the geometric center of the image. M0 is rotated around the geometric center according to ε, so that the robot's pose in M0 is the same as the robot's pose in the global map M. While preserving the obstacle and obstacle-free areas in the rotated image and ensuring that the geometric center of the rotated image is fixed, the rotated image is cropped to the size before rotation. At this point, the coordinates of the initial position P0 on the local map M0 can be obtained. Let h be the geometric center of the image, where h and w are the length and width of the image, respectively.
[0072] S5. Perform image feature matching between the local map M0 and the global map M to obtain the robot's initial position P, whose pixel coordinates are (u,v), and obtain the robot's initial pose (P,T1).
[0073] Using the obstacle areas {S} in the global map M and the local map M0 b0} and barrier-free areas {S o0 The pixel value of the corresponding pixel is a feature, and the weights of these two features are set to ω according to their importance. b and ω o The local map M0 and the global map M are matched pixel by pixel. When the coordinates of P are (u,v), the current score is calculated according to the following formula:
[0074] Score(u,v)=ω b N b +ω0N0
[0075] Where N b and N o The obstacle areas are {S} b0} and barrier-free areas {S o0 The number of overlapping pixels. After traversing every pixel in the entire local map M, take the value that makes the Score equal to... (u,v) The largest pixel coordinate (u,v) is located on the global map, which is the initial position P; thus, the robot's initial pose (P,T1) is obtained.
[0076] Example 2
[0077] like Figure 1 As shown, this embodiment provides a method for autonomous localization of a mobile robot based on posture information fusion, the specific steps of which include:
[0078] S101, LiDAR data acquisition.
[0079] S102. Establish a global map: First, establish a global map of the indoor environment in which the robot is located. The robot then needs to perform initial pose localization within the obstacle-free area covered by this global map. For a fixed indoor environment, this step only needs to be performed once before the robot's first initial localization. Afterward, the global map can be used for multiple initial pose localizations in the same indoor environment.
[0080] S201. Electronic Compass Data Acquisition: The electronic compass is connected to the robot's main control board via a serial port. During the initial pose localization of the robot, 10 frames of electronic compass readings are read, and the average of these 10 frames is used to calculate the robot's current posture. The electronic compass readings range from -180° to 180°.
[0081] S202. Obtain the robot's current posture by comparing with the reference posture: After obtaining the electronic compass reading θ corresponding to the robot's initial posture, calculate the robot's current posture T:
[0082]
[0083] S301, LiDAR data acquisition.
[0084] S302. Create a local map.
[0085] S303. Adjust the robot's position to the center of the map: The robot maintains its initial pose and uses a 2D LiDAR sensor to collect 10 frames of radar point cloud data of the robot's surrounding environment to construct a local map. Assume the maximum value in the surrounding environment's point cloud data is d. max To center the robot on the local map, the local map can be set to have a side length of 2d. max Create a square image with +2 pixels and position the robot at the geometric center of that square image.
[0086] S401, Rotate and crop a local map.
[0087] 1) Rotating the Local Map: To facilitate feature matching between the local and global maps, the local map needs to be rotated to the same orientation as the global map. The specific method is as follows: Given that the pose corresponding to the global map is T0 and the pose corresponding to the local map is T1, with an angle θ-θ0 between the two poses, rotate the square local map around its geometric center by -(θ-θ0). At this point, the poses of the obstacle-free and obstacle-free regions in the local map are the same as those in the global map.
[0088] 2) Cropping the Local Map: To reduce the computational load of feature matching between the local and global maps, the local map needs to be cropped. The specific cropping method is as follows: First, it is necessary to ensure that the geometric center of the rotated local map remains the geometric center after cropping. Second, the cropping step can only remove the unknown areas at the edges of the image. Therefore, during cropping, pixels in the first n rows, first m columns, last n rows, and last m columns of the unknown areas can be removed.
[0089] S501. Image feature matching to calculate robot position: Select pixel values of obstacle-free and obstacle-free areas in the local and global maps as features, and assign corresponding weights ω according to the importance of each. b and ω o Starting from the first row and first column of the global map image, the score is calculated pixel by pixel in row-first, then column-second order. (u,v) Whenever a higher score is obtained (u,v) At each step, record and update the coordinates (u,v). The coordinates (u,v) obtained after the global map traversal is completed are the Score. (u,v) The coordinates corresponding to the maximum value are also the initial position P that we are looking for.
[0090] Example 3
[0091] The specific description of this embodiment is as follows: This embodiment is a real-world experiment. A wheeled robot equipped with a WLR-719LIDAR single-line lidar with a scanning frequency of 20Hz was selected as the experimental platform. A Raspberry Pi 4B with an Ubuntu 18.04 operating system was selected as the main control board for program execution. The experimental scenario is a laboratory in a school.
[0092] First, a global map of the laboratory is constructed using the existing Hector SLAM algorithm, such as... Figure 2 As shown.
[0093] The orientation of the global map is taken as the reference direction T0, at which point the electronic compass reading is 0. The robot's pose remains unchanged after power-on, and a local map is constructed based on the collected radar point cloud, such as... Figure 3 As shown.
[0094] The electronic compass reading was recorded as -175.17°, at which point the robot's posture T1 was obtained.
[0095] The local map is rotated and cropped to obtain a preprocessed local map for image feature matching, such as... Figure 4 As shown.
[0096] At this point, the robot's initial position still corresponds to the geometric center of the preprocessed local map.
[0097] Image feature matching is performed between the preprocessed local map and the global map, and a weight ω is set. b =10, ω o =1. Find the score that equals 1. (u,v) The largest pixel (u,v), such as Figure 5 As shown. At this point, the optimal initial position P(256, 256) is obtained, corresponding to the score maxScore. (u,v) =Score (256,256) =1.20164×10 10 The program ran for 5.803 seconds.
[0098] The robot's initial pose (P, T1) is finally obtained.
[0099] Example 4
[0100] The specific description of this embodiment is as follows: This embodiment is a dataset scene experiment. A Turtlebot3 robot equipped with a 10Hz single-line LiDAR was selected as the simulation platform. A PC configured with Ubuntu 18.04 operating system was selected as the host to run the program. The host parameters were i7-12700H, 2.70GHz CPU, and 16GB of memory. The experimental scene was a manually constructed virtual indoor scene.
[0101] First, a global map of the indoor simulation scene is constructed using the existing Hector SLAM algorithm, such as... Figure 6 As shown.
[0102] The orientation of the global map is taken as the reference direction T0, at which point the electronic compass reading is 0. The robot's pose remains unchanged after power-on, and a local map is constructed based on the collected radar point cloud, such as... Figure 7 As shown.
[0103] Record the electronic compass reading as 0° at this point, and obtain the robot's posture T2.
[0104] Image feature matching is performed between the local map and the global map, with weights ω set. b =10, ω o =1. Find the score that equals 1. (u,v) The largest pixel (u,v), such as Figure 8 As shown. At this point, the optimal initial position is obtained, P1(80,112) corresponds to the score maxScore. (u,v) =Score (80,112) =459004. Program execution time: 0.298824 seconds.
[0105] Finally, the robot's initial pose (P1, T2) is obtained.
[0106] Keeping the robot's posture unchanged, the robot's initial position is changed, and a local map is constructed based on the collected radar point cloud, such as... Figure 9 As shown.
[0107] Image feature matching is performed between the local map and the global map, with weights ω set. b =10, ω o =1. Find the score that equals 1. (u,v) The largest pixel (u,v), such as Figure 10 As shown. At this point, the optimal initial position P2(120, 80) is obtained, corresponding to the score maxScore. (u,v) =Score (120,80) =549160. Program execution time: 0.296776 seconds.
[0108] The robot's initial pose (P2, T2) is finally obtained.
[0109] In summary, the method proposed in this invention uses only single-line LiDAR, electronic compass, and other sensor devices, connected to the SOC main control board and mounted on a mobile robot. It can effectively perform initial pose localization of the robot under physical and simulated conditions with limited hardware resources, providing the robot's global map coordinates and attitude at startup, thus providing a precise navigation starting point. Through real-world scenario experiments and dataset experiments, this invention demonstrates that it can automatically calculate the robot's position and attitude in the global map upon startup, exhibiting high efficiency and high accuracy. Therefore, this invention is highly suitable for application on indoor mobile robot platforms.
[0110] Example 5
[0111] This invention also provides an electronic device, which includes a processor and a memory. The memory stores at least one instruction, at least one program, a code set, or an instruction set. The at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to achieve the following: Figure 1 This paper presents an autonomous localization method for mobile robots based on posture information fusion.
[0112] It is understood that the memory may include random access memory (RAM) or read-only memory. Optionally, the memory may include non-transitory computer-readable storage medium. The memory can be used to store instructions, programs, code, code sets, or instruction sets. The memory may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function, instructions for implementing the various method embodiments described above, etc.; the stored data area may store data created according to the use of the server, etc.
[0113] A processor may include one or more processing cores. The processor connects to various parts of the server via various interfaces and lines, executing instructions, programs, code sets, or instruction sets stored in memory, and accessing data stored in memory to perform various server functions and process data. Optionally, the processor may be implemented using at least one of the following hardware forms: Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor may integrate one or more of the following: Central Processing Unit (CPU) and Modem. The CPU primarily handles the operating system and applications; the modem handles wireless communication. It is understood that the modem may also be implemented as a separate chip without being integrated into the processor.
[0114] Since this electronic device is the electronic device corresponding to the mobile robot autonomous localization method based on attitude information fusion in the embodiments of the present invention, and the principle of solving the problem by this electronic device is similar to that of the method, the implementation of this electronic device can refer to the implementation process of the above method embodiments, and the repeated parts will not be described again.
[0115] Example 6
[0116] This invention also provides a computer-readable storage medium storing at least one instruction, at least one program, a code set, or an instruction set, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to achieve the following: Figure 1 This paper presents an autonomous localization method for mobile robots based on posture information fusion.
[0117] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, including read-only memory (ROM), random access memory (RAM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), one-time programmable read-only memory (OTPROM), electrically-Erasable Programmable Read-Only Memory (EEPROM), compact disc read-only memory (CD-ROM) or other optical disc storage, disk storage, magnetic tape storage, or any other computer-readable medium capable of carrying or storing data.
[0118] Since this storage medium is the storage medium corresponding to a mobile robot autonomous localization method based on attitude information fusion in an embodiment of the present invention, and the principle of the storage medium in solving the problem is similar to that of the method, the implementation of this storage medium can refer to the implementation process of the above method embodiment, and the repeated parts will not be described again.
[0119] Example 7
[0120] In some possible implementations, various aspects of the methods of the embodiments of the present invention can also be implemented as a program product comprising program code that, when run on a computer device, causes the computer device to perform the steps of a mobile robot autonomous localization method based on posture information fusion according to various exemplary embodiments of this application described above. The executable computer program code or "code" for performing the various embodiments can be written in high-level programming languages such as C, C++, C#, Smalltalk, Java, JavaScript, Visual Basic, Structured Query Language (e.g., Transact-SQL), Perl, or in various other programming languages.
[0121] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0122] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.
[0123] The above embodiments are merely illustrative of the technical concept and features of the present invention, and are intended to enable those skilled in the art to understand the content of the present invention and implement it accordingly. They should not be construed as limiting the scope of protection of the present invention. All equivalent changes or modifications made based on the essence of the content of the present invention should be covered within the scope of protection of the present invention.
Claims
1. A method for autonomous localization of a mobile robot based on posture information fusion, characterized in that, Includes the following steps: Select a coordinate point O on the global map M as the origin, select direction T0 as the reference direction, and calibrate the electronic compass sensor at coordinate point O to calibrate direction T0. A local map M0 is obtained at the initial position P0 after the robot is powered on using a two-dimensional laser mapping method, where the local map M0 is a part of the global map M. The initial posture T1 of the robot after power-on is determined based on the reference direction T0 and the reading of the electronic compass sensor; Rotate the local map M0 so that the robot's pose coincides with the reference direction T0, and calculate the initial position P0 on the local map M0, denoted as (u0, v0); the robot's initial position P on the global map M is calculated. * , denoted as (u * ,v * The local map M0 and the global map M are matched for image features to obtain the robot's initial position P, denoted as (u,v), and the robot's initial pose (P,T1) is obtained. The step of performing image feature matching between the local map M0 and the global map M to obtain the robot's initial position P includes: There is an obstacle area {S} on the global map M. b }, Barrier-free area {S o } and unknown regions {S u On the local map M0, there is an obstacle area {S}. b0 }, Barrier-free area {S o0 } and unknown regions {S u0 },and The three regions can be distinguished in the image by their pixel values. Using these features, image matching is performed to find the coordinates (u,v) that maximize the overlap between the local map M0 and the global map M. The position corresponding to these coordinates is the optimal initial position P of the robot.
2. The method for autonomous localization of a mobile robot based on attitude information fusion according to claim 1, characterized in that, The mobile robot autonomous localization method also includes the step of pre-establishing a global map M: A global map M of the indoor environment where the robot is located is created using a two-dimensional laser mapping algorithm. This map is stored as an image in PGM format. For a fixed indoor environment, the step of establishing a global map M only needs to be performed once before the robot's first initial localization. When the robot performs multiple initial pose localizations in the same environment, the global map can be used directly.
3. The autonomous localization method for a mobile robot based on attitude information fusion according to claim 1, characterized in that, The calibration of the electronic compass sensor at coordinate point O with respect to direction T0 includes: Align the horizontal direction of the electronic compass sensor with the reference direction T0, and read the sensor reading at this point as θ0. Then, at any subsequent moment, the robot's posture corresponds to the electronic compass reading as θ. Obtain the robot's current posture T on the map based on the difference ε between θ and θ0.
4. The method for autonomous localization of a mobile robot based on attitude information fusion according to claim 1, characterized in that, The step of obtaining a local map M0 at the initial position P0 after the robot is powered on using a two-dimensional laser mapping method includes: Keeping the robot's position and orientation unchanged when it is powered on, several frames of point cloud {P} of the robot's surrounding environment are collected using a two-dimensional LiDAR sensor. A local map M0 is then constructed with the two-dimensional LiDAR sensor mounted on the robot as the geometric center. This map is stored as a pgm format image.
5. The autonomous localization method for a mobile robot based on attitude information fusion according to claim 1, characterized in that, The step of rotating the local map M0 to make the robot's pose coincide with the reference direction T0 includes: The reading of the electronic compass sensor corresponding to the reference direction T0 is θ0, and the reading of the electronic compass sensor corresponding to the initial attitude T1 is θ1; the difference between θ0 and θ1 is ε1; Based on ε1, perform a rotation operation on the local map M0 with the geometric center as the center, so that the orientation of the local map M0 is the same as that of the global map M.
6. The method for autonomous localization of a mobile robot based on attitude information fusion according to claim 1, characterized in that, The calculation of the initial position P0 on the local map M0 includes: While preserving both obstacle-free and obstacle-free areas in the rotated image and ensuring the geometric center of the rotated image remains fixed, the rotated image is cropped to its original size to obtain the coordinates of the initial position P0 on the local map M0. Let h be the geometric center of the image, where h and w are the length and width of the image, respectively.
7. The autonomous localization method for a mobile robot based on attitude information fusion according to claim 1, characterized in that, The step of using this feature to perform image matching to find the coordinates (u,v) that maximize the overlap between the local map M0 and the global map M includes: Using the obstacle areas {S} in the global map M and the local map M0 b0 } and barrier-free areas {S o0 The pixel value of the corresponding pixel is a feature, and the weights of these two features are set to ω according to their importance. b and ω0; The local map M0 and the global map M are matched pixel by pixel. When the coordinates are (u,v), the current score is calculated according to the following formula: Score(u,v)=ω b N b +ω0N0 In the formula, N b and N o The obstacle areas are {S} b0 } and barrier-free areas {S o0 The number of overlapping pixels; After traversing every pixel of the entire local map M, take the value that makes the Score... (u,v) The largest pixel coordinate (u,v) is located on the global map, which is the initial position P to be obtained.
8. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one program, which is loaded and executed by the processor to implement the method as described in any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Determination method and apparatus for poses of mobile robot
CN105953798A
Dynamic obstacle trajectory prediction method of mobile robot based on laser data
CN113034579A