CN110647148A - 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
CN110647148A
CN110647148A CN201910889209.0A CN201910889209A CN110647148A CN 110647148 A CN110647148 A CN 110647148A CN 201910889209 A CN201910889209 A CN 201910889209A CN 110647148 A CN110647148 A CN 110647148A
Authority
CN
China
Prior art keywords
point cloud
sub
coordinate system
determining
angle
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.)
Granted
Application number
CN201910889209.0A
Other languages
Chinese (zh)
Other versions
CN110647148B (en
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 CN201910889209.0A priority Critical patent/CN110647148B/en
Publication of CN110647148A publication Critical patent/CN110647148A/en
Application granted granted Critical
Publication of CN110647148B publication Critical patent/CN110647148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0238Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using obstacle or wall sensors
    • G05D1/024Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using obstacle or wall sensors in combination with a laser
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0214Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory in accordance with safety or protection criteria, e.g. avoiding hazardous areas
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0231Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means
    • G05D1/0242Control of position or course in two dimensions specially adapted to land vehicles using optical position detecting means using non-visible light signals, e.g. IR or UV signals
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0257Control of position or course in two dimensions specially adapted to land vehicles using a radar
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0259Control of position or course in two dimensions specially adapted to land vehicles using magnetic or electromagnetic means
    • GPHYSICS
    • G05CONTROLLING; REGULATING
    • G05DSYSTEMS FOR CONTROLLING OR REGULATING NON-ELECTRIC VARIABLES
    • G05D1/00Control of position, course, altitude or attitude of land, water, air or space vehicles, e.g. using automatic pilots
    • G05D1/02Control of position or course in two dimensions
    • G05D1/021Control of position or course in two dimensions specially adapted to land vehicles
    • G05D1/0276Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle
    • G05D1/0285Control of position or course in two dimensions specially adapted to land vehicles using signals provided by a source external to the vehicle using signals transmitted via a public communication network, e.g. GSM network

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Electromagnetism (AREA)
  • Optics & Photonics (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Length Measuring Devices With Unspecified Measuring Means (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: establishing a plane rectangular coordinate system; scanning a preset area according to the plane rectangular coordinate system to obtain point cloud data of the preset area; dividing the preset area into a plurality of sub-areas in the rectangular plane coordinate system; determining the point cloud number of the point cloud data on each sub-region to obtain a plurality of point cloud numbers; and when the maximum point cloud number in the point cloud numbers 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: establishing a plane rectangular coordinate system; scanning a preset area according to the plane rectangular coordinate system to obtain point cloud data of the preset area; dividing the predetermined area into a plurality of sub-areas in the rectangular plane coordinate system; determining the point cloud number of the point cloud data on each sub-area to obtain a plurality of point cloud numbers; and when the maximum point cloud number in the point cloud numbers 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.
Optionally, when a maximum point cloud number of a plurality of point cloud numbers satisfies 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, including: 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; and determining the position of the sub-region in the rectangular plane coordinate system as the wall position when the maximum point cloud number meets the first preset condition and the maximum distance meets a second preset condition.
Optionally, in the rectangular plane coordinate system, dividing the predetermined region into a plurality of sub-regions includes: dividing the predetermined area into a plurality of first sub-areas by taking a transverse axis of the plane rectangular coordinate system as a reference; and dividing the preset area into a plurality of second sub-areas by taking the longitudinal axis of the plane rectangular coordinate system as a reference.
Optionally, determining the number of point clouds of point cloud data on each sub-region to obtain a plurality of point clouds, including: determining a first point cloud number of the point cloud data on each first sub-area to obtain a plurality of first point cloud numbers; and determining the number of second point clouds of the point cloud data on each second sub-area to obtain a plurality of second point clouds.
Optionally, when a maximum point cloud number of a plurality of point cloud numbers satisfies 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, including: determining the maximum point cloud number in the first point cloud numbers and the second point cloud numbers; 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 rectangular plane 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 in the point cloud numbers 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 predetermined 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 the number of point clouds corresponding to all the re-divided 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 wall body position.
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: determining an angle between a forward direction of the intelligent robot and the plane rectangular coordinate system before rotation when the maximum point cloud number in the plurality of point cloud numbers meets the first predetermined condition, and obtaining the initial angle; or, when the maximum number of point clouds among the plurality of point clouds does not satisfy the first predetermined condition, determining an angle between the moving direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the newly determined maximum number of point clouds, and obtaining the initial angle.
Optionally, determining an angle between the forward direction of the intelligent robot and the rotated rectangular plane coordinate system corresponding to the newly determined maximum number of point clouds to obtain the initial angle, including: determining a second rotation angle of the rotated rectangular plane coordinate system corresponding to the newly determined maximum point cloud number, wherein the second rotation angle is an integral multiple of the second predetermined 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 establishing module is used for establishing a plane rectangular coordinate system; the scanning module is used for scanning a preset area according to the plane rectangular coordinate system to obtain point cloud data of the preset area; the first dividing module is used for dividing the preset area into a plurality of sub-areas in the plane rectangular coordinate system; the first determining module is used for determining the point cloud number of the point cloud data on each sub-area to obtain a plurality of point cloud numbers; 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 position of the wall body when the maximum point cloud number in the point cloud numbers 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.
The wall body position determining method, the wall body position determining device, the computer equipment and the computer readable storage medium provided by the invention have the advantages that before finding a wall, a plane rectangular coordinate system is established, then a preset area is scanned by taking the plane rectangular coordinate system as a reference to obtain point cloud data of the preset area, then the preset area is divided into a plurality of sub-areas by taking the plane rectangular coordinate system as the reference, 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 number of the point clouds in the point cloud data obtained by scanning the wall body is very large, so that the number of the point clouds falling into the sub-area of the position of the wall body is larger than that of the point clouds corresponding to any other sub-area, and the position of the sub-area corresponding to the maximum number of the point clouds is determined as the position of the wall body only when the maximum number of the point clouds meets a first preset condition, so that the accuracy of determining the position of the wall body is improved.
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 of dividing a predetermined area into a plurality of sub-areas according to an embodiment of the present invention;
fig. 3 is a schematic diagram of dividing a predetermined 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 predetermined 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 determining wall position according to another embodiment of the present invention;
FIG. 8 is a flow chart of a method for determining a wall location according to another embodiment of the present invention;
FIG. 9 is a flow chart of a method for determining wall location according to yet another embodiment of the present invention;
FIG. 10 is a flowchart of calculating an initial angle according to an embodiment of the present invention;
FIG. 11 is a flowchart of a method for determining a wall location according to another embodiment of the present invention;
FIG. 12 is a block diagram of a wall position determining apparatus according to an embodiment of the present invention;
fig. 13 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:
and step S101, establishing a plane rectangular coordinate system.
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.
Step S102, scanning a preset area according to the plane rectangular coordinate system to obtain point cloud data of the preset area.
In this embodiment, the laser radar of the intelligent robot may be started, and the predetermined area is scanned by using the planar rectangular coordinate system as the coordinate reference, so as to obtain point cloud data (also referred to as laser point cloud data) of the predetermined area. The predetermined area may be an area to be cleaned, the range of the predetermined area is included in the scanning range of the laser radar, and the predetermined area is preferably a square area in order to accurately identify the wall position according to the number of the point cloud data. 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 predetermined area can be accurately scanned, and further the point cloud data in the polar coordinate form may be converted into point cloud data in a plane rectangular coordinate form. It should be understood that the point cloud data described in the present invention is point cloud data in the form of a rectangular plane coordinate system.
Step S103, in the rectangular plane coordinate system, a predetermined area is divided into a plurality of sub-areas.
In this embodiment, since the predetermined region is established in the planar rectangular coordinate system, the predetermined region may be divided into a plurality of sub-regions according to the coordinates in the planar rectangular coordinate system. For example, there are a plurality of division lines parallel to each other for dividing the predetermined region into a plurality of sub-regions, each division line being at a predetermined angle to the transverse axis. Optionally, in order to improve the accuracy of the subsequent comparison of the number of point clouds on each sub-region, the embodiment preferably divides the predetermined region into a plurality of equal sub-regions.
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 predetermined region may be divided on the assumption that the horizontal axis or the vertical axis of the currently established rectangular plane coordinate system is parallel to the wall. For example, the predetermined region is divided from two dimensions, that is, the predetermined region is divided into a plurality of first sub-regions from the dimension of the horizontal axis, the predetermined region is divided into a plurality of second sub-regions from the dimension of the vertical axis, and then the maximum point cloud number is determined from the point cloud numbers corresponding to the sub-regions 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 predetermined region into a plurality of sub-regions according to an embodiment of the present invention, and as shown in fig. 2, step S103 may include step S1031 and step S1032, where:
and step S1031, dividing the predetermined area into a plurality of first sub-areas by taking the horizontal axis of the plane rectangular coordinate system as a reference.
Specifically, the predetermined area may be divided into a plurality of equal first sub-areas by taking the horizontal axis as a reference, and each first sub-area is parallel to the horizontal axis or forms a preset angle with the horizontal axis. When the predetermined area is parallel to the rectangular planar 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 planar 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 predetermined area into a plurality of equal first sub-areas. When the predetermined area 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-areas may form a predetermined angle with the horizontal axis, and at this time, it may be assumed by default that the horizontal axis of the currently established planar rectangular coordinate system forms a predetermined angle with the wall.
As shown in fig. 3, assuming that the predetermined region is a square region of 10m × 10m with its center point at the origin, which is parallel to the rectangular plane coordinate system, the predetermined region is divided into n first sub-regions with a step size of 5cm, each of the first sub-regions is parallel to the horizontal axis, for example, the vertical axis of the first sub-region y1 is [0,5cm ], and the horizontal axis is [ -5m,5m ]; the first sub-region y2 has a longitudinal axis in the range of [5cm,10cm ], and a transverse axis in the range of [ -5m,5m ]; the first sub-region y3 has a longitudinal axis in the range of [ -5cm,0cm) and a transverse axis in the range of [ -5m,5m ].
In step S1032, the predetermined region is divided into a plurality of second sub-regions based on the vertical axis of the planar rectangular coordinate system.
In particular, the predetermined area may be divided, with reference to the longitudinal axis, into a number of equal second sub-areas, each of which is parallel to the longitudinal axis or at a predetermined angle to the longitudinal axis. When the predetermined 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 transverse 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 predetermined area into a plurality of equal second sub-areas. When the predetermined area 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-areas may form a predetermined angle with the vertical axis, and at this time, it may be assumed by default that the vertical axis of the currently established planar rectangular coordinate system and the wall form a predetermined angle
As shown in fig. 4, assuming that the predetermined region is a square region of 10m × 10m parallel to the planar rectangular coordinate system with the center point at the origin, the predetermined region is divided into n second sub-regions with 5cm as a step, each of the n second sub-regions being parallel to the vertical axis, the horizontal axis of the second sub-region x1 being [0,5cm ], and the vertical axis being [ -5m,5m ]; the second subregion x2 has a transverse axis in the range of [5cm,10cm) and a longitudinal axis in the range of [ -5m,5m ]; the second sub-region x3 has a horizontal axis in the range of [ -5cm,0cm) and a vertical axis in the range of [ -5m,5m ].
And step S104, determining the point cloud number of the point cloud data on each sub-area 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.
Optionally, since the above embodiment divides the predetermined area by two dimensions, as shown in fig. 5, step S104 may include step S1041 and step S1042, where:
step S1041, determining a first point cloud number of the point cloud data on each first sub-area to obtain a plurality of first point cloud numbers;
step S1042, determining a second point cloud number of the point cloud data on each second sub-region, and obtaining a plurality of second point cloud numbers.
And step S105, when the maximum point cloud number in the point cloud numbers meets a first preset condition, determining the position of the sub-region corresponding to the maximum point cloud number in the plane rectangular coordinate system as a 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.
According to the wall position determining method provided by the invention, before finding a wall, a plane rectangular coordinate system is established, then a predetermined area is scanned by taking the plane rectangular coordinate system as a reference to obtain point cloud data of the predetermined area, then the predetermined area is divided into a plurality of sub-areas by taking the plane rectangular coordinate system as the reference, 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 predetermined condition, the position of the corresponding sub-area is determined as the wall position. According to the method, the number of the point clouds in the point cloud data obtained by scanning the wall body is very large, so that the number of the point clouds falling into the sub-area of the position of the wall body is larger than that of the point clouds corresponding to any other sub-area, and the position of the sub-area corresponding to the maximum number of the point clouds is determined as the position of the wall body only when the maximum number of the point clouds meets a first preset condition, so that the accuracy of determining the position of the wall body is improved.
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 a1 and step a2, where:
step A1, aiming at the sub-region corresponding to the maximum point cloud number, calculating the distance between any two point cloud data on the sub-region, and recording the maximum distance;
and step A2, when the maximum point cloud number meets a 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.
In this embodiment, in addition to considering that the number of point clouds corresponding to the wall is inevitably far greater than that of other obstacles, it is further considered that the length of the wall is inevitably far greater than that of 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 distance satisfies 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.
Alternatively, since the above-described embodiment divides the predetermined region into the first sub-regions and the second sub-regions from two dimensions, respectively, as shown in fig. 7, step S105 may include step B1 and step B2, in which:
step B1, determining the maximum point cloud number in the first point cloud numbers and the second point cloud numbers;
and step B2, 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 wall body position.
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 account, and step B2 may include: aiming at the first sub-area or the second sub-area corresponding to the maximum point cloud number, calculating the distance between any two point cloud data on the first sub-area or the second sub-area, 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 point cloud numbers does not meet a 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, the position of the wall may be determined by rotating the plane rectangular coordinate system for multiple times. Specifically, fig. 8 is a flowchart of a wall position determining method according to another embodiment of the present invention, and as shown in fig. 8, the wall position determining method may further include steps C1 to C4, where:
and step C1, when the maximum point cloud number in the 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.
Step C2, for each rotation, subdividing the predetermined area into a number of sub-areas.
For each rotation, steps S103 to S104 may be performed again, that is, the predetermined area is subdivided, and the number of point clouds corresponding to each sub-area is determined again.
For example, for each rotation, the predetermined 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 foregoing 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 C3, re-determining the maximum number of point clouds from all the number of point clouds corresponding to all the re-partitioned sub-regions for all rotations within the first predetermined angle.
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 D121) is recorded, where the second rotation angle is an integral multiple of the second predetermined angle.
And step C4, 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. 9 is a flowchart of a wall position determining method according to still another embodiment of the present invention, and as shown in fig. 9, the wall position determining method further includes steps D1 to D3, where:
and D1, 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 the step D1 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 D11), 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 D12). Specifically, step D1 may include step D11 or step D12, wherein:
and D11, 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 D12, 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. 10 is a flowchart of calculating an initial angle according to an embodiment of the present invention, and as shown in fig. 10, step D12 may include step D121 and step D122, where:
step D121, 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 D122, 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 D122 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 D2, 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 D3, 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. 11 is a flowchart of a wall position determining method according to another embodiment of the present invention, and as shown in fig. 11, 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. 3, the rectangular plane coordinate system uses the current position of the intelligent robot as the origin, and the positive direction of the x-axis is the advancing direction of the sweeper.
Step S202, starting a laser radar of the intelligent robot, and scanning a preset area to obtain point cloud data.
The size of the preset area is a square area which takes an origin as a center and has a radius of 5m, and the preset area is parallel to the plane rectangular coordinate system.
Step S203, traversing the point cloud data of the Y axis to obtain first point cloud numbers 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 [5cm,10cm) 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, traversing the point cloud data in the X-axis direction to obtain second point cloud numbers X1, X2 and … … Xn;
as shown in fig. 4, 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 [5cm,10cm) 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 and cleans 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 S203-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. 12 is a block diagram of a wall position determining apparatus according to an embodiment of the present invention. As shown in fig. 12, the wall position determining apparatus 400 may include a setup module 401, a scanning module 402, a first division module 403, a first determination module 404, and a second determination module 405, wherein:
the establishing module 401 is configured to establish a rectangular plane coordinate system;
a scanning module 402, configured to scan a predetermined region according to the rectangular plane coordinate system to obtain point cloud data of the predetermined region;
a first dividing module 403, configured to divide the predetermined region into a plurality of sub-regions in the planar rectangular coordinate system;
a first determining module 404, configured to determine the number of point clouds in the point cloud data on each sub-region, so as to obtain a plurality of point clouds;
and a second determining module 405, configured to determine, when a maximum point cloud number of the point cloud numbers 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 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 first dividing module is further configured to: dividing the preset area into a plurality of first sub-areas by taking a transverse axis of the plane rectangular coordinate system as a reference; and dividing the preset area into a plurality of second sub-areas by taking the longitudinal axis of the plane rectangular coordinate system as a reference.
Optionally, the first determining module is further configured to: determining a first point cloud number of point cloud data on each first sub-area to obtain a plurality of first point cloud numbers; and determining the second point cloud number of the point cloud data on each second sub-area to obtain a plurality of second point cloud numbers.
Optionally, the second determining module is further configured to: determining the maximum point cloud number of a plurality of the first point cloud numbers and a plurality of the second point cloud numbers; 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 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 point cloud numbers does not meet the first preset condition; a second dividing module, configured to, for each rotation, re-divide the predetermined region into a plurality of sub-regions; 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 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 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. 13 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. 13, 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. 13 only shows the computer device 500 having components 501 and 503, but it is understood that not all of the shown components are required and that more or fewer components may 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 (12)

1. A method for determining a location of a wall, comprising:
establishing a plane rectangular coordinate system;
scanning a preset area according to the plane rectangular coordinate system to obtain point cloud data of the preset area;
dividing the preset area into a plurality of sub-areas in the rectangular plane coordinate system;
determining the point cloud number of the point cloud data on each sub-region to obtain a plurality of point cloud numbers;
and when the maximum point cloud number in the point cloud numbers 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 when a maximum point cloud number of the point cloud numbers satisfies 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, 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.
3. The method of claim 1, wherein dividing the predetermined area into a plurality of sub-areas in the rectangular plane coordinate system comprises:
dividing the preset area into a plurality of first sub-areas by taking a transverse axis of the plane rectangular coordinate system as a reference;
and dividing the preset area into a plurality of second sub-areas by taking the longitudinal axis of the plane rectangular coordinate system as a reference.
4. The method of claim 3, wherein determining the number of point clouds of the point cloud data for each sub-region to obtain a number of point clouds comprises:
determining a first point cloud number of point cloud data on each first sub-area to obtain a plurality of first point cloud numbers;
and determining the second point cloud number of the point cloud data on each second sub-area to obtain a plurality of second point cloud numbers.
5. The method of claim 4, wherein when a maximum point cloud number of the point cloud numbers satisfies 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, comprises:
determining the maximum point cloud number of a plurality of the first point cloud numbers and a plurality of the second point cloud numbers;
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.
6. The method of claim 1, further comprising:
when the maximum point cloud number in the point cloud numbers does not meet the first preset condition, sequentially rotating the plane rectangular coordinate system to the same direction by taking a second preset angle as a step length within a first preset angle;
for each rotation, subdividing the predetermined area into a number 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.
7. The method of claim 6, 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.
8. The method of claim 7, 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 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 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.
9. The method of claim 8, 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.
10. A wall position determining apparatus, comprising:
the establishing module is used for establishing a plane rectangular coordinate system;
the scanning module is used for scanning a preset area according to the plane rectangular coordinate system to obtain point cloud data of the preset area;
the first dividing module is used for dividing the preset area into a plurality of sub-areas in the plane rectangular coordinate system;
the first determining module is used for determining the point cloud number of the point cloud data on each sub-region to obtain a plurality of point cloud numbers;
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 in the point cloud numbers meets a first preset condition.
11. 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 9 when executing the computer program.
12. 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 9.
CN201910889209.0A 2019-09-19 2019-09-19 Wall position determining method and device, computer equipment and storage medium Active CN110647148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910889209.0A CN110647148B (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
CN201910889209.0A CN110647148B (en) 2019-09-19 2019-09-19 Wall position determining method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110647148A true CN110647148A (en) 2020-01-03
CN110647148B CN110647148B (en) 2022-11-11

Family

ID=69010857

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910889209.0A Active CN110647148B (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) CN110647148B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111474946A (en) * 2020-05-27 2020-07-31 苏州高之仙自动化科技有限公司 Edge detection method and device and control method and device for robot edge cleaning
CN111879250A (en) * 2020-08-04 2020-11-03 小狗电器互联网科技(北京)股份有限公司 Wall surface detection method and device, sweeper and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103148804A (en) * 2013-03-04 2013-06-12 清华大学 Indoor unknown structure identification method based on laser scanning
CN106786938A (en) * 2016-12-30 2017-05-31 亿嘉和科技股份有限公司 A kind of crusing robot localization method and automatic recharging method
US20170235312A1 (en) * 2014-08-27 2017-08-17 Sharp Kabushiki Kaisha Autonomous mobile object and autonomous mobile object system
US20170347979A1 (en) * 2016-06-01 2017-12-07 Siemens Healthcare Gmbh Method and device for motion control of a mobile medical device
CN108827249A (en) * 2018-06-06 2018-11-16 歌尔股份有限公司 A kind of map constructing method and device
CN108919825A (en) * 2018-05-18 2018-11-30 国网山东省电力公司青岛供电公司 The unmanned plane indoor locating system and method for having barrier avoiding function
CN108931983A (en) * 2018-09-07 2018-12-04 深圳市银星智能科技股份有限公司 Map constructing method and its robot
CN109141402A (en) * 2018-09-26 2019-01-04 亿嘉和科技股份有限公司 A kind of localization method and autonomous charging of robots method based on laser raster
CN109540915A (en) * 2018-11-19 2019-03-29 温州大学 A kind of cleaning machine cleaning detection method based on laser ranging

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103148804A (en) * 2013-03-04 2013-06-12 清华大学 Indoor unknown structure identification method based on laser scanning
US20170235312A1 (en) * 2014-08-27 2017-08-17 Sharp Kabushiki Kaisha Autonomous mobile object and autonomous mobile object system
US20170347979A1 (en) * 2016-06-01 2017-12-07 Siemens Healthcare Gmbh Method and device for motion control of a mobile medical device
CN106786938A (en) * 2016-12-30 2017-05-31 亿嘉和科技股份有限公司 A kind of crusing robot localization method and automatic recharging method
CN108919825A (en) * 2018-05-18 2018-11-30 国网山东省电力公司青岛供电公司 The unmanned plane indoor locating system and method for having barrier avoiding function
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
CN109141402A (en) * 2018-09-26 2019-01-04 亿嘉和科技股份有限公司 A kind of localization method and autonomous charging of robots method based on laser raster
CN109540915A (en) * 2018-11-19 2019-03-29 温州大学 A kind of cleaning machine cleaning detection method based on laser ranging

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111474946A (en) * 2020-05-27 2020-07-31 苏州高之仙自动化科技有限公司 Edge detection method and device and control method and device for robot edge cleaning
CN111474946B (en) * 2020-05-27 2021-04-23 苏州高之仙自动化科技有限公司 Edge detection method and device and control method and device for robot edge cleaning
CN111879250A (en) * 2020-08-04 2020-11-03 小狗电器互联网科技(北京)股份有限公司 Wall surface detection method and device, sweeper and storage medium
CN111879250B (en) * 2020-08-04 2021-10-08 小狗电器互联网科技(北京)股份有限公司 Wall surface detection method and device, sweeper and storage medium

Also Published As

Publication number Publication date
CN110647148B (en) 2022-11-11

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
CN108827249B (en) Map construction method and device
CN112171665A (en) Motion control method and device, terminal equipment and storage medium
US10346996B2 (en) Image depth inference from semantic labels
CN110647148B (en) Wall position determining method and device, computer equipment and storage medium
CN111728535B (en) Method and device for generating cleaning path, electronic equipment and storage medium
CN111209978B (en) Three-dimensional visual repositioning method and device, computing equipment and storage medium
JP2019537023A (en) Positioning method and device
US20200125115A1 (en) Methods and systems of distributing task regions for a plurality of cleaning devices
CN109598670B (en) Map information acquisition memory management method, device, storage medium and system
CN110648038B (en) Task area allocation method and system for cleaning device and cleaning device
CN109558471B (en) Updating method, device, storage medium and system of grid map
CN105335309A (en) Data transmission method and computer
JP2022541977A (en) Image labeling method, device, electronic device and storage medium
CN110135278A (en) A kind of obstacle detection method, device and electronic equipment
CN111802978A (en) Cleaning control method, storage medium and sweeping robot
CN113190568A (en) Map updating method, device and related components
CN113671949A (en) Navigation map determination method and device, storage medium and electronic device
CN110887490B (en) Key frame selection method, medium, terminal and device for laser positioning navigation
CN112200860B (en) Object position relation determining method and device, storage medium and electronic device
CN104407848A (en) Data processing method and device
CN113902797A (en) Rigid body construction method, device and equipment based on mark points and storage medium
CN114154208A (en) Method and device for moving primitives across drawings, computer equipment and storage medium
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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 7-605, 6th floor, building 1, yard a, Guanghua Road, Chaoyang District, Beijing 100026

Applicant after: Beijing dog vacuum cleaner Group Co.,Ltd.

Address before: 7-605, 6th floor, building 1, yard a, Guanghua Road, Chaoyang District, Beijing 100026

Applicant before: PUPPY ELECTRONIC APPLIANCES INTERNET TECHNOLOGY (BEIJING) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant