Robot recharging positioning identification method and device, computer device, and storage medium
By acquiring laser points using a lidar mounted on the robot, filtering and fitting straight lines, and calculating the relative pose of the charging equipment, the problem of inaccurate robot positioning was solved, and accurate charging pile positioning and recharging were achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SHENZHEN FREE DYNAMICS DEV CO LTD
- Filing Date
- 2022-11-11
- Publication Date
- 2026-05-01
AI Technical Summary
Existing robots often fail to locate charging stations due to unstable infrared signals, leading to inaccurate positioning and charging failures.
The robot uses a lidar to acquire laser points within a preset range, selects laser segments by filtering conditions, fits them into straight lines, determines the mathematical relationship between the lines, calculates the relative pose of the charging device, and achieves accurate positioning and recharging.
This improved the robot's accuracy in locating charging stations, prevented charging failures, and ensured that the robot could successfully dock with the charging station.
Smart Images

Figure CN115741683B_ABST
Abstract
Description
Robot recharging, positioning, and identification methods, devices, computer equipment, and storage media Technical Field
[0001] This invention relates to the field of robotics, and in particular to a robot recharging, positioning, and identification method, apparatus, computer equipment, and storage medium. Background Technology
[0002] Service robots are gradually replacing some human jobs. Currently, robots are widely used in restaurants, hotels, hospitals, government agencies, and other scenarios to provide services such as delivery and guidance. Robots used in these scenarios need to overcome the limitations of their operating space and move without tracks. Robots have power systems that need to be recharged promptly when the power is depleted. Currently, each robot has a dedicated charging station. Whenever the robot's remaining power falls below a preset threshold, it automatically moves to the designated charging station. However, the current method for robots to move to the charging station is relatively simple, basically relying on receiving infrared signals emitted by the charging station to determine its location. However, due to the varying strengths of the infrared signals emitted by the multiple indicator lights installed on the charging station, coupled with light refraction and the influence of other obstacles, the received infrared signals are often unstable, leading to inaccurate signal direction identification and thus an inability to accurately determine the charging station's location, resulting in charging failure.
[0003] Therefore, accurately determining the location of the robot's charging station to avoid charging failure has become an urgent problem to be solved. Summary of the Invention
[0004] The main objective of this application is to provide a robot recharging positioning and identification method, device, computer equipment, and storage medium, aiming to solve the problem of inaccurate robot positioning of charging piles.
[0005] To achieve the aforementioned objectives, the first aspect of this invention provides a method for robot recharging and positioning identification, comprising:
[0006] When the robot moves to a preset range, the lidar on the robot is used to acquire a number of laser points within the preset range;
[0007] Multiple laser segments are obtained from the aforementioned laser points using preset filtering conditions;
[0008] The multiple laser segments are fitted into multiple straight lines, and the mathematical relationship between the multiple straight lines is determined;
[0009] If the straight lines meet the first mathematical judgment condition, the positioning and recognition are successful, and the relative pose of the charging device in the robot coordinate system is calculated and recharging is performed according to the relative pose.
[0010] Furthermore, the step of obtaining multiple laser segments from the plurality of laser points using preset screening conditions includes:
[0011] Using the installation angle of the lidar in the robot coordinate system, the angle range of the lidar coordinate system corresponding to the robot coordinate system is calculated.
[0012] Target laser points are obtained by filtering out the laser points using the angular range relationship between the laser points and the lidar coordinate system.
[0013] Based on the distance measurement value between the target laser point and the feature code of the charging device, the target laser point is divided into multiple laser segments;
[0014] The charging device feature code includes at least one reflective segment and one absorbent segment; the target laser point has different ranging values for the reflective segment and the absorbent segment, and the reflective segment has a tilt angle feature.
[0015] Further, the step of dividing the target laser point into multiple laser segments based on the ranging value between the target laser point and the feature code configured on the charging device includes:
[0016] Measure the laser range value of the target laser point, and filter out all laser segments composed of laser points whose range value is greater than the first determination distance;
[0017] The laser segments are saved to different storage spaces, and point clouds of the laser segments are formed in each storage space.
[0018] Further, the step of determining successful positioning and identification if the lines satisfy the first mathematical condition includes:
[0019] Determine whether the multiple lines are parallel to each other;
[0020] If none of the aforementioned lines are parallel to each other, then select the first and last points of each line segment and calculate the distance between the two points as the length of the line.
[0021] If the difference between the length of the straight line and its preset length satisfies a first preset distance, and the straight lines satisfy a preset positional relationship, then the laser segment distance measurement value between the straight lines is obtained;
[0022] If the laser segment ranging value is less than the second preset distance, the positioning and identification are determined to be successful.
[0023] Furthermore, the step of determining successful positioning and identification if the lines satisfy the first mathematical condition further includes:
[0024] Select the first and last points of each line segment, and calculate the distance between the two points as the length of the line;
[0025] Determine whether the difference between the length of the straight line and its preset length satisfies the first determination condition;
[0026] If the first determination condition is met, then the length ratio between the straight lines is calculated;
[0027] If the length ratio between the lines satisfies the second judgment condition, then the lines are determined to satisfy the first mathematical judgment condition.
[0028] Furthermore, after the step of determining whether the lines are parallel, the method further includes:
[0029] If there is parallelism between the lines, continue to traverse and extract the point cloud, refit to obtain new lines, and determine whether the new lines are parallel.
[0030] If, after traversing all the point clouds, there are no multiple straight lines that satisfy the first mathematical judgment condition, then the localization and recognition are deemed to have failed.
[0031] Furthermore, the step of positioning and refilling based on the geometric features of the straight line includes:
[0032] Select the straight line that satisfies the first mathematical criterion, transform the straight line to the robot coordinate system, and calculate the midpoint and angle of the straight line;
[0033] The pose of the charging pile in the robot coordinate system is determined based on the midpoint and angle of the straight line.
[0034] The robot is controlled to locate and recharge based on the stated pose.
[0035] A second aspect of the present invention provides a robot recharging and positioning identification device, comprising:
[0036] The acquisition module is used to acquire a number of laser points within the preset range using the lidar mounted on the robot when the robot moves to the preset range;
[0037] The filtering module is used to obtain multiple laser segments from the plurality of laser points using preset filtering conditions;
[0038] The fitting module is used to fit multiple laser segments into multiple straight lines and determine the mathematical relationship between the multiple straight lines;
[0039] The positioning and recharging module is used to determine if the positioning and recognition are successful if the straight lines meet the first mathematical judgment condition, and to calculate the relative pose of the charging device in the robot coordinate system and recharge according to the relative pose.
[0040] A third aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of any of the above-described robot recharging and positioning identification methods.
[0041] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of any of the above-described robot recharging and positioning identification methods.
[0042] This invention discloses a method, apparatus, computer device, and storage medium for robot recharging positioning and identification. The method utilizes a lidar mounted on the robot to acquire a plurality of laser points within a preset range; the plurality of laser points are then filtered using preset conditions to obtain multiple laser segments; these laser segments are fitted into multiple straight lines, and the mathematical relationships between the multiple straight lines are determined to identify the robot's position; if the straight lines satisfy a first mathematical judgment condition, the positioning and identification are successful, and the relative pose of the charging device in the robot's coordinate system is calculated. Based on the midpoint and angle of the straight lines, the robot recharges according to the relative pose, thereby achieving accurate positioning of the robot at the charging station and avoiding charging failure. Attached Figure Description
[0043] Figure 1 is a schematic diagram of the feature code located on a charging pile according to an embodiment of this application;
[0044] Figure 2 is a flowchart illustrating a robot recharging and positioning identification method according to an embodiment of this application;
[0045] Figure 3 is a schematic diagram of a robot recharging and positioning identification device according to an embodiment of this application;
[0046] Figure 4 is a schematic diagram of a computer device and a readable storage medium according to an embodiment of this application. Detailed Implementation
[0047] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, 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, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0048] In one specific embodiment, the robot can be any type of robot that needs to dock with a charging station for charging. Referring to Figure 1, in this embodiment, the charging station's feature code consists of five segments: A, B, C, D, and E, with lengths a, b, c, d, and e, respectively. The three white segments (A, C, and E) are made of radar-visible material (reflective material), while the two black segments (B and D) are made of radar-invisible material (light-absorbing material), or they can be made with a slanted surface covered with light-absorbing paper. By combining the alternating black and white features of the feature code with the tilt angle characteristics of the radar-visible materials in segments A, C, and E, the characteristic charging station can be identified, its location accurately calculated, and the robot positioned for recharging.
[0049] Referring to Figure 2, this embodiment provides a method for robot recharging and positioning identification, including the following steps S1-S4:
[0050] S1. When the robot moves to a preset range, the laser radar on the robot is used to acquire a number of laser points within the preset range.
[0051] This embodiment is applied to the scenario of a robotic vacuum cleaner locating and recharging its charging station. When the robot moves to a preset range, the robot controls the LiDAR to scan the feature code on the surface of the charging station and obtain a number of laser points within the preset range. In this embodiment, the laser points are used as samples, and then a straight line is fitted to the laser points and analyzed.
[0052] S2. Obtain multiple laser segments from the aforementioned laser points using preset screening conditions.
[0053] In this embodiment, the feature code located on the charging pile consists of five segments: A, B, C, D, and E, composed of alternating light-absorbing and reflective materials. The three white segments (A, C, and E) are visible to radar (reflective material), so when a laser hits these segments, a ranging value (greater than 0) will be generated. The two black segments (B and D) are invisible to radar (light-absorbing material), meaning their ranging value is 0. Based on this characteristic, laser segments that meet this characteristic are first selected. These laser segments are characterized by a continuous range value. The starting segment of this laser segment has a ranging value greater than 0 (corresponding to segment A), followed by a ranging value of 0 (corresponding to segment B), then a ranging value greater than 0 in the middle segment (corresponding to segment C), followed by a ranging value of 0 (corresponding to segment D), and finally a ranging value greater than 0 (corresponding to segment E).
[0054] S3. Fit the multiple laser segments into multiple straight lines and determine the mathematical relationship between the multiple straight lines.
[0055] In this embodiment, by fitting each acquired laser segment to a straight line, the mathematical relationships such as the length and relative position between multiple straight lines are determined to determine whether the acquired laser segment matches the feature code on the charging pile.
[0056] This embodiment uses the RANSAC algorithm to fit straight lines and calculate whether each of the three lines is parallel to the others. The basic assumption of the RANSAC algorithm is that the sample contains both inliers (data that can be described by the model) and outliers (data that deviates significantly from the normal range and cannot fit the mathematical model), meaning that the node cloud contains obviously unsuitable laser points. These outliers may be caused by incorrect measurements, incorrect assumptions, or incorrect calculations. RANSAC also assumes that, given a set of correct data, there exists a method to calculate model parameters that fit this data.
[0057] S4. If the straight lines meet the first mathematical judgment condition, the positioning and recognition are successful, and the relative pose of the charging device in the robot coordinate system is calculated and recharged according to the relative pose.
[0058] In this embodiment, the mathematical relationship between the fitted straight lines is determined. If the straight lines meet the preset first mathematical judgment condition (including the judgment of mathematical relationships such as relative position and length), it means that the straight lines correspond to the area located on the feature code of the charging pile. Then, based on the pose of these straight lines, the position and angle of the charging pile are determined, thereby realizing the robot's positioning of the charging pile and docking for charging.
[0059] In this embodiment, step S2, which involves obtaining multiple laser segments from the plurality of laser points using preset screening conditions, includes:
[0060] S21. Using the installation angle of the lidar in the robot coordinate system, calculate the angle range of the lidar coordinate system corresponding to the robot coordinate system;
[0061] S22. Using the relationship between the laser point and the coordinate system of the lidar, target laser points are selected and obtained;
[0062] S23. Based on the distance measurement value between the target laser point and the feature code of the charging device, the target laser point is divided into multiple laser segments;
[0063] S24. The feature code of the charging device includes at least one reflective segment and one absorbent segment; the distance measurement value of the target laser point to the reflective segment and the absorbent segment is different, and the reflective segment has a tilt angle feature.
[0064] As described above, in this embodiment, the range from (-180° - offset) to (-180° + offset) in the robot coordinate system is selected. According to the installation angle of the lidar, the angle range of the lidar coordinate system corresponding to the range of (-180° - offset to -180° + offset) in the robot coordinate system is calculated. The calculation formula is as follows:
[0065] LowBound = 180 - mInstallAngle + offset
[0066] UpperBound = 180 - mInstallAngle + offset
[0067] Then, all the points of a frame of lidar data are judged. If lowBound < theta < upperBound, the lidar point is retained; otherwise, it is excluded. Here, LowBound is the minimum angle, UpperBound is the maximum angle, mInstallAngle is the installation angle, offset is the compensation angle, and theta is the angle of the corresponding point of the lidar.
[0068] The ranging values between the target lidar points and the feature codes of the charging device are different. By comparing the ranging values of different lidar points, the target lidar points can be divided into multiple lidar segments.
[0069] Among them, the feature code of the charging device at least includes a reflective segment and an absorptive segment; the ranging values of the target lidar points for the reflective segment and the absorptive segment are different, and the reflective segments all have an inclination angle feature, so they have larger ranging values.
[0070] Preferably, in another embodiment, considering that the robot usually preferentially uses the tail to dock with the charging pile during the process of returning to charge and dust collection. Therefore, when determining the position of the target charging pile, laser points located within a certain range from the robot's tail on the charging pile are preferentially selected, so as to achieve the purpose of narrowing the range of the acquired laser points, thereby reducing the workload of subsequent screening of the laser points.
[0071] In this embodiment, the step S23 of dividing the target lidar points into multiple lidar segments according to the ranging values between the target lidar points and the feature codes configured by the charging device includes:
[0072] S231. Measure the laser ranging values of the target lidar points, and screen out the lidar segments composed of all the lidar points with ranging values greater than the first determination distance;
[0073] S232. Save the lidar segments into different storage spaces respectively, and form the point clouds of the lidar segments in each storage space.
[0074] In this embodiment, the first determination distance is 0. Since the three white materials A, C, and E are visible to radar (reflective materials), there will be a range value when the laser hits the position of these segments. The two black segments B and D are invisible to radar, so the range value is 0 when the laser hits the position of these segments. Based on this characteristic, the laser segments that meet this characteristic are first screened out. The characteristic of this laser segment is that there is a continuous laser range value. The range value of the starting segment of this laser segment is greater than 0 (corresponding to segment A), the range value of the following starting segment is equal to 0 (corresponding to segment B), the range value of the middle segment is greater than 0 (corresponding to segment C), the range value of the following middle segment is equal to 0 (corresponding to segment D), and the range value of the ending segment is greater than 0 (corresponding to segment E).
[0075] In this embodiment, the three segments with ranging values are also saved to three storage spaces A, B, and C respectively, and the three laser points with ranging values form point clouds in the three storage spaces respectively.
[0076] In this embodiment, the step of successfully locating and identifying the line if the straight lines satisfy the first mathematical condition includes:
[0077] S41. Determine whether the multiple lines are parallel to each other;
[0078] S42. If none of the above lines are parallel to each other, select the first and last points of each line segment and calculate the distance between the two points as the length of the line.
[0079] S43. If the difference between the length of the straight line and its preset length satisfies a first preset distance, and the straight line satisfies a preset positional relationship, then obtain the laser segment distance measurement value between the straight lines.
[0080] S44. If the laser segment ranging value is less than the second preset distance, the positioning and identification are determined to be successful.
[0081] As described above, in this embodiment, the point cloud saved each time is retrieved sequentially from the three containers A, B, and C, and the ransac algorithm is used to fit straight lines respectively to calculate whether each of the three straight lines is parallel to each other.
[0082] In this embodiment, if the straight lines are not parallel, it indicates that the straight lines have a tilt angle feature, that is, they are located on the three segments A, C, and E with distance measurement values. The laser segments obtained when the robot scans segments A, C, and E can then be obtained. Subsequently, the first and last points of each straight line segment are selected, and the distance between the two points is calculated as the length of the straight line, denoted as z1, z2, and z3 respectively.
[0083] In this embodiment, the first preset distance is denoted as th. It is then necessary to determine whether the difference between the length of the straight line and its preset length satisfies the first numerical condition:
[0084] fabs(z1-a) <fabs(z2-c)<fabs(z3-e)<th
[0085] If the difference between the length of the straight line and its preset length satisfies the first numerical condition, and the straight line satisfies the preset positional relationship, in this embodiment, the preset positional relationship is located between two regions A and C (i.e., corresponding to segment B). At this time, the laser segment ranging value of segment B is obtained to verify whether the recognition is successful.
[0086] In another embodiment, the parallel implementation of S43 may be as follows: if it is determined whether the distance between the last point of segment A and the first point of segment B is less than a preset threshold, and if it is determined whether the distance between the last point of segment B and the first point of segment C is less than a preset threshold, and if both conditions are less than the preset threshold, then the following step is to execute "if the laser segment ranging value is less than the second preset distance, then the positioning and recognition are determined to be successful".
[0087] If the laser range measurement value of segment B is less than the second preset distance (in this embodiment, the second preset distance is also 0), then the identified segment B is determined to be a light-absorbing material. If the identified segment B is indeed the segment B on the charging pile, the positioning identification is determined to be successful.
[0088] In this embodiment, after step S41 of determining whether the lines are parallel, the method further includes:
[0089] S411. If there is parallelism between the lines, continue to traverse and extract the point cloud, refit to obtain new lines, and determine whether the new lines are parallel.
[0090] S412. If, after traversing all the point clouds, there are no multiple straight lines that satisfy the first mathematical judgment condition, then the localization and recognition are determined to have failed.
[0091] As described above, in another embodiment, if there is parallelism between the lines, it is determined that the line is not the target line, and the point cloud is retrieved and refitted to obtain a new line, and it is determined whether the new lines are parallel; if after traversal, no continuous laser segment that meets the above determination conditions is found in all the laser segments in the container, it is determined that the recognition has failed, and step S1 is restarted.
[0092] In another embodiment, the step of determining successful positioning and identification if the straight lines satisfy the first mathematical condition further includes:
[0093] S401. Select the first and last points of each straight line segment, and calculate the distance between the two points as the length of the straight line;
[0094] S402. Determine whether the difference between the length of the straight line and its preset length satisfies the first determination condition;
[0095] S403. If the first determination condition is met, then calculate the length ratio between the straight lines;
[0096] S404. If the length ratio between the lines satisfies the second determination condition, then the lines are determined to satisfy the first mathematical determination condition.
[0097] As described above, in this embodiment, the first and last points of each straight line segment are selected, and the distance between the two points is calculated as the length of the straight line, denoted as z1, z2, and z3 respectively.
[0098] In this embodiment, the first preset distance is denoted as th. It is then necessary to determine whether the difference between the length of the straight line and its preset length satisfies the first numerical condition:
[0099] fabs(z1-a) <fabs(z2-c)<fabs(z3-e)<th
[0100] If the difference between the length of the straight line and its preset length satisfies the first numerical condition, and the straight line satisfies a preset positional relationship (in this embodiment, the preset positional relationship is located between regions A and C (corresponding to segment B), then the laser segment ranging value of segment B is obtained to verify whether the recognition is successful. If the length ratio between the straight lines satisfies the second determination condition, the second determination condition is:
[0101] z1:z2:z3=a:c:e
[0102] Considering the unavoidable nature of systematic errors, the error in the ratio of z1:z2:z3 can be allowed to be within 5%. If the length ratio between the lines satisfies the second determination condition, then the lines are further determined to satisfy the first mathematical determination condition.
[0103] In this embodiment, the steps of locating and refilling based on the geometric features of the straight line include:
[0104] S451. Select the straight line that satisfies the first mathematical judgment condition, transform the straight line to the robot coordinate system, and calculate the midpoint and angle of the straight line.
[0105] S452. Determine the pose of the charging pile in the robot coordinate system based on the midpoint and angle of the straight line;
[0106] S453. Control the robot to locate and recharge according to the posture.
[0107] In this embodiment, the laser point is transformed into the robot coordinate system, the straight line in the corresponding laser segment B is refitted, the midpoint and angle of the straight line are calculated, the pose of the straight line is calibrated based on the midpoint and angle of the straight line, and the pose is determined to be the pose of the charging pile in the preset coordinate system. Then, the robot can be controlled to locate and recharge according to the pose.
[0108] Referring to Figure 3, this application embodiment also provides an apparatus for a robot recharging and positioning identification method, comprising:
[0109] The acquisition module 10 is used to acquire a number of laser points within the preset range using the lidar mounted on the robot when the robot moves to the preset range.
[0110] The filtering module 20 is used to obtain multiple laser segments from the plurality of laser points using preset filtering conditions;
[0111] The fitting module 30 is used to fit multiple laser segments into multiple straight lines and determine the mathematical relationship between the multiple straight lines;
[0112] The positioning and recharging module 40 is used to determine if the positioning and recognition are successful if the straight lines meet the first mathematical judgment condition, and to calculate the relative pose of the charging device in the robot coordinate system and recharge according to the relative pose.
[0113] Referring to Figure 4, this embodiment of the application also provides a computer device, which can be a server, and its internal structure can be as shown in Figure 4. The computer device includes a processor, memory, network interface, and database connected via a system bus. The processor in this computer design provides computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for data such as dimensions and geometric relationships. The network interface of the computer device is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a charging pile feature code identification method for recharging.
[0114] The processor described above executes the charging pile feature code recognition method for recharging, including: when the robot moves to a preset range, using the lidar on the robot to acquire a number of laser points within the preset range; using preset filtering conditions to acquire multiple laser segments from the laser points; fitting the multiple laser segments into multiple straight lines, and determining the mathematical relationship between the multiple straight lines; if the straight lines satisfy a first mathematical judgment condition, the positioning and recognition are successful, and the relative pose of the charging device in the robot coordinate system is calculated, and recharging is performed according to the relative pose.
[0115] One embodiment of this application also provides a computer-readable storage medium storing a computer program thereon. When the computer program is executed by a processor, it implements a method for robot recharging positioning and identification, including the following steps: when the robot moves to a preset range, it uses a lidar mounted on the robot to acquire a plurality of laser points within the preset range; it uses preset filtering conditions to acquire multiple laser segments from the plurality of laser points; it fits the multiple laser segments into multiple straight lines and determines the mathematical relationship between the multiple straight lines; if the straight lines satisfy a first mathematical judgment condition, the positioning and identification is successful, and the relative pose of the charging device in the robot coordinate system is calculated, and recharging is performed according to the relative pose.
[0116] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods.
[0117] Any references to memory, storage, database or other media used in this application and in the embodiments may include non-volatile and / or volatile memory.
[0118] Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-speed SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.
[0119] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method 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, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.
[0120] The above description is only a preferred embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural changes made based on the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A method for robot recharging and positioning identification, characterized in that, The method includes: when the robot moves to a preset range, using a lidar mounted on the robot to acquire a plurality of laser points within the preset range; wherein, the robot controls the lidar to scan the feature code located on the surface of the charging pile to acquire the plurality of laser points within the preset range; the plurality of laser points are used to acquire multiple laser segments using preset filtering conditions; the multiple laser segments are fitted into multiple straight lines, and the mathematical relationship between the multiple straight lines is determined; wherein, by fitting each acquired laser segment into a straight line, the mathematical relationship of the length and relative position between the multiple straight lines is determined to determine whether the acquired laser segment matches the feature code on the charging pile; if the mathematical relationship between the straight lines is satisfied... If the first mathematical condition is met, the positioning and recognition are successful, and the relative pose of the charging device in the robot coordinate system is calculated and recharging is performed based on the relative pose. The step of determining successful positioning and recognition if the straight lines meet the first mathematical condition includes: determining whether multiple straight lines are parallel to each other; if multiple straight lines are not parallel to each other, selecting the first and last points of each straight line segment and calculating the distance between the two points as the length of the straight line; if the difference between the length of the straight line and its preset length satisfies a first preset distance, and the straight lines satisfy a preset positional relationship, obtaining the laser segment distance measurement value between the straight lines; if the laser segment distance measurement value is less than a second preset distance... If a distance is set, the positioning and recognition are considered successful. The step of determining successful positioning and recognition if the straight lines satisfy a first mathematical condition further includes: selecting the first and last points of each straight line segment, calculating the distance between the two points as the length of the straight line; determining whether the difference between the length of the straight line and its preset length satisfies the first condition; if the first condition is satisfied, calculating the length ratio between the straight lines; if the length ratio between the straight lines satisfies a second condition, determining that the straight lines satisfy the first mathematical condition. The step of obtaining multiple laser segments from the plurality of laser points using preset filtering conditions includes: using the robot... The installation angle of the lidar in the coordinate system is used to calculate the angle range of the lidar coordinate system corresponding to the robot coordinate system. Target laser points are selected based on the relationship between the laser point and the angle range of the lidar coordinate system. The target laser point is divided into multiple laser segments according to the distance measurement value between the target laser point and the charging device feature code. The charging device feature code includes at least one reflective segment and one absorbent segment. The distance measurement values of the target laser point for the reflective and absorbent segments are different, and the reflective segments all have tilt angle characteristics. When determining the location of the target charging pile, laser points located on the charging pile within a range from the robot's tail are selected.
2. The robot recharging and positioning identification method according to claim 1, characterized in that, The step of dividing the target laser point into multiple laser segments based on the distance measurement value between the target laser point and the feature code configured on the charging device includes: measuring the laser distance measurement value of the target laser point, filtering out all laser segments composed of laser points whose distance measurement value is greater than a first determination distance; saving the laser segments to different storage spaces, and forming a point cloud of the laser segments in each storage space.
3. The robot recharging and positioning identification method according to claim 2, characterized in that, After the step of determining whether the lines are parallel, the method further includes: if there are parallel lines, then continue to traverse and extract the point cloud, refit to obtain new lines, and determine whether the new lines are parallel; if after traversing all the point clouds there are no multiple lines that satisfy the first mathematical judgment condition, then the positioning and recognition is determined to have failed.
4. The robot recharging and positioning identification method according to claim 1, characterized in that, The steps of locating and recharging based on the geometric features of the straight line include: selecting the straight line that satisfies the first mathematical judgment condition, converting the straight line to the robot coordinate system, and calculating the midpoint and angle of the straight line; determining the pose of the charging pile in the robot coordinate system based on the midpoint and angle of the straight line; and controlling the robot to locate and recharge based on the pose.
5. A robot recharging and positioning identification device, characterized in that, include: The acquisition module is used to acquire a number of laser points within a preset range using a lidar mounted on the robot when the robot moves to that range. Specifically, the robot controls the lidar to scan the feature code on the surface of the charging pile to acquire the laser points within the preset range. The filtering module is used to acquire multiple laser segments from the laser points using preset filtering conditions. The fitting module is used to fit the multiple laser segments into multiple straight lines and determine the mathematical relationship between the multiple straight lines. Specifically, by fitting each acquired laser segment into a straight line and determining the mathematical relationship between the lengths and relative positions of the multiple straight lines, it is determined whether the acquired laser segment matches the feature code on the charging pile. The positioning and recharging module is used to determine if the positioning and recognition are successful if the straight lines meet a first mathematical condition, and to calculate the relative pose of the charging device in the robot coordinate system, and to perform recharging based on the relative pose; wherein, the step of determining if the positioning and recognition are successful if the straight lines meet the first mathematical condition includes: determining whether multiple straight lines are parallel to each other; if multiple straight lines are not parallel to each other, selecting the first point and the last point of each straight line segment, and calculating the distance between the two points as the length of the straight line; if the difference between the length of the straight line and its preset length meets a first preset distance, and the straight lines meet a preset positional relationship, then obtaining the laser segment distance measurement value between the straight lines; if the... If the laser segment ranging value is less than the second preset distance, the positioning and identification are deemed successful. The step of determining successful positioning and identification if the straight lines meet the first mathematical condition further includes: selecting the first and last points of each straight line segment, calculating the distance between the two points as the length of the straight line; determining whether the difference between the length of the straight line and its preset length meets the first condition; if the first condition is met, calculating the length ratio between the straight lines; if the length ratio between the straight lines meets the second condition, determining that the straight lines meet the first mathematical condition. The step of obtaining multiple laser segments from the plurality of laser points using preset filtering conditions includes: using... The installation angle of the lidar in the robot coordinate system is used to calculate the angle range of the lidar coordinate system corresponding to the robot coordinate system. Target laser points are selected based on the relationship between the laser point and the angle range of the lidar coordinate system. The target laser point is divided into multiple laser segments according to the distance measurement value between the target laser point and the charging device feature code. The charging device feature code includes at least one reflective segment and one absorbent segment. The distance measurement values of the target laser point for the reflective and absorbent segments are different, and the reflective segments all have tilt angle characteristics. When determining the location of the target charging pile, laser points located on the charging pile within a range from the robot's tail are selected.
6. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 4.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 4.
Citation Information
Patent Citations
Charging pile, and method and device for autonomous charging of mobile robot
CN112217248A
Automatic recharging method and system
CN112230664A
Mobile robot automatic docking charging method based on laser measurement
CN112928799A