A robot positioning method and device, electronic equipment and storage medium
By acquiring the robot's current initial pose and historical pose, and combining the acquisition time of the sensor ranging values, the target pose adjustment amount is calculated to adjust the robot's pose, thus solving the problem of inaccurate robot-to-obstacle relative pose positioning and achieving precise obstacle approach and task execution.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU EZVIZ SOFTWARE CO LTD
- Filing Date
- 2024-12-12
- Publication Date
- 2026-06-12
AI Technical Summary
Existing technologies make it difficult to accurately determine the relative pose between the robot and surrounding obstacles, making it difficult for the robot to move accurately to a position close to the obstacles, which can easily lead to collisions or missed scans.
By acquiring the robot's current initial pose, historical pose, and the acquisition time of sensor ranging values, the robot's pose when the sensors acquire ranging values is determined, and the target pose adjustment amount is calculated to minimize the difference between the robot and the obstacle positions in the local map, thereby adjusting the current initial pose.
It achieves accurate positioning between the robot and obstacles, improves the accuracy and reliability of task execution, and avoids collisions and missed scans.
Smart Images

Figure CN122192298A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot positioning technology, and in particular to a robot positioning method, device, electronic device and storage medium. Background Technology
[0002] In many application scenarios, accurately locating the robot's relative pose to surrounding obstacles is crucial to ensuring the robot can perform its tasks accurately. Taking cleaning robots as an example, these robots typically have edge cleaning capabilities. The prerequisite for achieving this function is that the robot can accurately locate its relative pose to surrounding obstacles. In this way, the robot can move to a position close to the obstacle without colliding, thereby achieving close cleaning of the obstacle's contour and avoiding problems such as missed areas or collisions.
[0003] Currently, the commonly used robot localization method is global localization. This method can only determine the robot's approximate pose within the entire workspace, and it is difficult to accurately determine the robot's relative pose with respect to surrounding obstacles. Furthermore, when there is a discrepancy between the located relative pose and the actual relative pose, the robot may struggle to move close to obstacles or may collide with them when attempting to move based on the located relative pose. Summary of the Invention
[0004] The purpose of this application is to provide a robot localization method, apparatus, electronic device, and storage medium to accurately determine the relative pose of a robot and its surrounding obstacles. The specific technical solution is as follows:
[0005] In a first aspect, embodiments of this application provide a robot localization method, the method comprising:
[0006] Obtain the robot's current initial pose;
[0007] The acquisition pose is determined based on the current initial pose, the robot's historical poses, the localization time of each pose, and the acquisition time of the robot's sensor ranging value. The acquisition pose is the robot's pose when the sensor acquires the ranging value.
[0008] Determine a target pose adjustment amount that minimizes the distance between the target position and the positions of obstacles included in the local map, wherein the target position is a position relative to the robot from the distance measured value, determined based on the acquired pose, the pose adjustment amount, and the sensor mounting pose;
[0009] The current initial pose is adjusted according to the target pose adjustment amount to obtain the current pose of the robot.
[0010] Optionally, determining the target pose adjustment amount that minimizes the distance between the target location and the locations of obstacles included in the local map includes:
[0011] Based on the robot's current initial pose, determine the edge description information of the inner edge of the obstacle in the local map, wherein the inner edge of the obstacle is the edge of the area on the obstacle that is within the robot's detection range;
[0012] The pose adjustment amount that minimizes the target distance is determined as the target pose adjustment amount, wherein the target distance is determined based on the minimum distance between the target position and the inner edge.
[0013] Optionally, the target location may be determined in the following manner:
[0014] Calculate the relative pose relationship between the acquired pose and the current initial pose;
[0015] The current initial pose is adjusted based on the pose adjustment amount to obtain the first pose.
[0016] Based on the relative pose relationship and the first pose, the second pose is determined;
[0017] The target position is determined based on the second pose and the sensor mounting pose.
[0018] Optionally, determining the edge description information of the inner edges of obstacles in the local map based on the robot's current initial pose includes:
[0019] Edge detection is performed on the horizontal plane of the local map, and the edge points of the obstacles around the robot are determined based on the edge detection results.
[0020] Based on the normal or tangent direction at the edge point, edge points within the robot's detection range are selected from the various edge points and designated as inner edge points;
[0021] By fitting the inner edge points, the edge description information of the inner edge of the obstacle is obtained.
[0022] Optionally, fitting the inner edge points to obtain the edge description information of the inner edge of the obstacle includes:
[0023] Based on the position of each inner edge point, adjacent inner edge points are grouped into the same set, resulting in multiple sets;
[0024] Polynomial fitting is performed on the inner edge points included in each set to obtain multiple polynomials, where each polynomial corresponds to a segment of the inner edge of the obstacle;
[0025] The minimum distance between the target location and the inner edge is determined as follows:
[0026] Based on the location coordinates of the target position and the plurality of polynomials, calculate the minimum distance between the target position and each segment of the inner edge.
[0027] Optionally, before determining the pose adjustment amount that minimizes the target distance as the target pose adjustment amount, the method further includes:
[0028] Calculate the pose adjustment loss based on the magnitude of each adjustment component in the pose adjustment amount;
[0029] Determining the pose adjustment amount that minimizes the target distance, as the target pose adjustment amount, includes:
[0030] The pose adjustment amount that minimizes the total loss is determined as the target pose adjustment amount, wherein the total loss is determined based on the target distance and the position adjustment loss.
[0031] Optionally, the number of ranging values is multiple, and the target distance is determined based on the minimum non-abnormal distance between the target position and the inner edge;
[0032] Determine whether the minimum distance is abnormal using the following method:
[0033] The system uses a preset anomaly detection method to detect whether there is an abnormal minimum distance among the various minimum distances.
[0034] Optionally, determining the acquisition pose based on the current initial pose, the robot's historical poses, the localization time of each pose, and the acquisition time of the robot's sensor ranging values includes:
[0035] Determine whether there is a target pose in each pose of the robot whose positioning time is the same as the acquisition time of the ranging value acquired by the robot's sensors;
[0036] If the target pose exists, the target pose is determined as the acquisition pose;
[0037] If the target pose does not exist, interpolation calculation is performed based on each pose, the acquisition time of the ranging value, and the positioning time of each pose to obtain the acquired pose.
[0038] Optionally, the sensor is a point sensor.
[0039] Secondly, embodiments of this application provide a robot positioning device, the device comprising:
[0040] The pose acquisition module is used to acquire the robot's current initial pose.
[0041] The pose determination module is used to determine the acquisition pose based on the current initial pose, the robot's historical pose, the positioning time of each pose, and the acquisition time of the robot's sensor ranging value. The acquisition pose is the robot's pose when the sensor acquires the ranging value.
[0042] The adjustment amount determination module is used to determine the target pose adjustment amount that minimizes the distance between the target position and the position of the obstacle included in the local map, wherein the target position is the position of the robot at a distance from the distance measurement value determined based on the acquired pose, the pose adjustment amount and the installation pose of the sensor;
[0043] The pose adjustment module is used to adjust the current initial pose according to the target pose adjustment amount to obtain the current pose of the robot.
[0044] Optionally, the adjustment amount determination module includes:
[0045] The edge description information determination submodule is used to determine the edge description information of the inner edge of the obstacle in the local map based on the robot's current initial pose, wherein the inner edge of the obstacle is the edge of the area on the obstacle that is within the robot's detection range;
[0046] The adjustment amount determination submodule is used to determine the pose adjustment amount that minimizes the target distance value, which is used as the target pose adjustment amount, wherein the target distance is determined based on the minimum distance between the target position and the inner edge.
[0047] Optionally, the target location may be determined in the following manner:
[0048] Calculate the relative pose relationship between the acquired pose and the current initial pose; adjust the current initial pose based on the pose adjustment amount to obtain the first pose;
[0049] Based on the relative pose relationship and the first pose, a second pose is determined; based on the second pose and the sensor mounting pose, the target position is determined.
[0050] Optionally, the edge description information determination submodule includes:
[0051] An edge point determination unit is used to perform edge detection on the horizontal plane of the local map and determine the edge points of obstacles around the robot based on the edge detection results.
[0052] The inner edge point determination unit is used to select edge points within the detection range of the robot from the various edge points according to the normal vector direction or tangent direction at the edge point, and to designate them as inner edge points.
[0053] The fitting unit is used to fit the inner edge points to obtain the edge description information of the inner edge of the obstacle.
[0054] Optionally, the fitting unit includes:
[0055] The set partitioning subunit is used to divide adjacent inner edge points into the same set based on their positions, resulting in multiple sets;
[0056] The fitting subunit is used to perform polynomial fitting on the inner edge points included in each set to obtain multiple polynomials, wherein each polynomial corresponds to a segment of the inner edge of the obstacle.
[0057] The minimum distance between the target location and the inner edge is determined as follows: based on the location coordinates of the target location and the plurality of polynomials, the minimum distance between the target location and each segment of the inner edge is calculated.
[0058] Optionally, the adjustment amount determination module further includes:
[0059] The pose adjustment loss determination unit is used to calculate the pose adjustment loss based on the magnitude of each adjustment component in the pose adjustment amount.
[0060] The adjustment amount determination submodule is specifically used to: determine the pose adjustment amount that minimizes the total loss, as the target pose adjustment amount, wherein the total loss is determined based on the target distance and the position adjustment loss.
[0061] Optionally, the number of ranging values is multiple, and the target distance is determined based on the minimum non-abnormal distance between the target position and the inner edge;
[0062] Determine whether the minimum distance is abnormal using the following method:
[0063] The system uses a preset anomaly detection method to detect whether there is an abnormal minimum distance among the various minimum distances.
[0064] Optionally, the pose determination module is specifically used for:
[0065] Determine whether there is a target pose in each pose of the robot whose positioning time is the same as the acquisition time of the ranging value acquired by the robot's sensors;
[0066] If the target pose exists, the target pose is determined as the acquisition pose;
[0067] If the target pose does not exist, interpolation calculation is performed based on each pose, the acquisition time of the ranging value, and the positioning time of each pose to obtain the acquired pose.
[0068] Optionally, the sensor is a point sensor.
[0069] Thirdly, embodiments of this application provide an electronic device, including:
[0070] Memory, used to store computer programs;
[0071] When a processor executes a program stored in memory, it implements any of the methods described in the first aspect above.
[0072] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the methods described in the first aspect above.
[0073] Beneficial effects of the embodiments in this application:
[0074] In the solution provided in this application, the electronic device acquires the robot's current initial pose. Based on this, and combining the robot's historical poses, the localization time of each pose, and the acquisition time of the sensor ranging values, it determines the robot's pose when the sensors acquire the ranging values. Subsequently, using the above information and the sensor's installation pose, a target pose adjustment amount is calculated that minimizes the difference between the position calculated based on the sensor ranging values and the positions of obstacles in the local map surrounding the robot. Finally, by applying this target pose adjustment amount to adjust the current initial pose, the relative pose between the robot and its surrounding obstacles can be accurately located.
[0075] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0076] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0077] Figure 1 This is a schematic flowchart of a robot localization method provided in an embodiment of this application;
[0078] Figure 2 For based on Figure 1 A flowchart illustrating a method for determining a target pose adjustment amount in an embodiment shown;
[0079] Figure 3 For based on Figure 2 A flowchart illustrating one method for determining a target location in the embodiment shown;
[0080] Figure 4 For based on Figure 2 A flowchart illustrating a method for determining edge description information in the embodiment shown;
[0081] Figure 5 For based on Figure 4 A schematic diagram of a projection method according to the embodiment shown;
[0082] Figure 6 For based on Figure 2 A schematic diagram illustrating a specific process for determining the target pose adjustment amount in the embodiment shown.
[0083] Figure 7 This is a schematic diagram of a robot positioning device provided in an embodiment of this application;
[0084] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0085] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0086] To accurately determine the relative pose of a robot to its surrounding obstacles, embodiments of this application provide a robot localization method, apparatus, electronic device, computer-readable storage medium, and computer program product. The robot localization method provided in the embodiments of this application will be described first.
[0087] The robot positioning method provided in this application can be applied to any electronic device that needs to position a robot. For example, the electronic device can be the robot itself or a server that communicates with the robot. No specific limitation is made here. For clarity, it will be referred to as an electronic device.
[0088] like Figure 1 As shown, a robot localization method includes:
[0089] S101, Obtain the robot's current initial pose.
[0090] S102, determine the acquisition pose based on the current initial pose, the robot's historical pose, the localization time of each pose, and the acquisition time of the robot's sensor ranging values.
[0091] Among them, the acquired pose is the robot's pose when the sensor acquires the ranging value.
[0092] S103, determine the target pose adjustment amount that minimizes the distance between the target position and the positions of obstacles included in the local map.
[0093] The target position is the distance measured from the robot, determined based on the acquired pose, pose adjustment amount, and sensor installation pose.
[0094] S104, adjust the current initial pose according to the target pose adjustment amount to obtain the robot's current pose.
[0095] In the solution provided in this application, the robot's current initial pose is obtained. Based on this, and combined with the robot's historical poses, the localization time of each pose, and the acquisition time of the sensor ranging values, the robot's pose when the sensors acquire the ranging values is determined. Subsequently, using the above information and the sensor's installation pose, a target pose adjustment amount is calculated that minimizes the difference between the position calculated based on the sensor ranging values and the positions of obstacles in the local map around the robot. Finally, by applying this target pose adjustment amount to adjust the current initial pose, the relative pose between the robot and its surrounding obstacles can be accurately located.
[0096] When accurate positioning of a robot relative to its surrounding obstacles is required, electronic devices can first acquire the robot's current initial pose and the positioning time of that initial pose; this is the starting point of the entire positioning process. For example, the approximate pose of the robot within the entire workspace can be determined using global positioning (GPS) as the current initial pose; alternatively, the robot's acceleration and angular velocity can be measured using an IMU (Inertial Measurement Unit), and the robot's pose can be determined by integrating these acceleration and angular velocities. The current initial pose can include the robot's coordinate position. and posture angle .
[0097] However, there is often a certain deviation between the acquired initial pose and the robot's actual pose. For example, due to the accuracy limitations of global localization, the accuracy of the initial pose is low, making it difficult to accurately determine the robot's actual pose; or, when determining the robot's pose using an IMU, cumulative errors occur over time, leading to errors in the initial pose determined through integration.
[0098] Therefore, after acquiring the robot's current initial pose, the electronic device can correct it in the following ways to accurately locate the robot's relative pose to its surrounding obstacles.
[0099] During the robot's previous movements, electronic devices can record the robot's various historical poses and the positioning time of each pose. In addition, the robot is equipped with a distance-measuring sensor, which can perform distance measurement in real time during the robot's movement, collecting various distance values. Based on this, the electronic devices can also record each distance value collected by the sensor and the time of collection for each distance value.
[0100] Because point sensors measure by focusing a single beam of light or signal, they reduce environmental interference and scattering effects, resulting in more accurate ranging. Therefore, the aforementioned sensors can be point sensors such as ultrasonic sensors or TOF (time-of-flight) sensors. It should be noted that using a point sensor is merely an example, and the specific type of sensor is not limited in the embodiments of this application.
[0101] For ranging values, the distance between the robot and obstacles around it is represented. In order to determine the specific location of the obstacle based on the ranging value, it is also necessary to know the robot's pose when the sensor collects the ranging value (i.e., the acquisition pose, including coordinate position). and posture angle And the sensor's mounting pose (i.e., the sensor's pose in the robot coordinate system, including its coordinate position) and the sensor's mounting pose. and posture angle ).
[0102] The sensor's mounting pose is fixed and can be pre-recorded, but the acquisition pose changes as the robot moves. Therefore, the robot's acquisition pose needs to be determined based on its movement. Specifically:
[0103] Because the robot's historical pose and current initial pose can reflect the robot's historical movement, and the ranging value is also collected during the robot's historical movement, the electronic device can determine the robot's acquisition pose at the acquisition time based on the positioning time of each pose and the acquisition time of the ranging value.
[0104] In one implementation, since locating the pose and acquiring the ranging value are relatively independent processes, the locating time of the historical pose and the acquisition time of the ranging value may not be consistent. Based on this, when determining the acquisition pose, the electronic device can first determine whether there is a target pose among the robot's various poses whose locating time is the same as the acquisition time of the robot's sensor acquiring the ranging value. If a target pose exists, the target pose is determined as the acquisition pose. If no target pose exists, interpolation calculation is performed based on the acquisition time of each pose, the acquisition time of the ranging value, and the locating time of each pose to obtain the acquisition pose.
[0105] After determining the acquisition pose, the electronic device can adjust the pose (including coordinate position adjustment) based on the acquisition pose and the pose adjustment amount. and attitude angle adjustment amount The electronic devices determine the target position relative to the distance measured by the sensor mounting pose and the distance to the obstacle in the local map. The electronic devices then compare the target position with the obstacle positions in the local map to determine the distance between them. The electronic devices iteratively update the pose adjustment amount and perform the above steps until they find the pose adjustment amount that minimizes the distance between the target position and the obstacle positions included in the local map; this target pose adjustment amount is the amount needed to adjust the robot's current initial pose to make the target position match the actual obstacle positions as closely as possible.
[0106] The local map can be gradually built by the robot through its own LiDAR, cameras and other sensors during the movement, or it can be a portion of the map captured from a pre-established global map based on the robot's current initial pose. There are no specific limitations here, as long as the local map contains obstacle information in the robot's surrounding environment.
[0107] For the specific process of determining the target pose adjustment amount, the electronic device can start with the initial pose adjustment amount and iteratively update the pose adjustment amount through an optimization algorithm to minimize the distance between the target position and the obstacle positions in the local map. The electronic device can then use the pose adjustment amount that minimizes the distance as the target pose adjustment amount. For example, the electronic device can first determine the distance between the target position and the obstacle positions in the local map based on the initial pose adjustment amount, and then use gradient descent to iteratively optimize the pose adjustment amount. In each iteration, the new distance between the target position and the obstacle positions is calculated based on the current pose adjustment amount, and the pose adjustment amount is adjusted according to the trend of distance changes until the target pose adjustment amount that minimizes the distance is found.
[0108] Finally, after obtaining the adjustment amount based on the target pose, the electronic device can adjust the current initial pose based on the target pose adjustment amount to obtain the robot's current pose. This current pose can accurately represent the relative pose between the robot and its surrounding obstacles. For example, the electronic device can multiply the adjustment matrix corresponding to the target pose adjustment amount with the pose matrix corresponding to the current initial pose, and then use the calculated result as the robot's current pose.
[0109] In the solution provided in this application, the robot's current initial pose is obtained. Based on this, and combined with the robot's historical poses, the localization time of each pose, and the acquisition time of the sensor ranging values, the robot's pose when the sensors acquire the ranging values is determined. Subsequently, using the above information and the sensor's installation pose, a target pose adjustment amount is calculated that minimizes the difference between the position calculated based on the sensor ranging values and the positions of obstacles in the local map around the robot. Finally, by applying this target pose adjustment amount to adjust the current initial pose, the relative pose between the robot and its surrounding obstacles can be accurately located.
[0110] As one implementation method of this application, such as Figure 2 As shown, when the electronic device performs step S103, it can specifically achieve this through steps S201-S202:
[0111] S201, Based on the robot's current initial pose, determine the edge description information of the inner edges of obstacles in the local map.
[0112] Determining the distance between a target location and the location of obstacles included in the local map involves significant computation if the complete edges of the obstacles are used. Therefore, considering that the area of an obstacle within the robot's detection range is the part most closely interacted with by the robot, and that most of the ranging values collected by sensors originate from this area, the electronic device can first determine the area of the obstacle within the robot's detection range in the local map based on the robot's current initial pose before determining the distance between the target location and the location of obstacles included in the local map. Then, it can determine the edge description information of the edges of this area (i.e., the edge description information of the inner edges). Subsequently, the electronic device can determine the distance between the target location and the location of obstacles included in the local map based solely on the edge description information of the inner edges, without needing to consider the edges of the obstacles outside the robot's detection range in the local map, thus reducing the computational load.
[0113] The specific method for determining the edge description information of the inner edge of obstacles in the local map will be described in detail in subsequent embodiments, and will not be repeated here.
[0114] S202, determine the pose adjustment amount that minimizes the target distance, and use it as the target pose adjustment amount.
[0115] The electronic device can determine the position (i.e., the target position) relative to the robot based on the acquired pose, pose adjustment amount, and sensor mounting pose. Then, based on the target position's coordinate information and the edge description information of the obstacle's inner edge obtained in step S201, the electronic device can calculate the minimum distance between the target position and the inner edge, and determine the target distance based on the obtained minimum distance.
[0116] The electronic device iteratively updates the position adjustment amount and repeats the above target distance calculation process until the pose adjustment amount that minimizes the target distance is found, and this is taken as the target pose adjustment amount.
[0117] The minimum distance can be calculated using different methods depending on the different types of edge description information of the inner edge (such as curve equations, key point coordinates, etc.). No specific limitation is made here. For example, for inner edges composed of points, the point-to-point distance formula can be used, and for inner edges represented by curves, the point-to-curve distance formula can be used, etc.
[0118] Regarding the method of determining the target distance based on the obtained minimum distance:
[0119] When there is only one distance measurement value, the electronic device can directly use the minimum distance obtained as the target distance, or use the square of the minimum distance as the target distance, etc.
[0120] When there are multiple ranging values, there are also multiple target locations, and there are also multiple minimum distances between the determined target locations and the inner edge. At this time, the electronic device can use the sum of multiple minimum distances as the target distance. The sum can be an addition, a square sum, or a weighted square sum, and no specific limitation is made here.
[0121] For example, if target position 1 is determined based on distance measurement value 1, target position 2 is determined based on distance measurement value 2, and target position 3 is determined based on distance measurement value 3, the electronic device can calculate the minimum distance S1 between target position 1 and the inner edge, the minimum distance S2 between target position 2 and the inner edge, and the minimum distance S3 between target position 3 and the inner edge, respectively. Then, the target distance can be the sum of the squares of these three minimum distances, i.e., the target distance is... .
[0122] In one implementation, when multiple minimum distances are obtained, to prevent individual sensor anomalies from affecting the determination of the target distance and thus the adjustment of the robot's pose, the electronic device can use a preset anomaly detection method to detect whether there is an abnormal minimum distance among the various minimum distances, and then determine the target distance only based on the non-abnormal minimum distances. Specifically:
[0123] Electronic devices can use a preset evaluation algorithm to detect whether there are any abnormal minimum distances among the various minimum distances. The specific type of evaluation algorithm can be set according to the actual use case, and is not specifically limited here.
[0124] For example, the evaluation algorithm could be: calculate the mean and standard deviation of all minimum distances. Then, add or subtract a certain multiple of the standard deviation from the mean to determine the range of normal distances. For each minimum distance, determine whether it falls within the range of normal distances; if a minimum distance exceeds this range, it is considered an outlier minimum distance. Other examples of evaluation algorithms could be Isolation Forest Algorithm (IF) or Local Outlier Factor Algorithm (LOF).
[0125] Electronic devices can also use a pre-trained classification model to detect whether there are abnormal minimum distances among the various minimum distances. This classification model is trained based on the normal and abnormal distances between points and lines and is used to detect abnormal distances.
[0126] For example, an SVM (Support Vector Machine) model can be trained beforehand using normal and abnormal distances between points and lines. The goal of training is to enable the SVM model to find a hyperplane that separates normal and abnormal distances as much as possible. During training, the parameters of the SVM (such as support vectors, bias terms, etc.) are adjusted using optimization algorithms to obtain the trained SVM model. After obtaining each minimum distance, these minimum distances can be input into the trained SVM model. The SVM model will then determine whether each minimum distance is an abnormal minimum distance based on the distance from the minimum distance to the hyperplane and a pre-defined decision function.
[0127] The solution provided in this application reduces computation by determining the edge description information of the inner edge of the obstacle and using it to determine the target distance, thus avoiding the heavy computation caused by processing the entire obstacle edge. Furthermore, by iteratively calculating the minimum distance between the target position and the inner edge to obtain the target pose adjustment amount, the relative position of the robot and the inner edge of the obstacle can be accurately located. This allows the robot to accurately approach the obstacle without collision when performing tasks such as edge-following, significantly improving the accuracy and reliability of task execution. In addition, after obtaining each minimum distance, abnormal minimum distances can be eliminated, thereby preventing abnormal values from individual sensors from affecting the determination of the target distance and thus affecting the robot's pose adjustment.
[0128] As one embodiment of this application, the electronic device can be implemented according to... Figure 3 The target location is determined as shown:
[0129] S301, calculate the relative pose relationship between the acquired pose and the current initial pose.
[0130] As mentioned earlier, the current initial pose includes the robot's coordinate position. and posture angle Based on coordinate position and posture angle The current initial position can be represented in matrix form as follows: The pose acquisition includes the robot's coordinate position. and posture angle Based on coordinate position and posture angle The pose set can be represented in matrix form as follows: .
[0131] Furthermore, the electronic device can calculate the relative pose relationship between the acquired pose and the current initial pose using the following formula. :
[0132] ;
[0133] S302, adjust the current initial pose based on the pose adjustment amount to obtain the first pose.
[0134] As mentioned earlier, pose adjustment includes coordinate position adjustment. and attitude angle adjustment amount Based on coordinate position and attitude angle adjustment amount The pose adjustment can be represented in matrix form as follows: .
[0135] Furthermore, the electronic device can adjust its current initial pose based on the pose adjustment amount using the following formula to obtain the first pose. :
[0136] ;
[0137] S303, determine the second pose based on the relative pose relationship and the first pose.
[0138] After determining the relative pose relationship between the acquisition pose and the current initial pose, as well as the adjusted current initial pose, the electronic device can determine the adjusted acquisition pose (i.e., the second pose) based on the relative pose relationship and the adjusted current initial pose.
[0139] Following steps S301-S302, the electronic device can determine the second pose using the following formula. :
[0140] ;
[0141] S304, determine the target position based on the second pose and the sensor mounting pose.
[0142] After the electronic device obtains the second pose, since the second pose represents the robot's adjusted pose when the sensor collects the ranging value, meaning the robot's pose is determined at this point, the sensor's acquisition direction can be further determined based on the second pose and the pre-recorded sensor installation pose. Finally, based on this acquisition direction and the ranging value, a position can be determined, which is the target position.
[0143] In the solution provided in this application embodiment, the relative pose relationship between the acquired pose and the current initial pose is calculated, and the current initial pose is adjusted based on the pose adjustment amount to obtain the first pose. Then, the second pose (i.e., the adjusted acquisition pose) is determined by combining the relative pose relationship and the first pose. Finally, based on the second pose and the sensor installation pose, the sensor acquisition direction can be accurately determined, and combined with the ranging value, the target position can be accurately located, thus improving the accuracy of target position positioning.
[0144] As one implementation method of this application, such as Figure 4 As shown, when the electronic device performs step S201, it can specifically achieve this through steps S401-S403:
[0145] S401 performs edge detection on the horizontal plane of the local map and determines the edge points of obstacles around the robot based on the edge detection results.
[0146] When the local map is a two-dimensional map, it includes obstacles that are on the same horizontal plane as the robot and are located around the robot. Based on this, the electronic device can directly perform edge detection on the local map and then determine the edge points of the obstacles around the robot based on the edge detection results.
[0147] When the local map is a three-dimensional map, such as a three-dimensional point cloud map or an obstacle semantic envelope map, the electronic device can first project the local map onto a horizontal plane to obtain a two-dimensional map, and then perform edge detection on the projected local map, and determine the edge points of the obstacles around the robot based on the edge detection results.
[0148] For the operation of projecting a local map onto a horizontal plane, in most scenarios, the edges of obstacles at different heights are consistent, such as vertical walls or table legs with a constant diameter. In this scenario, whether all the 3D information of the obstacles in the local map is projected onto the horizontal plane, or only part of the 3D information of the obstacles in the local map is projected onto the horizontal plane, it will not have a significant impact on the edges of the obstacles. Therefore, in this scenario, both methods are feasible.
[0149] However, in some scenarios, the edges of obstacles differ at different heights, for example, as shown in the image. Figure 5 As shown, the obstacle is a table leg with an inconsistent diameter (the diameter of table leg segment A is smaller, and the diameter of table leg segment B is larger). Assuming the target position corresponding to the distance measurement value is point a, if all the three-dimensional information of the obstacle in the local map is projected onto the horizontal plane, the edges will be different from those if only part of the three-dimensional information of the obstacle in the local map is projected onto the horizontal plane (for example, only the three-dimensional information of table leg segment A is projected onto the horizontal plane). This will have a significant impact on the calculation of the target distance.
[0150] Based on this, when the electronic device projects a local map onto a horizontal plane, it can determine the 3D information of obstacles whose height difference from the target location is within a certain threshold, and then project this 3D information onto the horizontal plane; or it can determine the edge changes of the obstacle based on the obstacle's 3D information, segment the obstacle according to the edge changes, and then project the segmented 3D information, including the height of the target location, onto the horizontal plane. Continuing the example above, for point A, the electronic device can project the 3D information of segment A of the table leg onto the horizontal plane.
[0151] S402, based on the normal or tangent direction at the edge point, select the edge points within the robot's detection range from each edge point and use them as inner edge points.
[0152] As mentioned earlier, considering that the area on the obstacle within the robot's detection range is the part that interacts more closely with the robot in actual operation, and that the ranging values collected by the sensors mostly come from this area, after obtaining each edge point of the obstacle, the electronic device can select the edge points within the robot's detection range from each edge point based on the normal vector direction or tangent direction at the edge point, and use them as inner edge points.
[0153] For example, for each edge point, the electronic device can determine the angle between the direction of the line connecting the edge point and the robot and the direction of the normal vector (or tangent direction) of the edge. If the angle is within a preset angle range, the edge point is determined as an inner edge point.
[0154] S403, fit the inner edge points to obtain the edge description information of the inner edge of the obstacle.
[0155] When determining the minimum distance between the target location and the inner edge, one can directly calculate the distance between the target location and each inner edge point, and then determine the minimum distance from each distance. However, this requires calculation for each inner edge, which involves a large amount of computation and low processing efficiency.
[0156] Therefore, in order to reduce the amount of computation and improve processing efficiency, after obtaining the inner edge points, the electronic device can first fit the inner edge points to obtain the edge description information of the inner edge of the obstacle. In this way, when determining the minimum distance between the target position and the inner edge, it can be directly calculated based on the coordinates of the target position and the edge description information of the inner edge, without having to calculate each inner edge point separately.
[0157] Regarding the fitting of inner edge points, electronic devices can achieve this through, but are not limited to, the following methods:
[0158] In the first embodiment, the electronic device treats each obtained inner edge point as a whole and uses methods such as least squares to fit it, thereby obtaining a polynomial, which is the edge description information of the inner edge.
[0159] Correspondingly, in this case, when determining the minimum distance between the target position and the inner edge, the electronic device can directly calculate the Euclidean distance between the position coordinates of the target position and the polynomial, and use it as the minimum distance between the target position and the inner edge.
[0160] In the second embodiment, the electronic device can first divide the adjacent inner edge points into the same set according to the position of each inner edge point, and then perform polynomial fitting on the inner edge points included in each set to obtain multiple polynomials. Each polynomial corresponds to a segment of the inner edge of the obstacle. The number of polynomials can be preset according to the size of the local map, or it can be determined in real time according to the number of inner edge points of the obstacle. No specific limitation is made here.
[0161] Correspondingly, in this case, when determining the minimum distance between the target position and the inner edge, the electronic device can calculate the Euclidean distance between the position coordinates of the target position and multiple polynomials respectively, and then take the Euclidean distance with the smallest value as the minimum distance between the target position and the inner edge.
[0162] Furthermore, in order to further improve the accuracy of inner edge point fitting, in the second embodiment, when the electronic device divides into multiple sets, each of two adjacent sets may include inner edge points located at the boundary between the two sets, so that the curves corresponding to each polynomial fitted based on the inner edge points in the multiple sets are connected end to end.
[0163] For example, the inner edge points include: point a, point b, point c... point l. Suppose that the inner edges are divided into a first set, a second set, and a third set. Then, the first set and the second set can both include point d, and the second set and the third set can both include point h. This allows one end of curve 1 corresponding to polynomial 1 fitted based on the inner edge points in the first set to be connected to one end of curve 2 corresponding to polynomial 2 fitted based on the inner edge points in the second set, and the other end of curve 2 corresponding to polynomial 2 fitted based on the inner edge points in the second set to be connected to one end of curve 3 corresponding to polynomial 3 fitted based on the inner edge points in the third set.
[0164] The solution provided in this application can intelligently select the projection method of the local map according to different scenarios to reduce edge errors. Furthermore, after detecting edge points, it can accurately filter inner edge points by using the normal or tangent direction at the edge points. Subsequent polynomial fitting of each inner edge point can model the obstacle, simplifying the subsequent minimum distance calculation process and improving computational efficiency. Moreover, by including inner edge points located at the boundary between two adjacent sets, the coherence between multiple polynomials can be ensured simultaneously, thereby further improving the accuracy of edge fitting.
[0165] As one embodiment of this application, when determining the target pose adjustment amount, the electronic device may consider not only the distance between the target position and the positions of obstacles included in the local map, but also the magnitude of the pose adjustment amount. Specifically, for example... Figure 6 As shown, before executing step S202, the electronic device may also execute step S601:
[0166] S601, calculate the pose adjustment loss based on the magnitude of each adjustment component in the pose adjustment amount.
[0167] In the process of iteratively updating the position adjustment amount, the electronic device not only needs to redetermine the target position based on the new position adjustment amount and calculate the distance between the target position and the position of obstacles included in the local map, but also needs to consider the magnitude of the updated pose adjustment amount.
[0168] Therefore, during the iterative update of the position adjustment amount, the electronic device can also calculate the pose adjustment loss based on the magnitude of each adjustment component in the new pose adjustment amount.
[0169] For example, electronic devices can calculate pose adjustment loss using the following formula. :
[0170] ;
[0171] in, Indicates the position adjustment loss weight. This indicates the weight of the angle adjustment loss.
[0172] Accordingly, when the electronic device executes step S202, it can specifically achieve this through step S602:
[0173] S602, determine the pose adjustment amount that minimizes the total loss, and use it as the target pose adjustment amount.
[0174] After determining the target distance and pose adjustment loss, the electronic device can calculate the total loss based on the two, and then iteratively update the pose adjustment amount through an optimization algorithm to determine the pose adjustment amount that minimizes the total loss, which is then used as the target pose adjustment amount.
[0175] For example, electronic devices can calculate the target distance using the following formula. :
[0176] ;
[0177] in, This represents the minimum distance between the first target location and the inner edge. This represents the minimum distance between the nth target location and the inner edge.
[0178] The electronic device can then calculate the total loss using the following formula. :
[0179] ;
[0180] in, Indicates the target distance weight. This represents the pose adjustment loss weight.
[0181] In one implementation, the electronic device may also consider the maximum position adjustment amount during the iterative update of the position adjustment amount, that is, the position adjustment amount iteratively updated by the electronic device will not exceed the maximum position adjustment amount.
[0182] The above is based on total loss Determining the target pose adjustment is a nonlinear optimization problem. Based on this, it can be solved using existing nonlinear optimization libraries such as Ceres and G2O (General Graph Optimization), with the maximum position adjustment as a constraint added during the solution process.
[0183] In the solution provided in this application, when determining the target pose adjustment amount, the electronic device considers not only the distance between the target position and obstacles in the local map, but also the magnitude of the pose adjustment amount, that is, the adjustment range of position and angle. By calculating the pose adjustment loss and incorporating it into the total loss, the electronic device can make the pose adjustment process more stable and prevent edge control oscillations caused by excessive correction. In addition, by setting a limit on the maximum position adjustment amount, the controllability and stability of the adjustment process can be further ensured, preventing over-adjustment of the pose.
[0184] Corresponding to the robot positioning method described above, this application also provides a robot positioning device, which will be described below.
[0185] like Figure 7 As shown, a robot positioning device includes:
[0186] The pose acquisition module 701 is used to acquire the robot's current initial pose;
[0187] The pose determination module 702 is used to determine the acquisition pose based on the current initial pose, the robot's historical pose, the localization time of each pose, and the acquisition time of the robot's sensor ranging value. The acquisition pose is the robot's pose when the sensor acquires the ranging value.
[0188] The adjustment amount determination module 703 is used to determine the target pose adjustment amount that minimizes the distance between the target position and the position of obstacles included in the local map, wherein the target position is the position of the distance measurement value between the robot and the acquired pose, pose adjustment amount and sensor installation pose.
[0189] The pose adjustment module 704 is used to adjust the current initial pose according to the target pose adjustment amount to obtain the current pose of the robot.
[0190] In the solution provided in this application, the robot's current initial pose is obtained. Based on this, and combined with the robot's historical poses, the localization time of each pose, and the acquisition time of the sensor ranging values, the robot's pose when the sensors acquire the ranging values is determined. Subsequently, using the above information and the sensor's installation pose, a target pose adjustment amount is calculated that minimizes the difference between the position calculated based on the sensor ranging values and the positions of obstacles in the local map around the robot. Finally, by applying this target pose adjustment amount to adjust the current initial pose, the relative pose between the robot and its surrounding obstacles can be accurately located.
[0191] As one embodiment of this application, the adjustment amount determination module 703 described above may include:
[0192] The edge description information determination submodule is used to determine the edge description information of the inner edges of obstacles in the local map based on the robot's current initial pose. The inner edges of obstacles are the edges of the areas on the obstacles that are within the robot's detection range.
[0193] The adjustment amount determination submodule is used to determine the pose adjustment amount that minimizes the target distance value, which is used as the target pose adjustment amount. The target distance is determined based on the minimum distance between the target position and the inner edge.
[0194] As one embodiment of this application, the electronic device can determine the target location in the following manner:
[0195] Calculate the relative pose relationship between the acquired pose and the current initial pose;
[0196] The first pose is obtained by adjusting the current initial pose based on the pose adjustment amount.
[0197] Determine the second pose based on the relative pose relationship and the first pose;
[0198] The target position is determined based on the second pose and the sensor mounting pose.
[0199] As one embodiment of this application, the aforementioned edge description information determination submodule may include:
[0200] The edge point determination unit is used to perform edge detection in the horizontal plane of the local map and determine the edge points of obstacles around the robot based on the edge detection results.
[0201] The inner edge point determination unit is used to select edge points within the robot's detection range from each edge point based on the normal vector direction or tangent direction at the edge point, and to designate them as inner edge points.
[0202] The fitting unit is used to fit the inner edge points to obtain the edge description information of the inner edge of the obstacle.
[0203] As one embodiment of this application, the above-mentioned fitting unit may include:
[0204] The set partitioning subunit is used to divide adjacent inner edge points into the same set based on their positions, resulting in multiple sets;
[0205] The fitting subunit is used to perform polynomial fitting on the inner edge points included in each set to obtain multiple polynomials, where each polynomial corresponds to a segment of the inner edge of the obstacle.
[0206] The minimum distance between the target location and the inner edge shall be determined as follows:
[0207] Based on the target location's coordinates and multiple polynomials, calculate the minimum distance between the target location and each segment of the inner edge.
[0208] As one embodiment of this application, the adjustment amount determination module 703 may further include:
[0209] The pose adjustment loss determination unit is used to calculate the pose adjustment loss based on the magnitude of each adjustment component in the pose adjustment amount.
[0210] The adjustment amount determination submodule is specifically used for:
[0211] The pose adjustment amount that minimizes the total loss is determined as the target pose adjustment amount, where the total loss is determined based on the target distance and position adjustment loss.
[0212] As one embodiment of this application, the number of the above-mentioned ranging values can be multiple, and the target distance is determined based on the non-abnormal minimum distance between the target position and the inner edge;
[0213] Electronic devices can determine whether the minimum distance is abnormal in the following ways:
[0214] The system uses a preset anomaly detection method to detect whether there is an abnormal minimum distance among the various minimum distances.
[0215] As one embodiment of this application, the pose determination module 702 described above can be specifically used for:
[0216] Determine whether there is a target pose among the robot's various poses whose localization time is the same as the acquisition time of the robot's sensor range measurement value; if a target pose exists, determine the target pose as the acquisition pose; if no target pose exists, perform interpolation calculation based on the acquisition time of each pose, the range measurement value, and the localization time of each pose to obtain the acquisition pose.
[0217] As one embodiment of this application, the sensor described above can be a point sensor.
[0218] This application also provides an electronic device, such as... Figure 8 As shown, it includes:
[0219] Memory 801 is used to store computer programs;
[0220] The processor 802, when executing the program stored in the memory 801, implements the robot localization method described in any of the above embodiments.
[0221] In the solution provided in this application, the robot's current initial pose is obtained. Based on this, and combined with the robot's historical poses, the localization time of each pose, and the acquisition time of the sensor ranging values, the robot's pose when the sensors acquire the ranging values is determined. Subsequently, using the above information and the sensor's installation pose, a target pose adjustment amount is calculated that minimizes the difference between the position calculated based on the sensor ranging values and the positions of obstacles in the local map around the robot. Finally, by applying this target pose adjustment amount to adjust the current initial pose, the relative pose between the robot and its surrounding obstacles can be accurately located.
[0222] Furthermore, the aforementioned electronic device may also include a communication bus and / or a communication interface, with the processor 802, the communication interface, and the memory 801 communicating with each other via the communication bus.
[0223] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0224] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0225] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0226] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0227] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements the steps of the robot localization method described in any of the above embodiments.
[0228] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to execute the robot localization method described in any of the embodiments above.
[0229] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a solid-state drive (SSD), etc.
[0230] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0231] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, computer-readable storage media, and computer program products are basically similar to the method embodiments, and therefore the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0232] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A robot localization method, characterized in that, The method includes: Obtain the robot's current initial pose; The acquisition pose is determined based on the current initial pose, the robot's historical poses, the localization time of each pose, and the acquisition time of the robot's sensor ranging value. The acquisition pose is the robot's pose when the sensor acquires the ranging value. Determine a target pose adjustment amount that minimizes the distance between the target position and the positions of obstacles included in the local map, wherein the target position is a position relative to the robot from the distance measured value, determined based on the acquired pose, the pose adjustment amount, and the sensor mounting pose; The current initial pose is adjusted according to the target pose adjustment amount to obtain the current pose of the robot.
2. The method according to claim 1, characterized in that, The determination of the target pose adjustment amount that minimizes the distance between the target location and the locations of obstacles included in the local map includes: Based on the robot's current initial pose, determine the edge description information of the inner edge of the obstacle in the local map, wherein the inner edge of the obstacle is the edge of the area on the obstacle that is within the robot's detection range; The pose adjustment amount that minimizes the target distance is determined as the target pose adjustment amount, wherein the target distance is determined based on the minimum distance between the target position and the inner edge.
3. The method according to claim 2, characterized in that, The target location is determined in the following manner: Calculate the relative pose relationship between the acquired pose and the current initial pose; The current initial pose is adjusted based on the pose adjustment amount to obtain the first pose. Based on the relative pose relationship and the first pose, the second pose is determined; The target position is determined based on the second pose and the sensor mounting pose.
4. The method according to claim 2, characterized in that, The step of determining the edge description information of the inner edges of obstacles in the local map based on the robot's current initial pose includes: Edge detection is performed on the horizontal plane of the local map, and the edge points of the obstacles around the robot are determined based on the edge detection results. Based on the normal or tangent direction at the edge point, edge points within the robot's detection range are selected from the various edge points and designated as inner edge points; By fitting the inner edge points, the edge description information of the inner edge of the obstacle is obtained.
5. The method according to claim 4, characterized in that, The process of fitting the inner edge points to obtain the edge description information of the inner edge of the obstacle includes: Based on the position of each inner edge point, adjacent inner edge points are grouped into the same set, resulting in multiple sets; Polynomial fitting is performed on the inner edge points included in each set to obtain multiple polynomials, where each polynomial corresponds to a segment of the inner edge of the obstacle; The minimum distance between the target location and the inner edge is determined as follows: Based on the location coordinates of the target position and the plurality of polynomials, calculate the minimum distance between the target position and each segment of the inner edge.
6. The method according to claim 2, characterized in that, Before determining the pose adjustment amount that minimizes the target distance as the target pose adjustment amount, the method further includes: Calculate the pose adjustment loss based on the magnitude of each adjustment component in the pose adjustment amount; Determining the pose adjustment amount that minimizes the target distance, as the target pose adjustment amount, includes: The pose adjustment amount that minimizes the total loss is determined as the target pose adjustment amount, wherein the total loss is determined based on the target distance and the position adjustment loss.
7. The method according to claim 2, characterized in that, The number of ranging values is multiple, and the target distance is determined based on the minimum non-abnormal distance between the target position and the inner edge; Determine whether the minimum distance is abnormal using the following method: The system uses a preset anomaly detection method to detect whether there is an abnormal minimum distance among the various minimum distances.
8. The method according to any one of claims 1-7, characterized in that, The step of determining the acquisition pose based on the current initial pose, the robot's historical poses, the localization time of each pose, and the acquisition time of the robot's sensor ranging values includes: Determine whether there is a target pose in each pose of the robot whose positioning time is the same as the acquisition time of the ranging value acquired by the robot's sensors; If the target pose exists, the target pose is determined as the acquisition pose; If the target pose does not exist, interpolation calculation is performed based on each pose, the acquisition time of the ranging value, and the positioning time of each pose to obtain the acquired pose.
9. The method according to any one of claims 1-7, characterized in that, The sensor is a point sensor.
10. A robot positioning device, characterized in that, The device includes: The pose acquisition module is used to acquire the robot's current initial pose. The pose determination module is used to determine the acquisition pose based on the current initial pose, the robot's historical pose, the positioning time of each pose, and the acquisition time of the robot's sensor ranging value. The acquisition pose is the robot's pose when the sensor acquires the ranging value. The adjustment amount determination module is used to determine the target pose adjustment amount that minimizes the distance between the target position and the position of the obstacle included in the local map, wherein the target position is the position of the robot at a distance from the distance measurement value determined based on the acquired pose, the pose adjustment amount and the installation pose of the sensor; The pose adjustment module is used to adjust the current initial pose according to the target pose adjustment amount to obtain the current pose of the robot.
11. The apparatus according to claim 10, characterized in that, The adjustment amount determination module includes: an edge description information determination submodule, used to determine the edge description information of the inner edge of an obstacle in the local map based on the robot's current initial pose, wherein the inner edge of the obstacle is the edge of the area on the obstacle within the robot's detection range; and an adjustment amount determination submodule, used to determine the pose adjustment amount that minimizes the target distance, as the target pose adjustment amount, wherein the target distance is determined based on the minimum distance between the target position and the inner edge. And / or, The target position is determined as follows: the relative pose relationship between the acquired pose and the current initial pose is calculated; the current initial pose is adjusted based on the pose adjustment amount to obtain a first pose; a second pose is determined based on the relative pose relationship and the first pose; and the target position is determined based on the second pose and the sensor mounting pose. And / or, The edge description information determination submodule includes: an edge point determination unit, used to perform edge detection on the horizontal plane of the local map and determine each edge point of the obstacle around the robot based on the edge detection results; an inner edge point determination unit, used to filter edge points within the detection range of the robot from the edge points according to the normal vector direction or tangent direction at the edge points, as inner edge points; and a fitting unit, used to fit the inner edge points to obtain the edge description information of the inner edge of the obstacle. And / or, The fitting unit includes: a set partitioning subunit, used to partition adjacent inner edge points into the same set according to the position of each inner edge point, to obtain multiple sets; and a fitting subunit, used to perform polynomial fitting on the inner edge points included in each set, to obtain multiple polynomials, wherein each polynomial corresponds to a segment of the inner edge of the obstacle; and the minimum distance between the target position and the inner edge is determined in the following manner: based on the position coordinates of the target position and the multiple polynomials, the minimum distance between the target position and each segment of the inner edge is calculated; And / or, The adjustment amount determination module further includes: a pose adjustment loss determination unit, used to calculate the pose adjustment loss based on the magnitude of each adjustment component in the pose adjustment amount; the adjustment amount determination submodule is specifically used to: determine the pose adjustment amount that minimizes the total loss value as the target pose adjustment amount, wherein the total loss is determined based on the target distance and the position adjustment loss; And / or, The number of ranging values is multiple, and the target distance is determined based on the non-abnormal minimum distance between the target position and the inner edge; the minimum distance is determined to be abnormal in the following way: by using a preset anomaly detection method, it is detected whether there is an abnormal minimum distance among the various minimum distances; And / or, The pose determination module is specifically used to: determine whether there is a target pose among the various poses of the robot whose positioning time is the same as the acquisition time of the ranging value acquired by the robot's sensors; if the target pose exists, determine the target pose as the acquisition pose; if the target pose does not exist, perform interpolation calculation based on the various poses, the acquisition time of the ranging value, and the positioning time of the various poses to obtain the acquisition pose; And / or, The sensor is a point sensor.
12. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the method described in any one of claims 1-9.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-9.