CN110599543A - Wall position determining method and device, computer equipment and storage medium - Google Patents

Wall position determining method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN110599543A
CN110599543A CN201910889208.6A CN201910889208A CN110599543A CN 110599543 A CN110599543 A CN 110599543A CN 201910889208 A CN201910889208 A CN 201910889208A CN 110599543 A CN110599543 A CN 110599543A
Authority
CN
China
Prior art keywords
sub
point cloud
coordinate system
determining
area
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
CN201910889208.6A
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.)
Xiaogou Electric Internet Technology Beijing Co Ltd
Original Assignee
Xiaogou Electric Internet Technology Beijing 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 Xiaogou Electric Internet Technology Beijing Co Ltd filed Critical Xiaogou Electric Internet Technology Beijing Co Ltd
Priority to CN201910889208.6A priority Critical patent/CN110599543A/en
Publication of CN110599543A publication Critical patent/CN110599543A/en
Pending legal-status Critical Current

Links

Classifications

    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47LDOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
    • A47L11/00Machines for cleaning floors, carpets, furniture, walls, or wall coverings
    • A47L11/24Floor-sweeping machines, motor-driven
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47LDOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
    • A47L11/00Machines for cleaning floors, carpets, furniture, walls, or wall coverings
    • A47L11/40Parts or details of machines not provided for in groups A47L11/02 - A47L11/38, or not restricted to one of these groups, e.g. handles, arrangements of switches, skirts, buffers, levers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • 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

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

The invention discloses a wall position determining method, which can improve the accuracy of determining the position of a wall, and the wall position determining method can comprise the following steps: scanning a cleaning area according to a pre-established plane rectangular coordinate system to obtain point cloud data of the cleaning area; dividing the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas; counting the number of point clouds of point cloud data on each sub-area in the plurality of sub-areas to obtain a plurality of point clouds; determining a maximum number of point clouds of a plurality of the point clouds; and when the maximum point cloud number meets a first preset condition, determining the position of the sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as a wall body position. The invention also discloses a wall position determining device, a computer device and a computer readable storage medium.

Description

Wall position determining method and device, computer equipment and storage medium
Technical Field
The invention relates to the field of robots, in particular to a wall position determining method, a wall position determining device, computer equipment and a computer readable storage medium.
Background
At present, a sweeping robot can automatically complete sweeping, wiping and automatic recharging functions of an area to be swept under the unmanned operation condition, and is increasingly popular with people.
However, the inventor finds that the prior art has at least the following defects in the process of researching the invention: the accuracy of robot discernment wall body position of sweeping floor among the prior art is poor, and then leads to the robot of sweeping floor to the effect of cleaning of wall limit corner and wall root department poor.
Disclosure of Invention
The present invention is directed to a method, an apparatus, a computer device and a computer readable storage medium for determining a wall position, which can solve the above-mentioned drawbacks of the prior art.
One aspect of the present invention provides a wall position determining method, including: scanning a cleaning area according to a pre-established plane rectangular coordinate system to obtain point cloud data of the cleaning area; dividing the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas; counting the number of point clouds of point cloud data on each sub-area in the plurality of sub-areas to obtain a plurality of point clouds; determining the maximum point cloud number from the plurality of point cloud numbers; and when the maximum point cloud number meets a first preset condition, determining the position of the sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as a wall body position.
Optionally, the size and the position of each overlapping area with respect to the range of two adjacent sub-areas corresponding to the overlapping area are the same.
Optionally, dividing the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, including: dividing the cleaning area into a plurality of first sub-areas by taking a transverse axis of the plane rectangular coordinate system as a reference, wherein a first overlapping area exists between any two adjacent first sub-areas; and dividing the cleaning area into a plurality of second sub-areas by taking the longitudinal axis of the plane rectangular coordinate system as a reference, wherein a second overlapping area exists between any two adjacent second sub-areas.
Optionally, counting the number of point clouds of point cloud data in each of the sub-regions to obtain a plurality of number of point clouds, including: counting the number of first point clouds of point cloud data on each first sub-area of the plurality of first sub-areas to obtain the number of the first point clouds; and counting the number of the second point clouds of the point cloud data on each second sub-area in the plurality of second sub-areas to obtain the number of the second point clouds.
Optionally, determining a maximum number of point clouds from a plurality of the point clouds includes: determining the maximum point cloud number from the plurality of first point cloud numbers and the plurality of second point cloud numbers.
Optionally, when the maximum point cloud number meets a first predetermined condition, determining the position of the sub-region corresponding to the maximum point cloud number in the rectangular plane coordinate system as a wall position, including: and when the maximum point cloud number meets the first preset condition, determining the position of the first sub-area or the second sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the position of the wall body.
Optionally, when the maximum point cloud number meets a first predetermined condition, determining a position of the sub-region corresponding to the maximum point cloud number in the rectangular plane coordinate system as a wall position, further comprising: aiming at the sub-area corresponding to the maximum point cloud number, calculating the distance between any two point cloud data on the sub-area, and recording the maximum distance; and when the maximum point cloud number meets the first preset condition and the maximum distance meets a second preset condition, determining the position of the sub-region in the plane rectangular coordinate system as the position of the wall body.
Optionally, the method for determining the position of the wall further includes: when the maximum point cloud number does not meet the first preset condition, sequentially rotating the plane rectangular coordinate system in the same direction by taking a second preset angle as a step length within a first preset angle; for each rotation, subdividing the cleaning area into a plurality of sub-areas; for all rotations within the first predetermined angle, re-determining the maximum number of point clouds from all point clouds corresponding to all re-partitioned sub-regions; and when the redetermined maximum point cloud number meets the first preset condition, determining the position of the plane rectangular coordinate system of the sub-area corresponding to the redetermined maximum point cloud number after rotation as the position of the wall body.
Optionally, the method for determining the position of the wall further includes: determining an initial angle of the intelligent robot relative to the plane rectangular coordinate system; calculating a first rotation angle according to the initial angle and the position of the sub-region corresponding to the maximum point cloud number in the plane rectangular coordinate system; and controlling the intelligent robot to rotate by the first rotation angle.
Optionally, determining an initial angle of the intelligent robot relative to the planar rectangular coordinate system includes: when the maximum point cloud number in the plurality of point cloud numbers meets the first preset condition, determining an angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation to obtain the initial angle; or when the maximum point cloud number in the plurality of point cloud numbers does not meet the first preset condition, determining an angle between the advancing direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the newly determined maximum point cloud number to obtain the initial angle.
Optionally, determining an angle between the advancing direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the re-determined maximum point cloud number to obtain the initial angle, including: determining a second rotation angle of the rotated rectangular plane coordinate system corresponding to the re-determined maximum point cloud number, wherein the second rotation angle is an integral multiple of the second preset angle; and calculating the initial angle according to the angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation and the second rotation angle.
Another aspect of the present invention provides a wall position determining apparatus, including: the scanning module is used for scanning a cleaning area according to a pre-established plane rectangular coordinate system to obtain point cloud data of the cleaning area; the first dividing module is used for dividing the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas; the counting module is used for counting the point cloud number of the point cloud data on each sub-area in the plurality of sub-areas to obtain a plurality of point cloud numbers; a first determining module for determining a maximum number of point clouds from a plurality of said point clouds; and the second determining module is used for determining the position of the sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the wall body position when the maximum point cloud number meets a first preset condition.
Yet another aspect of the present invention provides a computer apparatus, comprising: a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor implements the wall position determining method according to any of the embodiments when executing the computer program.
Yet another aspect of the present invention provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements a wall position determination method as described in any of the embodiments above.
Before finding a wall, the method, the device, the computer equipment and the computer readable storage medium for determining the position of the wall provided by the invention can establish a plane rectangular coordinate system, then scan a cleaning area by taking the plane rectangular coordinate system as a reference to obtain point cloud data of the cleaning area, and divide the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas. According to the method, the wall body is not straight, for example, the surface of the wall body has convex and concave parts, so that point cloud data obtained by scanning the wall body can be distributed on two sub-areas, and further if the wall body is divided into a plurality of non-overlapped sub-areas, errors are easy to generate, and the result of determining the position of the wall body is influenced; in addition, the invention also considers that the point cloud number of the point cloud data obtained by scanning the wall body is very large, so that the point cloud number in the sub-area of the position of the wall body is necessarily far larger than the point cloud number corresponding to any other sub-area, and the invention determines the position of the sub-area corresponding to the maximum point cloud number as the position of the wall body only when the maximum point cloud number meets the first preset condition, thereby improving the accuracy of determining the position of the wall body.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to refer to like parts throughout the drawings.
In the drawings:
fig. 1 is a flowchart of a wall position determining method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating dividing a cleaning area into a plurality of sub-areas according to an embodiment of the present invention;
fig. 3 is a schematic diagram of dividing a cleaning area into a plurality of first sub-areas according to an embodiment of the present invention;
fig. 4 is a schematic diagram of dividing a cleaning area into a plurality of second sub-areas according to an embodiment of the present invention;
FIG. 5 is a flow chart of determining the number of point clouds according to an embodiment of the invention;
FIG. 6 is a flow chart of determining the position of a wall according to an embodiment of the present invention;
FIG. 7 is a flow chart of a method for determining a wall location according to another embodiment of the present invention;
FIG. 8 is a flow chart of a method for determining wall location according to yet another embodiment of the present invention;
FIG. 9 is a flowchart of calculating an initial angle according to an embodiment of the present invention;
FIG. 10 is a flow chart of a method for determining a wall location according to another embodiment of the present invention;
FIG. 11 is a block diagram of a wall position determining apparatus according to an embodiment of the present invention;
fig. 12 is a block diagram of a computer device suitable for implementing the wall location determining method according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The embodiment of the present invention provides a wall position determining method, which may be applied to the following application scenarios, it should be understood that the application scenarios described in this embodiment are only used for explaining the present invention, and do not limit the protection scope of the present invention, and the present invention may also be applied to other application scenarios, specifically: the wall body position determining method can be applied to an intelligent robot, particularly can be applied to a wall following behavior stage of the intelligent robot, the wall following behavior stage can be divided into two stages, the first stage is used for finding the position of a wall body for the intelligent robot, and the second stage is used for enabling the intelligent robot to find the position of the wall body and then walk along the wall. Because the initial state of the intelligent robot is unknown, that is, the initial state of the intelligent robot may be a wall-existing state (near a wall) or a wall-absent state (far from the wall), when the intelligent robot is in the wall-existing state, the intelligent robot can be directly switched to a wall-following walking mode to work, but when the intelligent robot is in the wall-absent state, the intelligent robot needs to search the position of the wall and then switch to the wall-following walking mode.
Fig. 1 is a flowchart of a wall position determining method according to an embodiment of the present invention.
As shown in fig. 1, the method for determining the wall position may include steps S101 to S105, where:
step S101, scanning a cleaning area according to a pre-established plane rectangular coordinate system to obtain point cloud data of the cleaning area.
In this embodiment, the intelligent robot may include a floor sweeping robot and a floor mopping robot, and after the intelligent robot is started, the intelligent robot may establish a rectangular plane coordinate system using the ground as a horizontal plane. The origin of the rectangular plane coordinate system may be the position of the intelligent robot, and the horizontal axis or the vertical axis may be the advancing direction of the intelligent robot, for example, the positive direction of the horizontal axis is the advancing direction of the intelligent robot.
Optionally, the origin of the planar rectangular coordinate system may also be a position away from the intelligent robot by a predetermined distance, and the horizontal axis or the vertical axis may also be a fixed angle with the advancing direction of the intelligent robot, for example, the positive direction of the horizontal axis forms a fixed angle with the advancing direction of the intelligent robot, and the specific method for establishing the planar rectangular coordinate system is not limited in this embodiment.
In this embodiment, the laser radar of the intelligent robot may be started, and the cleaning area is scanned by using the plane rectangular coordinate system as the coordinate reference, so as to obtain point cloud data (also referred to as laser point cloud data) of the cleaning area. The cleaning area may be a predetermined area, the range of the predetermined area is included in the scanning range of the laser radar, and in order to accurately identify the wall position according to the number of the point cloud data, the cleaning area is preferably a square area. E.g., a 10m x 10m area with the center point at the origin.
Optionally, the form of the point cloud data obtained by scanning may be a polar coordinate form, so that it can be ensured that the whole cleaning area can be accurately scanned, and further the point cloud data in the polar coordinate form can be converted into point cloud data in a plane rectangular coordinate form. It should be understood that the point cloud data of the present invention is point cloud data in the form of a planar rectangular coordinate system.
Step S102, dividing the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas.
In this embodiment, since the cleaning region is established in the rectangular planar coordinate system, the cleaning region may be divided into a plurality of sub-regions according to the coordinates in the rectangular planar coordinate system. Moreover, since the wall may not be straight, for example, there are convex and concave portions on the wall surface, the point cloud data obtained by scanning the wall may be distributed on two sub-areas, and if the wall is divided into a plurality of sub-areas that are not overlapped, an error is easily generated, which affects the result of determining the wall position. Therefore, in order to improve the accuracy of determining the position of the wall body, according to the tolerance of the wall body, an overlapping area is arranged between two adjacent sub-areas. For example, there are a plurality of division lines parallel to each other for dividing the sweeping area into a plurality of sub-areas, each division line is at a predetermined angle (the predetermined angle includes 0 degree) to the horizontal axis, and an overlapping area exists between two adjacent sub-areas, and if the width of two adjacent sub-areas is 5cm, the overlapping area width is set to 1 cm.
Optionally, in order to improve the accuracy of subsequently comparing the number of point clouds in each sub-region, in this embodiment, it is preferable to divide the cleaning region into a plurality of equal sub-regions, and the range size and the position of each overlapping region with respect to two adjacent sub-regions corresponding to the overlapping region are the same.
For example, the cleaning area is divided into 3 sub-areas, the width range of the first sub-area is [0,5cm ], and the length range is [ -5cm,5cm ]; the second subregion has a width in the range of [4cm,9cm ] and a length in the range of [ -5cm,5cm ]; the third subregion has a width in the range of [8cm,13cm ] and a length in the range of [ -5cm,5cm ]. Obviously, the first overlap region has a size of 1cm in width and 10cm in length relative to the extent of the first and second sub-regions, at a position of 1cm in width at the end of the first sub-region and 1cm in width at the beginning of the second sub-region; the second overlap region is sized relative to the extent of the second and third sub-regions to be 1cm in width and 10cm in length, at a position 1cm wide at the end of the second sub-region and 1cm wide at the beginning of the third sub-region.
Optionally, in order to improve the accuracy of identifying the wall position, the number of point clouds in the sub-area where the wall position is located is the largest only when the divided sub-areas are parallel to the wall, and then the wall position can be determined according to the number of the point clouds. Therefore, the cleaning area can be divided by assuming that the horizontal axis or the vertical axis of the currently established rectangular plane coordinate system is parallel to the wall. For example, the cleaning area is divided from two dimensions, that is, the cleaning area is divided into a plurality of first sub-areas from the dimension of the transverse axis, the cleaning area is divided into a plurality of second sub-areas from the dimension of the longitudinal axis, and then the maximum point cloud number is determined from the point cloud numbers corresponding to the sub-areas divided from the two dimensions, that is, for the rectangular coordinate system of the same plane, the contents of the two dimensions are considered at one time, so that not only the efficiency of determining the wall position is improved, but also the accuracy of determining the wall position is improved. Specifically, fig. 2 is a flowchart of dividing the cleaning area into a plurality of sub-areas according to an embodiment of the present invention, and as shown in fig. 2, step S102 may include step S1021 and step S1022, where:
step S1021, taking a horizontal axis of the plane rectangular coordinate system as a reference, dividing the cleaning area into a plurality of first subregions, wherein a first overlapping area exists between any two adjacent first subregions.
Specifically, the horizontal axis may be used as a reference, the cleaning region may be divided into a plurality of equal first sub-regions, each first sub-region is parallel to the horizontal axis or forms a preset angle with the horizontal axis, a first overlapping region exists between any two adjacent first sub-regions, and in order to improve accuracy, the range size and the position of each first overlapping region with respect to two adjacent first sub-regions corresponding to the first overlapping region are the same. When the cleaning area is parallel to the rectangular plane coordinate system, the divided first sub-areas may also be parallel to the horizontal axis, and in this case, it may be assumed by default that the horizontal axis of the rectangular plane coordinate system currently established is parallel to the wall, and the horizontal axis range of each first sub-area is consistent, and the vertical axis range is consistent, for example, there are a plurality of dividing lines parallel to the horizontal axis and at consistent intervals, and these dividing lines are used for dividing the cleaning area into a plurality of equal first sub-areas. When the cleaning region and the planar rectangular coordinate system form a predetermined angle, for example, a predetermined angle with the horizontal axis, each of the divided first sub-regions may form a predetermined angle with the horizontal axis, and at this time, it may be assumed that the horizontal axis of the currently established planar rectangular coordinate system forms a predetermined angle with the wall by default.
As shown in fig. 3, assuming that a square area parallel to a rectangular plane coordinate system and having an origin at a center point of the cleaning area is 10m × 10m, the cleaning area is divided into n first sub-areas with a step length of 5cm, each first sub-area is parallel to a horizontal axis, a first overlapping area exists between any two adjacent first sub-areas, and the range size and the position of each first overlapping area relative to two adjacent first sub-areas corresponding to the first overlapping area are the same. If the longitudinal axis of the first sub-region y1 is in the range of [0,5cm ], the transverse axis is in the range of [ -5m,5m ]; the first sub-region y2 has a longitudinal axis in the range of [4cm,9cm ], and a transverse axis in the range of [ -5m,5m ]; the first sub-region y3 has a longitudinal axis in the range of [8cm,13cm ], and a transverse axis in the range of [ -5m,5m ]; the first sub-region y4 has a longitudinal axis in the range of [ -4cm,1cm), a transverse axis in the range of [ -5m,5m ], …, and so on. Obviously, there is a first overlapping region between the first sub-region y1 and the first sub-region y2, which is sized with a width of 1cm and a length of 10cm with respect to the extent of the first sub-region y1 and the first sub-region y2, and is located at the end 1cm width of the first sub-region y1 and at the beginning 1cm width of the first sub-region y 2; there is a first overlap region between the first sub-region y2 and the first sub-region y3, which is sized to be 1cm wide and 10cm long relative to the extent of the first sub-region y2 and the first sub-region y3, at a position of 1cm width at the end of the first sub-region y2 and 1cm width at the beginning of the first sub-region y 3; …, respectively; and so on.
In step S1022, the cleaning region is divided into a plurality of second sub-regions with reference to the vertical axis of the planar rectangular coordinate system, where a second overlapping region exists between any two adjacent second sub-regions.
Specifically, the cleaning region may be divided into a plurality of equal second sub-regions with reference to the longitudinal axis, each second sub-region is parallel to the longitudinal axis or forms a predetermined angle with the longitudinal axis, a second overlapping region exists between any two adjacent second sub-regions, and in addition, in order to improve accuracy, the range size and the position of each second overlapping region with respect to the two adjacent second sub-regions corresponding to the second overlapping region are the same. When the cleaning area is parallel to the rectangular planar coordinate system, the divided second sub-areas may also be parallel to the longitudinal axis, and at this time, it may be assumed by default that the longitudinal axis of the rectangular planar coordinate system currently established is parallel to the wall, and the longitudinal axis range of each second sub-area is consistent, and the distance between the horizontal axis ranges is consistent, for example, there are a plurality of dividing lines parallel to the longitudinal axis and having consistent distance, and these dividing lines are used for dividing the cleaning area into a plurality of equal second sub-areas. When the cleaning region and the planar rectangular coordinate system form a predetermined angle, for example, a predetermined angle with the horizontal axis, each of the divided first sub-regions may form a predetermined angle with the vertical axis, and at this time, it may be assumed that the vertical axis of the currently established planar rectangular coordinate system forms a predetermined angle with the wall by default.
As shown in fig. 4, assuming that a square area parallel to a rectangular plane coordinate system with an origin at a center point of the cleaning area is 10m × 10m, the cleaning area is divided into n second sub-areas with a step length of 5cm, each second sub-area is parallel to the longitudinal axis, a second overlapping area exists between any two adjacent second sub-areas, and the range size and the position of each second overlapping area relative to the two adjacent second sub-areas corresponding to the second overlapping area are the same. If the horizontal axis of the second subregion x1 is in the range of [0,5cm), the vertical axis is in the range of [ -5m,5m ]; the horizontal axis of the second sub-region x2 ranges from [4cm,9cm ], and the vertical axis ranges from [ -5m,5m ]; the horizontal axis of the second sub-region x3 ranges from [8cm,13cm ], and the vertical axis ranges from [ -5m,5m ]; the second sub-region x4 has a horizontal axis in the range of [ -4cm,1cm), a vertical axis in the range of [ -5m,5m ], …, and so on. Obviously, between the second sub-zone x1 and the second sub-zone x2 there is a second overlapping area, which is sized with respect to the extent of the second sub-zone x1 and the second sub-zone x2, with a width of 1cm and a length of 10cm, positioned at the end 1cm width of the second sub-zone x1 and at the beginning 1cm width of the second sub-zone x 2; between the second sub-region x2 and the second sub-region x3 there is a second overlapping region which is sized 1cm wide and 10cm long relative to the extent of the second sub-region x2 and the second sub-region x3, and is located at the end 1cm width of the second sub-region x2 and at the beginning 1cm width of the second sub-region x 3; …, respectively; and so on.
Step S103, counting the point cloud number of the point cloud data on each subarea in the plurality of subareas to obtain a plurality of point cloud numbers.
In this embodiment, each sub-region corresponds to its own coordinate, and the plane rectangular coordinate value of each point cloud data is also known, so that the number of point clouds of the point cloud data falling on each sub-region can be determined.
Alternatively, since the above-described embodiment divides the cleaning region by two dimensions, as shown in fig. 5, step S103 may include step S1031 and step S1032, in which:
step S1031, counting the first point cloud number of the point cloud data on each first subregion of the plurality of first subregions to obtain a plurality of first point cloud numbers;
step S1032 is to count the number of the second point clouds of the point cloud data in each of the plurality of second sub-areas to obtain a plurality of second point clouds.
And step S104, determining the maximum point cloud number from the plurality of point cloud numbers.
Alternatively, step S104 may include: determining the maximum point cloud number from the plurality of first point cloud numbers and the plurality of second point cloud numbers.
And step S105, when the maximum point cloud number meets a first preset condition, determining the position of the sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the wall body position.
In this embodiment, since the number of point cloud data obtained by scanning the wall is necessarily very large, the first predetermined condition may be that the difference between the maximum number of point clouds and any one of the other number of point clouds reaches the first predetermined threshold.
The wall body position determining method provided by the invention can establish a plane rectangular coordinate system before finding a wall, then scan a cleaning area by taking the plane rectangular coordinate system as a reference to obtain point cloud data of the cleaning area, and divide the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas, further, the point cloud number of the point cloud data falling on each sub-area is determined, the maximum point cloud number is determined, and when the maximum point cloud number meets a first preset condition, the position of the corresponding sub-area is determined as the wall body position. According to the method, the wall body is not straight, for example, the surface of the wall body has convex and concave parts, so that point cloud data obtained by scanning the wall body can be distributed on two sub-areas, and further if the wall body is divided into a plurality of non-overlapped sub-areas, errors are easy to generate, and the result of determining the position of the wall body is influenced; in addition, the invention also considers that the point cloud number of the point cloud data obtained by scanning the wall body is very large, so that the point cloud number in the sub-area of the position of the wall body is necessarily far larger than the point cloud number corresponding to any other sub-area, and the invention determines the position of the sub-area corresponding to the maximum point cloud number as the position of the wall body only when the maximum point cloud number meets the first preset condition, thereby improving the accuracy of determining the position of the wall body.
Alternatively, since the length of the wall is also necessarily longer than other obstacles, such as a table placed in front of the wall, but the length of the wall is necessarily longer than the length of the table, the second predetermined condition may include: the difference between the largest distance and any other distance on the sub-area reaches a second predetermined threshold. Specifically, fig. 6 is a flowchart of determining a wall position according to an embodiment of the present invention, and as shown in fig. 6, step S105 may include step S1051 and step S1052, where:
step S1051, aiming at the subarea corresponding to the maximum point cloud number, calculating the distance between any two point cloud data on the subarea, and recording the maximum distance;
step S1052, when the maximum point cloud number satisfies a first predetermined condition and the maximum distance satisfies a second predetermined condition, determining the position of the sub-region in the rectangular plane coordinate system as the wall position.
In this embodiment, in addition to considering that the number of point clouds corresponding to the wall is inevitably far beyond other obstacles, it is further considered that the length of the wall is inevitably far beyond other obstacles, that is, the maximum distance of point cloud data on the sub-region corresponding to the maximum number of point clouds is taken into consideration, and only when the maximum number of point clouds satisfies the first predetermined condition and the maximum distances both satisfy the second predetermined condition, the position of the sub-region in the plane rectangular coordinate system is determined as the position of the wall, so that the accuracy of determining the position of the wall is further improved.
Optionally, since the cleaning area is divided into the plurality of first sub-areas and the plurality of second sub-areas from two dimensions in the above embodiment, the step S105 may include: and when the maximum point cloud number meets a first preset condition, determining the position of the first sub-area or the second sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the position of the wall body.
In this embodiment, the maximum point cloud number is determined from all the first point cloud numbers and all the second point cloud numbers. If the maximum point cloud number belongs to the first point cloud number, determining the position of the first sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the wall body position when the maximum point cloud number meets a first preset condition; and if the maximum point cloud number belongs to the second point cloud number, determining the position of the second sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the wall body position when the maximum point cloud number meets a first preset condition.
Optionally, the embodiment may also take the distance between the point cloud data into consideration, and the step of determining, when the maximum point cloud number satisfies the first predetermined condition, the position of the first sub-region or the second sub-region corresponding to the maximum point cloud number in the rectangular plane coordinate system as the wall position may include: calculating the distance between any two point cloud data on the first sub-area or the second sub-area aiming at the first sub-area or the second sub-area corresponding to the maximum point cloud number, and recording the maximum distance; and when the maximum point cloud number and the maximum distance meet a first preset condition, determining the position of the corresponding first sub-area or second sub-area in the plane rectangular coordinate system as the position of the wall body.
Optionally, when the maximum point cloud number in the plurality of point cloud numbers does not satisfy the first predetermined condition, that is, the sub-regions divided by the plane rectangular coordinate system are not parallel to the wall, or the included angle between the walls is not a right angle, at this time, the position of the wall may be determined by rotating the plane rectangular coordinate system for multiple times. Specifically, fig. 7 is a flowchart of a wall position determining method according to another embodiment of the present invention, and as shown in fig. 7, the wall position determining method may further include steps a1 to a step a4, where:
step A1, when the maximum point cloud number in the plurality of point cloud numbers does not meet a first preset condition, sequentially rotating the plane rectangular coordinate system in the same direction by taking a second preset angle as a step length within a first preset angle.
In this embodiment, since the angle between the walls is generally 90 degrees, the first predetermined angle may be set to 90 degrees. The second predetermined angle is smaller than the first predetermined angle, and the smaller the second predetermined angle is, the more times the planar rectangular coordinate system is rotated, the more accurate the determination of the wall position is, for example, the second predetermined angle may be set to 1 degree. The same direction may be clockwise or counter-clockwise.
For example, if the first predetermined angle is 90 degrees and the second predetermined angle is 1 degree, the planar rectangular coordinate system may be rotated 90 times counterclockwise, or the planar rectangular coordinate system may be rotated 90 times clockwise.
In step a2, the cleaning region is subdivided into a plurality of sub-regions for each rotation.
For each rotation, the steps S102 to S104 may be performed again, that is, the cleaning area is divided again, and the number of the point clouds corresponding to each sub-area is determined again.
For example, for each rotation, the cleaning region may be subdivided into a plurality of first sub-regions and a plurality of second sub-regions, and the specific partitioning method is consistent with the above embodiment, and is not described again in this embodiment. And each first sub-area corresponds to one first point cloud number again, and each second sub-area corresponds to one second point cloud number again.
Step a3, for all rotations within the first predetermined angle, re-determining the maximum number of point clouds from all point clouds corresponding to all sub-regions re-partitioned.
For example, after all the rotations are completed, the maximum point cloud number is determined again from all the re-determined first point cloud number and second point cloud number, where the re-determined maximum point cloud number corresponds to one re-determined first sub-area or second sub-area, and for each rotation, a relationship between the plane rectangular coordinate system after the rotation and the current rotation angle (i.e., the second rotation angle in the following step B121) is recorded, where the second rotation angle is an integral multiple of the second predetermined angle.
And step A4, when the redetermined maximum point cloud number meets a first preset condition, determining the position of the plane rectangular coordinate system of the sub-area corresponding to the redetermined maximum point cloud number after rotation as the wall body position.
In this embodiment, when the redetermined maximum point cloud number meets the first predetermined condition, a sub-region corresponding to the maximum point cloud number is determined, and then it is determined according to which rotated rectangular planar coordinate system the sub-region is divided, so that the position of the sub-region in the rotated rectangular planar coordinate system is determined as the position of the wall body.
If the wall position cannot be determined according to the initially established planar rectangular coordinate system, it may be that the sub-regions divided by the planar rectangular coordinate system are not parallel to the wall, or the included angle between the walls is not a right angle. In the embodiment, the planar rectangular coordinate system is rotated for multiple times, so that at least a sub-area divided by the planar rectangular coordinate system after a certain rotation is parallel to the wall, the re-determined maximum point cloud number is bound to be in a certain sub-area divided by the planar rectangular coordinate system after the certain rotation, and the position of the wall can be determined by determining the position of the sub-area in the planar rectangular coordinate system.
Optionally, after the position of the wall is determined, the intelligent robot can be controlled to rotate, so that the advancing direction of the intelligent robot is over against the wall, and the intelligent robot can advance to find the wall. Specifically, fig. 8 is a flowchart of a wall position determining method according to still another embodiment of the present invention, and as shown in fig. 8, the wall position determining method further includes steps B1 to B3, where:
and step B1, determining the initial angle of the intelligent robot relative to the plane rectangular coordinate system.
In this embodiment, the initial angle may be represented by R, and step B1 may include two schemes, the first scheme is that the horizontal axis or the vertical axis of the rectangular plane coordinate system before rotation is parallel to the wall (i.e., step B11), and the second scheme is that the horizontal axis or the vertical axis of the rectangular plane coordinate system before rotation is not parallel to the wall (i.e., step B12). Specifically, step B1 may include step B11 or step B12, wherein:
and step B11, when the maximum point cloud number in the point cloud numbers meets a first preset condition, determining an angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation to obtain an initial angle.
For the first scheme, when the maximum point cloud number in the point cloud numbers meets a first preset condition, the wall body position can be determined, and at the moment, in order to enable the intelligent robot to walk to the wall body position to execute a subsequent task, the advancing direction of the intelligent robot can be controlled to be over against the wall body. However, the current direction of the intelligent robot may be at an angle (e.g., a first rotation angle) with respect to the wall, and therefore the angle needs to be calculated to control the intelligent robot to rotate by the angle so as to face the wall. The embodiment can determine an angle between a horizontal axis or a vertical axis of an initially established rectangular plane coordinate system and the advancing direction of the intelligent robot, and further determine the first rotation angle through the initial angle. For example, the angle between the positive direction of the cross axis of the initially established rectangular plane coordinate system and the advancing direction of the intelligent robot is determined.
According to the embodiment of the disclosure, the transverse axis or the longitudinal axis of the initially established planar rectangular coordinate system is considered to possibly form a certain angle with the advancing direction of the intelligent robot, so that the initial angle is determined before the first rotation angle of the intelligent robot is calculated, the accuracy of calculating the first rotation angle is ensured, the advancing direction of the intelligent robot is accurately controlled to be right opposite to the wall, the intelligent robot can rapidly move to the side of the wall in the shortest distance, and unnecessary curve is avoided.
And step B12, when the maximum point cloud number in the point cloud numbers does not meet a first preset condition, determining an angle between the advancing direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the re-determined maximum point cloud number, and obtaining an initial angle.
For the second scheme, when the maximum point cloud number in the point cloud numbers does not meet the first preset condition, the fact that the position of the wall body needs to be determined through the rotating coordinate system is shown, and after the position of the wall body is determined, in order to enable the intelligent robot to walk to the position of the wall body to execute subsequent tasks, the advancing direction of the intelligent robot can be controlled to be over against the wall body. However, the current direction of the intelligent robot may be at an angle (e.g., a first rotation angle) with respect to the wall, and therefore the angle needs to be calculated to control the intelligent robot to rotate by the angle so as to face the wall. However, since the rectangular plane coordinate system has already been rotated, the initial angle should be an angle between the advancing direction of the intelligent robot and the rectangular plane coordinate system after the rotation corresponding to the maximum number of point clouds newly determined. For example, the angle between the positive direction of the abscissa of the rectangular plane coordinate system after the rotation and the advancing direction of the intelligent robot is determined.
According to the embodiment of the disclosure, the transverse axis or the longitudinal axis of the rotated plane rectangular coordinate system may form a certain angle with the advancing direction of the intelligent robot, so that the initial angle is determined before the first rotation angle of the intelligent robot is calculated, the accuracy of calculating the first rotation angle is ensured, and the advancing direction of the intelligent robot is accurately controlled to be right opposite to the wall, so that the intelligent robot rapidly walks to the side of the wall in the shortest distance, and avoids unnecessary curves.
Optionally, fig. 9 is a flowchart of calculating an initial angle according to an embodiment of the present invention, and as shown in fig. 9, step B12 may include step B121 and step B122, where:
step B121, determining a second rotation angle of the rotated plane rectangular coordinate system corresponding to the re-determined maximum point cloud number, wherein the second rotation angle is an integral multiple of a second preset angle;
and step B122, calculating an initial angle according to the angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation and the second rotation angle.
Specifically, since the planar rectangular coordinate system is rotated each time, the intelligent robot records the corresponding rotation angle, and therefore, it may be determined which rotated planar rectangular coordinate system the re-determined maximum point cloud number corresponds to, and then obtain the second rotation angle corresponding to the rotated planar rectangular coordinate system. Step B122 is further performed.
For example, if the counterclockwise angle between the advance direction of the smart robot and the horizontal and vertical directions of the rectangular planar coordinate system before rotation is 20 degrees, and the second rotation angle is 5 degrees in the counterclockwise direction, the initial angle is 25 degrees.
For another example, if the counterclockwise angle between the forward direction of the intelligent robot and the horizontal and vertical directions of the rectangular plane coordinate system before rotation is 20 degrees, and the second rotation angle is 5 degrees in the clockwise direction, the initial angle is 15 degrees.
And step B2, calculating a first rotation angle according to the initial angle and the position of the sub-region corresponding to the maximum point cloud number in the rectangular plane coordinate system.
If the position of the sub-region corresponding to the maximum point cloud number in the plane rectangular coordinate system is a certain second sub-region in the positive direction of the horizontal axis, the first rotation angle is the initial angle R +0 degrees; if the position of the sub-region corresponding to the maximum point cloud number in the plane rectangular coordinate system is a certain first sub-region in the positive direction of the longitudinal axis, the first rotation angle is an initial angle R +90 degrees; if the position of the sub-region corresponding to the maximum point cloud number in the plane rectangular coordinate system is a certain second sub-region in the positive and negative directions of the transverse axis, the first rotation angle is an initial angle R +180 degrees; if the position of the sub-region corresponding to the maximum point cloud number in the rectangular plane coordinate system is a certain first sub-region in the positive and negative directions of the longitudinal axis, the first rotation angle is an initial angle R +270 degrees.
And step B3, controlling the intelligent robot to rotate by a first rotation angle.
In this embodiment, by controlling the intelligent robot to rotate by the first rotation angle, the advancing direction of the intelligent robot can be opposite to the wall, and the intelligent robot can find the wall by advancing.
Further, in order to deeply understand the technical solution of the present invention, the present invention will now be described in detail by specific examples with reference to fig. 3 and 4.
Specifically, fig. 10 is a flowchart of a wall position determining method according to another embodiment of the present invention, and as shown in fig. 10, the wall position determining method may include steps S201 to S207, where:
step S201, a plane rectangular coordinate system is established.
As shown in fig. 2, the rectangular plane coordinate system uses the current position of the intelligent robot as an origin, and the positive direction of the x-axis is the advancing direction of the sweeper.
And step S202, starting a laser radar of the intelligent robot, and scanning a cleaning area to obtain point cloud data.
The size of the cleaning area is a square area with the origin as the center and the radius of 5m, and the cleaning area is parallel to the plane rectangular coordinate system.
And S203, setting the first overlapping area to be 1cm according to the tolerance of the wall, traversing the point cloud data of the Y axis, and obtaining the first point cloud number Y1, Y2, … …. Yn.
Firstly, traversing point cloud data in the Y-axis direction to obtain point cloud data of a first sub-region Y1 between positive directions [0,5cm) of the Y-axis, converting polar coordinates of the point cloud data into plane rectangular coordinates, and storing a first point cloud number Y1 of the point cloud data of a first sub-region Y1;
acquiring point cloud data of a first sub-region Y2 between positive directions [4cm,9cm) of the Y axis, converting polar coordinates of the point cloud data into plane rectangular coordinates, and storing a first point cloud number Y2 of the point cloud data of a first sub-region Y2;
and sequentially traversing the point cloud data of all the second subregions in the Y-axis direction, and recording the point cloud data of each first subregion in the Y-axis direction and the first point cloud numbers Y3, Y4 and … … Yn.
S204, setting the first overlapping area to be 1cm according to the tolerance of the wall, traversing the point cloud data in the X-axis direction, and obtaining second point cloud numbers X1, X2, … …. Xn;
as shown in fig. 3, firstly, traversing the point cloud data in the X-axis direction to obtain point cloud data of a second sub-region X1 between the positive directions [0,5cm) of the X-axis, converting the polar coordinates of the point cloud data into plane rectangular coordinates, and storing a second point cloud number X1 of the point cloud data of the second sub-region X1;
acquiring point cloud data of a second sub-area X2 between positive directions [4cm,9cm) of the X axis, converting polar coordinates of the point cloud data into plane rectangular coordinates, and storing a second point cloud number X2 of the point cloud data of the second sub-area X2;
and sequentially traversing the point cloud data of all the second subregions in the X-axis direction, and recording the point cloud data of each second subregion in the X-axis direction and the second point cloud numbers X3, X4 and … … Xn.
S205, comparing the number of the first point clouds with the number of the second point clouds, and determining the maximum point cloud number PMax and the corresponding maximum distance LMax.
The maximum point cloud number PMax may belong to the first point cloud number or the second point cloud number.
S206, if the maximum point cloud number PMax meets a first preset condition and the maximum distance LMax meets a second preset condition, the intelligent robot is switched to a wall-following walking mode, and cleaning is carried out along the wall.
Specifically, if the maximum point cloud number PMax meets a first predetermined condition and the maximum distance LMax meets a second predetermined condition, the position corresponding to the sub-region corresponding to the maximum point cloud number PMax is the wall position to be searched by the intelligent robot, and then the intelligent robot switches to a wall-following walking mode to clean along the wall.
If the maximum point cloud number PMax belongs to the first point cloud number, the sub-area corresponding to the maximum point cloud number PMax is the first sub-area; and if the maximum point cloud number PMax belongs to the second point cloud number, the sub-area corresponding to the maximum point cloud number PMax is the second sub-area.
And S207, if the maximum point cloud number PMax does not meet the first preset condition and/or the maximum distance LMax does not meet the second preset condition, rotating the plane rectangular coordinate system of the intelligent robot by 1 degree anticlockwise.
Specifically, if the maximum point cloud number PMax does not satisfy the first predetermined condition and/or the maximum distance LMax does not satisfy the second predetermined condition, it is indicated that the advancing direction of the intelligent robot does not face the wall (that is, the x axis of the planar rectangular coordinate system does not face the wall), or the included angle between two adjacent walls of the area to be cleaned is not 90 degrees, at this time, the planar rectangular coordinate system of the intelligent robot is rotated counterclockwise by 1 degree, and then, according to the repeated steps S201 to S207, until the wall to be searched by the intelligent robot is found, where the maximum rotation angle of the intelligent robot is 90 degrees.
It should be noted that, since the positive direction of the x-axis of the initially established planar rectangular coordinate system in this embodiment is the advancing direction of the intelligent robot, the angle between the advancing direction of the intelligent robot and the planar rectangular coordinate system before rotation is 0 degree, and the initial angle is the counterclockwise rotation angle, i.e., R [0,90 ]. And traversing all sub-areas under the plane rectangular coordinate system which rotates R [0,90 ] anticlockwise, and finding out PMax and an initial angle by the point cloud number of all point cloud data. If the maximum point cloud number is in the positive direction of the x axis, the first rotation angle that the intelligent robot needs to rotate is R +0, if in the positive direction of the y axis, the first rotation angle that the intelligent robot needs to rotate is R +90, if in the negative direction of the x axis, the first rotation angle that the intelligent robot needs to rotate is R +180, and if in the negative direction of the y axis, the first rotation angle that the intelligent robot needs to rotate is R + 270. Through the series of operations, the intelligent robot can be enabled to move forward to be over against the wall, and the wall can be found through direct infrared detection according to the right front of the intelligent robot.
The embodiment of the present invention further provides a wall position determining apparatus, which corresponds to the wall position determining method provided in the above embodiment, and corresponding technical features and technical effects are not described in detail in this embodiment, and reference may be made to the above embodiment for relevant points. Specifically, fig. 11 is a block diagram of a wall position determining apparatus according to an embodiment of the present invention. As shown in fig. 11, the wall position determining apparatus 400 may include a scanning module 401, a first dividing module 402, a statistical module 403, a first determining module 404, and a second determining module 405, wherein:
the scanning module 401 is configured to scan a cleaning area according to a pre-established rectangular plane coordinate system to obtain point cloud data of the cleaning area;
a first dividing module 402, configured to divide the cleaning area into a plurality of sub-areas based on the plane rectangular coordinate system, where an overlapping area exists between any two adjacent sub-areas;
a counting module 403, configured to count the number of point clouds of point cloud data in each of the multiple sub-regions to obtain multiple numbers of the point clouds;
a first determining module 404, configured to determine a maximum number of point clouds from a plurality of the point clouds;
a second determining module 405, configured to determine, when the maximum point cloud number meets a first predetermined condition, a position of the sub-region corresponding to the maximum point cloud number in the rectangular plane coordinate system as a wall position.
Optionally, the size and the position of each overlapping area relative to the range of two adjacent sub-areas corresponding to the overlapping area are the same.
Optionally, the first dividing module is further configured to: dividing the cleaning area into a plurality of first sub-areas by taking a transverse axis of the plane rectangular coordinate system as a reference, wherein a first overlapping area exists between any two adjacent first sub-areas; and dividing the cleaning area into a plurality of second sub-areas by taking the longitudinal axis of the plane rectangular coordinate system as a reference, wherein a second overlapping area exists between any two adjacent second sub-areas.
Optionally, the statistics module is further configured to: counting the number of first point clouds of point cloud data on each first sub-area of the plurality of first sub-areas to obtain the number of the first point clouds; and counting the number of the second point clouds of the point cloud data on each second sub-area in the plurality of second sub-areas to obtain the number of the second point clouds.
Optionally, the first determining module is further configured to: determining the maximum point cloud number from the plurality of first point cloud numbers and the plurality of second point cloud numbers.
Optionally, the second determining module is further configured to: and when the maximum point cloud number meets the first preset condition, determining the position of the first sub-area or the second sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the position of the wall body.
Optionally, the second determining module is further configured to: aiming at the sub-area corresponding to the maximum point cloud number, calculating the distance between any two point cloud data on the sub-area, and recording the maximum distance; and when the maximum point cloud number meets the first preset condition and the maximum distance meets a second preset condition, determining the position of the sub-region in the plane rectangular coordinate system as the position of the wall body.
Optionally, the wall position determining apparatus further includes: the first rotating module is used for sequentially rotating the plane rectangular coordinate system in the same direction by taking a second preset angle as a step length within a first preset angle when the maximum point cloud number in the plurality of point cloud numbers does not meet the first preset condition; a second dividing module for, for each rotation, re-dividing the cleaning area into a plurality of sub-areas; a third determining module, configured to determine the maximum number of point clouds again from all the number of point clouds corresponding to all the sub-regions to be re-divided for all the rotations within the first predetermined angle; and the fourth determining module is used for determining the position of the plane rectangular coordinate system of the sub-area corresponding to the maximum point cloud number after rotation as the position of the wall body when the maximum point cloud number determined again meets the first preset condition.
Optionally, the wall position determining apparatus further includes: the fifth determining module is used for determining the initial angle of the intelligent robot relative to the plane rectangular coordinate system; the calculation module is used for calculating a first rotation angle according to the initial angle and the position of the sub-region corresponding to the maximum point cloud number in the plane rectangular coordinate system; and the second rotating module is used for controlling the intelligent robot to rotate by the first rotating angle.
Optionally, the fifth determining module is further configured to: when the maximum point cloud number in the plurality of point cloud numbers meets the first preset condition, determining an angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation to obtain the initial angle; or when the maximum point cloud number in the plurality of point cloud numbers does not meet the first preset condition, determining an angle between the advancing direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the newly determined maximum point cloud number to obtain the initial angle.
Optionally, when determining an angle between the advancing direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the maximum number of point clouds determined again, the fifth determining module is further configured to: determining a second rotation angle of the rotated rectangular plane coordinate system corresponding to the re-determined maximum point cloud number, wherein the second rotation angle is an integral multiple of the second preset angle; and calculating the initial angle according to the angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation and the second rotation angle.
Fig. 12 is a block diagram of a computer device suitable for implementing the wall location determining method according to an embodiment of the present invention. In this embodiment, the computer device 500 may be a smart phone, a tablet computer, a notebook computer, a desktop computer, a rack-mounted server, a blade server, a tower server, or a rack-mounted server (including an independent server or a server cluster composed of a plurality of servers) for executing programs, and the like. As shown in fig. 12, the computer device 500 of the present embodiment includes at least, but is not limited to: a memory 501, a processor 502, and a network interface 503 communicatively coupled to each other via a system bus. It is noted that FIG. 12 only shows the computer device 500 having the components 501 and 503, but it is understood that not all of the shown components are required to be implemented, and that more or fewer components can be implemented instead.
In this embodiment, the memory 503 includes at least one type of computer-readable storage medium, and the readable storage medium includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, and the like. In some embodiments, the storage 501 may be an internal storage unit of the computer device 500, such as a hard disk or a memory of the computer device 500. In other embodiments, the memory 501 may also be an external storage device of the computer device 500, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), or the like, provided on the computer device 500. Of course, the memory 501 may also include both internal and external memory units of the computer device 500. In the present embodiment, the memory 501 is generally used for storing an operating system installed in the computer device 500 and various types of application software, such as program codes of the wall location determining method. Further, the memory 501 may also be used to temporarily store various types of data that have been output or are to be output.
Processor 502 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor, or other data Processing chip in some embodiments. The processor 502 generally operates to control the overall operation of the computer device 500. Such as program code for executing a wall location determination method related to data interaction or communication with the computer device 500, and the like.
In this embodiment, the method for determining the wall position stored in the memory 501 may be further divided into one or more program modules, and executed by one or more processors (in this embodiment, the processor 502) to complete the present invention.
The network interface 503 may include a wireless network interface or a wired network interface, and the network interface 503 is typically used to establish communication links between the computer device 500 and other computer devices. For example, the network interface 503 is used to connect the computer device 500 to an external terminal via a network, establish a data transmission channel and a communication link between the computer device 500 and the external terminal, and the like. The network may be a wireless or wired network such as an Intranet (Intranet), the Internet (Internet), a Global System of Mobile communication (GSM), Wideband Code Division Multiple Access (WCDMA), 4G network, 5G network, Bluetooth (Bluetooth), Wi-Fi, etc.
The present embodiment also provides a computer-readable storage medium including a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., SD or DX memory, etc.), a Random Access Memory (RAM), a Static Random Access Memory (SRAM), a Read Only Memory (ROM), an Electrically Erasable Programmable Read Only Memory (EEPROM), a Programmable Read Only Memory (PROM), a magnetic memory, a magnetic disk, an optical disk, a server, an App application mall, etc., on which a computer program is stored, which when executed by a processor, implements a wall location determination method.
It will be apparent to those skilled in the art that the modules or steps of the embodiments of the invention described above may be implemented by a general purpose computing device, they may be centralized on a single computing device or distributed across a network of multiple computing devices, and alternatively, they may be implemented by program code executable by a computing device, such that they may be stored in a storage device and executed by a computing device, and in some cases, the steps shown or described may be performed in an order different than that described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple ones of them may be fabricated into a single integrated circuit module. Thus, embodiments of the invention are not limited to any specific combination of hardware and software.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (14)

1. A method for determining a location of a wall, comprising:
scanning a cleaning area according to a pre-established plane rectangular coordinate system to obtain point cloud data of the cleaning area;
dividing the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas;
counting the number of point clouds of point cloud data on each sub-area in the plurality of sub-areas to obtain a plurality of point clouds;
determining the maximum point cloud number from the plurality of point cloud numbers;
and when the maximum point cloud number meets a first preset condition, determining the position of the sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as a wall body position.
2. The method of claim 1, wherein the size and the position of each overlapping area relative to the range of two adjacent sub-areas corresponding to the overlapping area are the same.
3. The method of claim 1 or 2, wherein dividing the swept area into a plurality of sub-areas with reference to the planar rectangular coordinate system comprises:
dividing the cleaning area into a plurality of first sub-areas by taking a transverse axis of the plane rectangular coordinate system as a reference, wherein a first overlapping area exists between any two adjacent first sub-areas;
and dividing the cleaning area into a plurality of second sub-areas by taking the longitudinal axis of the plane rectangular coordinate system as a reference, wherein a second overlapping area exists between any two adjacent second sub-areas.
4. The method of claim 3, wherein counting the number of point clouds of point cloud data in each of the plurality of sub-regions to obtain a plurality of point clouds comprises:
counting the number of first point clouds of point cloud data on each first sub-area of the plurality of first sub-areas to obtain the number of the first point clouds;
and counting the number of the second point clouds of the point cloud data on each second sub-area in the plurality of second sub-areas to obtain the number of the second point clouds.
5. The method of claim 4, wherein determining the maximum number of point clouds from the plurality of point clouds comprises:
determining the maximum point cloud number from the plurality of first point cloud numbers and the plurality of second point cloud numbers.
6. The method of claim 5, wherein determining the position of the sub-region corresponding to the maximum number of point clouds in the rectangular plane coordinate system as the wall position when the maximum number of point clouds satisfies a first predetermined condition comprises:
and when the maximum point cloud number meets the first preset condition, determining the position of the first sub-area or the second sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the position of the wall body.
7. The method of claim 1, wherein determining the position of the sub-region corresponding to the maximum number of point clouds in the rectangular plane coordinate system as a wall position when the maximum number of point clouds satisfies a first predetermined condition, further comprises:
aiming at the sub-area corresponding to the maximum point cloud number, calculating the distance between any two point cloud data on the sub-area, and recording the maximum distance;
and when the maximum point cloud number meets the first preset condition and the maximum distance meets a second preset condition, determining the position of the sub-region in the plane rectangular coordinate system as the position of the wall body.
8. The method of claim 1, further comprising:
when the maximum point cloud number does not meet the first preset condition, sequentially rotating the plane rectangular coordinate system in the same direction by taking a second preset angle as a step length within a first preset angle;
for each rotation, subdividing the cleaning area into a plurality of sub-areas;
for all rotations within the first predetermined angle, re-determining the maximum number of point clouds from all point clouds corresponding to all re-partitioned sub-regions;
and when the redetermined maximum point cloud number meets the first preset condition, determining the position of the plane rectangular coordinate system of the sub-area corresponding to the redetermined maximum point cloud number after rotation as the position of the wall body.
9. The method of claim 8, further comprising:
determining an initial angle of the intelligent robot relative to the plane rectangular coordinate system;
calculating a first rotation angle according to the initial angle and the position of the sub-region corresponding to the maximum point cloud number in the plane rectangular coordinate system;
and controlling the intelligent robot to rotate by the first rotation angle.
10. The method of claim 9, wherein determining an initial angle of the intelligent robot relative to the planar orthogonal coordinate system comprises:
when the maximum point cloud number in the plurality of point cloud numbers meets the first preset condition, determining an angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation to obtain the initial angle; or the like, or, alternatively,
and when the maximum point cloud number in the plurality of point cloud numbers does not meet the first preset condition, determining an angle between the advancing direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the re-determined maximum point cloud number to obtain the initial angle.
11. The method of claim 10, wherein determining an angle between the heading of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the re-determined maximum number of point clouds to obtain the initial angle comprises:
determining a second rotation angle of the rotated rectangular plane coordinate system corresponding to the re-determined maximum point cloud number, wherein the second rotation angle is an integral multiple of the second preset angle;
and calculating the initial angle according to the angle between the advancing direction of the intelligent robot and the plane rectangular coordinate system before rotation and the second rotation angle.
12. A wall position determining apparatus, comprising:
the scanning module is used for scanning a cleaning area according to a pre-established plane rectangular coordinate system to obtain point cloud data of the cleaning area;
the first dividing module is used for dividing the cleaning area into a plurality of sub-areas by taking the plane rectangular coordinate system as a reference, wherein an overlapping area exists between any two adjacent sub-areas;
the counting module is used for counting the point cloud number of the point cloud data on each sub-area in the plurality of sub-areas to obtain a plurality of point cloud numbers;
a first determining module for determining a maximum number of point clouds from a plurality of said point clouds;
and the second determining module is used for determining the position of the sub-area corresponding to the maximum point cloud number in the plane rectangular coordinate system as the wall body position when the maximum point cloud number meets a first preset condition.
13. A computer device, characterized in that the computer device comprises: memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the method of any one of claims 1 to 11 when executing the computer program.
14. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the method of any one of claims 1 to 11.
CN201910889208.6A 2019-09-19 2019-09-19 Wall position determining method and device, computer equipment and storage medium Pending CN110599543A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910889208.6A CN110599543A (en) 2019-09-19 2019-09-19 Wall position determining method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910889208.6A CN110599543A (en) 2019-09-19 2019-09-19 Wall position determining method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN110599543A true CN110599543A (en) 2019-12-20

Family

ID=68861399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910889208.6A Pending CN110599543A (en) 2019-09-19 2019-09-19 Wall position determining method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110599543A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112237400A (en) * 2020-09-04 2021-01-19 安克创新科技股份有限公司 Method for area division, self-moving robot and computer storage medium
CN113253299A (en) * 2021-06-09 2021-08-13 深圳市速腾聚创科技有限公司 Obstacle detection method, obstacle detection device and storage medium
CN113475976A (en) * 2020-03-16 2021-10-08 珠海格力电器股份有限公司 Method and device for determining passable area of robot, storage medium and robot
CN113768419A (en) * 2021-09-17 2021-12-10 安克创新科技股份有限公司 Method and device for determining sweeping direction of sweeper and sweeper
US11624831B2 (en) 2021-06-09 2023-04-11 Suteng Innovation Technology Co., Ltd. Obstacle detection method and apparatus and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108827249A (en) * 2018-06-06 2018-11-16 歌尔股份有限公司 A kind of map constructing method and device
CN108931983A (en) * 2018-09-07 2018-12-04 深圳市银星智能科技股份有限公司 Map constructing method and its robot

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108827249A (en) * 2018-06-06 2018-11-16 歌尔股份有限公司 A kind of map constructing method and device
CN108931983A (en) * 2018-09-07 2018-12-04 深圳市银星智能科技股份有限公司 Map constructing method and its robot

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
BRAND C,ET AL.: "Submap matching for stereo-vision based indoor/outdoor SLAM[C]", 《IEEE/RSJ INTERNATIONAL CONFERENCE ON INTELLIGENT ROBOTS AND SYSTEMS(IROS)》 *
沈小军 等: "复杂地形电力线机载激光雷达点云自动提取方法", 《同济大学学报(自然科学版)》 *
陈昌鸣 等: "基于车载激光雷达的行道树提取研究", 《北京测绘》 *

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113475976A (en) * 2020-03-16 2021-10-08 珠海格力电器股份有限公司 Method and device for determining passable area of robot, storage medium and robot
CN112237400A (en) * 2020-09-04 2021-01-19 安克创新科技股份有限公司 Method for area division, self-moving robot and computer storage medium
CN112237400B (en) * 2020-09-04 2022-07-01 安克创新科技股份有限公司 Method for area division, self-moving robot and computer storage medium
CN113253299A (en) * 2021-06-09 2021-08-13 深圳市速腾聚创科技有限公司 Obstacle detection method, obstacle detection device and storage medium
CN113253299B (en) * 2021-06-09 2022-02-01 深圳市速腾聚创科技有限公司 Obstacle detection method, obstacle detection device and storage medium
US11624831B2 (en) 2021-06-09 2023-04-11 Suteng Innovation Technology Co., Ltd. Obstacle detection method and apparatus and storage medium
US11927672B2 (en) 2021-06-09 2024-03-12 Suteng Innovation Technology Co., Ltd. Obstacle detection method and apparatus and storage medium
CN113768419A (en) * 2021-09-17 2021-12-10 安克创新科技股份有限公司 Method and device for determining sweeping direction of sweeper and sweeper

Similar Documents

Publication Publication Date Title
CN110599543A (en) Wall position determining method and device, computer equipment and storage medium
CN107898393B (en) Block adjusting method and device for cleaning robot and robot
JP6881723B2 (en) Angle correction method for mobile robots in the work area and mobile robots
US20190314991A1 (en) Method for controlling robot movement and robot
CN111728535B (en) Method and device for generating cleaning path, electronic equipment and storage medium
WO2020077850A1 (en) Method and apparatus for dividing and identifying indoor region, and terminal device
CN110648038B (en) Task area allocation method and system for cleaning device and cleaning device
CN109540155A (en) A kind of path planning and navigation method, computer installation and the computer readable storage medium of sweeping robot
CN111209978B (en) Three-dimensional visual repositioning method and device, computing equipment and storage medium
CN112179330A (en) Pose determination method and device of mobile equipment
CN110647148B (en) Wall position determining method and device, computer equipment and storage medium
CN111802978B (en) Cleaning control method, storage medium and sweeping robot
CN109558471B (en) Updating method, device, storage medium and system of grid map
US10037027B2 (en) System and method for determining an energy-efficient path of an autonomous device
CN109254839B (en) Method for determining task trigger time, method and system for constructing task timer
CN112013840B (en) Sweeping robot and map construction method and device thereof
CN111474946A (en) Edge detection method and device and control method and device for robot edge cleaning
CN114431771B (en) Sweeping method of sweeping robot and related device
CN110887490B (en) Key frame selection method, medium, terminal and device for laser positioning navigation
CN113744329A (en) Automatic region division and robot walking control method, system, equipment and medium
CN117387593A (en) Repositioning method, repositioning device, electronic equipment and computer readable storage medium
CN111047642A (en) Correction method, equipment and storage medium of environment map
CN111413969A (en) Reversing control method and device, electronic equipment and storage medium
RU2658092C2 (en) Method and navigation system of the mobile object using three-dimensional sensors
CN113985885B (en) Equipment operation control method, device, computer equipment 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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191220