A positioning method, apparatus, device, and medium
By obtaining the position parameters of the template in different coordinate systems and calculating the pose change of the electronic device, the problem of low positioning accuracy caused by slippage of the wheeled odometer is solved, and high-precision positioning in changing environments is achieved.
Patent Information
- Application Number
- CN202310519422.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-08
- Publication Date
- 2026-02-03
- Estimated Expiration
- 2043-05-08
AI Technical Summary
In existing technologies, wheel-type odometers may experience low positioning accuracy when the wheels slip, making it difficult to accurately determine their own position, especially in changing environments.
By obtaining the position parameters of the template in different coordinate systems, the pose change of the electronic device is calculated. Laser data is used to scan the template fixed in space to replace the wheeled odometer for positioning, ensuring positioning accuracy.
Even when wheeled odometers slip, positioning accuracy and reliability can be improved, ensuring accurate positioning of electronic equipment in changing environments.
Smart Images

Figure CN116660922B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the positioning technical field, and in particular to a positioning method, device, equipment and medium. BACKGROUND
[0002] When an electronic device is performing a task, for example, a mobile robot is performing object carrying in a warehouse, the mobile robot needs to accurately know its own position in the current environment in a changing environment, so as to accurately perform the task.
[0003] The prior art often uses an odometer to position. The odometer can estimate the pose transformation amount between the last time and the current time, and then infer the pose at the current time according to the pose at the last time and the pose transformation amount. Among them, the wheeled odometer is a device that measures the travel of an electronic device by using the speed of the wheels. When the wheels slip, the wheeled odometer may output an incorrect pose change amount. Therefore, using the wheeled odometer to position may result in low positioning accuracy of the electronic device. SUMMARY
[0004] Embodiments of the present application provide a positioning method, device, equipment and medium for improving the positioning accuracy of an electronic device.
[0005] In a first aspect, embodiments of the present application provide a positioning method, which comprises:
[0006] When the electronic device is at a first position, the position information of at least one template in the space is obtained to obtain the first position parameter of the at least one template; wherein the electronic device has laser detection capability, the template is fixed in the space, the surface of the template has a laser high reflectivity area, the first position parameter is the position parameter of the at least one template in a first local coordinate system, and the first local coordinate system is a laser coordinate system of the electronic device at the first position; the position parameter includes the coordinates of the template;
[0007] When the electronic device is at a second position, the position information of at least one template is obtained to obtain the second position parameter of the at least one template; the second position parameter is the position parameter of the at least one template in a second local coordinate system, and the second local coordinate system is a laser coordinate system of the electronic device at the second position;
[0008] According to the first position parameter, the second position parameter and the third position parameter of the at least one template, the pose change amount of the electronic device from the first position to the second position is determined; the third position parameter is the position parameter of the at least one template in a reference coordinate system;
[0009] The pose of the electronic device at the second position is determined based on the pose change and the pose of the electronic device at the first position.
[0010] In this scheme, the pose transformation of the electronic device from the first position to the second position is obtained based on the position parameters of at least one template acquired by the electronic device at the first position and the second position, as well as the position parameters of at least one template in the reference coordinate system. Since at least one template is fixed in space, and the electronic device obtains the position parameters of at least one template based on laser data scanning, the calculation of pose transformation is not affected by the environment. Furthermore, this scheme uses the position parameters of at least one template in different coordinate systems to replace the wheel odometer for calculating pose transformation, ensuring positioning accuracy even when the wheel odometer slips, thus improving the reliability and accuracy of pose transformation and consequently improving the positioning accuracy of the electronic device.
[0011] Optionally, determining the pose change of the electronic device from the first position to the second position based on the first position parameter, the second position parameter, and the third position parameter of the at least one template includes: determining a first pose parameter of the electronic device at the first position based on the first position parameter and the third position parameter; the pose parameter includes the coordinates and orientation angle of the electronic device; determining a second pose parameter of the electronic device at the second position based on the second position parameter and the third position parameter; and determining the pose change of the electronic device from the first position to the second position based on the first pose parameter and the second pose parameter.
[0012] This method determines the first pose parameter of the electronic device at the first position and the second pose parameter at the second position based on the position parameters of at least one template in different coordinate systems. This yields the pose change of the electronic device as it moves from the first position to the second position. The pose change can be determined solely based on the position parameters of at least one template in different coordinate systems, making the determination method simple. Furthermore, the calculation of the pose change is unaffected by the environment, thus improving the reliability and accuracy of the pose change.
[0013] Optionally, determining the pose of the electronic device at the second position based on the pose change and the pose of the electronic device at the first position includes: determining a third pose parameter of the electronic device at the second position based on the pose change and the pose of the electronic device at the first position; determining a first template based on the third pose parameter and pose parameters corresponding to one or more templates; wherein the space includes one or more templates, each of the one or more templates is associated with a position point in the space, and the pose parameter corresponding to any one of the one or more templates is the pose parameter of the electronic device when it is located at the position point associated with the any one template; the one or more templates include the first template; determining a fourth pose parameter of the electronic device at the second position based on the third pose parameter and the relative pose; wherein the relative pose is determined based on the position parameter of the first template in the second local coordinate system and the position parameter in the third local coordinate system, the third local coordinate system being the laser coordinate system at the position point associated with the first template; and determining the pose of the electronic device at the second position based on the third pose parameter and the fourth pose parameter.
[0014] This method determines the third pose parameters of the electronic device at the second position based on the pose change and the pose of the electronic device at the first position. Then, based on the third pose parameters, a first template is determined from one or more templates. The relative pose is determined based on the position parameters of the first template in the second and third local coordinate systems, thus obtaining the fourth pose parameters at the second position. The third position parameters and the fourth pose parameters are the pose of the electronic device at the second position calculated by two different methods. By fusing the third pose parameters and the fourth pose parameters, a more accurate pose at the second position can be obtained, reducing the impact of template coordinate jumps and thus improving the robot's positioning accuracy.
[0015] Optionally, determining the first template based on the third pose parameter and the pose parameters corresponding to the one or more templates includes: determining a template that satisfies a first preset condition from the one or more templates, wherein the first preset condition includes that the distance between the pose parameter corresponding to the template and the third pose parameter is less than a first threshold; if only one template among the one or more templates satisfies the first preset condition, then the one template is taken as the first template; if multiple templates among the one or more templates satisfy the first preset condition, then the first template is determined from the multiple templates based on a second preset condition, wherein the absolute value of the difference between the relative angle corresponding to the template and the direction angle of the third pose parameter is less than a second threshold, and the relative angle corresponding to the template is the angle corresponding to the vector constructed based on the pose parameter corresponding to the template and the third pose parameter.
[0016] This method determines the first template from one or more templates based on distance and angle, eliminating interference from templates with different orientations, making the first template meet actual needs, and ensuring the reliability of the relative pose obtained from the first template, thereby improving positioning accuracy.
[0017] Optionally, determining the first template from the templates corresponding to the pose parameters whose distance from the third pose parameter is less than a first threshold based on the angle includes: sorting the multiple templates in ascending order of the distance from the pose parameter to the third pose parameter, sequentially determining whether each of the multiple templates satisfies the second preset condition, until the first template that satisfies the second preset condition is determined, and taking the first template that satisfies the second preset condition as the first template.
[0018] This method determines a first template from one or more templates based on distance and angle. The first template can be a template that meets the angle requirements and corresponds to the pose parameter that is closest to the third pose parameter, making the first template more in line with actual needs. The relative pose obtained based on the first template is reliable, thereby improving the positioning accuracy.
[0019] Optionally, determining the fourth pose parameter of the electronic device at the second position based on the third pose parameter and the relative pose includes: determining the fourth pose parameter of the electronic device at the second position based on the distribution state of the reflective area on the first template, the third pose parameter, and the relative pose.
[0020] This method also allows for the determination of the fourth pose parameter based on whether the reflective areas are located on the same plane, providing multiple ways to calculate the fourth pose parameter and improving the flexibility of the solution.
[0021] Optionally, the relative pose includes a relative angle; the first template includes two reflective sub-regions, and when the distribution of the reflective regions on the first template is such that the two reflective sub-regions are not located on the same plane, the relative angle satisfies the following relationship: Wherein, the coordinates of the two reflective sub-regions in the third local coordinate system are C1 and C2, respectively, and the vector constructed by C1 and C2 is C 12 The coordinates of the two reflective regions in the second local coordinate system are D1 and D2, respectively, and the vector constructed by D1 and D2 is D. 12 Δθ is a relative angle; or, when the first template includes at least one reflective sub-region, and the distribution of the reflective regions on the first template is such that the at least one reflective sub-region is located on the same plane, the relative angle satisfies the following relationship: Where e2 is the error, m i Let z be the normal vector of the i-th reflective region in the second local coordinate system. i Let n1 be the normal vector of the i-th reflective region in the third local coordinate system, and n2 be the number of features in the first template, where 0 < i ≤ n2. cd This is the rotation matrix corresponding to the relative angle.
[0022] Understandably, the above is merely an example and not a limitation.
[0023] Optionally, the relative pose includes relative displacement; the first template includes two reflective sub-regions, and when the distribution state of the reflective regions on the first template is such that the two reflective sub-regions are not located on the same plane, the relative displacement satisfies the following relationship: t=R×C1-D1; where R is the rotation matrix corresponding to the relative angle Δθ, and t is the relative displacement.
[0024] Understandably, the above is merely an example and not a limitation.
[0025] Secondly, embodiments of this application provide a positioning device, comprising:
[0026] An acquisition module is configured to acquire position information of at least one template in space when the electronic device is at a first position, and obtain a first position parameter of the at least one template; wherein the electronic device has laser detection capability, the template is fixed in position in space, the surface of the template has a region with high laser reflectivity, and the first position parameter includes the coordinates of the at least one template in a first local coordinate system, the first local coordinate system being the laser coordinate system of the electronic device at the first position; the position parameter includes the coordinates of the template; when the electronic device is at a second position, acquire position information of at least one template, and obtain a second position parameter of the at least one template; the second position parameter includes the coordinates of the at least one template in a second local coordinate system, the second local coordinate system being the laser coordinate system of the electronic device at the second position;
[0027] The processing module is configured to determine the pose change of the electronic device from the first position to the second position based on the first position parameter, the second position parameter, and the third position parameter of the at least one template; the third position parameter includes the coordinates of the at least one template in a reference coordinate system; and determine the pose of the electronic device at the second position based on the pose change and the pose of the electronic device at the first position.
[0028] Optionally, the processing module is specifically configured to: determine a first pose parameter of the electronic device at the first position based on the first position parameter and the third position parameter; the pose parameter includes the coordinates and orientation angle of the electronic device; determine a second pose parameter of the electronic device at the second position based on the second position parameter and the third position parameter; and determine the pose change amount of the electronic device moving from the first position to the second position based on the first pose parameter and the second pose parameter.
[0029] Optionally, the processing module is specifically configured to: determine a third pose parameter of the electronic device at the second position based on the pose change and the pose of the electronic device at the first position; determine a first template based on the third pose parameter and pose parameters corresponding to one or more templates; wherein the space includes one or more templates, each of the one or more templates is associated with a position point in the space, and the pose parameter corresponding to any one of the one or more templates is the pose parameter of the electronic device when it is located at the position point associated with the any one template; the one or more templates include the first template; determine a fourth pose parameter of the electronic device at the second position based on the third pose parameter and the relative pose; wherein the relative pose is determined based on the position parameter of the first template in the second local coordinate system and the position parameter in the third local coordinate system, the third local coordinate system being the laser coordinate system at the position point associated with the first template; and determine the pose of the electronic device at the second position based on the third pose parameter and the fourth pose parameter.
[0030] Optionally, the processing module is specifically used to: determine a template that satisfies a first preset condition from the one or more templates, the first preset condition including that the distance between the pose parameter corresponding to the template and the third pose parameter is less than a first threshold; if only one template among the one or more templates satisfies the first preset condition, then the one template is taken as the first template; if multiple templates among the one or more templates satisfy the first preset condition, then the first template is determined from the multiple templates based on a second preset condition, the second preset condition being that the absolute value of the difference between the relative angle corresponding to the template and the direction angle of the third pose parameter is less than a second threshold, the relative angle corresponding to the template being the angle corresponding to the vector constructed based on the pose parameter corresponding to the template and the third pose parameter.
[0031] Optionally, the processing module is specifically used to: sort the plurality of templates in ascending order of the distance of the pose parameter from the third pose parameter, sequentially determine whether each of the plurality of templates satisfies the second preset condition, until the first template that satisfies the second preset condition is determined, and take the first template that satisfies the second preset condition as the first template.
[0032] Optionally, the processing module is specifically used to: determine the fourth pose parameter of the electronic device at the second position based on the distribution state of the reflective area on the first template, the third pose parameter, and the relative pose.
[0033] Optionally, the relative pose includes a relative angle; the first template includes two reflective sub-regions, and when the distribution of the reflective regions on the first template is such that the two reflective sub-regions are not located on the same plane, the relative angle satisfies the following relationship: Wherein, the coordinates of the two reflective sub-regions in the third local coordinate system are C1 and C2, respectively, and the vector constructed by C1 and C2 is C 12 The coordinates of the two reflective regions in the second local coordinate system are D1 and D2, respectively, and the vector constructed by D1 and D2 is D. 12 Δθ is a relative angle; or, when the first template includes at least one reflective sub-region, and the distribution of the reflective regions on the first template is such that the at least one reflective sub-region is located on the same plane, the relative angle satisfies the following relationship: Where e2 is the error, m i Let z be the normal vector of the i-th reflective region in the second local coordinate system. i Let n1 be the normal vector of the i-th reflective region in the third local coordinate system, and n2 be the number of features in the first template, where 0 < i ≤ n2. cd This is the rotation matrix corresponding to the relative angle.
[0034] Optionally, the relative pose includes relative displacement; the first template includes two reflective sub-regions, and when the distribution state of the reflective regions on the first template is such that the two reflective sub-regions are not located on the same plane, the relative displacement satisfies the following relationship: t=R×C1-D1; where R is the rotation matrix corresponding to the relative angle Δθ, and t is the relative displacement.
[0035] Thirdly, a communication device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the at least one processor causes the communication device to perform the steps of the positioning method described in the first aspect by executing the instructions stored in the memory.
[0036] Fourthly, this application provides a computer-readable storage medium storing a computer program, the computer program including program instructions, which, when executed by a computer, cause the computer to perform the steps of the satellite beam control method described in the first aspect. Attached Figure Description
[0037] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0038] Figure 1 A schematic diagram of a robot provided for an embodiment of this application;
[0039] Figure 2 A schematic diagram of a location point provided in an embodiment of this application;
[0040] Figure 3 A schematic diagram of a template provided for an embodiment of this application;
[0041] Figure 4 A flowchart illustrating a positioning method provided in an embodiment of this application;
[0042] Figure 5 A scenario diagram provided for an embodiment of this application;
[0043] Figure 6 A flowchart illustrating another positioning method provided in an embodiment of this application;
[0044] Figure 7 A structural diagram of a positioning device provided in an embodiment of this application;
[0045] Figure 8 This is a structural diagram of a communication device provided in an embodiment of this application. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings of the embodiments of this application. Obviously, the described embodiments are only some embodiments of the technical solutions of this application, and not all embodiments. Based on the embodiments recorded in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the technical solutions of this application.
[0047] The terms "first" and "second" in the embodiments of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the term "comprising" and any variations thereof are intended to cover non-exclusive protection. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices. The term "multiple" in this application can mean at least two, for example, two, three, or more; the embodiments of this application do not impose any limitations.
[0048] Furthermore, the term "and / or" in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article, unless otherwise specified, generally indicates that the preceding and following related objects have an "or" relationship.
[0049] The embodiments of this application can be used to locate any electronic device with laser detection capabilities, such as a robot with laser detection capabilities.
[0050] See Figure 1 This diagram illustrates a robot with laser detection capabilities, provided in an embodiment of this application. The robot includes a mobile chassis and a lidar sensor. The mobile chassis includes a motion controller, a motor, a battery, an embedded computer, and an odometer. The lidar sensor is used to acquire two-dimensional planar contour information of the surrounding environment; the lidar sensor can be a 2D lidar sensor.
[0051] In the space where electronic devices perform tasks, or in the space where electronic devices need to be positioned, templates are manually set up near the location points. There are one or more templates in the space, and each template is associated with a location point. The location point can be a task point that needs to be precisely docked in the space or a point on a high-precision route. The position of the template in the space is fixed.
[0052] For example, see Figure 2 Node F is the point where task docking is required. However, the electronic device needs to be accurately positioned at locations D and E to ensure successful scanning of the QR code to switch the navigation mode, or at locations D and E it needs to scan the template. Therefore, templates are set up around locations D, E, and F.
[0053] The types of templates include reflective strip templates, reflective column templates, and reflective panel templates. See also Figure 3The surfaces of the reflective strip template, reflective column template, and reflective plate template have areas with high laser reflectivity. Furthermore, this application also provides a point cloud template, which needs to determine the frames corresponding to the associated position points.
[0054] One reflective strip template includes at least two reflective strips. The width of the reflective strips can be 2-3cm, which can limit the detection error of the reflective strips to be too large. The spacing between the reflective strips can be set to different values to avoid equal spacing. In addition, each reflective strip in the reflective strip template can be located on different planes or on the same plane.
[0055] A reflective column template includes at least two reflective columns. The diameter of the reflective columns can be specified according to actual needs. For example, when the electronic device scans the reflective column at a distance of 4m, the diameter of the reflective column is 5cm; when the electronic device scans the reflective column at a distance of 6m, the diameter of the reflective column is 7cm. In addition, each reflective column in the reflective strip template can be located on different planes or on the same plane.
[0056] A reflector is made by attaching reflective strips to a flat plate. The width of the reflective strips can be specified according to actual needs. For example, a reflector is made by attaching reflective strips with a spacing of at least 10cm to a flat plate at least 30cm long. When the electronic device is 3m away from the reflector, the width of the reflective strips on the reflector is 2cm; when the electronic device is 4m away from the reflector, the width of the reflective strips on the reflector is 3cm. When a reflector template includes one reflector, the reflector includes at least two reflective strips. When a reflector template includes two or more reflectors, each reflector includes at least one reflective strip. Each reflector in the reflector template is located on the same plane.
[0057] Before implementing the positioning method provided in this application embodiment, positioning is required based on a probabilistic grid map established by the Simultaneous Localization and Mapping (SLAM) algorithm. The electronic device is manually remotely controlled to a location point, and at each location point, a template corresponding to that location point is scanned to obtain the feature information of each template. The feature information of a template includes the pose of the electronic device when scanning the template from its associated location point (hereinafter referred to as the pose parameters corresponding to the template), the laser parameters used, the laser type, the laser scanning range, and the template's identifier (e.g., ID) and template type.
[0058] In this application, pose represents the position and orientation angle of an object in space. For example, in pose (x, y, θ), x and y are the positions of the object in space in a two-dimensional plane, and θ is the orientation angle of the object in space in a two-dimensional plane. Pose can also be represented by a matrix.
[0059] In this application, the position parameters of the template include the coordinates of the template in the laser coordinate system.
[0060] This application calculates the current pose of an electronic device based on the known pose of the electronic device at the previous moment and the position parameters of a template acquired by the electronic device. For example, if the pose of the electronic device at position A at the previous moment is known, the electronic device will move to position B at the next moment based on a pre-stored walking route and the pose of the electronic device at position A. Furthermore, this application can also calculate the pose at a certain position using different methods to obtain multiple poses at that position, and based on these multiple poses, obtain the final pose at that position.
[0061] For ease of distinction, in this application, the pose of an electronic device refers to the final pose at a certain position, while the pose parameters of an electronic device refer to the multiple poses at that position required to determine the final pose at that position.
[0062] See Figure 4 The flowchart below illustrates a positioning method provided in this application. This method is applicable to electronic devices with computing power and laser detection capabilities, such as... Figure 1 The robot shown, or the computer device connected to the network of the electronic device, such as a laptop, desktop computer, or server, can also be applied to various computing devices connected to the network of the electronic device. The above devices are merely illustrative examples and are not intended to limit the scope of this application.
[0063] The following is based on this method. Figure 1 The robot shown performs the following. The method includes:
[0064] S401: When the robot is at the first position, it acquires the position information of at least one template in the space and obtains the first position parameters of at least one template.
[0065] When the robot is performing a task, it will continuously use LiDAR to scan the surrounding environment.
[0066] When the robot is in the first position, the pose parameters that are less than a preset distance from the pose parameters of the position points corresponding to one or more templates are determined, and the templates associated with the pose parameters that are less than the preset distance from the pose parameters of the robot in the first position are used as at least one template.
[0067] For example, see Figure 5The two black dots represent the first and second positions, respectively, and the white dots represent the position points associated with the templates. The robot pre-positions itself at each template-associated position point to scan the corresponding template. The robot's pose while scanning the template is the pose parameters corresponding to the template. When the robot is in the first position, it obtains the first position parameters of the two templates (one template includes features c1 and c2, and the other template includes features b1, b2, and b3) at the first position.
[0068] Optionally, a KD tree can be pre-generated based on the pose parameters of one or more templates at their corresponding positions, which can be used to quickly find pose parameters that are less than a preset distance from the robot's pose at the first position.
[0069] Understandably, the preset distance can be specified according to actual needs, and this application does not impose any restrictions.
[0070] The first position parameters include the coordinates of at least one template in a first local coordinate system, which is the laser coordinate system of the robot at the first position.
[0071] The coordinates of the template include the coordinates of each feature in the template. Each reflective strip in the reflective strip template, each reflective column in the reflective column template, and each reflector in the reflector template are features. The coordinates of the reflector can be determined based on the coordinates of the reflective strips on the reflector.
[0072] S402: When the robot is at the second position, it acquires the position information of at least one template and obtains the second position parameters of at least one template.
[0073] In one possible implementation, the robot moves from a first position to a second position at adjacent moments.
[0074] Continue using the above Figure 5 For example, when the robot is in the second position, it obtains the second position parameters of two templates (one template includes features c1 and c2, and the other template includes features b1, b2, and b3) at the second position.
[0075] The second position parameter includes the coordinates of at least one template in a second local coordinate system, which is the laser coordinate system of the robot at the second position.
[0076] S403: Determine the pose change of the robot as it moves from the first position to the second position based on the first position parameter, the second position parameter, and the third position parameter of at least one template.
[0077] The third position parameter is derived as follows: a local map is constructed based on the pose parameters corresponding to at least one template. This local map stores the coordinates of at least one template. The third position parameter includes the coordinates of at least one template in a reference coordinate system. The reference coordinate system can be the laser coordinate system when the robot is located at any one of the position points associated with at least one template. In one possible implementation, the robot's pose at the first position is determined based on the first position parameter and the third position parameter, according to the following formula (1), and is denoted as the first pose parameter; the robot's pose at the second position is determined based on the second position parameter and the third position parameter, according to the following formula (1), and is denoted as the second pose parameter.
[0078]
[0079] Where e1 is the first error, and the first error e1 can be specified according to actual needs, L Gi It is the coordinate of each feature in at least one template in the reference coordinate system, T L Let L be the coordinates of the point to be determined. Ci n1 represents the coordinates of each feature in at least one template obtained when the robot is at the desired location point, and n1 represents the number of features in at least one template.
[0080] That is, T L When L is the first pose parameter, Gi L is the third positional parameter. Ci T is the first position parameter; L When L is the second pose parameter, Gi L is the third positional parameter. Ci This is the second positional parameter.
[0081] Based on the first pose parameter and the second pose parameter, determine the pose change of the robot as it moves from the first position to the second position.
[0082] S404: Determine the robot's pose at the second position based on the pose change and the robot's pose at the first position.
[0083] The robot's pose at the first position is a known value. The robot's pose at the first position can be determined using any of the following algorithms: a custom algorithm, the SLAM algorithm, and this application does not impose any restrictions.
[0084] In one possible implementation, the robot's pose at the first position is added to the pose change to obtain the pose at the second position.
[0085] In another possible implementation, see Figure 6 The above step S404 may specifically include the following steps:
[0086] S601: Determine the third pose parameters of the robot at the second position based on the pose change and the robot's pose at the first position.
[0087] In one possible implementation, the robot's pose at the first position is added to the pose change to obtain the robot's third pose parameters at the second position.
[0088] In another possible implementation, for a point cloud template, the third pose parameters of the robot at the second position are determined based on the probabilistic grid map constructed from the point cloud template and the laser frame obtained by the robot at the second position.
[0089] S602: Determine the first template based on the pose parameters corresponding to the third pose parameter and one or more templates.
[0090] When the robot is in the second position, it determines a template that meets the first preset condition from one or more templates. The first preset condition includes the pose parameter corresponding to the template whose distance from the third pose parameter is less than the first threshold.
[0091] In one possible implementation, if multiple templates among one or more templates satisfy the first preset condition, then the first template is determined from the multiple templates based on the second preset condition. The second preset condition is that the absolute value of the difference between the relative angle corresponding to the template and the orientation angle of the third pose parameter is less than a second threshold. The relative angle corresponding to the template is the angle corresponding to the vector constructed based on the pose parameter corresponding to the template and the third pose parameter.
[0092] Specifically, multiple templates that meet the first preset condition are sorted in ascending order of distance from the third pose parameter. Then, each template is judged to determine whether it meets the second preset condition until the first template that meets the second preset condition is determined. The first template that meets the second preset condition is then taken as the first template.
[0093] For example, the third positional parameter is P t (x t y t θ t The pose parameters of the position point corresponding to the first template are P. i (x i y i θ i The pose vector constructed by the two is TI = (x ti y ti )=((x i -x t ),(y i -y t The angle corresponding to this vector is θ. ti =arctan(y ti,x ti Let the second threshold be 30°, then θ ti With θ t The angle difference is less than 30°.
[0094] Continue using the above Figure 5 For example, the robot selects a first template from one or more templates at a second position (the first template includes features a1 and a2).
[0095] This method determines the first template from one or more templates based on distance and angle, eliminating interference from templates with different orientations, making the first template meet actual needs, and ensuring the reliability of the relative pose obtained from the first template, thereby improving positioning accuracy.
[0096] In another possible implementation, if there is only one template that meets the first preset condition, or there is no template that meets the preset condition, or there are multiple templates that meet the first preset condition but none of them meet the second preset condition, then the pose parameter with the smallest distance to the third pose parameter is determined from the pose parameters corresponding to one or more templates, and the template associated with the pose parameter is taken as the first template.
[0097] Optionally, a KD tree can be pre-generated based on the pose parameters of one or more template-associated location points to quickly find pose parameters that are less than a first threshold distance from the robot's pose at the second location.
[0098] It is understandable that the first threshold and the second threshold can be specified according to actual needs. This application does not impose any restrictions. The first threshold and the preset distance can be the same or different.
[0099] This method allows for the determination of the first template based solely on distance when the angle cannot be determined, thus improving the flexibility of the solution.
[0100] S603: Based on the third pose parameters and the relative pose, determine the fourth pose parameters of the robot at the second position.
[0101] Once the robot has identified the first template, at the second position, it uses the laser pattern of the first template when scanning it from the position point associated with the first template to obtain the position parameters of the first template in the second local coordinate system.
[0102] The relative pose is determined based on the position parameters of the first template in the second local coordinate system and the position parameters in the third local coordinate system. The third local coordinate system is the laser coordinate system when the robot is scanning the first template at the position point associated with the first template. In other words, the third local coordinate system is the laser coordinate system of the robot under the pose parameters corresponding to the first template.
[0103] Specifically, there are several methods for calculating relative pose:
[0104] Method 1: When the type of the first template is a point cloud template, the relative pose is calculated based on the point-to-line-iterative closest point (PL-ICP) algorithm, according to the point cloud data of the first template in the second local coordinate system and the point cloud data in the third local coordinate system.
[0105] Method 2: When the type of the first template is a reflective strip template or a reflective column template, and the number of features in the first template is greater than or equal to 3, the relative pose is calculated based on the Iterative Closest Point (ICP) algorithm, according to the coordinates of the first template in the second local coordinate system and the coordinates in the third local coordinate system.
[0106] Method 3: When the type of the first template is a reflective strip template or a reflective column template, and the number of features in the first template is equal to 2, calculate the relative angle based on the following formula (2), and calculate the relative displacement based on the following formula (3). The relative pose includes the relative angle and the relative displacement.
[0107]
[0108] In the first template, the coordinates of each feature in the third local coordinate system are C1 and C2, respectively, and the vector constructed by C1 and C2 is C. 12 In the first template, the coordinates of each feature in the second local coordinate system are D1 and D2, respectively. The vector constructed from D1 and D2 is D. 12 Δθ is a relative angle.
[0109] t=R×C1-D1 (3)
[0110] Where R is the rotation matrix corresponding to the relative angle Δθ, and t is the relative displacement.
[0111] Method 4: When the type of the first template is a reflector template, calculate the relative angle based on the following formula (4), and determine the relative displacement based on the coordinates of each feature in the reflector template in the second local coordinate system and the coordinates in the third local coordinate system.
[0112]
[0113] Where e2 is the error, and the error e2 can be specified according to actual needs, m i Let z be the coordinates of each feature in the first template in the second local coordinate system. iLet n be the coordinates of each feature in the first template in the third local coordinate system, n2 be the number of features in the first template, and R be the coordinates of each feature in the first template. cd This is the rotation matrix corresponding to the relative angle.
[0114] For methods three and four above, the relative pose can be obtained after determining the relative angle and relative displacement.
[0115] Understandably, if the features in the reflector template are located on the same plane or the features in the reflector column template are located on the same plane, the relative pose can be obtained based on method four; if the reflector template includes two reflective strips, the relative pose can be obtained based on method three.
[0116] In one possible implementation, the fourth pose parameters of the robot in the second position are calculated based on the following formula (5).
[0117]
[0118] Where G is the fourth pose parameter, and T c For the third pose parameter, For relative pose, The laser parameters are used when the robot scans the first template at the position point associated with the first template.
[0119] S604: Determine the robot's pose at the second position based on the third and fourth pose parameters.
[0120] For example, the pose of the robot at the second position is obtained by fusing the third pose parameter and the fourth pose parameter based on the principle of extended Kalman filter (EKF).
[0121] By fusing the poses obtained from two different methods at the second position, the robot's final pose at the second position can be obtained, which can reduce the impact of template coordinate jumps and thus improve the robot's positioning accuracy.
[0122] In the above schemes S401 to S404, the pose transformation of the robot from the first position to the second position is obtained based on the position parameters of at least one template acquired by the robot at the first position and the second position, and the position parameters of at least one template in the reference coordinate system. Since at least one template is fixed in space, and the position parameters of at least one template are obtained by the robot based on laser data scanning, the calculation of pose transformation is not affected by the environment. Furthermore, this scheme uses the position parameters of at least one template in different coordinate systems to replace the wheel odometry for calculating pose transformation, ensuring positioning accuracy even when the wheel odometry slips, improving the reliability and accuracy of pose transformation, and thus improving the robot's positioning accuracy.
[0123] The methods provided in the embodiments of this application have been described above. The apparatus provided in the embodiments of this application will be described below.
[0124] See Figure 7 This application provides a data processing apparatus 700, which includes modules / units / technical means for performing the methods executed by computer devices in the above-described method embodiments.
[0125] For example, the device 700 includes:
[0126] The acquisition module 701 is used to acquire the position information of at least one template in space when the electronic device is at a first position, and obtain a first position parameter of the at least one template; wherein the electronic device has laser detection capability, the template is fixed in position in space, the surface of the template has a region with high laser reflectivity, and the first position parameter includes the coordinates of the at least one template in a first local coordinate system, the first local coordinate system being the laser coordinate system of the electronic device at the first position; the position parameter includes the coordinates of the template; when the electronic device is at a second position, the acquisition module 701 acquires the position information of at least one template, and obtains a second position parameter of the at least one template; the second position parameter includes the coordinates of the at least one template in a second local coordinate system, the second local coordinate system being the laser coordinate system of the electronic device at the second position;
[0127] The processing module 702 is configured to determine the pose change of the electronic device from the first position to the second position based on the first position parameter, the second position parameter, and the third position parameter of the at least one template; the third position parameter includes the coordinates of the at least one template in a reference coordinate system; and determine the pose of the electronic device at the second position based on the pose change and the pose of the electronic device at the first position.
[0128] It should be understood that all relevant content of each step involved in the above method embodiments can be referenced from the functional description of the corresponding functional module, and will not be repeated here.
[0129] As one possible product form of the aforementioned device, see [link to product description]. Figure 8 This application also provides a communication device 800, comprising:
[0130] At least one processor 801; and a communication interface 803 communicatively connected to the at least one processor 801; the at least one processor 801 causes the communication device 800 to execute the method steps performed by any device in the above method embodiments through the communication interface 803 by executing instructions stored in the memory 802.
[0131] Optionally, the memory 802 is located outside the communication device 800.
[0132] Optionally, the communication device 800 includes the memory 802, which is connected to the at least one processor 801, and stores instructions executable by the at least one processor 801. (Appendix) Figure 8 The dashed line indicates that memory 802 is optional for communication device 800.
[0133] The processor 801 and the memory 802 can be coupled through an interface circuit or integrated together; no restriction is imposed here.
[0134] This application embodiment does not limit the specific connection medium between the processor 801, memory 802, and communication interface 803. This application embodiment... Figure 8 The processor 801, memory 802, and communication interface 803 are connected via a bus 804. Figure 8 The connections between other components are shown in bold and are for illustrative purposes only, not as limiting information. The bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, Figure 8 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0135] It should be understood that the processor mentioned in the embodiments of this application can be implemented in hardware or software. When implemented in hardware, the processor can be a logic circuit, integrated circuit, etc. When implemented in software, the processor can be a general-purpose processor, implemented by reading software code stored in memory.
[0136] For example, the processor can be a Central Processing Unit (CPU), or other general-purpose processors, 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, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0137] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate Synchronous DRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchlink DRAM (SLDRAM), and Direct RAM (DR RAM).
[0138] It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) can be integrated into the processor.
[0139] It should be noted that the memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
[0140] As another possible product form, this application embodiment also provides a computer-readable storage medium for storing instructions that, when executed, cause a computer to perform the method steps performed by the first device in the above method example.
[0141] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0142] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0143] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0144] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0145] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A positioning method, characterized in that, The method includes: When the electronic device is at a first position, it acquires the position information of at least one template in the space and obtains the first position parameter of the at least one template; wherein, the electronic device has laser detection capability, the template is fixed in position in the space, the surface of the template has a region with high laser reflectivity, and the first position parameter includes the coordinates of the at least one template in a first local coordinate system, the first local coordinate system being the laser coordinate system of the electronic device at the first position; When the electronic device is at the second position, it acquires the position information of at least one template and obtains the second position parameter of the at least one template; the second position parameter includes the coordinates of the at least one template in a second local coordinate system, which is the laser coordinate system of the electronic device at the second position. Based on the first position parameter, the second position parameter, and the third position parameter of the at least one template, the pose change of the electronic device from the first position to the second position is determined; the third position parameter includes the coordinates of the at least one template in the reference coordinate system. Based on the pose change and the pose of the electronic device at the first position, the third pose parameter of the electronic device at the second position is determined. A first template is determined based on the third pose parameter and the pose parameters corresponding to one or more templates; wherein, the space includes one or more templates, each of the one or more templates is associated with a position point in the space, and the pose parameter corresponding to any one of the one or more templates is the pose parameter of the electronic device when it is located at the position point associated with the arbitrary template; the one or more templates include the first template; Based on the third pose parameter and the first template, the pose of the electronic device at the second position is determined.
2. The method as described in claim 1, characterized in that, Determining the pose change of the electronic device from the first position to the second position based on the first position parameter, the second position parameter, and the third position parameter of the at least one template includes: Based on the first position parameter and the third position parameter, the first pose parameter of the electronic device at the first position is determined; the pose parameter includes the coordinates and orientation angle of the electronic device. Based on the second position parameter and the third position parameter, the second pose parameter of the electronic device at the second position is determined; The pose change of the electronic device as it moves from the first position to the second position is determined based on the first pose parameter and the second pose parameter.
3. The method as described in claim 1, characterized in that, Determining the pose of the electronic device at the second position based on the third pose parameters and the first template includes: Based on the third pose parameter and the relative pose, the fourth pose parameter of the electronic device at the second position is determined; wherein, the relative pose is determined based on the position parameter of the first template in the second local coordinate system and the position parameter in the third local coordinate system, and the third local coordinate system is the laser coordinate system of the electronic device at the position point associated with the first template; The pose of the electronic device at the second position is determined based on the third pose parameter and the fourth pose parameter.
4. The method as described in claim 1, characterized in that, The step of determining the first template based on the pose parameters corresponding to the third pose parameter and the one or more templates includes: From the one or more templates, determine the template that satisfies the first preset condition, wherein the first preset condition includes that the distance between the pose parameter corresponding to the template and the third pose parameter is less than the first threshold. If only one of the one or more templates satisfies the first preset condition, then that one template is taken as the first template; If multiple templates among the one or more templates satisfy the first preset condition, then a first template is determined from the multiple templates based on a second preset condition. The second preset condition is that the absolute value of the difference between the relative angle corresponding to the template and the direction angle of the third pose parameter is less than a second threshold. The relative angle corresponding to the template is the angle corresponding to the vector constructed based on the pose parameter corresponding to the template and the third pose parameter.
5. The method as described in claim 4, characterized in that, The step of determining the first template from the plurality of templates based on the second preset conditions includes: The multiple templates are sorted in ascending order of their distance from the third pose parameter. Each template is then judged to determine whether it meets the second preset condition until the first template that meets the second preset condition is determined. The first template that meets the second preset condition is then taken as the first template.
6. The method as described in claim 3, characterized in that, Determining the fourth pose parameter of the electronic device at the second position based on the third pose parameter and the relative pose includes: Based on the distribution of reflective areas on the first template, the third pose parameter, and the relative pose, the fourth pose parameter of the electronic device at the second position is determined.
7. The method as described in claim 6, characterized in that, The relative pose includes the relative angle; The first template includes two reflective sub-regions, and when the two reflective sub-regions are not located on the same plane, the relative angle satisfies the following relationship: The coordinates of the two reflective regions in the third local coordinate system are respectively... , , and The constructed vector is The coordinates of the two reflective regions in the second local coordinate system are respectively , , The constructed vector is , It is a relative angle; or, The first template includes at least one reflective sub-region, and the distribution of the reflective regions on the first template is such that when the at least one reflective sub-region is located on the same plane, the relative angle satisfies the following relationship: ;in, For error, Let be the normal vector of the i-th reflective sub-region in the second local coordinate system. Let n1 be the normal vector of the i-th reflective region in the third local coordinate system, and n2 be the number of features in the first template, where 0 < i ≤ n2. This is the rotation matrix corresponding to the relative angle.
8. The method as described in claim 7, characterized in that, The relative pose includes relative displacement; The first template includes two reflective sub-regions, and when the distribution of the reflective sub-regions on the first template is such that the two reflective sub-regions are not located on the same plane, the relative displacement satisfies the following relationship: ; wherein, the relative angle The corresponding rotation matrix, This represents relative displacement.
9. A positioning device, characterized in that, include: An acquisition module is configured to acquire position information of at least one template in space when the electronic device is at a first position, and obtain a first position parameter of the at least one template; wherein the electronic device has laser detection capability, the template is fixed in position in space, the surface of the template has a region with high laser reflectivity, and the first position parameter includes the coordinates of the at least one template in a first local coordinate system, the first local coordinate system being the laser coordinate system of the electronic device at the first position; the position parameter includes the coordinates of the template; when the electronic device is at a second position, acquire position information of at least one template, and obtain a second position parameter of the at least one template; the second position parameter includes the coordinates of the at least one template in a second local coordinate system, the second local coordinate system being the laser coordinate system of the electronic device at the second position; A processing module is configured to: determine the pose change of the electronic device from the first position to the second position based on the first position parameter, the second position parameter, and the third position parameter of the at least one template; the third position parameter includes the coordinates of the at least one template in a reference coordinate system; determine the third pose parameter of the electronic device at the second position based on the pose change and the pose of the electronic device at the first position; determine the first template based on the third pose parameter and the pose parameters corresponding to one or more templates; wherein the space includes one or more templates, each of the one or more templates is associated with a position point in the space, and the pose parameter corresponding to any one of the one or more templates is the pose parameter of the electronic device when it is located at the position point associated with the any one template; the one or more templates include the first template; and determine the pose of the electronic device at the second position based on the third pose parameter and the first template.
10. A communication device, characterized in that, include: At least one processor; And a memory and a communication interface that are communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, by executing the instructions stored in the memory, causes the communication device to perform the method as described in any one of claims 1-8 through the communication interface.
11. A computer-readable storage medium, characterized in that, It stores a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the method according to any one of claims 1-8.
Citation Information
Patent Citations
Positioning system and method based on space identifier
CN108257177A