Relocation Method, Storage Medium and Device for Robot
Through multi-sensor fusion and loopback optimization technology, the robot realizes autonomous repositioning in high-end business scenarios, solving the problem of positioning loss in the existing technology and improving positioning accuracy and stability.
Patent Information
- Application Number
- CN202310267535.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-14
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2043-03-14
AI Technical Summary
The problem of robot positioning loss in the existing technology is difficult to solve in high-end business scenarios. Existing solutions such as remote manual settings of APPs, external markers and deep learning visual recognition have problems such as complex operation, environmental damage and insufficient accuracy.
By combining multi-sensor fusion with laser sensors, inertial measurement units and wheeled odometers, using probability grid maps and loop optimization technology, keyframes are generated independently for positioning and reconstruction, realizing autonomous repositioning of robots in high-end business scenarios.
It realizes that robots can independently perform precise positioning without external markers in high-end business scenarios, improves positioning accuracy and stability, and is suitable for complex environments.
Smart Images

Figure CN116358552B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to an autonomous charging method, storage medium, and device for a robot. Background Art
[0002] As a result of modern technology, robots are intelligent devices capable of autonomous and continuous operation. Since business environments are often complex and ever-changing, especially in busy environments, service robots operating in such environments often run the risk of losing their positioning. Once their positioning is lost, the robot may end up in the wrong place, such as entering a restricted area. Currently, there are several service robot solutions to address this issue:
[0003] 1. Manually set the position remotely via the APP or the cloud to force alignment;
[0004] 2. Use QR code marking or strong reflectors to make corrections in places where positioning is easily lost;
[0005] 3. Through deep learning, it identifies some special objects in the scene as references and corrects their positions;
[0006] 4. Repositioning through GPS information;
[0007] The above-mentioned solutions all have their shortcomings or are not suitable for high-end commercial scenarios: for example, remote manual setting through APP or cloud, because the two-dimensional occupancy grid map scanned by the robot is very abstract and difficult to understand, it is difficult for customers or operators to set the correct posture of the robot through remote operation, and this method requires manual operation by the user; by using external auxiliary features to forcibly set landmarks, this method can reposition the robot more efficiently, but for high-end commercial scenarios, such landmarks are often not set, causing damage to the overall environment; the visual features in deep learning are often affected by changes in lighting, and high-end scenarios often do not have rich texture features. Visual recognition-assisted positioning will cause a large degree of mismatching, resulting in repositioning failure; finally, the accuracy of GPS signals indoors does not meet the requirements.
[0008] Based on this, there is an urgent need for a robot repositioning method to solve the problems existing in the existing technology. Summary of the Invention
[0009] The purpose of the present invention is to provide a repositioning method, storage medium and device for a robot to solve the problems in the prior art.
[0010] In one aspect, a method for relocating a robot is provided, comprising:
[0011] Execute the task and obtain the reference trajectory;
[0012] Determine whether an accurate pose is obtained by matching the front-end result of multi-sensor fusion with the reference trajectory;
[0013] In response to the inability to obtain the precise pose, whether positioning is lost is detected based on the weight of the obstacle point in the probability grid map hit by the laser sensor:
[0014] In response to positioning loss, performing degraded environment detection;
[0015] In response to a loss of positioning due to a degraded environment detection, a key frame is generated by spinning, and the key frame is matched with a key frame of the reference trajectory to calculate the precise pose;
[0016] After the task is completed, the reference trajectory is updated according to the new trajectory.
[0017] In some embodiments, the initial trajectory of the reference trajectory is obtained by controlling the robot to run along the environment and obstacles to build a map.
[0018] In some embodiments, generating a front-end pose based on a front-end result of the current multi-sensor fusion, and determining whether an accurate pose is obtained based on the front-end pose and the reference trajectory includes:
[0019] Get the initial pose based on the wheel odometer and inertial measurement unit;
[0020] Loop closure detection in the reference trajectory according to the initial pose and data from the laser sensor;
[0021] After the loop closure detection is successful, the precise pose is obtained by performing loop closure optimization through continuous iterations;
[0022] After the loop closure detection fails, it is determined that the accurate pose cannot be obtained.
[0023] In some embodiments, the continuous iterative optimization is achieved by constructing a gradient descent function of the residual using the Gauss-Newton method.
[0024] In some embodiments, detecting whether positioning is lost based on the number of times the laser sensor hits an obstacle point in the probability grid map includes:
[0025] On the probability grid map, the number of times each laser click hits the obstacle point on the probability grid map is accumulated'
[0026] If the hit frequency of the single-scan probability grid obstacle is lower than the preset threshold, the positioning is lost.
[0027] In some embodiments, the degraded environment detection includes:
[0028] The speed calculated by the wheel odometry does not match the speed estimated by SLAM, and it is determined that the system is in a degraded environment, resulting in positioning loss.
[0029] In some embodiments, matching the key frame with a key frame of a reference trajectory to calculate an accurate pose includes:
[0030] Get the initial pose based on the wheel odometer and inertial measurement unit;
[0031] Performing global loop closure detection in the reference trajectory based on the initial pose and the data of the laser sensor to obtain a scored optimal pose, and optimizing the history constraint based on the scored optimal pose;
[0032] The precise pose is obtained by searching around the best-scoring pose using brute force matching and constructing a least squares optimization.
[0033] In another aspect, a computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the above-mentioned robot repositioning method.
[0034] In another aspect, a computer device is provided, comprising a processor and a memory; the memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to implement the above-mentioned method for repositioning a robot.
[0035] The beneficial effects of the present invention are:
[0036] The robot repositioning method provided in the embodiment of the present invention, by combining laser sensor data, does not require setting up markers in the environment, can autonomously complete positioning after performing a task, and can reposition the robot during operation. In addition, a new trajectory will be opened for each task, and the new trajectory will continuously search and calculate the posture constraint relationship between it and the reference trajectory to achieve a better global positioning method. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 A flowchart of a method for testing a robot repositioning method provided by an embodiment of the present invention;
[0038] Figure 2 This is a principle block diagram of a robot repositioning device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0039] The specific implementation manner of the present invention will be further described below in conjunction with the accompanying drawings and examples. The following examples are only used to more clearly illustrate the technical solutions of the present invention and are not intended to limit the scope of protection of the present invention.
[0040] The technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0041] In the description of the present invention, it should be noted that the terms "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer," etc., indicating orientations or positional relationships, are based on the orientations or positional relationships shown in the accompanying drawings and are intended solely to facilitate and simplify the description of the present invention. They are not intended to indicate or imply that the devices or components referred to must have, be constructed, or operate in a specific orientation, and therefore should not be construed as limitations on the present invention. Furthermore, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance.
[0042] In the description of the present invention, it should be noted that, unless otherwise expressly specified or limited, the terms "mounted," "connected," and "connected" should be understood in a broad sense. For example, they may refer to fixed, detachable, or integral connections; mechanical or electrical connections; direct or indirect connections through an intermediate medium; and internal communication between two components. Those skilled in the art will understand the specific meanings of the above terms in the present invention based on the specific circumstances.
[0043] The repositioning method provided in the embodiments of this invention is primarily targeted at commercial service robots in high-end scenarios. These environments are typically quite specialized, requiring minimal human involvement and requiring specialized environmental settings, such as the placement of landmarks. This allows the robot to autonomously and accurately perform repositioning operations.
[0044] like Figure 1 As shown, an embodiment of the present invention provides a repositioning method for a robot, comprising:
[0045] Step 102, execute the task and obtain the reference trajectory;
[0046] Step 104, determining whether an accurate pose is obtained by matching the front-end result of multi-sensor fusion with the reference trajectory;
[0047] Step 106: In response to the inability to obtain an accurate position, detect whether positioning is lost based on the weights of the laser sensor hitting the obstacle points in the probability grid map:
[0048] Step 108 , in response to the positioning being lost, performing a degraded environment detection;
[0049] Step 110 , in response to the loss of positioning caused by the degraded environment detection, a key frame is generated by spinning, and the key frame is matched with the key frame of the reference trajectory to calculate the accurate pose;
[0050] Step 112: After the task is completed, the reference trajectory is updated according to the new trajectory.
[0051] The robot repositioning method provided in the embodiment of the present invention, by combining laser sensor data, does not require setting up markers in the environment, can autonomously complete positioning after performing a task, and can reposition the robot during operation. In addition, a new trajectory will be opened for each task, and the new trajectory will continuously search and calculate the posture constraint relationship between it and the reference trajectory to achieve a better global positioning method.
[0052] In step 102, a single-line LiDAR sensor is mounted below the robot. During initial use, the user manually pushes or remotely controls the robot to circumvent obstacles in the indoor environment, creating a recorded trajectory. This trajectory serves as the reference trajectory, also known as trajectory zero. This trajectory consists of multiple recorded keyframes; these keyframes are sequentially constrained to form complete inter-frame constraints, and according to the search structure, loop constraints are formed. During the robot's operation, the LiDAR sensor data forms a series of keyframes, and the relationship between position and posture changes is reflected between keyframes.
[0053] After receiving the task execution instruction, the reference trajectory is obtained. The reference trajectory is the zero trajectory or the trajectory updated according to the trajectory after the previous task execution is completed.
[0054] In step 104, the current multi-sensor system includes, in addition to the aforementioned lidar sensor, an inertial measurement unit (IMU) and a wheel odometry. The IMU can obtain the robot's angular velocity, while the wheel odometry can obtain its linear velocity. The IMU and wheel odometry can roughly determine the robot's initial pose. The lidar sensor data is combined into keyframes. This initial pose is then combined with loop closure detection of the lidar sensor data on the reference trajectory to determine the pose with the highest matching score between the current keyframe and the subgraph in the historical trajectory.
[0055] If the loop closure detection fails to match, it is determined that the accurate pose cannot be obtained. After the loop closure detection is successful, the accurate pose is obtained through continuous iteration of loop closure optimization, where the optimization is to set multiple target errors, construct a gradient descent function, and continuously iterate to minimize the error.
[0056] The continuous iterative optimization here is achieved by constructing a gradient descent function of the residual using the Gauss-Newton method, and then performing continuous iterative optimization until the error is eliminated. For example, the calculation methods in the Gauss-Newton equation are well known to those skilled in the art, such as the Jacobian matrix, and will not be explained in detail here.
[0057] After the mission is completed, the reference trajectory is updated based on the new trajectory. Since trajectory zero refers to the initial frozen trajectory, the trajectory used to build the robot's map, the map is updated with each subsequent run, and the new trajectory is saved, replacing trajectory zero as the new trajectory. This can be thought of as "recording the path taken." When the next mission is executed, it is matched with the saved trajectory from the previous run, i.e., the reference trajectory (frozen trajectory), to achieve global positioning optimization.
[0058] Steps 106 to 112 are used to determine if positioning is lost and to implement repositioning.
[0059] Wherein, in step 106, detecting whether positioning is lost according to the number of times the laser sensor hits the obstacle point in the probability grid map includes:
[0060] On the probability grid map, the number of times each laser click hits the obstacle point on the probability grid map is accumulated'
[0061] If the hit frequency of the single-scan probability grid obstacle is lower than the preset threshold, the positioning is lost.
[0062] The following formula is a grid calculation formula. The concentration frequency is determined by dividing the laser point concentration grid into equal parts. The lower the score, the lower the hit frequency. When the score falls below the preset threshold, positioning is lost.
[0063]
[0064] Among them, T represents the intensity of the point cloud, hk represents the grid value hit, and K represents the sequence.
[0065] After determining that the robot has lost its positioning, it is necessary to determine whether the loss of positioning is caused by a degraded environment. A degraded environment is when sensor measurements are incorrect or tracking fails because the environment no longer contains sufficient information. Alternatively, in one embodiment, the degraded environment is determined by determining whether the speed calculated by the wheel odometer matches the speed estimated by SLAM (Simultaneous Localization and Mapping), as follows:
[0066] V odom < <V slam or V odom >>V slam
[0067] Among them, V odom represents the speed calculated by the wheel odometer, V slam is the velocity estimated by SLAM.
[0068] After the robot detects that it has lost its positioning, it slowly spins, generating keyframes. These keyframes are then gradually matched and optimized with the keyframes in the reference trajectory using wheel odometers, laser scanning, and inertial measurement units to obtain the optimal posture. The wheel odometer and inertial measurement unit use a Kalman filter algorithm to predict posture, obtaining a preliminary displacement posture (initial posture). Based on the initial posture, a global loop closure test is performed on the reference trajectory using the initial posture and laser sensor data to obtain a posture with an optimal score. Historical constraints are then optimized based on this optimal posture. Optimization involves solving gradient descent equations for all historical constraints based on this precise posture, optimizing each constraint and improving positioning accuracy. Existing techniques such as branch-and-bound accelerated search can be used to obtain the optimal posture. The input and output of optimizing historical constraints are the constraint values between each subgraph and node of the historical trajectory, eliminating historical trajectory errors and providing more references.
[0069] Finally, the precise pose is obtained by searching around the best-scoring pose using brute force matching and constructing a least squares optimization method.
[0070]
[0071] The best score is just the best search among multiple search items. The search item itself has errors, and this value cannot represent the exact posture. The exact posture is determined through optimization.
[0072] Correspondingly, such as Figure 2 As shown, an embodiment of the present invention further provides a computer device, including: a processor 21 and a memory 22; the memory 22 is used to store computer instructions, and the processor 21 is used to run the computer instructions stored in the memory 22 to implement any one of the robot repositioning methods provided in the aforementioned embodiments, thereby also achieving corresponding beneficial technical effects, which have been described in detail above and will not be repeated here.
[0073] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.
[0074] In some embodiments, the memory 22 can be a hard disk or a memory, or an external storage device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0075] Accordingly, an embodiment of the present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can be executed by one or more processors to implement any one of the robot repositioning methods provided in the aforementioned embodiments, thereby also achieving corresponding beneficial technical effects. This has been described in detail above and will not be repeated here.
[0076] Computer readable media can be tangible media that can contain or store programs for use with or in combination with an instruction execution system, device or equipment. Machine-readable media can be machine-readable signal media or machine-readable storage media. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0077] In addition, although adopting specific order to describe each operation, this should be understood as requiring such operation to be carried out in the specific order shown or in sequential order, or requiring that all illustrated operations should be carried out to obtain desired results. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although comprising some specific implementation details in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of separate embodiment can also be implemented in a single implementation in combination. On the contrary, the various features described in the context of a single implementation also can be implemented in a plurality of implementations individually or in the mode of any suitable subcombination.
[0078] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for repositioning a robot, characterized in that: include: Execute the task and obtain the reference trajectory; Matching and optimizing the front-end result of multi-sensor fusion with the reference trajectory to determine whether an accurate pose is obtained; In response to the inability to obtain the precise pose, whether positioning is lost is detected based on the weight of the obstacle point in the probability grid map hit by the laser sensor: In response to positioning loss, performing degraded environment detection; In response to a loss of positioning due to a degraded environment detection, a key frame is generated by spinning, and the key frame is matched with a key frame of the reference trajectory to calculate the precise pose; After the task is completed, the reference trajectory is updated according to the new trajectory.
2. The method according to claim 1, wherein The initial trajectory of the reference trajectory is obtained by controlling the robot to run along the environment and obstacles to build a map.
3. The method according to claim 1 or 2, wherein: The determining whether an accurate pose is obtained by matching the front-end result of multi-sensor fusion with the reference trajectory includes: Get the initial pose based on the wheel odometer and inertial measurement unit; Loop closure detection in the reference trajectory according to the initial pose and data from the laser sensor; After the loop closure detection is successful, the precise pose is obtained by performing loop closure optimization through continuous iterations; After the loop closure detection fails, it is determined that the accurate pose cannot be obtained.
4. The method according to claim 3, wherein The continuous iterative optimization is achieved by constructing a gradient descent function of the residual through the Gauss-Newton method.
5. The method according to claim 1, wherein The detecting whether positioning is lost according to the number of times the laser sensor hits the obstacle point in the probability grid map includes: On the probability grid map, the number of times each laser click hits the obstacle point on the probability grid map is accumulated; If the hit frequency of the single-scan probability grid obstacle is lower than the preset threshold, the positioning is lost.
6. The method according to claim 1, wherein The degradation environment detection includes: The speed calculated by the wheel odometry does not match the speed estimated by SLAM, and it is determined that the system is in a degraded environment, resulting in positioning loss.
7. The method according to claim 1, wherein The step of matching the key frame with the key frame of the reference trajectory to calculate the precise pose includes: Get the initial pose based on the wheel odometer and inertial measurement unit; Performing global loop closure detection in the reference trajectory based on the initial pose and the data of the laser sensor to obtain a scored optimal pose, and optimizing the history constraint based on the scored optimal pose; The precise pose is obtained by searching around the best-scoring pose using brute force matching and constructing a least squares optimization.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the robot repositioning method according to any one of claims 1 to 7.
9. A computer device comprising a processor and a memory; the memory is used to store computer instructions, and the processor is used to execute the computer instructions stored in the memory to implement the robot repositioning method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Simultaneous localization and mapping method of monocular vision robot based on retracking strategy
CN106885574A
Navigation map updating method and device, readable storage medium and robot
CN111024100A