Angle compensation method and system, autonomous mobile robot and electronic equipment
By calculating the compensation angle between the angle of the object detected by the optical radar and the actual angle, the problem of low detection accuracy of the optical radar is solved and the detection accuracy is improved.
Patent Information
- Application Number
- CN202311536049.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-05-30
AI Technical Summary
When optical radar detects objects, due to installation errors and mechanical parts production, the detected object angles are deviated from the real angle, which reduces the detection accuracy.
By obtaining the distance between the actual position of the target detector and the position detected by the optical radar, the compensation angle of the optical radar is calculated to compensate for the detected angle.
Improve the accuracy of optical radar in position detection and reduce detection errors caused by installation errors and workmanship errors.
Smart Images

Figure CN120065180A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of angle compensation for lidar, and specifically relates to an angle compensation method, system, autonomous mobile robot, and electronic device. Background Art
[0002] Lidar (Light Detection and Ranging) can be applied to autonomous mobile robots (AMRs). It can monitor the surrounding environment of the autonomous mobile robot for navigation, or establish a regional map and observe the surrounding environment for warnings, etc.
[0003] However, various factors such as the installation error of the lidar and the manufacturing tolerance of mechanical parts may cause a deviation between the detected angle of an object by the lidar and the true angle of the object when detecting the object, resulting in a decrease in the detection accuracy of the object. Summary of the Invention
[0004] In view of the above, embodiments of this application provide an angle compensation method, system, autonomous mobile robot, and electronic device, aiming to improve the accuracy of position detection by the lidar.
[0005] In a first aspect, an embodiment of this application provides an angle compensation method applied to an electronic device. The angle compensation method includes:
[0006] Obtain the actual position of the target detection object, where the actual position is the position of the target detection object relative to a preset reference area;
[0007] If the lidar reaches the preset reference area, detect the target detection object through the lidar to obtain the detection position of the target detection object;
[0008] Determine a first distance between the detection position and the actual position;
[0009] Based on the first distance, determine a compensation angle of the lidar, where the compensation angle is used to compensate the angle detected by the lidar.
[0010] Embodiments of this application set a target detection object, and obtain the compensation angle of the lidar based on the actual position of the target detection object relative to the preset reference area and the detection position of the target detection object detected by the lidar in the preset reference area. The compensation angle of the lidar can compensate for the detection error of the lidar caused by various factors such as the installation error of the lidar and the manufacturing tolerance of mechanical parts, thereby improving the accuracy of the position detection of the lidar.
[0011] In some embodiments, after determining the first distance between the detection position and the actual position, the method further includes:
[0012] If the first distance does not exceed a preset threshold, it is determined that the lidar meets the preset installation standard;
[0013] Determining the compensation angle of the lidar based on the first distance includes:
[0014] In the case where the lidar meets the preset installation standard, the step of determining the compensation angle of the lidar based on the first distance is executed.
[0015] In some embodiments, after determining the first distance between the detection position and the actual position, the method further includes:
[0016] If the first distance exceeds the preset threshold, it is determined that the lidar does not meet the preset installation standard;
[0017] And a prompt to reinstall the lidar is issued.
[0018] In some embodiments, determining the compensation angle of the lidar based on the first distance includes:
[0019] Obtain a second distance between the preset reference area and the target detection object;
[0020] Based on the ratio of the first distance and the second distance, obtain the sine value of the compensation angle;
[0021] Based on the sine value, obtain the compensation angle of the lidar.
[0022] In some embodiments, the electronic device is communicatively connected to a fixing device, and the fixing device is disposed in the preset reference area;
[0023] Before detecting the target detection object through the lidar to obtain the detection position of the target detection object, the method further includes:
[0024] If the lidar reaches the preset reference area, send an instruction to fix the lidar to the fixing device;
[0025] After detecting the target detection object through the lidar to obtain the detection position of the target detection object, the method further includes:
[0026] Send an instruction to release the lidar to the fixing device.
[0027] In some embodiments, the electronic device is communicatively connected to a pressure sensor, and the pressure sensor is disposed in the preset reference area;
[0028] The step of confirming that the lidar reaches the preset reference area includes:
[0029] If a pressure value is received from the pressure sensor and the pressure value is within a preset range, it is confirmed that the lidar reaches the preset reference area.
[0030] In a second aspect, an embodiment of the present application further provides an autonomous mobile robot configured with a lidar. The autonomous mobile robot is used to obtain an initial detection angle of the lidar for the object to be detected; and based on the compensation angle and the initial detection angle, obtain the actual angle of the object to be detected, where the compensation angle is obtained by using the above angle compensation method.
[0031] In some embodiments, when the compensation angle is that the detection position is deflected clockwise by N degrees relative to the actual position, the autonomous mobile robot is used to rotate the initial detection angle counterclockwise by the N degrees to obtain the actual angle of the object to be detected;
[0032] And when the compensation angle is that the detection position is deflected counterclockwise by the N degrees relative to the actual position, the autonomous mobile robot is used to rotate the initial detection angle clockwise by the N degrees to obtain the actual angle of the object to be detected.
[0033] In a third aspect, an embodiment of the present application further provides an electronic device, including a processor and a memory. The memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the above angle compensation method.
[0034] In a fourth aspect, an angle compensation system includes: the autonomous mobile robot described in the second aspect and the electronic device described in the third aspect;
[0035] The electronic device is communicatively connected to the autonomous mobile robot, and the electronic device is used to transmit the compensation angle to the autonomous mobile robot after obtaining the compensation angle of the lidar of the mobile robot. Description of the Drawings
[0036] Figure 1 It is a schematic structural diagram of an angle compensation system provided according to an embodiment of the present application.
[0037] Figure 2 It is a schematic diagram of the scenario of the preset reference area provided according to an embodiment of the present application.
[0038] Figure 3 It is a schematic diagram of the installation position of a fixing device provided according to an embodiment of the present application.
[0039] Figure 4 It is a flowchart of the steps of an angle compensation method provided according to an embodiment of the present application.
[0040] Figure 5 It is a schematic diagram of the scenario where an autonomous mobile robot moves to a preset reference position provided according to an embodiment of the present application.
[0041] Figure 6 It is a schematic diagram of the scenario of the actual position and the detected position of a target detection object provided according to an embodiment of the present application.
[0042] Figure 7 It is a schematic structural diagram of an electronic device provided according to an embodiment of the present application.
[0043] Main component symbol description: Electronic device 10
[0044] Memory 11
[0045] Processor 12
[0046] Computer program 13
[0047] Autonomous mobile robot 20
[0048] LiDAR 21
[0049] Drive wheel 22
[0050] Pressure sensor 31
[0051] Guide rail 32
[0052] Preset reference area 40
[0053] Fixing device 50
[0054] Target detection object 60 Detailed implementation manners
[0055] In order to be able to more clearly understand the above objects, features and advantages of the present application, the present application will be described in detail below with reference to the accompanying drawings and specific implementation manners. It should be noted that, without conflict, the implementation manners of the present application and the features in the implementation manners can be combined with each other.
[0056] Many specific details are set forth in the following description in order to provide a thorough understanding of the present application. The described implementation manners are only a part of the implementation manners of the present application, rather than all of the implementation manners.
[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which this application belongs. The terms used in the specification of this application herein are only for the purpose of describing specific implementation manners, and are not intended to limit this application.
[0058] Furthermore, it should be noted that in this text, the term "including", "comprising" or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article or device including a series of elements not only includes those elements but also includes other elements not expressly listed, or elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "including a..." does not exclude the existence of additional identical elements in the process, method, article or device including such element.
[0059] In this application, "at least one" means one or more, and "a plurality" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. Terms such as "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0060] In the embodiments of this application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of this application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Rather, the use of words such as "exemplary" or "for example" is intended to present relevant concepts in a specific manner.
[0061] Optical radar (LiDAR) can be applied to autonomous mobile robots (AMRs). It can monitor the surrounding environment of the autonomous mobile robot for navigation, or can also establish a regional map and observe the surrounding environment for warning, etc.
[0062] However, various types of factors such as the installation error of the optical radar and the manufacturing tolerance of mechanical parts may cause a deviation between the detected angle of an object and the true angle of the object when the optical radar detects the object, resulting in a reduction in the object detection accuracy.
[0063] In view of the above, the embodiments of this application provide an angle compensation method, system, autonomous mobile robot and electronic device.
[0064] Refer to Figure 1 as shown Figure 1 which is a schematic structural diagram of the angle compensation system provided by the embodiments of this application.
[0065] The angle compensation system may include an electronic device 10 and an autonomous mobile robot 20.
[0066] The autonomous mobile robot 20 is configured with a lidar 21, and the autonomous mobile robot 20 is communicatively connected to the electronic device 10.
[0067] The electronic device 10 is used to execute the angle compensation method. The angle compensation method may include: obtaining the actual position of a target detection object, where the actual position is the position of the target detection object relative to a preset reference area; if the lidar 21 (such as the autonomous mobile robot 20 configured with the lidar 21) reaches the preset reference area, it indicates that the lidar 21 configured on the autonomous mobile robot 20 is directly facing the target detection object. The electronic device 10 may detect the target detection object through the lidar 21 to obtain the detection position of the target detection object, and then determine the first distance between the detection position and the actual position; based on the first distance, determine the compensation angle of the lidar 21, and the compensation angle is used to compensate the angle detected by the lidar 21, thereby improving the detection accuracy of the lidar 21.
[0068] The electronic device 10 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to a processor, a microprogrammed control unit (MCU), an application specific integrated circuit (ASIC), a field-programmable gate array (FPGA), a digital signal processor (DSP), an embedded device, etc.
[0069] The autonomous mobile robot 20 is used to obtain the initial detection angle of the lidar 21 for the object to be detected; and based on the compensation angle and the initial detection angle, obtain the actual angle of the object to be detected. Then, based on the compensation angle and the initial detection angle, obtain the actual angle of the object to be detected.
[0070] For example, if the compensation angle is that the detection position deflects N degrees clockwise relative to the actual position, the initial detection angle can be rotated counterclockwise by N degrees to obtain the actual angle of the object to be detected; if the compensation angle is that the detection position deflects N degrees counterclockwise relative to the actual position, the initial detection angle can be rotated clockwise by N degrees to obtain the actual angle of the object to be detected.
[0071] That is to say, the autonomous mobile robot 20 can obtain the compensation angle and, when detecting the object to be detected, compensate the detected angle through the compensation angle to obtain the actual angle of the object to be detected, thereby improving the detection accuracy of the autonomous mobile robot 20.
[0072] Reference Figure 2 As shown, the angle compensation system may further include at least one pressure sensor 31 disposed at the docking position of the driving wheels in the preset reference area 40. That is, when the autonomous mobile robot 20 moves to the preset reference area 40, the driving wheels 22 of the autonomous mobile robot 20 can just come into contact with the pressure sensor 31.
[0073] In some embodiments, the angle compensation system may include two pressure sensors 31. The positions of the two pressure sensors 31 may respectively correspond to the left and right driving wheels 22 of the autonomous mobile robot 20, and the distance between the two pressure sensors 31 may be the distance between the left and right driving wheels 22 of the autonomous mobile robot 20.
[0074] The pressure sensor 31 is used to detect the pressure value and transmit the pressure value to the electronic device 10. The electronic device 10 is used to detect whether the pressure value is within a preset range after receiving the pressure value. If the pressure value is within the preset range, it is confirmed that the lidar 21 has reached the preset reference area 40.
[0075] Further, if the pressure value is less than the minimum value of the preset range, it means that the pressure value is too small and the autonomous mobile robot 20 has not reached the preset reference area 40. If the pressure value is greater than the maximum value of the preset range, it means that the pressure value is too large and the autonomous mobile robot 20 is pressing on the pressure sensor 31 instead of being in a state of just contacting the pressure sensor 31, and the area where the autonomous mobile robot 20 is located may have exceeded the preset reference area 40.
[0076] The above preset range can be set according to actual application requirements. For example, the maximum value in the preset range is less than the weight of the autonomous mobile robot 20, and the minimum value in the preset range is greater than 0, etc., but not limited thereto.
[0077] In the embodiment of the present application, through the pressure sensor 31 and the detection of its pressure value range, it can be accurately identified whether the autonomous mobile robot 20 is in the preset reference area 40, so as to accurately obtain the compensation angle.
[0078] In some embodiments, with continued reference to Figure 2 As shown, the angle compensation system may further include a guide rail 32. The autonomous mobile robot 20 can walk on the guide rail 32, and the guide rail 32 can guide the autonomous mobile robot 20 to a preset reference position so that the lidar 21 configured on the autonomous mobile robot 20 is directly facing the target detection object.
[0079] In the embodiment of the present application, the guide rail 32 can limit the walking direction of the autonomous mobile robot 20, so that the autonomous robot can accurately move to the preset reference position.
[0080] In some embodiments, the autonomous mobile robot 20 may be configured with a machine frame, and detecting whether the autonomous mobile robot 20 is in the preset reference area 40 is to detect whether the machine frame is in the preset reference area 40.
[0081] Since the shape and appearance of the machine frame have little difference, therefore, in the embodiments of the present application, using the machine frame as the basis for positioning and judging the autonomous mobile robot 20 can avoid positioning differences caused by large differences in the appearance of different autonomous mobile robots 20, which is beneficial to calculating the compensation angles in batches for the autonomous mobile robots 20 on the production line.
[0082] In some embodiments, referring Figure 3 As shown, the angle compensation system may further include a fixing device 50, and the fixing device 50 is arranged in the preset reference area 40.
[0083] The fixing device 50 is used to fix the autonomous mobile robot 20 in the preset reference area 40.
[0084] For example, the fixing device 50 may be arranged at the middle position between the docking positions of the two driving wheels in the preset reference area 40. The docking position of the driving wheels refers to the position where the driving wheels 22 of the autonomous mobile robot 20 are located when the autonomous mobile robot 20 reaches the preset reference area 40.
[0085] In some embodiments, the fixing device 50 may include a bolt, and positioning holes that cooperate with the bolt may be arranged on the machine frame of the autonomous mobile robot 20. When the autonomous mobile robot 20 reaches the preset reference position, the electronic device 10 may control the bolt to rise and insert the bolt into the positioning hole, so that the autonomous mobile robot 20 can be fixed at the preset reference position.
[0086] In the embodiments of the present application, when the autonomous mobile robot 20 reaches the preset reference position, such as when it is detected that the pressure value of the pressure sensor 31 reaches the preset range, the control fixing device 50 fixes the autonomous mobile robot 20 at the preset reference position, so that the autonomous mobile robot 20 can detect the target detection object under stable motion conditions, avoiding detection errors caused by unstable motion states, and further avoiding compensation angle calculation deviations caused by the detection errors, thereby improving the accuracy of the obtained compensation angles.
[0087] The angle compensation system of the embodiments of the present application can enable the autonomous mobile robot 20 to automatically move to the preset reference area 40 and perform detection. Compared with manually observing whether the autonomous mobile robot 20 moves to the preset reference area 40, it can reduce operation errors, thereby improving the efficiency of angle compensation, and further improving the test efficiency of the entire production line.
[0088] The embodiments of the present application further provide an angle compensation method, which is applied to the electronic device 10 in the above embodiments.
[0089] Figure 4 It is a flowchart of the steps of an embodiment of the angle compensation method of the present application. According to different requirements, the order of the steps in the flowchart can be changed, and some steps can be omitted.
[0090] Refer to Figure 4 As shown, the angle compensation method may include the following steps.
[0091] Step 401, obtain the actual position of the target detection object, where the actual position is the position of the target detection object relative to the preset reference area.
[0092] The target detection object may be an item with a symmetrical shape to facilitate detection and positioning.
[0093] The specific position of the preset reference area can be set according to actual application requirements. For example, it can be set in combination with the size of the test site, and the embodiments of the present application do not limit this.
[0094] If the autonomous mobile robot 20 moves to the preset reference area 40 as shown in Figure 2 As shown, this actual position can be understood as the position of the target detection object relative to the autonomous mobile robot 20.
[0095] For example, referring to Figure 5 As shown, the target detection object 60 can be Figure 5 As shown, a wall with a length of 10 meters. The preset reference area 40 can face this wall.
[0096] Step 402, if the lidar reaches the preset reference area, detect the target detection object through the lidar to obtain the detection position of the target detection object.
[0097] When the lidar 21 reaches the preset reference area 40, the detection position of the target detection object 60 by the lidar 21 can be understood as the position of the target detection object 60 detected by the lidar 21 relative to the preset reference area 40.
[0098] The lidar 21 can be configured on the autonomous mobile robot 20, and the autonomous mobile robot 20 moves, and the lidar 21 carried on the autonomous mobile robot 20 moves with it.
[0099] In some embodiments, referring to Figure 2As shown, the electronic device 10 is communicatively connected to the pressure sensor 31, and the pressure sensor 31 is disposed in the preset reference area 40. Among them, the steps for the electronic device 10 to confirm that the lidar 21 reaches the preset reference area 40 include: if a pressure value is received from the pressure sensor 31 and the pressure value is within the preset range, it is confirmed that the lidar 21 reaches the preset reference area 40.
[0100] In some embodiments, after the electronic device 10 confirms that the lidar 21 reaches the preset reference area 40, the electronic device 10 can control the autonomous mobile robot 20 to stop moving forward.
[0101] In some other embodiments, referring again to Figure 3 As shown, after the electronic device 10 confirms that the lidar 21 reaches the preset reference area 40, the autonomous mobile robot 20 can be fixed to the preset reference area 40 by the fixing device 50.
[0102] Furthermore, the electronic device 10 is communicatively connected to the fixing device 50, and the fixing device 50 is disposed in the preset reference area 40; before step 402, the angle compensation method further includes: if the lidar 21 reaches the preset reference area 40, sending an instruction to the fixing device 50 to fix the lidar 21.
[0103] The fixing device 50 can respond to this instruction and fix the autonomous mobile robot 20 to the preset reference area 40. For example, the fixing device 50 includes a bolt, and the bolt of the fixing device 50 rises and inserts into the positioning hole configured on the autonomous mobile robot 20.
[0104] In some embodiments, after step 402, the angle compensation method further includes: sending an instruction to the fixing device 50 to release the lidar 21, such as an instruction to release the autonomous mobile robot 20.
[0105] The fixing device 50 can respond to this instruction and release the autonomous mobile robot 20. For example, the bolt of the fixing device 50 can automatically descend to pull out from the positioning hole configured on the autonomous mobile robot 20.
[0106] After releasing the autonomous mobile robot 20, the next autonomous mobile robot 20 on the production line can move towards the preset reference area 40 to calculate the compensation angle of the lidar of the next autonomous mobile robot 20, so as to realize batch calculation of the compensation angle and be able to perform batch calibration on the autonomous mobile robots 20 on the production line.
[0107] Step 403, determining the first distance between the detection position and the actual position.
[0108] For example, referring to Figure 5 and Figure 6As shown, a target point can be selected on the target object 60, and the actual coordinates of the target point are used as the actual position. The lidar 21 detects the target object 60 to obtain the detection coordinates of the target point, and the detection coordinates are used as the detection position. The first distance between the actual position and the detection position is denoted as d 1 .
[0109] In some embodiments, if the first distance does not exceed a preset threshold, it is determined that the lidar 21 meets the preset installation standard, and step 404 can be executed.
[0110] In some embodiments, if the first distance exceeds the preset threshold, it is determined that the lidar 21 does not meet the preset installation standard; and a prompt to reinstall the lidar 21 is issued.
[0111] The above preset threshold can be set according to actual application requirements. For example, it can be set in combination with the second distance between the preset reference area 40 and the target object 60 and the requirements for the assembly accuracy of the lidar 21, but not limited to this.
[0112] For example, if the second distance between the preset reference area 40 and the target object 60 is 5 meters, the preset threshold can be set to 0.05 cm.
[0113] In the embodiment of the present application, the assembly of the lidar 21 can be identified as meeting the installation standard through the first distance. When the installation standard is not met, reinstallation is performed, thereby increasing the probability of good products leaving the factory; when the lidar 21 meets the installation standard, the compensation angle is calculated to improve the detection accuracy of the lidar 21 leaving the factory, that is, to improve the quality of the lidar 21.
[0114] Step 404: Determine the compensation angle of the lidar based on the first distance.
[0115] The compensation angle is used to compensate the angle detected by the lidar 21. The compensation angle can describe the deviation angle and deviation direction of the detection position relative to the actual position.
[0116] In some embodiments, the second distance between the preset reference area 40 and the target object 60 is obtained; based on the ratio of the first distance and the second distance, the sine value of the compensation angle is obtained; based on the sine value, the compensation angle of the lidar 21 is obtained.
[0117] For example, referring again to Figure 6 As shown, the electronic device 10 can obtain the second distance d between the preset reference area 40 and the target object 60 2 , and then, based on the first distance d 1 and the second distance d 2The ratio is used to obtain the sine value sinx of the deviation angle x, and the deviation angle x is obtained based on the sine value sinx.
[0118] Among them,
[0119]
[0120] In the embodiment of the present application, the compensation angle can be calculated through trigonometric functions, and the compensation angle of the lidar 21 can be accurately obtained under the condition of limited site range.
[0121] After the electronic device 10 obtains the compensation angle, it can transmit the compensation angle to the autonomous mobile robot 20. The autonomous mobile robot 20 obtains the initial detection angle of the lidar 21 for the object to be detected; and based on the compensation angle and the initial detection angle, the actual angle of the object to be detected is obtained.
[0122] For example, assume Figure 6 the compensation angle in is 0.1 degrees clockwise deviation, and the initial detection angle obtained by the lidar 21 detecting a certain object to be detected is 20 degrees. Then rotate the 20 degrees counterclockwise by 0.1 degrees to get 19.9 degrees, and 19.9 degrees is the actual angle of the object to be detected.
[0123] Assume Figure 6 the compensation angle in is 0.1 degrees counterclockwise deviation, and the initial detection angle obtained by the lidar 21 detecting a certain object to be detected is 20 degrees. Then rotate the 20 degrees clockwise by 0.1 degrees to get 20.1 degrees, and 20.1 degrees is the actual angle of the object to be detected.
[0124] The angle compensation system of the embodiment of the present application can enable the autonomous mobile robot 20 to automatically move to the preset reference area 40 and perform detection. Compared with manually observing whether the autonomous mobile robot 20 moves to the preset reference area 40, the accuracy can be improved. When the autonomous mobile robot 20 moves to the preset reference area 40, the compensation angle of the lidar 21 carried on the autonomous mobile robot 20 is automatically calculated, thereby improving the efficiency of angle compensation and further improving the test efficiency of the entire production line.
[0125] Refer to Figure 1 As shown, the embodiment of the present application further provides an autonomous mobile robot 20. The autonomous mobile robot 20 is configured with a lidar 21. The autonomous mobile robot 20 is used to obtain the initial detection angle of the lidar 21 for the object to be detected; and based on the compensation angle and the initial detection angle, the actual angle of the object to be detected is obtained, where the compensation angle is obtained by using the angle compensation method of the above embodiment.
[0126] In some embodiments, obtaining the actual angle of the object to be detected based on the compensation angle and the initial detection angle includes:
[0127] If the compensation angle is that the detection position is deflected clockwise by N degrees relative to the actual position, the initial detection angle can be rotated counterclockwise by N degrees to obtain the actual angle of the object to be detected.
[0128] If the compensation angle is that the detection position is deflected counterclockwise by N degrees relative to the actual position, the initial detection angle can be rotated clockwise by N degrees to obtain the actual angle of the object to be detected.
[0129] An embodiment of the present application also provides an electronic device 10, Figure 7 which is a schematic diagram of an embodiment of the electronic device 10 of the present application.
[0130] The electronic device 10 includes a memory 11, a processor 12, and a computer program 13 stored in the memory 11 and executable on the processor 12. When the processor 12 executes the computer program 13, the steps in the above-mentioned embodiment of the angle compensation method are implemented, such as Figure 4 the steps 401 to 404 shown.
[0131] Exemplarily, the computer program 13 can also be divided into one or more modules / units, and the one or more modules / units are stored in the memory 11 and executed by the processor 12. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 13 in the electronic device 10.
[0132] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 10, and does not constitute a limitation on the electronic device 10. It may include more or fewer components than shown, or combine some components, or different components. For example, the electronic device 10 may further include input / output devices, network access devices, buses, etc.
[0133] The processor 12 may be a central processing unit (CPU), or may also be 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. The general-purpose processor may be a microprocessor, a single-chip microcomputer, or the processor 12 may also be any conventional processor, etc.
[0134] The memory 11 can be used to store computer programs 13 and / or modules / units. By running or executing the computer programs and / or modules / units stored in the memory 11, and by invoking the data stored in the memory 11, the processor 12 realizes various functions of the electronic device 10. The memory 11 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.); the data storage area can store data created according to the use of the electronic device 10 (such as audio data, etc.). In addition, the memory 11 may include high-speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
[0135] If the modules / units integrated in the electronic device 10 are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on such an understanding, to implement all or part of the processes in the above-described embodiment methods of this application, it can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above various method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, an executable file, or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disc, a computer memory, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc. It should be noted that the content included in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.
[0136] In several embodiments provided in this application, it should be understood that the disclosed electronic device 10 and method can be implemented in other ways. For example, the above-described embodiment of the electronic device 10 is merely illustrative. For example, the division of the units is only a logical function division, and there may be other division methods in actual implementation.
[0137] In addition, in each embodiment of the present application, each functional unit can be integrated in the same processing unit, can exist separately as individual physical units, or two or more units can be integrated in the same unit. The above-mentioned integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional modules.
[0138] For those skilled in the art, it is obvious that the present application is not limited to the details of the above-mentioned exemplary embodiments, and without departing from the spirit or basic characteristics of the present application, the present application can be implemented in other specific forms. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-limiting. In addition, it is obvious that the term "including" does not exclude other units or steps, and the singular does not exclude the plural. The multiple units or electronic devices 10 stated in the claims of the electronic device 10 can also be implemented by the same unit or electronic device 10 through software or hardware. The terms "first", "second", etc. are used to denote names and do not denote any particular order.
[0139] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit them. Although the present application has been described in detail with reference to the above embodiments, those of ordinary skill in the art should understand that the technical solutions of the present application can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. An angle compensation method, characterized in that, applied to an electronic device, the angle compensation method includes: Obtain the actual position of the target detection object, where the actual position is the position of the target detection object relative to a preset reference area; If the lidar reaches the preset reference area, detect the target detection object through the lidar to obtain the detection position of the target detection object; Determine a first distance between the detection position and the actual position; Based on the first distance, determine a compensation angle of the lidar, where the compensation angle is used to compensate the angle detected by the lidar.
2. The angle compensation method according to claim 1, characterized in that, after determining the first distance between the detection position and the actual position, further includes: If the first distance does not exceed a preset threshold, determine that the lidar meets a preset installation standard; The determining the compensation angle of the lidar based on the first distance includes: When the lidar meets the preset installation standard, perform the step of determining the compensation angle of the lidar based on the first distance.
3. The angle compensation method according to claim 2, characterized in that, after determining the first distance between the detection position and the actual position, further includes: If the first distance exceeds a preset threshold, determine that the lidar does not meet a preset installation standard; and issue a prompt to reinstall the lidar.
4. The angle compensation method according to claim 1, characterized in that, the determining the compensation angle of the lidar based on the first distance includes: Obtain a second distance between the preset reference area and the target detection object; Based on the ratio of the first distance and the second distance, obtain the sine value of the compensation angle; Based on the sine value, obtain the compensation angle of the lidar.
5. The angle compensation method according to claim 1, characterized in that, the electronic device is communicatively connected to a fixing device, and the fixing device is disposed in the preset reference area; before detecting the target detection object through the lidar to obtain the detection position of the target detection object, further includes: If the lidar reaches the preset reference area, send an instruction to fix the lidar to the fixing device; after detecting the target detection object through the lidar to obtain the detection position of the target detection object, further includes: Send an instruction to release the lidar to the fixing device.
6. The angle compensation method according to claim 1, characterized in that, the electronic device is communicatively connected to a pressure sensor, and the pressure sensor is disposed in the preset reference area; The step of confirming that the lidar reaches the preset reference area includes: If a pressure value is received from the pressure sensor and the pressure value is within a preset range, confirm that the lidar reaches the preset reference area.
7. An autonomous mobile robot, characterized in that, The autonomous mobile robot is configured with a lidar, and the autonomous mobile robot is used to obtain an initial detection angle of the lidar for the object to be detected; and based on a compensation angle and the initial detection angle, obtain an actual angle of the object to be detected, where the compensation angle is obtained by using the angle compensation method according to any one of claims 1 to 6.
8. The autonomous mobile robot according to claim 7, wherein, when the compensation angle is that the detection position is deflected clockwise by N degrees relative to the actual position, the autonomous mobile robot is used to rotate the initial detection angle counterclockwise by the N degrees to obtain the actual angle of the object to be detected; and when the compensation angle is that the detection position is deflected counterclockwise by the N degrees relative to the actual position, the autonomous mobile robot is used to rotate the initial detection angle clockwise by the N degrees to obtain the actual angle of the object to be detected.
9. An electronic device, wherein, the electronic device includes a processor and a memory, the memory is used to store instructions, and the processor is used to call the instructions in the memory so that the electronic device executes the angle compensation method according to any one of claims 1 to 6.
10. An angle compensation system, wherein, comprising: the autonomous mobile robot according to claim 7 or claim 8 and the electronic device according to claim 9; the electronic device is communicatively connected to the autonomous mobile robot, and the electronic device is used to transmit the compensation angle to the autonomous mobile robot after obtaining the compensation angle of the lidar of the autonomous mobile robot.