CN114998535A - Angle deflection correction method and system for map construction and electronic equipment - Google Patents

Angle deflection correction method and system for map construction and electronic equipment Download PDF

Info

Publication number
CN114998535A
CN114998535A CN202210580712.XA CN202210580712A CN114998535A CN 114998535 A CN114998535 A CN 114998535A CN 202210580712 A CN202210580712 A CN 202210580712A CN 114998535 A CN114998535 A CN 114998535A
Authority
CN
China
Prior art keywords
angle
degrees
angles
inclination angles
coordinate points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210580712.XA
Other languages
Chinese (zh)
Inventor
夏宗帅
曹钰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hunan Grand Pro Robot Technology Co ltd
Original Assignee
Hunan Grand Pro Robot Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hunan Grand Pro Robot Technology Co ltd filed Critical Hunan Grand Pro Robot Technology Co ltd
Priority to CN202210580712.XA priority Critical patent/CN114998535A/en
Publication of CN114998535A publication Critical patent/CN114998535A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/05Geographic models
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/20Finite element generation, e.g. wire-frame surface description, tesselation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds

Landscapes

  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Geometry (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Graphics (AREA)
  • Remote Sensing (AREA)
  • Image Processing (AREA)

Abstract

The invention provides an angle deflection correction method, an angle deflection correction system and electronic equipment for map construction, wherein the method comprises the steps of performing line segment fitting on a plurality of coordinate points through storage of laser data, converting inclination angles of a plurality of line segments, calculating different deflection angles according to the number of the line segments, effectively utilizing the line segments fitted in the laser data, obtaining correction parameters of the map construction according to the inclination angles of the line segments, and combining an object of an actual scene where the map construction is located as a reference.

Description

Angle deflection correction method and system for map construction and electronic equipment
Technical Field
The invention relates to the field of mobile map construction, in particular to a method and a system for correcting angle deflection of map construction and electronic equipment.
Background
With the development of science and technology and the continuous improvement of requirements of people on living quality, smart homes are more and more popularized in daily life of people, particularly household sweeping robots, the current sweeping robots generally have a mapping function, so that a user can conveniently use the sweeping robots, the user can check an environment map constructed by the robots and position information of the robots at any time on an APP, however, the robots generally establish a coordinate system in the direction of the initial working moment of the robots to construct the map, if the robots are not vertically or parallelly arranged when the user uses the robots, the map constructed by the robots can be inclined, the cleaning track of the robots in working is not perpendicular to the wall, the working efficiency of the robots is influenced, the inclined map is not accordant with visual senses of the people, and the user cannot easily interact with the robots through the APP, therefore, a method capable of correcting an initial map angle according to a sensor of the robot itself is important.
Disclosure of Invention
The invention provides an angle deflection correction method and system for map construction and electronic equipment, and aims to solve the problem that when a moving map is constructed by an existing robot, the map construction has an inclination angle due to the fact that the robot is placed unevenly.
The present invention provides a method for correcting angle deflection in map construction, which is characterized in that: the method comprises the following steps: step S1: acquiring laser data, converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence; step S2: fitting the plurality of coordinate points to obtain a plurality of line segments; step S3: calculating the inclination angle of each line segment, adding 90 degrees to the data with the negative angle, and sorting all the adjusted inclination angles; step S4: the number of the line segments is one, and the inclination angle is the deflection angle of the map; step S5: the number of the line segments is two, and if only one angle is near 0 degrees or 90 degrees, the angle is a deflection angle; if the two angles are both around 0 degree or 90 degrees, subtracting 90 degrees from the angle around 90 degrees, and then calculating the average value of the two angles to be the deflection angle; if the two angles are not around 0 degrees or 90 degrees, the difference value of the two inclination angles is obtained, if the difference value is larger than an angle threshold value, the deflection angle is judged to be 0 degrees, otherwise, the average value of the two inclination angles is taken as the deflection angle; step S6: the number of the line segments is more than two, after the angle near 90 degrees is subtracted by 90 degrees, all the inclination angles are sorted again, the difference value between the adjacent inclination angles is calculated, every two inclination angles with the difference value within a threshold value are reserved, and the average value of all the reserved inclination angles is calculated to obtain the deflection angle; step S7: based on the obtained deflection angle, 90 ° is subtracted from the deflection angle larger than 45 °, and the final correction angle is obtained as the correction for the map construction.
Preferably, in step S2, the fitting the plurality of line segments mainly includes: step S21: traversing all the coordinate points according to the sequence of the coordinate points, calculating the distance between the next coordinate point and the previous coordinate point, if the distance is less than a distance threshold value, continuing traversing downwards, if the distance is greater than the distance threshold value, grouping, and starting traversing again from the next coordinate point to obtain a plurality of data groups; step S22: removing data groups with the number of coordinate points less than a number threshold value from the multiple data groups; step S23: in each data set, performing straight line fitting according to the coordinate point sequence to obtain a corresponding line segment; step S24: according to the distances from all coordinate points in the current data set to the line segments, eliminating the coordinate points with the distances larger than a threshold value; step S25: repeating the steps S21-S24 after the straight line is re-fitted, and obtaining the corresponding line segment.
Preferably, after step S25, the method further includes: step S26: comparing every two adjacent line segments, and selecting two data groups of which the difference of the slopes of the two line segments is smaller than a threshold value and the distance between the head and the tail is smaller than the threshold value; step S27: and combining the two data sets, and repeating the step of straight line fitting to obtain a corresponding line segment.
Preferably, in step S2, the length of each line segment is calculated, and line segments with lengths less than the length threshold are filtered out.
Preferably, step S1 specifically includes: step S11: the method comprises the steps of obtaining laser data of a laser sensor, and selecting the laser data in an error detection range according to the error detection range of the laser sensor, wherein the laser data comprise distance information and angle information of a plurality of laser points; step S12: and converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence.
The invention also provides a map-constructed angle deflection correction system, which comprises: the data acquisition unit is used for acquiring laser data, converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence; the line segment fitting unit is used for fitting the coordinate points to obtain a plurality of line segments; the inclination angle calculation unit is used for calculating the inclination angle of each line segment, adding 90 degrees to the data with the negative angle, and sorting all the adjusted inclination angles; a deflection angle calculation unit for, when the number of the inclination angles is one, taking the inclination angle as a deflection angle of the map; when the number of the inclination angles is two, if only one of the angles is near 0 degrees or 90 degrees, the angle is a deflection angle; if the two angles are both around 0 degree or 90 degrees, subtracting 90 degrees from the angle around 90 degrees, and then calculating the average value of the two angles to be the deflection angle; if the two angles are not around 0 degrees or 90 degrees, the difference value of the two inclination angles is obtained, if the difference value is larger than an angle threshold value, the deflection angle is judged to be 0 degrees, otherwise, the average value of the two inclination angles is taken as the deflection angle; when the number of the inclination angles is more than two, subtracting 90 degrees from the angles near 90 degrees, sorting all the inclination angles again, solving the difference between the adjacent inclination angles, reserving every two inclination angles with the difference within a threshold value, and calculating the average value of all the reserved inclination angles to obtain the deflection angle; and the correcting unit is used for subtracting 90 degrees from the deflection angle larger than 45 degrees based on the obtained deflection angle to obtain a final correction angle as the correction of the map construction.
The invention also provides an electronic device comprising a memory and a processor, the memory having stored therein a computer program arranged to execute, when running, the method of angular deflection correction as described in any one of the preceding claims; the processor is arranged to perform the method of angular deflection correction as mapped in any one of the above by the computer program.
Compared with the prior art, the angle deflection correction method, the angle deflection correction system and the electronic equipment for map construction provided by the invention have the following advantages:
1. through the storage of laser data, carry out the line segment fitting to a plurality of coordinate points, and convert through the inclination of a plurality of line segments, the calculation of different deflection angles has been carried out to the quantity of line segment, the line segment of fitting in the laser data has effectively been utilized, and obtain the correction parameter that the map was found according to the line segment inclination, the object that has combined the actual scene that the map was found place is as the benchmark, even do not have perpendicular or be on a parallel with the wall body and place the robot, also can establish a forward map of laying level, let the robot can more stable work, autonomy is stronger.
2. Through screening of multiple rejection conditions of point intervals, quantity and point-line intervals on the coordinate points, accurate estimation of line segments is carried out on multiple coordinate points in the whole laser data, the fitted line segments are close to the edge contour line area of a real object, the calculation error of the real scene line segments is reduced, and the calculation accuracy is improved.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for correcting an angle deflection by mapping according to a first embodiment of the present invention.
Fig. 2 is a flowchart of step S1 in the method for correcting angle deflection by mapping according to the first embodiment of the present invention.
Fig. 3 is a flowchart of step S2 in the method for correcting angle deflection by mapping according to the first embodiment of the present invention.
Fig. 4 is a flowchart of an embodiment after step S25 in the method for correcting angular deflection by mapping according to the first embodiment of the present invention.
FIG. 5 is a block diagram of a mapped angular deflection correction system provided by a second embodiment of the present invention.
Fig. 6 is a block diagram of an electronic device according to a third embodiment of the present invention.
Description of reference numerals:
1. a data acquisition unit; 2. a line segment fitting unit; 3. a tilt angle calculation unit; 4. a deflection angle calculation unit; 5. a correction unit;
10. a memory; 20. a processor.
Detailed Description
Specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings, but it should be understood that the scope of the present invention is not limited to the specific embodiments.
Referring to fig. 1, a first embodiment of the present invention provides an angle deflection correction method for map construction, which is applied to an automatic tracking mobile robot system, for example, the embodiment can be applied to the construction work of a road sweeping robot route planning map in an intelligent home scene, and specifically includes the following steps:
step S1: and acquiring laser data, converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence.
Step S2: and fitting the plurality of coordinate points to obtain a plurality of line segments.
Step S3: and calculating the inclination angle of each line segment, adding 90 degrees to the data with the negative angle, and sorting all the adjusted inclination angles.
Step S4: the number of the line segments is one, and the inclination angle is the deflection angle of the map.
Step S5: the number of the line segments is two, and if only one angle is about 0 degrees or 90 degrees, the angle is a deflection angle; if the two angles are both around 0 degree or 90 degrees, subtracting 90 degrees from the angle around 90 degrees, and then calculating the average value of the two angles to be the deflection angle; and if the two angles are not around 0 degrees or 90 degrees, calculating the difference value of the two inclination angles, if the difference value is greater than an angle threshold value, judging that the deflection angle is 0 degree, and otherwise, taking the average value of the two inclination angles as the deflection angle.
Step S6: and (3) the number of the line segments is more than two, all the inclination angles are sorted again after the angle near 90 degrees is subtracted by 90 degrees, the difference value between the adjacent inclination angles is calculated, every two inclination angles with the difference value within a threshold value are reserved, and the average value of all the reserved inclination angles is calculated to obtain the deflection angle.
Step S7: based on the obtained deflection angle, 90 ° is subtracted from the deflection angle larger than 45 °, and the final correction angle is obtained as the correction for the map construction.
It is to be understood that, in step S1, the laser data is obtained by detecting a peripheral object by a laser sensor, and the laser data is composed of a plurality of laser points, each of which contains coordinate information, distance information, and angle information of a current point.
It is to be understood that in step S2, a straight line fitting is performed on the obtained plurality of coordinate points to perform a straight line fitting on a plurality of coordinate points having a straight line arrangement requirement, and in the present embodiment, a least square method is used to perform the straight line fitting. Since there are different objects, different curves in space, a plurality of line segments are obtained based on the fitting of the line segments.
It can be understood that, in step S3, each coordinate point in the line segment has corresponding angle information according to the fitted line segment, and based on this, the inclination angle of the corresponding line segment can be calculated, but due to the different line profiles of different objects in space and the different placing postures of different objects, the inclination angle cannot be directly used for calibration. The inclination angle of each line segment is between-90 deg., all negative angle angles plus 90 deg. are changed into 0 deg. -90 deg. angles, and then all angles are sorted from small to large.
It will be appreciated that in this embodiment the adjustment between the angles is made in accordance with the quadrant in which they are located, adding 90 to the angle of the negative angle so that all angles of inclination are adjusted to within the interval 0-90.
It is understood that in steps S4, S5, and S6, according to the result of the segment fitting in step S2, a determination can be made according to the number of segments, for example, in step S4, if the number of segments is one, the inclination angle is the deflection angle of the map. In step S5, if the number of line segments is two, the current line segment is defined to be near 0 ° with reference to two end points in the interval of 0 ° -90 °, and if the difference between the inclination angle of the current line segment and 0 ° is smaller than a threshold value, for example, a threshold value of 10 ° is set, which is also applicable to the determination near 90 °. In step S6, when the number of line segments is greater than two, the plurality of line segments are determined by subtracting 90 ° from the angle around 90 ° and adjusting the position to the 0 ° end point.
It is understood that, in step S7, a calculation is required based on the deflection angle obtained in any one of steps S4, S5, and S6, and the deflection angle larger than 45 ° is subtracted by 90 ° to obtain a final correction angle as a correction for map construction.
Referring to fig. 2, step S1 specifically includes:
step S11: the method comprises the steps of obtaining laser data of a laser sensor, and selecting the laser data in an error detection range according to the error detection range of the laser sensor, wherein the laser data comprise distance information and angle information of a plurality of laser points.
Step S12: and converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence.
It is understood that, in step S11, the laser sensor has the smallest error of the detected data within the predetermined applicable range based on its own usage parameters, and the embodiment may acquire the laser data within the optimal detection range (with the smallest error) based on its own usage parameters and reject the data outside the range to improve the accuracy of data calculation.
Referring to fig. 3, in step S2, the step of fitting the plurality of line segments mainly includes:
step S21: traversing all the coordinate points according to the sequence of the coordinate points, calculating the distance between the next coordinate point and the previous coordinate point, continuously traversing downwards if the distance is smaller than a distance threshold, grouping if the distance is larger than the distance threshold, and traversing again from the next coordinate point to obtain a plurality of data groups.
Step S22: and eliminating data groups with the number of coordinate points less than a number threshold value from the multiple data groups.
Step S23: and in each data set, performing straight line fitting according to the coordinate point sequence to obtain a corresponding line segment.
Step S24: and eliminating the coordinate points with the distance larger than the threshold value according to the distances from all the coordinate points in the current data set to the line segments.
Step S25: repeating the steps S21-S24 after the straight line is re-fitted, and obtaining the corresponding line segment.
It can be understood that, in step S21, the coordinate points are traversed according to the sequence, if the distance between two coordinate points before and after is greater than the threshold, the two coordinate points are considered as two related points that cannot be regarded as a straight line, so that in step S21, the two coordinate points can be split into two different data sets, and the traversal can be restarted respectively, and the traversal can be continued downward only if the distance between two adjacent coordinate points is within the threshold, so that the coordinate points can be divided into a plurality of data sets according to the threshold.
It is understood that in step S22, there are multiple coordinate points in multiple data sets, but if there are too few coordinate points, a true straight line segment cannot be fitted, so a smaller number of data sets need to be rejected.
It is to be understood that in step S23, each data set is subjected to straight line fitting to obtain a corresponding line segment.
It can be understood that, in step S24, the distance between each coordinate point and the line segment is calculated in the respective data sets of the fitted line segments, and if the distance between a certain coordinate point is too large and exceeds a set threshold, it can be determined that the coordinate point does not meet the condition for fitting the line segment, and needs to be eliminated.
It is understood that, in step S25, the data group from which coordinate points are culled twice is subjected to recalculation of the inter-coordinate-point distances, the number thereof, and the coordinate-point-line distances, which are performed in sequence in steps S21-S24, and finally a line segment is obtained.
Optionally, referring to fig. 4, as an embodiment, after step S25, the method further includes:
step S26: and comparing every two adjacent line segments, and selecting two data groups of which the difference of the slopes of the two line segments is smaller than a threshold value and the distance between the head and the tail of the two line segments is smaller than the threshold value.
Step S27: and combining the two data sets, and repeating the step of straight line fitting to obtain a corresponding line segment.
It is understood that in step S26, the two segments meeting the requirement are merged, so that the calculation amount can be reduced.
Optionally, as another embodiment, in step S2, the length of each line segment is calculated, and line segments with lengths smaller than the length threshold are filtered out, so that interference of shorter line segments on calculation of the deflection angle can be reduced, and accuracy and calculation efficiency are improved.
Referring to fig. 5, a second embodiment of the invention further provides a map-constructed angular deflection correction system, which is used for operating the map-constructed angular deflection correction method in the first embodiment. The mapped angular deflection correction system may include:
the data obtaining unit 1 is configured to execute the step S1, and is configured to obtain laser data, convert the laser data into a plurality of coordinate points, and store the coordinate points in a sequential order.
A line segment fitting unit 2, configured to perform step S2 described above, and configured to fit a plurality of coordinate points to obtain a plurality of line segments;
a tilt angle calculation unit 3, configured to execute the step S3 described above, and configured to calculate a tilt angle of each line segment, add 90 ° to the data in which a negative angle exists, and sort all the tilt angles after adjustment;
a yaw angle calculation unit 4 for performing the above-described steps S4, S5, and S6 for, when the number of inclination angles is one, the inclination angle being a yaw angle of the map; when the number of the inclination angles is two, if only one of the angles is near 0 degrees or 90 degrees, the angle is a deflection angle; if the two angles are both around 0 degree or 90 degrees, subtracting 90 degrees from the angle around 90 degrees, and then calculating the average value of the two angles to be the deflection angle; if the two angles are not around 0 degrees or 90 degrees, the difference value of the two inclination angles is obtained, if the difference value is larger than an angle threshold value, the deflection angle is judged to be 0 degrees, otherwise, the average value of the two inclination angles is taken as the deflection angle; when the number of the inclination angles is more than two, subtracting 90 degrees from the angles near 90 degrees, sorting all the inclination angles again, solving the difference between the adjacent inclination angles, reserving every two inclination angles with the difference within a threshold value, and calculating the average value of all the reserved inclination angles to obtain the deflection angle;
a correction unit 5 for executing the above step S7 for subtracting 90 ° from the deflection angle larger than 45 ° based on the obtained deflection angle to obtain a final correction angle as a correction for map construction.
Of course, the above units may further include a plurality of execution units for executing other steps in the steps of the first embodiment, which are not described herein again.
Referring to fig. 6, a third embodiment of the present invention provides an electronic device for implementing the above-mentioned map-constructed angle deflection correction method, where the electronic device includes a memory 10 and a processor 20, the memory 10 stores therein a computer program, and the computer program is configured to execute the steps in any of the above-mentioned map-constructed angle deflection correction method embodiments when the computer program is executed. The processor 20 is arranged to perform the steps of any of the above-described embodiments of the mapped angular deflection correction method by means of the computer program.
Optionally, in this embodiment, the electronic device may be located in at least one network device of a plurality of network devices of an operating machine network.
Compared with the prior art, the angle deflection correction method, the angle deflection correction system and the electronic equipment for map construction provided by the invention have the following advantages:
1. through the storage of laser data, carry out the line segment fitting to a plurality of coordinate points, and convert through the inclination of a plurality of line segments, the calculation of different deflection angles has been carried out to the quantity of line segment, the line segment of fitting in the laser data has effectively been utilized, and obtain the correction parameter that the map was found according to the line segment inclination, the object that has combined the actual scene that the map was found place is as the benchmark, even do not have perpendicular or be on a parallel with the wall body and place the robot, also can establish a forward map of laying level, let the robot can more stable work, autonomy is stronger.
2. Through screening of multiple rejection conditions of point intervals, number and point-line intervals on the coordinate points, accurate estimation of line segments is carried out on multiple coordinate points in the whole laser data, the fitted line segments are close to the edge contour line area of a real object, the calculation error of the line segments of the real scene is reduced, and the calculation accuracy is improved.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart.
Which when executed by a processor performs the above-described functions defined in the method of the present application. It should be noted that the computer memory described herein may be a computer readable signal medium or a computer readable storage medium or any combination of the two. The computer memory may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing.
More specific examples of computer memory may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present application, a computer readable signal medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In this application, however, a computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units described in the embodiments of the present application may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes a data acquisition unit, a line segment fitting unit, a tilt angle calculation unit, a deflection angle calculation unit, and a correction unit. Where the names of the cells do not in some cases constitute a limitation on the cells themselves, for example, the line segment fitting unit may also be described as a "unit that fits a plurality of coordinate points to obtain a plurality of line segments".
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to limit the invention to the precise form disclosed, and obviously many modifications and variations are possible in light of the above teaching. The exemplary embodiments were chosen and described in order to explain certain principles of the invention and its practical application to enable one skilled in the art to make and use various exemplary embodiments of the invention and various alternatives and modifications as are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the claims and their equivalents.

Claims (7)

1. A method for correcting angle deflection constructed by a map is characterized by comprising the following steps: the method comprises the following steps:
step S1: acquiring laser data, converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence;
step S2: fitting the plurality of coordinate points to obtain a plurality of line segments;
step S3: calculating the inclination angle of each line segment, adding 90 degrees to the data with the negative angle, and sorting all the adjusted inclination angles;
step S4: the number of the line segments is one, and the inclination angle is the deflection angle of the map;
step S5: the number of the line segments is two, and if only one angle is about 0 degrees or 90 degrees, the angle is a deflection angle; if the two angles are both around 0 degree or 90 degrees, subtracting 90 degrees from the angle around 90 degrees, and then calculating the average value of the two angles to be the deflection angle; if the two angles are not around 0 degrees or 90 degrees, the difference value of the two inclination angles is obtained, if the difference value is larger than an angle threshold value, the deflection angle is judged to be 0 degrees, otherwise, the average value of the two inclination angles is taken as the deflection angle;
step S6: the number of the line segments is more than two, after the angle near 90 degrees is subtracted by 90 degrees, all the inclination angles are sorted again, the difference value between the adjacent inclination angles is calculated, every two inclination angles with the difference value within a threshold value are reserved, and the average value of all the reserved inclination angles is calculated to obtain the deflection angle;
step S7: based on the obtained deflection angle, 90 ° is subtracted from the deflection angle larger than 45 ° to obtain the final correction angle as the correction for the map construction.
2. The mapped angular deflection correction method of claim 1, wherein: in step S2, the fitting to obtain a plurality of line segments mainly includes:
step S21: traversing all the coordinate points according to the sequence of the coordinate points, calculating the distance between the next coordinate point and the previous coordinate point, if the distance is smaller than a distance threshold value, continuing to traverse downwards, if the distance is larger than the distance threshold value, grouping, and starting to traverse again from the next coordinate point to obtain a plurality of data groups;
step S22: removing data groups with the number of coordinate points less than a number threshold value from the multiple data groups;
step S23: in each data set, performing straight line fitting according to the coordinate point sequence to obtain a corresponding line segment;
step S24: according to the distances from all coordinate points in the current data set to the line segments, eliminating the coordinate points with the distances larger than a threshold value;
step S25: and repeating the steps S21-S24 after the straight line is re-fitted, and obtaining the corresponding line segment.
3. The mapped angular deflection correction method of claim 2, wherein: after step S25, the method further includes:
step S26: comparing every two adjacent line segments, and selecting two data groups of which the difference of the slopes of the two line segments is smaller than a threshold value and the distance between the head and the tail is smaller than the threshold value;
step S27: and combining the two data sets, and repeating the step of straight line fitting to obtain a corresponding line segment.
4. The mapped angular deflection correction method of claim 1, wherein: in step S2, the length of each line segment is calculated, and line segments with lengths less than the length threshold are filtered out.
5. The mapped angular deflection correction method of claim 1, wherein: step S1 specifically includes:
step S11: the method comprises the steps of obtaining laser data of a laser sensor, and selecting the laser data in an error detection range according to the error detection range of the laser sensor, wherein the laser data comprise distance information and angle information of a plurality of laser points;
step S12: and converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence.
6. A map-constructed angular deflection correction system, comprising: the method comprises the following steps:
the data acquisition unit is used for acquiring laser data, converting the laser data into a plurality of coordinate points and storing the coordinate points according to the sequence;
the line segment fitting unit is used for fitting the coordinate points to obtain a plurality of line segments;
the inclination angle calculation unit is used for calculating the inclination angle of each line segment, adding 90 degrees to the data with the negative angle, and sequencing all the adjusted inclination angles;
a deflection angle calculation unit for, when the number of the inclination angles is one, taking the inclination angle as a deflection angle of the map; when the number of the inclination angles is two, if only one of the angles is near 0 degrees or 90 degrees, the angle is a deflection angle; if the two angles are both around 0 degree or 90 degrees, subtracting 90 degrees from the angle around 90 degrees, and then calculating the average value of the two angles to be the deflection angle; if the two angles are not around 0 degrees or 90 degrees, the difference value of the two inclination angles is obtained, if the difference value is larger than an angle threshold value, the deflection angle is judged to be 0 degrees, otherwise, the average value of the two inclination angles is taken as the deflection angle; when the number of the inclination angles is more than two, after subtracting 90 degrees from the angles near 90 degrees, sequencing all the inclination angles again, solving a difference value between the adjacent inclination angles, keeping every two inclination angles with the difference value within a threshold value, and calculating an average value of all the kept inclination angles to obtain a deflection angle;
and the correcting unit is used for subtracting 90 degrees from the deflection angle larger than 45 degrees based on the obtained deflection angle to obtain a final correction angle as the correction of the map construction.
7. An electronic device comprising a memory and a processor, characterized in that: a computer program stored in the memory, the computer program being arranged when executed to perform the method of angular deflection correction of the mapping in any of claims 1 to 5;
the processor is arranged to execute the method of angular deflection correction as mapped in any of claims 1 to 5 by the computer program.
CN202210580712.XA 2022-05-26 2022-05-26 Angle deflection correction method and system for map construction and electronic equipment Pending CN114998535A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210580712.XA CN114998535A (en) 2022-05-26 2022-05-26 Angle deflection correction method and system for map construction and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210580712.XA CN114998535A (en) 2022-05-26 2022-05-26 Angle deflection correction method and system for map construction and electronic equipment

Publications (1)

Publication Number Publication Date
CN114998535A true CN114998535A (en) 2022-09-02

Family

ID=83029158

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210580712.XA Pending CN114998535A (en) 2022-05-26 2022-05-26 Angle deflection correction method and system for map construction and electronic equipment

Country Status (1)

Country Link
CN (1) CN114998535A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018032488A1 (en) * 2016-08-19 2018-02-22 广州艾若博机器人科技有限公司 Map building method and apparatus based on light emitting device, and correction method and apparatus
CN107836013A (en) * 2016-03-09 2018-03-23 广州艾若博机器人科技有限公司 Map constructing method, method and device for correcting
CN108387234A (en) * 2018-02-06 2018-08-10 广州科语机器人有限公司 The map creating method of mobile robot based on laser range sensor
CN109696168A (en) * 2019-02-27 2019-04-30 沈阳建筑大学 A kind of mobile robot geometry map creating method based on laser sensor
CN111127559A (en) * 2019-12-26 2020-05-08 深圳市瑞立视多媒体科技有限公司 Method, device, equipment and storage medium for detecting marker post in optical dynamic capturing system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107836013A (en) * 2016-03-09 2018-03-23 广州艾若博机器人科技有限公司 Map constructing method, method and device for correcting
WO2018032488A1 (en) * 2016-08-19 2018-02-22 广州艾若博机器人科技有限公司 Map building method and apparatus based on light emitting device, and correction method and apparatus
CN108387234A (en) * 2018-02-06 2018-08-10 广州科语机器人有限公司 The map creating method of mobile robot based on laser range sensor
CN109696168A (en) * 2019-02-27 2019-04-30 沈阳建筑大学 A kind of mobile robot geometry map creating method based on laser sensor
CN111127559A (en) * 2019-12-26 2020-05-08 深圳市瑞立视多媒体科技有限公司 Method, device, equipment and storage medium for detecting marker post in optical dynamic capturing system

Similar Documents

Publication Publication Date Title
CN111536964B (en) Robot positioning method and device, and storage medium
US20190086543A1 (en) Method And Apparatus For Tracking Obstacle
CN109470254A (en) Generation method, device, system and the storage medium of map lane line
CN111339692B (en) Laser point cloud data-based power line sag determination method and device
CN107527382B (en) Data processing method and device
CN111360808B (en) Method and device for controlling robot to move and robot
CN109990783B (en) Robot motion path planning method, robot and storage medium
CN109683617B (en) Automatic driving method and device and electronic equipment
CN112171675B (en) Obstacle avoidance method and device for mobile robot, robot and storage medium
CN113218408B (en) 2Dslam method and system suitable for multi-sensor fusion of multiple terrains
CN111856499B (en) Map construction method and device based on laser radar
CN112700479A (en) Registration method based on CNN point cloud target detection
US10282490B2 (en) Estimation of three-dimensional models of roofs from spatial two-dimensional graphs
CN113674351A (en) Robot and drawing establishing method thereof
CN114442624B (en) Robot recharging control method, device and system
CN109341688A (en) A kind of map calling location algorithm based on construction sequence
CN116540726A (en) Intelligent obstacle avoidance method, system and medium for patrol robot
CN114998535A (en) Angle deflection correction method and system for map construction and electronic equipment
CN112097772B (en) Robot and map construction method and device thereof
CN112132951A (en) Method for constructing grid semantic map based on vision
CN111637897B (en) Map updating method, map updating device, storage medium, and processor
CN116012413A (en) Image feature point tracking method and device, electronic equipment and storage medium
CN110366104A (en) Localization method, device, system and electronic equipment and computer readable storage medium
CN115597585A (en) Robot positioning method, device, equipment and storage medium
CN116300876A (en) Multi-agent unknown environment autonomous collaborative exploration method, system, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination