WO2022135372A1 - Map construction method, and robot - Google Patents

Map construction method, and robot Download PDF

Info

Publication number
WO2022135372A1
WO2022135372A1 PCT/CN2021/139951 CN2021139951W WO2022135372A1 WO 2022135372 A1 WO2022135372 A1 WO 2022135372A1 CN 2021139951 W CN2021139951 W CN 2021139951W WO 2022135372 A1 WO2022135372 A1 WO 2022135372A1
Authority
WO
WIPO (PCT)
Prior art keywords
coverage
marker
point
robot
mark point
Prior art date
Application number
PCT/CN2021/139951
Other languages
French (fr)
Chinese (zh)
Inventor
杨勇
吴泽晓
杨敬伟
Original Assignee
深圳市杉川机器人有限公司
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 深圳市杉川机器人有限公司 filed Critical 深圳市杉川机器人有限公司
Publication of WO2022135372A1 publication Critical patent/WO2022135372A1/en

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/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/0212Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory
    • G05D1/0221Control of position or course in two dimensions specially adapted to land vehicles with means for defining a desired trajectory involving a learning process
    • 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

Definitions

  • the present application relates to the field of robotics, and in particular, to a map construction method and a robot.
  • the existing way of building a map is that the robot builds the coverage line map by obtaining the start and end points of the coverage line. However, during the coverage phase, the robot only fills the grid map around a single coverage line. When the robot runs for a period of time and the position deviates, it will cause the final generated map to be uneven or even wrong.
  • the present application proposes a map construction method and a robot to solve the problem that when the robot is building a map, when the robot runs for a period of time and the position deviates, the final generated map will be uneven or even wrong.
  • the present application proposes a map construction method, which is applied to a robot.
  • the method includes: at the beginning of an overlay line, determining an initial overlay marker point according to a first real-time position of the robot, and moving according to a preset The strategy controls the robot to move; at the end of the coverage line, the end coverage marker is recorded according to the second real-time position of the robot, and the first search area is determined according to the end coverage marker; if the first If there is a correction coverage marker point other than the termination coverage marker point in the search area, then correct the position of the termination coverage marker point according to the position of the correction coverage marker point to obtain the corrected termination coverage marker point; The starting coverage marker point and the corrected end coverage marker point are used to construct a coverage line map of the coverage line.
  • the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy;
  • the second real-time location records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then the termination is determined according to the position of the correction coverage marker.
  • the position of the coverage marker is corrected, and the corrected termination coverage marker is obtained; the coverage line map of the coverage line is constructed according to the initial coverage marker and the corrected termination coverage marker.
  • the present application proposes a robot, comprising: a first processing unit, configured to determine a start coverage mark point according to a first real-time position of the robot when the coverage line starts, and control it according to a preset movement strategy the robot moves; the second processing unit is used to record the termination coverage mark point according to the second real-time position of the robot when the coverage line ends, and determine the first search area according to the termination coverage mark point; A third processing unit, configured to correct the position of the termination coverage marker according to the position of the rectified coverage marker if there is a rectified coverage marker other than the termination coverage marker in the first search area , to obtain the corrected termination coverage marker point; the fourth processing unit is configured to construct a coverage line map of the coverage line according to the initial coverage marker point and the corrected termination coverage marker point.
  • the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy;
  • the real-time location records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then the termination coverage marker is determined according to the position of the correction coverage marker.
  • the position of the point is corrected to obtain the corrected termination coverage marker point; according to the initial coverage marker point and the corrected termination coverage marker point, the coverage line map of the coverage line is constructed.
  • the present application proposes another robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned computer program when the processor executes the computer program Methods.
  • the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy;
  • the real-time location records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then the termination coverage marker is determined according to the position of the correction coverage marker.
  • the position of the point is corrected to obtain the corrected termination coverage marker point; according to the initial coverage marker point and the corrected termination coverage marker point, the coverage line map of the coverage line is constructed.
  • the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method is implemented.
  • the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy; when the coverage line ends, according to the The second real-time position of the robot records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then according to the correction coverage marker Correct the position of the termination coverage marker to obtain the corrected termination coverage marker; build the coverage line map of the coverage line according to the initial coverage marker and the corrected termination coverage marker.
  • FIG. 1 is a schematic flowchart of a map construction method provided by the first embodiment of the present application.
  • FIG. 2 is a schematic flowchart of S105 to S107 in a map construction method provided by the first embodiment of the present application;
  • FIG. 3 is a schematic diagram of a robot provided by a second embodiment of the present application.
  • FIG. 4 is a schematic diagram of a robot provided by a third embodiment of the present application.
  • the term “if” may be contextually interpreted as “when” or “once” or “in response to determining” or “in response to detecting “.
  • the phrases “if it is determined” or “if the [described condition or event] is detected” may be interpreted, depending on the context, to mean “once it is determined” or “in response to the determination” or “once the [described condition or event] is detected. ]” or “in response to detection of the [described condition or event]”.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • FIG. 1 is a schematic flowchart of a map construction method provided by the first embodiment of the present application.
  • the execution subject of a map construction method in this embodiment is a robot.
  • the map construction method shown in Figure 1 may include:
  • S101 At the beginning of the coverage line, determine an initial coverage mark point according to the first real-time position of the robot, and control the robot to move according to a preset movement strategy.
  • the robot When the robot is building a map, the robot needs to move according to the preset movement strategy. Generally, when the robot moves, it will adopt the "bow" route. The route the robot travels when it does not move along the edge is the overlay line. When the overlay line ends, The robot can enter the edgewise movement, and after moving along the edge for a certain distance, it enters the next covering line. The robot can construct a coverage line map based on the coverage lines acquired during the movement.
  • the robot obtains the first real-time position of the robot, marks the first real-time position as the initial coverage mark point, and controls the robot to move according to the preset movement strategy.
  • S102 When the coverage line ends, record a termination coverage marker point according to the second real-time position of the robot, and determine a first search area according to the termination coverage marker point.
  • the end condition of the coverage line is set in the robot.
  • the end condition of the coverage line is satisfied, that is, the end of the coverage line
  • the second real-time position of the robot is obtained, and the end coverage mark point is recorded according to the second real-time position of the robot.
  • the robot collides it can be determined that the robot has moved to the boundary, and the coverage line can be terminated. Therefore, if it is detected that the robot collides, the second real-time position of the robot is obtained, and the second real-time position is marked as the termination coverage mark point.
  • the robot determines the end-coverage mark point, and determines the first search area according to the end-coverage mark point.
  • the first search area determination rule can be preset in the robot, and the robot determines the first search area according to the termination coverage mark point and the first search area determination rule.
  • the robot can take the end-coverage mark point as the center and the preset value as the radius to obtain a circular area, and use the circular area as the first search area.
  • the preset value can be set according to the actual situation, for example, the preset value is set to 10cm.
  • the robot After the robot obtains the first search area, the robot obtains the correction coverage mark point in the first search area, and the correction coverage mark point is used to correct the position of the end coverage mark point. Therefore, it can be understood that the correction coverage mark point and the end coverage mark point are Marker points cannot be the same point.
  • the correction cover mark point Since the purpose of correction is to make the edges of the two cover lines flush, the correction cover mark point must be determined according to the previous cover line.
  • the correction coverage mark point may be the end point of the previous coverage line in the first search area, and the correction coverage mark point may also be a new point determined by the robot according to the end point of the previous coverage line. In this way, if the position of the robot deviates or the robot slips when it moves, it can also ensure that the edges of the two covering lines are flush.
  • the robot corrects the position of the end-coverage mark point according to the position of the correction-coverage mark point, and obtains the corrected end-coverage mark point.
  • the robot can align the position of the termination coverage marker with the position of the correction coverage marker to obtain the corrected termination coverage marker; a calculation rule can also be set in the robot, and the robot can correct the coverage marker according to the position and calculation of the coverage marker.
  • the rule calculates the position of the corrected termination coverage marker, which is not limited here.
  • the first target distance may be the Euclidean distance.
  • the robot obtains the first Euclidean distance between each candidate coverage marker and the termination coverage marker, sorts all the first Euclidean distances, and obtains the candidate coverage marker corresponding to the smallest first Euclidean distance.
  • the point is determined as the correction overlay mark point. Then, the robot corrects the position of the end-coverage mark point according to the position of the correction-coverage mark point, and obtains the corrected end-coverage mark point.
  • S104 Construct a coverage line map of the coverage line according to the start coverage marker point and the corrected end coverage marker point.
  • the edge position of the preset body distance from the robot's current position in the robot's motion direction can be obtained. Taking the edge position as the center, the grid map filled with the preset number is black. , which is filled with the wall color.
  • this embodiment can also include S105-S107, as shown in Figure 2, S105-S107 are as follows:
  • S105 When the robot moves along the edge, determine the target edge mark point according to the real-time position of the robot and the edge mark point marking rule, and determine the second search area according to the target edge mark point.
  • the robot detects that it is currently moving along the edge and starts to determine the target edge mark point. Among them, the robot can judge whether the current edge movement is carried out through the sensor.
  • the robot has pre-stored edge marking rules.
  • the robot can determine the current position as the target edge marking point at every preset interval.
  • the robot moves along the edge, and determines the target edge mark point according to the real-time position of the robot and the edge mark point marking rule. Specifically, during the edge-edge process, the robot can obtain the current position every 25cm, and determine the current position as the target edge-edge mark point.
  • the second search area is determined according to the target edge mark point.
  • the target edge mark point For specific details of determining the second search area according to the target edge marker point, please refer to the relevant description of determining the first search area according to the end coverage marker point in S102, which will not be repeated here.
  • S106 If there are corrected edgewise marking points other than the target edgewise marking point in the second search area, correct the position of the target edgewise marking point according to the position of the corrected edgewise marking point to obtain the corrected edgewise marking point.
  • the target marks points along the edge.
  • the robot After the robot obtains the second search area, the robot obtains the correction edge mark point in the second search area, and the correction edge mark point is used to correct the position of the target edge mark point. Therefore, it can be understood that the correction edge mark point and the target edge mark point Marker points cannot be the same point.
  • the corrected edgewise marker point Since the purpose of the correction is to make the edge of the edgewise map flush, the corrected edgewise marker point must be determined according to the last target edgewise marker point.
  • the corrected edgewise marking point may be the last target edgewise marking point, and the corrected edgewise marking point may also be a new point determined by the robot according to the last target edgewise marking point. In this way, the position of the robot deviates or the robot slips when it moves, and it can also ensure that the edges of the map along the edge are flush.
  • the robot corrects the position of the target edge mark point according to the position of the corrected edge mark point, and obtains the corrected target edge mark point.
  • the robot can align the position of the target edge mark point with the position of the corrected edge mark point to obtain the corrected termination coverage mark point;
  • a calculation rule can also be set in the robot, and the robot can correct the cover mark point according to the position and calculation The rule calculates the position of the corrected termination coverage marker, which is not limited here.
  • the robot obtains the second Euclidean distance between each candidate edge marking point and the target edge marking point, sorts all the second Euclidean distances, and obtains the smallest second Euclidean distance
  • the candidate edge marking points corresponding to the distance are determined as the corrected edge marking points. Then, the robot corrects the position of the target edge mark point according to the position of the corrected edge mark point, and obtains the corrected target edge mark point.
  • the robot constructs an edge map based on the corrected target edge markers, and fills the grid map. Specifically, the robot can directly fill the raster map with the position of the corrected target edge marking point as the center 5*5 during the edge-edge process as white, and the left or right 20cm of the position of the corrected target edge-edge marking point is the The raster map with a center fill of 5*5 size is black.
  • an initial global map is constructed according to all the coverage line maps and all edge maps.
  • an optimization strategy can be preset in the robot to optimize the initial global map.
  • the optimization strategy includes one or more of: wall optimization strategy, outer contour optimization strategy, and obstacle optimization strategy kind.
  • the robot optimizes the initial global map according to the optimization strategy to obtain the target global map. For example, the robot can binarize the initial global map and reduce the size of the wall, or shrink the outer contour of the initial global map to make the overall layout more distinct, or expand the convex part of the outer contour. Straighten processing, or you can fill in obstacles in the map, etc.
  • the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy; when the coverage line ends, according to the second real-time position of the robot Record the termination coverage marker point, and determine the first search area according to the termination coverage marker point; if there is a correction coverage marker point other than the termination coverage marker point in the first search area, then according to the position of the correction coverage marker point, the termination coverage marker point is determined. Correct the position to obtain the corrected end coverage marker; build the coverage map of the coverage line according to the initial coverage marker and the corrected end coverage marker.
  • FIG. 3 is a schematic diagram of a robot provided by a second embodiment of the present application.
  • the included units are used to execute the steps in the embodiments corresponding to FIGS. 1 to 2 .
  • the robot 3 includes:
  • a first processing unit 310 configured to determine an initial coverage mark point according to the first real-time position of the robot when the coverage line starts, and control the robot to move according to a preset movement strategy
  • the second processing unit 320 is configured to, when the coverage line ends, record a termination coverage marker point according to the second real-time position of the robot, and determine a first search area according to the termination coverage marker point;
  • the third processing unit 330 is configured to, if there is a correction coverage marker point other than the termination coverage marker point in the first search area, perform a correction on the position of the termination coverage marker point according to the position of the correction coverage marker point Correction, get the corrected termination coverage mark point;
  • the fourth processing unit 340 is configured to construct a coverage line map of the coverage line according to the start coverage marker point and the corrected end coverage marker point.
  • the second processing unit 320 is specifically used for:
  • a second real-time position of the robot is acquired, and the second real-time position is marked as a termination coverage mark point.
  • the third processing unit 330 is specifically used for:
  • the robot 3 also includes:
  • a fifth processing unit configured to determine a target edge mark point according to the real-time position of the robot and the edge mark point marking rule when the robot moves along the edge, and determine a second search area according to the target edge mark point;
  • a sixth processing unit configured to correct the position of the target edgewise marking point according to the position of the corrected edgewise marking point if there is a corrected edgewise marking point other than the target edgewise marking point in the second search area , get the corrected target edge mark points;
  • the seventh processing unit is configured to construct an edge map according to the corrected target edge marking points.
  • the sixth processing unit is specifically used for:
  • the robot 3 also includes:
  • an eighth processing unit configured to construct an initial global map according to all the coverage line maps and all the edgewise maps
  • a ninth processing unit configured to optimize the initial global map according to an optimization strategy to obtain a target global map.
  • the optimization strategy includes: one or more of a wall optimization strategy, an outer contour optimization strategy, and an obstacle optimization strategy.
  • FIG. 4 is a schematic diagram of a robot provided by a third embodiment of the present application.
  • the robot 4 of this embodiment includes a processor 40, a memory 41, and a computer program 42, such as a map construction program, stored in the memory 41 and executable on the processor 40.
  • the processor 40 executes the computer program 42
  • the steps in each of the above-mentioned embodiments of the map construction method are implemented, for example, steps 101 to 104 shown in FIG. 1 .
  • the processor 40 executes the computer program 42
  • the functions of the modules/units in the above-mentioned apparatus embodiments for example, the functions of the modules 310 to 340 shown in FIG. 3 are implemented.
  • the computer program 42 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 41 and executed by the processor 40 to complete the this application.
  • the one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the robot 4 .
  • the computer program 42 can be divided into a first processing unit, a second processing unit, a third processing unit, and a fourth processing unit, and the specific functions of each unit are as follows:
  • a first processing unit configured to determine an initial coverage mark point according to the first real-time position of the robot when the coverage line starts, and control the robot to move according to a preset movement strategy
  • a second processing unit configured to record a termination coverage marker point according to the second real-time position of the robot when the coverage line ends, and determine a first search area according to the termination coverage marker point;
  • a third processing unit configured to correct the position of the termination coverage marker according to the position of the rectified coverage marker if there is a rectified coverage marker other than the termination coverage marker in the first search area , get the corrected termination coverage mark point;
  • the fourth processing unit is configured to construct a coverage line map of the coverage line according to the start coverage marker point and the corrected end coverage marker point.
  • the robot may include, but is not limited to, a processor 40 and a memory 41 .
  • FIG. 4 is only an example of the robot 4, and does not constitute a limitation to the robot 4. It may include more or less components than the one shown in the figure, or combine some components, or different components, such as
  • the robot may also include input and output devices, network access devices, buses, and the like.
  • the so-called processor 40 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 41 may be an internal storage unit of the robot 4 , such as a hard disk or a memory of the robot 4 .
  • the memory 41 can also be an external storage device of the robot 4, such as a plug-in hard disk equipped on the robot 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, Flash card (Flash Card) and so on.
  • the robot 4 may also include both an internal storage unit of the robot 4 and an external storage device.
  • the memory 41 is used to store the computer program and other programs and data required by the robot.
  • the memory 41 can also be used to temporarily store data that has been output or will be output.
  • An embodiment of the present application also provides a network device, the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor executing The computer program implements the steps in any of the foregoing method embodiments.
  • Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
  • the embodiments of the present application provide a computer program product, when the computer program product runs on a mobile terminal, the steps in the foregoing method embodiments can be implemented when the mobile terminal executes the computer program product.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium.
  • the present application realizes all or part of the processes in the methods of the above embodiments, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium.
  • the computer program includes computer program code
  • the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like.
  • the computer-readable medium may include at least: any entity or device capable of carrying the computer program code to the photographing device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signals, telecommunication signals, and software distribution media.
  • ROM read-only memory
  • RAM random access memory
  • electrical carrier signals telecommunication signals
  • software distribution media For example, U disk, mobile hard disk, disk or CD, etc.
  • computer readable media may not be electrical carrier signals and telecommunications signals.
  • the disclosed apparatus/network device and method may be implemented in other manners.
  • the apparatus/network device embodiments described above are only illustrative.
  • the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented.
  • the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

Landscapes

  • Engineering & Computer Science (AREA)
  • Aviation & Aerospace Engineering (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Automation & Control Theory (AREA)
  • Control Of Position, Course, Altitude, Or Attitude Of Moving Bodies (AREA)

Abstract

A map construction method, and a robot. The map construction method comprises: at the beginning of a coverage line, determining a coverage beginning mark point according to a first real-time position of a robot, and controlling the movement of the robot according to a preset movement policy (S101); at the end of the coverage line, recording a coverage termination mark point according to a second real-time position of the robot, and determining a first search area according to the coverage termination mark point (S102); if there is a coverage correction mark point, in addition to the coverage termination mark point, in the first search area, correcting the position of the coverage termination mark point according to the position of the coverage correction mark point, so as to obtain a corrected coverage termination mark point (S103); and constructing a coverage line map of the coverage line according to the coverage beginning mark point and the corrected coverage termination mark point (S104).

Description

一种地图构建方法及机器人A map construction method and robot
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2020年12月23日提交的申请号为202011547372.8,名称为“一种地图构建方法及机器人”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese patent application with the application number 202011547372.8 filed on December 23, 2020 and entitled "A Map Construction Method and Robot", the entire contents of which are incorporated herein by reference.
技术领域technical field
本申请涉及机器人技术领域,特别涉及一种地图构建方法及机器人。The present application relates to the field of robotics, and in particular, to a map construction method and a robot.
背景技术Background technique
现有构建地图的方式是机器人通过获取覆盖线的起点和终点来构建覆盖线地图。但是,机器人在覆盖阶段,只做单一覆盖线周围邻域占栅格地图的填充。当机器人运行一段时间位置发生偏差之后,会导致最后生成的地图参差不齐,甚至发生错误。The existing way of building a map is that the robot builds the coverage line map by obtaining the start and end points of the coverage line. However, during the coverage phase, the robot only fills the grid map around a single coverage line. When the robot runs for a period of time and the position deviates, it will cause the final generated map to be uneven or even wrong.
公开内容public content
本申请提出了一种地图构建方法及机器人,以解决机器人在构建地图时,当机器人运行一段时间位置发生偏差之后,会导致最后生成的地图参差不齐,甚至发生错误的问题。The present application proposes a map construction method and a robot to solve the problem that when the robot is building a map, when the robot runs for a period of time and the position deviates, the final generated map will be uneven or even wrong.
第一方面,本申请提出了一种地图构建方法,应用于机器人,所述方法包括:在覆盖线开始时,根据所述机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制所述机器人进行移动;在所述覆盖线结束时,根据所述机器人的第二实时位置记录终止覆盖标记点,并根据所述终止覆盖标记点确定第一搜索区域;若所述第一搜索区域内存在所述终止覆盖标记点以外的矫正覆盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;根据所述起始覆盖标记点和所述矫正后的终止覆盖标记点,构建所述覆盖线的覆盖线地图。In a first aspect, the present application proposes a map construction method, which is applied to a robot. The method includes: at the beginning of an overlay line, determining an initial overlay marker point according to a first real-time position of the robot, and moving according to a preset The strategy controls the robot to move; at the end of the coverage line, the end coverage marker is recorded according to the second real-time position of the robot, and the first search area is determined according to the end coverage marker; if the first If there is a correction coverage marker point other than the termination coverage marker point in the search area, then correct the position of the termination coverage marker point according to the position of the correction coverage marker point to obtain the corrected termination coverage marker point; The starting coverage marker point and the corrected end coverage marker point are used to construct a coverage line map of the coverage line.
根据本申请实施例的地图构建方法,在覆盖线开始时,根据机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制机器人进行移动;在覆盖线结束时,根据机器人的第二实时位置记录终止覆盖标记点,并根据终止覆盖标记点确定第一搜索区域;若第一搜索区域内存在终止覆盖标记点以外的矫正覆盖标记点,则根据矫正覆盖标记点的位置对终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;根据起始覆盖标记点和矫正后的终止覆盖标记点,构建覆盖线的覆盖线地图。上述方案,每次获取到终止覆盖标记点后,都要进行矫正,根据矫正后的终止覆盖标记点构建覆盖线地图。这样即使机器人的位置发生偏差或者机器人出现打滑时,构建的覆盖线地图也可以与上一条覆盖线对应 的覆盖线地图保持平齐,避免了最后构建的地图参差不齐的问题,提高了构建地图的准确度。According to the map construction method of the embodiment of the present application, when the coverage line starts, the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy; The second real-time location records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then the termination is determined according to the position of the correction coverage marker. The position of the coverage marker is corrected, and the corrected termination coverage marker is obtained; the coverage line map of the coverage line is constructed according to the initial coverage marker and the corrected termination coverage marker. In the above scheme, every time a termination coverage marker is obtained, correction must be performed, and a coverage line map is constructed according to the corrected termination coverage marker. In this way, even if the position of the robot deviates or the robot slips, the constructed coverage line map can be kept flush with the coverage line map corresponding to the previous coverage line, which avoids the problem of unevenness in the final constructed map and improves the construction of the map. accuracy.
第二方面,本申请提出了一种机器人,包括:第一处理单元,用于在覆盖线开始时,根据所述机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制所述机器人进行移动;第二处理单元,用于在所述覆盖线结束时,根据所述机器人的第二实时位置记录终止覆盖标记点,并根据所述终止覆盖标记点确定第一搜索区域;第三处理单元,用于若所述第一搜索区域内存在所述终止覆盖标记点以外的矫正覆盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;第四处理单元,用于根据所述起始覆盖标记点和所述矫正后的终止覆盖标记点,构建所述覆盖线的覆盖线地图。In a second aspect, the present application proposes a robot, comprising: a first processing unit, configured to determine a start coverage mark point according to a first real-time position of the robot when the coverage line starts, and control it according to a preset movement strategy the robot moves; the second processing unit is used to record the termination coverage mark point according to the second real-time position of the robot when the coverage line ends, and determine the first search area according to the termination coverage mark point; A third processing unit, configured to correct the position of the termination coverage marker according to the position of the rectified coverage marker if there is a rectified coverage marker other than the termination coverage marker in the first search area , to obtain the corrected termination coverage marker point; the fourth processing unit is configured to construct a coverage line map of the coverage line according to the initial coverage marker point and the corrected termination coverage marker point.
根据本申请实施例的机器人,在覆盖线开始时,根据机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制机器人进行移动;在覆盖线结束时,根据机器人的第二实时位置记录终止覆盖标记点,并根据终止覆盖标记点确定第一搜索区域;若第一搜索区域内存在终止覆盖标记点以外的矫正覆盖标记点,则根据矫正覆盖标记点的位置对终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;根据起始覆盖标记点和矫正后的终止覆盖标记点,构建覆盖线的覆盖线地图。上述方案,每次获取到终止覆盖标记点后,都要进行矫正,根据矫正后的终止覆盖标记点构建覆盖线地图。这样即使机器人的位置发生偏差或者机器人出现打滑时,构建的覆盖线地图也可以与上一条覆盖线对应的覆盖线地图保持平齐,避免了最后构建的地图参差不齐的问题,提高了构建地图的准确度。According to the robot of the embodiment of the present application, when the coverage line starts, the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy; The real-time location records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then the termination coverage marker is determined according to the position of the correction coverage marker. The position of the point is corrected to obtain the corrected termination coverage marker point; according to the initial coverage marker point and the corrected termination coverage marker point, the coverage line map of the coverage line is constructed. In the above scheme, every time a termination coverage marker is obtained, correction must be performed, and a coverage line map is constructed according to the corrected termination coverage marker. In this way, even if the position of the robot deviates or the robot slips, the constructed coverage line map can be kept flush with the coverage line map corresponding to the previous coverage line, which avoids the problem of unevenness in the final constructed map and improves the construction of the map. accuracy.
第三方面,本申请提出了另一种机器人,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述的方法。In a third aspect, the present application proposes another robot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the above-mentioned computer program when the processor executes the computer program Methods.
根据本申请实施例的机器人,在覆盖线开始时,根据机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制机器人进行移动;在覆盖线结束时,根据机器人的第二实时位置记录终止覆盖标记点,并根据终止覆盖标记点确定第一搜索区域;若第一搜索区域内存在终止覆盖标记点以外的矫正覆盖标记点,则根据矫正覆盖标记点的位置对终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;根据起始覆盖标记点和矫正后的终止覆盖标记点,构建覆盖线的覆盖线地图。上述方案,每次获取到终止覆盖标记点后,都要进行矫正,根据矫正后的终止覆盖标记点构建覆盖线地图。这样即使机器人的位置发生偏差或者机器人出现打滑时,构建的覆盖线地图也可以与上一条覆盖线对应的覆盖线地图保持平齐,避免了最后构建的地图参差不齐的问题,提高了构建地图的准确度。According to the robot of the embodiment of the present application, when the coverage line starts, the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy; The real-time location records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then the termination coverage marker is determined according to the position of the correction coverage marker. The position of the point is corrected to obtain the corrected termination coverage marker point; according to the initial coverage marker point and the corrected termination coverage marker point, the coverage line map of the coverage line is constructed. In the above scheme, every time a termination coverage marker is obtained, correction must be performed, and a coverage line map is constructed according to the corrected termination coverage marker. In this way, even if the position of the robot deviates or the robot slips, the constructed coverage line map can be kept flush with the coverage line map corresponding to the previous coverage line, which avoids the problem of unevenness in the final constructed map and improves the construction of the map. accuracy.
第四方面,本申请提出了一种计算机可读存储介质,所述计算机可读存储介质存储有计 算机程序,所述计算机程序被处理器执行时实现上述的方法。In a fourth aspect, the present application provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the above-mentioned method is implemented.
根据本申请实施例的计算机可读存储介质,在覆盖线开始时,根据机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制机器人进行移动;在覆盖线结束时,根据机器人的第二实时位置记录终止覆盖标记点,并根据终止覆盖标记点确定第一搜索区域;若第一搜索区域内存在终止覆盖标记点以外的矫正覆盖标记点,则根据矫正覆盖标记点的位置对终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;根据起始覆盖标记点和矫正后的终止覆盖标记点,构建覆盖线的覆盖线地图。上述方案,每次获取到终止覆盖标记点后,都要进行矫正,根据矫正后的终止覆盖标记点构建覆盖线地图。这样即使机器人的位置发生偏差或者机器人出现打滑时,构建的覆盖线地图也可以与上一条覆盖线对应的覆盖线地图保持平齐,避免了最后构建的地图参差不齐的问题,提高了构建地图的准确度。According to the computer-readable storage medium of the embodiment of the present application, when the coverage line starts, the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy; when the coverage line ends, according to the The second real-time position of the robot records the termination coverage marker, and determines the first search area according to the termination coverage marker; if there is a correction coverage marker other than the termination coverage marker in the first search area, then according to the correction coverage marker Correct the position of the termination coverage marker to obtain the corrected termination coverage marker; build the coverage line map of the coverage line according to the initial coverage marker and the corrected termination coverage marker. In the above scheme, every time a termination coverage marker is obtained, correction must be performed, and a coverage line map is constructed according to the corrected termination coverage marker. In this way, even if the position of the robot deviates or the robot slips, the constructed coverage line map can be kept flush with the coverage line map corresponding to the previous coverage line, which avoids the problem of unevenness in the final constructed map and improves the construction of the map. accuracy.
本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be set forth, in part, from the following description, and in part will become apparent from the following description, or may be learned by practice of the present application.
附图说明Description of drawings
本申请的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become apparent and readily understood from the following description of embodiments in conjunction with the accompanying drawings, wherein:
图1是本申请第一实施例提供的一种地图构建方法的示意流程图;1 is a schematic flowchart of a map construction method provided by the first embodiment of the present application;
图2是本申请第一实施例提供的一种地图构建方法中S105~S107的示意流程图;FIG. 2 is a schematic flowchart of S105 to S107 in a map construction method provided by the first embodiment of the present application;
图3是本申请第二实施例提供的机器人的示意图;3 is a schematic diagram of a robot provided by a second embodiment of the present application;
图4是本申请第三实施例提供的机器人的示意图。FIG. 4 is a schematic diagram of a robot provided by a third embodiment of the present application.
具体实施方式Detailed ways
以下描述中,为了说明而不是为了限定,提出了诸如特定系统结构、技术之类的具体细节,以便透彻理解本申请实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本申请。在其它情况中,省略对众所周知的系统、装置、电路以及方法的详细说明,以免不必要的细节妨碍本申请的描述。In the following description, for the purpose of illustration rather than limitation, specific details, such as specific system structures and technologies, are provided for a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be practiced in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
应当理解,当在本申请说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It is to be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described feature, integer, step, operation, element and/or component, but does not exclude one or more other The presence or addition of features, integers, steps, operations, elements, components and/or sets thereof.
还应当理解,在本申请说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It will also be understood that, as used in this specification and the appended claims, the term "and/or" refers to and including any and all possible combinations of one or more of the associated listed items.
如在本申请说明书和所附权利要求书中所使用的那样,术语“如果”可以依据上下文被解释为“当...时”或“一旦”或“响应于确定”或“响应于检测到”。类似地,短语“如果确定”或“如果检测到[所描述条件或事件]”可以依据上下文被解释为意指“一旦确定”或“响应于确定”或“一旦检测到[所描述条件或事件]”或“响应于检测到[所描述条件或事件]”。As used in the specification of this application and the appended claims, the term "if" may be contextually interpreted as "when" or "once" or "in response to determining" or "in response to detecting ". Similarly, the phrases "if it is determined" or "if the [described condition or event] is detected" may be interpreted, depending on the context, to mean "once it is determined" or "in response to the determination" or "once the [described condition or event] is detected. ]" or "in response to detection of the [described condition or event]".
另外,在本申请说明书和所附权利要求书的描述中,术语“第一”、“第二”、“第三”等仅用于区分描述,而不能理解为指示或暗示相对重要性。In addition, in the description of the specification of the present application and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the description, and should not be construed as indicating or implying relative importance.
在本申请说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。References in this specification to "one embodiment" or "some embodiments" and the like mean that a particular feature, structure or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in other embodiments," etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean "one or more but not all embodiments" unless specifically emphasized otherwise. The terms "including", "including", "having" and their variants mean "including but not limited to" unless specifically emphasized otherwise.
请参见图1,图1是本申请第一实施例提供的一种地图构建方法的示意流程图。本实施例中一种地图构建方法的执行主体为机器人。如图1所示的地图构建方法可以包括:Please refer to FIG. 1. FIG. 1 is a schematic flowchart of a map construction method provided by the first embodiment of the present application. The execution subject of a map construction method in this embodiment is a robot. The map construction method shown in Figure 1 may include:
S101:在覆盖线开始时,根据所述机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制所述机器人进行移动。S101: At the beginning of the coverage line, determine an initial coverage mark point according to the first real-time position of the robot, and control the robot to move according to a preset movement strategy.
机器人在进行地图构建时,需要机器人按照预设移动策略进行移动,一般机器人移动时,会采用“弓”字路线,机器人在没有进行沿边运动时走过的路线为覆盖线,当覆盖线结束,机器人可以进入沿边运动,沿边运动一段距离后,进入下一个覆盖线。机器人根据在运动过程中获取的覆盖线可以构建覆盖线地图。When the robot is building a map, the robot needs to move according to the preset movement strategy. Generally, when the robot moves, it will adopt the "bow" route. The route the robot travels when it does not move along the edge is the overlay line. When the overlay line ends, The robot can enter the edgewise movement, and after moving along the edge for a certain distance, it enters the next covering line. The robot can construct a coverage line map based on the coverage lines acquired during the movement.
机器人在覆盖线开始时,获取机器人的第一实时位置,将第一实时位置标记为起始覆盖标记点,并且根据预设移动策略控制机器人进行移动。At the beginning of the coverage line, the robot obtains the first real-time position of the robot, marks the first real-time position as the initial coverage mark point, and controls the robot to move according to the preset movement strategy.
S102:在所述覆盖线结束时,根据所述机器人的第二实时位置记录终止覆盖标记点,并根据所述终止覆盖标记点确定第一搜索区域。S102: When the coverage line ends, record a termination coverage marker point according to the second real-time position of the robot, and determine a first search area according to the termination coverage marker point.
机器人中设置覆盖线结束条件,当满足覆盖线结束条件时,即覆盖线结束,获取机器人的第二实时位置,根据机器人的第二实时位置记录终止覆盖标记点。The end condition of the coverage line is set in the robot. When the end condition of the coverage line is satisfied, that is, the end of the coverage line, the second real-time position of the robot is obtained, and the end coverage mark point is recorded according to the second real-time position of the robot.
当机器人发生碰撞时,可以判定机器人已经运动至边界,覆盖线可以终止。所以,若检测到机器人发生碰撞,则获取机器人的第二实时位置,将第二实时位置标记为终止覆盖标记点。When the robot collides, it can be determined that the robot has moved to the boundary, and the coverage line can be terminated. Therefore, if it is detected that the robot collides, the second real-time position of the robot is obtained, and the second real-time position is marked as the termination coverage mark point.
机器人确定终止覆盖标记点,根据终止覆盖标记点确定第一搜索区域。机器人中可以预设第一搜索区域确定规则,机器人根据终止覆盖标记点和第一搜索区域确定规则确定第一 搜索区域。例如,机器人可以以终止覆盖标记点为圆心,以预设值为半径,得到一个圆形区域,将该圆形区域作为第一搜索区域。其中,预设值可以根据实际情况进行设置,例如将预设值设置为10cm。The robot determines the end-coverage mark point, and determines the first search area according to the end-coverage mark point. The first search area determination rule can be preset in the robot, and the robot determines the first search area according to the termination coverage mark point and the first search area determination rule. For example, the robot can take the end-coverage mark point as the center and the preset value as the radius to obtain a circular area, and use the circular area as the first search area. The preset value can be set according to the actual situation, for example, the preset value is set to 10cm.
S103:若所述第一搜索区域内存在所述终止覆盖标记点以外的矫正覆盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点。S103: If there is a correction coverage mark point other than the termination coverage mark point in the first search area, correct the position of the correction coverage mark point according to the position of the correction coverage mark point, and obtain a corrected Terminate overwriting points.
机器人获取到第一搜索区域后,机器人在第一搜索区域中获取矫正覆盖标记点,矫正覆盖标记点用于矫正终止覆盖标记点的位置,所以,可以理解的是,矫正覆盖标记点和终止覆盖标记点不能为同一个点。After the robot obtains the first search area, the robot obtains the correction coverage mark point in the first search area, and the correction coverage mark point is used to correct the position of the end coverage mark point. Therefore, it can be understood that the correction coverage mark point and the end coverage mark point are Marker points cannot be the same point.
由于矫正的目的是为了使得两条覆盖线的边缘是平齐的,所以,必须根据上一条覆盖线来确定矫正覆盖标记点。其中,矫正覆盖标记点可以为第一搜索区域内的上一条覆盖线的端点,矫正覆盖标记点也可以是机器人根据上一条覆盖线的端点确定的新的点。这样,机器人的位置出现偏差或者机器人运动时出现打滑,也可以保证两条覆盖线的边缘是平齐的。Since the purpose of correction is to make the edges of the two cover lines flush, the correction cover mark point must be determined according to the previous cover line. The correction coverage mark point may be the end point of the previous coverage line in the first search area, and the correction coverage mark point may also be a new point determined by the robot according to the end point of the previous coverage line. In this way, if the position of the robot deviates or the robot slips when it moves, it can also ensure that the edges of the two covering lines are flush.
机器人根据矫正覆盖标记点的位置对终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点。具体矫正时,机器人可以将终止覆盖标记点的位置与矫正覆盖标记点的位置进行对齐,得到矫正后的终止覆盖标记点;机器人中也可以设置计算规则,机器人根据矫正覆盖标记点的位置和计算规则计算得到矫正后的终止覆盖标记点的位置,此处不做限制。The robot corrects the position of the end-coverage mark point according to the position of the correction-coverage mark point, and obtains the corrected end-coverage mark point. During the specific correction, the robot can align the position of the termination coverage marker with the position of the correction coverage marker to obtain the corrected termination coverage marker; a calculation rule can also be set in the robot, and the robot can correct the coverage marker according to the position and calculation of the coverage marker. The rule calculates the position of the corrected termination coverage marker, which is not limited here.
若搜索区域内存在所述终止覆盖标记点以外的候选覆盖标记点,则获取各个候选覆盖标记点与终止覆盖标记点的第一目标距离;将最小的第一目标距离对应的候选覆盖标记点确定为矫正覆盖标记点。其中,第一目标距离可以为欧式距离,机器人获取各个候选覆盖标记点与终止覆盖标记点的第一欧式距离,将所有第一欧式距离进行排序,获取最小的第一欧式距离对应的候选覆盖标记点确定为矫正覆盖标记点。然后,机器人再根据矫正覆盖标记点的位置对终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点。If there are candidate coverage markers other than the termination coverage marker in the search area, obtain the first target distance between each candidate coverage marker and the termination coverage marker; determine the candidate coverage marker corresponding to the smallest first target distance Overlay marker points for correction. The first target distance may be the Euclidean distance. The robot obtains the first Euclidean distance between each candidate coverage marker and the termination coverage marker, sorts all the first Euclidean distances, and obtains the candidate coverage marker corresponding to the smallest first Euclidean distance. The point is determined as the correction overlay mark point. Then, the robot corrects the position of the end-coverage mark point according to the position of the correction-coverage mark point, and obtains the corrected end-coverage mark point.
S104:根据所述起始覆盖标记点和所述矫正后的终止覆盖标记点,构建所述覆盖线的覆盖线地图。S104: Construct a coverage line map of the coverage line according to the start coverage marker point and the corrected end coverage marker point.
根据起始覆盖标记点和矫正后的终止覆盖标记点构建覆盖线,将覆盖线上所有的占栅格地图填充为白色,即填充为覆盖色,构建覆盖线的覆盖线地图。Build coverage lines based on the start coverage markers and the corrected end coverage markers, fill all the raster maps on the coverage lines with white, that is, fill them with coverage colors, and build a coverage line map of the coverage lines.
当机器人发生碰撞时,标记终止覆盖标记点时,可以获取在机器人运动方向上距离机器人当前位置预设机体距离的边缘位置,以该边缘位置为中心,填充预设数量的占栅格地图为黑色,即填充为墙体色。When the robot collides and the marker stops covering the marker point, the edge position of the preset body distance from the robot's current position in the robot's motion direction can be obtained. Taking the edge position as the center, the grid map filled with the preset number is black. , which is filled with the wall color.
在机器人进行沿边移动时,可以构建沿边地图,为了避免最后生成的地图中沿边地图出 现参差不齐的情况,本实施例还可以包括S105~S107,如图2所示,S105~S107具体如下:When the robot moves along the edge, an edge map can be constructed. In order to avoid the unevenness of the edge map in the final generated map, this embodiment can also include S105-S107, as shown in Figure 2, S105-S107 are as follows:
S105:当所述机器人进行沿边移动,根据所述机器人实时位置和沿边标记点标记规则确定目标沿边标记点,并根据所述目标沿边标记点确定第二搜索区域。S105: When the robot moves along the edge, determine the target edge mark point according to the real-time position of the robot and the edge mark point marking rule, and determine the second search area according to the target edge mark point.
机器人检测到当前进行沿边移动,开始确定目标沿边标记点。其中,机器人可以通过传感器来判断当前是否进行沿边运动。The robot detects that it is currently moving along the edge and starts to determine the target edge mark point. Among them, the robot can judge whether the current edge movement is carried out through the sensor.
机器人中预先存储沿边标记点标记规则,当机器人进行沿边移动,机器人可以每间隔预设间隔值,将当前位置确定为目标沿边标记点。机器人进行沿边移动,根据机器人实时位置和沿边标记点标记规则确定目标沿边标记点。具体来说,机器人在沿边过程中,可以每间隔25cm就获取当前位置,将当前位置确定为目标沿边标记点。The robot has pre-stored edge marking rules. When the robot moves along the edge, the robot can determine the current position as the target edge marking point at every preset interval. The robot moves along the edge, and determines the target edge mark point according to the real-time position of the robot and the edge mark point marking rule. Specifically, during the edge-edge process, the robot can obtain the current position every 25cm, and determine the current position as the target edge-edge mark point.
机器人获取到目标沿边点之后,根据目标沿边标记点确定第二搜索区域。具体根据目标沿边标记点确定第二搜索区域的细节可以参阅S102中根据终止覆盖标记点确定第一搜索区域的相关描述,此处不再赘述。After the robot obtains the target edge point, the second search area is determined according to the target edge mark point. For specific details of determining the second search area according to the target edge marker point, please refer to the relevant description of determining the first search area according to the end coverage marker point in S102, which will not be repeated here.
S106:若所述第二搜索区域内存在所述目标沿边标记点以外的矫正沿边标记点,则根据所述矫正沿边标记点的位置对所述目标沿边标记点的位置进行矫正,得到矫正后的目标沿边标记点。S106: If there are corrected edgewise marking points other than the target edgewise marking point in the second search area, correct the position of the target edgewise marking point according to the position of the corrected edgewise marking point to obtain the corrected edgewise marking point. The target marks points along the edge.
机器人获取到第二搜索区域后,机器人在第二搜索区域中获取矫正沿边标记点,矫正沿边标记点用于矫正目标沿边标记点的位置,所以,可以理解的是,矫正沿边标记点和目标沿边标记点不能为同一个点。After the robot obtains the second search area, the robot obtains the correction edge mark point in the second search area, and the correction edge mark point is used to correct the position of the target edge mark point. Therefore, it can be understood that the correction edge mark point and the target edge mark point Marker points cannot be the same point.
由于矫正的目的是为了使得沿边地图的边缘是平齐的,所以,必须根据上一个目标沿边标记点来确定矫正沿边标记点。其中,矫正沿边标记点可以为上一目标沿边标记点,矫正沿边标记点也可以是机器人根据上一目标沿边标记点确定的新的点。这样,机器人的位置出现偏差或者机器人运动时出现打滑,也可以保证沿边地图的边缘是平齐的。Since the purpose of the correction is to make the edge of the edgewise map flush, the corrected edgewise marker point must be determined according to the last target edgewise marker point. The corrected edgewise marking point may be the last target edgewise marking point, and the corrected edgewise marking point may also be a new point determined by the robot according to the last target edgewise marking point. In this way, the position of the robot deviates or the robot slips when it moves, and it can also ensure that the edges of the map along the edge are flush.
机器人根据矫正沿边标记点的位置对目标沿边标记点的位置进行矫正,得到矫正后的目标沿边标记点。具体矫正时,机器人可以将目标沿边标记点的位置与矫正沿边标记点的位置进行对齐,得到矫正后的终止覆盖标记点;机器人中也可以设置计算规则,机器人根据矫正覆盖标记点的位置和计算规则计算得到矫正后的终止覆盖标记点的位置,此处不做限制。The robot corrects the position of the target edge mark point according to the position of the corrected edge mark point, and obtains the corrected target edge mark point. During the specific correction, the robot can align the position of the target edge mark point with the position of the corrected edge mark point to obtain the corrected termination coverage mark point; a calculation rule can also be set in the robot, and the robot can correct the cover mark point according to the position and calculation The rule calculates the position of the corrected termination coverage marker, which is not limited here.
若第二搜索区域内存在目标沿边标记点以外的候选沿边标记点,则获取各个候选沿边标记点与目标沿边标记点的第二目标距离;将最小的第二目标距离对应的候选沿边标记点确定为矫正沿边标记点;其中,第二目标距离可以为欧式距离,机器人获取各个候选沿边标记点与目标沿边标记点的第二欧式距离,将所有第二欧式距离进行排序,获取最小的第二欧式距离对应的候选沿边标记点确定为矫正沿边标记点。然后,机器人再根据矫正沿边标 记点的位置对目标沿边标记点的位置进行矫正,得到矫正后的目标沿边标记点。If there are candidate edge marking points other than the target edge marking points in the second search area, obtain the second target distance between each candidate edge marking point and the target edge marking point; determine the candidate edge marking point corresponding to the smallest second target distance In order to correct the edge marking points; wherein, the second target distance can be the Euclidean distance, the robot obtains the second Euclidean distance between each candidate edge marking point and the target edge marking point, sorts all the second Euclidean distances, and obtains the smallest second Euclidean distance The candidate edge marking points corresponding to the distance are determined as the corrected edge marking points. Then, the robot corrects the position of the target edge mark point according to the position of the corrected edge mark point, and obtains the corrected target edge mark point.
S107:根据所述矫正后的目标沿边标记点构建沿边地图。S107: Build an edge map according to the corrected target edge marking points.
机器人根据矫正后的目标沿边标记点构建沿边地图,对占栅格地图进行填充。具体来说,机器人可以在沿边过程中以矫正后的目标沿边标记点的位置为中心5*5直接填充占栅格地图为白色,以矫正后的目标沿边标记点的位置的左或者右20cm为中心填充5*5大小的占栅格地图为黑色。The robot constructs an edge map based on the corrected target edge markers, and fills the grid map. Specifically, the robot can directly fill the raster map with the position of the corrected target edge marking point as the center 5*5 during the edge-edge process as white, and the left or right 20cm of the position of the corrected target edge-edge marking point is the The raster map with a center fill of 5*5 size is black.
在机器人获取到各覆盖线地图和个沿边地图后,根据所有覆盖线地图和所有沿边地图构建初始全局地图。为了提高整体地图的美观度,在机器人中可以预先设置优化策略,用于对初始全局地图进行优化,优化策略包括:墙体优化策略、外轮廓优化策略、障碍物优化策略中的一种或多种。机器人根据优化策略对所述初始全局地图进行优化,得到目标全局地图。例如,机器人可以对初始全局地图进行二值化处理,并且缩小墙体的大小,或者将初始全局地图的外轮廓内缩,使得整体户型更加的鲜明,或者可以对外轮廓的凸起部分进行外扩拉直处理,或者可以进行地图中障碍物的填充等等。After the robot obtains each coverage line map and each edge map, an initial global map is constructed according to all the coverage line maps and all edge maps. In order to improve the aesthetics of the overall map, an optimization strategy can be preset in the robot to optimize the initial global map. The optimization strategy includes one or more of: wall optimization strategy, outer contour optimization strategy, and obstacle optimization strategy kind. The robot optimizes the initial global map according to the optimization strategy to obtain the target global map. For example, the robot can binarize the initial global map and reduce the size of the wall, or shrink the outer contour of the initial global map to make the overall layout more distinct, or expand the convex part of the outer contour. Straighten processing, or you can fill in obstacles in the map, etc.
本申请实施例中,在覆盖线开始时,根据机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制机器人进行移动;在覆盖线结束时,根据机器人的第二实时位置记录终止覆盖标记点,并根据终止覆盖标记点确定第一搜索区域;若第一搜索区域内存在终止覆盖标记点以外的矫正覆盖标记点,则根据矫正覆盖标记点的位置对终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;根据起始覆盖标记点和矫正后的终止覆盖标记点,构建覆盖线的覆盖线地图。上述方案,每次获取到终止覆盖标记点后,都要进行矫正,根据矫正后的终止覆盖标记点构建覆盖线地图。这样即使机器人的位置发生偏差或者机器人出现打滑时,构建的覆盖线地图也可以与上一条覆盖线对应的覆盖线地图保持平齐,避免了最后构建的地图参差不齐的问题,提高了构建地图的准确度。In the embodiment of the present application, at the beginning of the coverage line, the initial coverage mark point is determined according to the first real-time position of the robot, and the robot is controlled to move according to the preset movement strategy; when the coverage line ends, according to the second real-time position of the robot Record the termination coverage marker point, and determine the first search area according to the termination coverage marker point; if there is a correction coverage marker point other than the termination coverage marker point in the first search area, then according to the position of the correction coverage marker point, the termination coverage marker point is determined. Correct the position to obtain the corrected end coverage marker; build the coverage map of the coverage line according to the initial coverage marker and the corrected end coverage marker. In the above scheme, every time a termination coverage marker is obtained, correction must be performed, and a coverage line map is constructed according to the corrected termination coverage marker. In this way, even if the position of the robot deviates or the robot slips, the constructed overlay line map can be kept flush with the overlay line map corresponding to the previous overlay line, which avoids the problem of unevenness in the final constructed map and improves the construction of the map. accuracy.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence numbers of the steps in the above embodiments does not mean the sequence of execution, and the execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
请参见图3,图3是本申请第二实施例提供的机器人的示意图。包括的各单元用于执行图1~2对应的实施例中的各步骤。具体请参阅图1~2对应的实施例中的相关描述。为了便于说明,仅示出了与本实施例相关的部分。参见图3,机器人3包括:Please refer to FIG. 3 , which is a schematic diagram of a robot provided by a second embodiment of the present application. The included units are used to execute the steps in the embodiments corresponding to FIGS. 1 to 2 . For details, please refer to the relevant descriptions in the embodiments corresponding to FIGS. 1 to 2 . For convenience of explanation, only the parts related to this embodiment are shown. Referring to Figure 3, the robot 3 includes:
第一处理单元310,用于在覆盖线开始时,根据所述机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制所述机器人进行移动;a first processing unit 310, configured to determine an initial coverage mark point according to the first real-time position of the robot when the coverage line starts, and control the robot to move according to a preset movement strategy;
第二处理单元320,用于在所述覆盖线结束时,根据所述机器人的第二实时位置记录终止覆盖标记点,并根据所述终止覆盖标记点确定第一搜索区域;The second processing unit 320 is configured to, when the coverage line ends, record a termination coverage marker point according to the second real-time position of the robot, and determine a first search area according to the termination coverage marker point;
第三处理单元330,用于若所述第一搜索区域内存在所述终止覆盖标记点以外的矫正覆 盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;The third processing unit 330 is configured to, if there is a correction coverage marker point other than the termination coverage marker point in the first search area, perform a correction on the position of the termination coverage marker point according to the position of the correction coverage marker point Correction, get the corrected termination coverage mark point;
第四处理单元340,用于根据所述起始覆盖标记点和所述矫正后的终止覆盖标记点,构建所述覆盖线的覆盖线地图。The fourth processing unit 340 is configured to construct a coverage line map of the coverage line according to the start coverage marker point and the corrected end coverage marker point.
所述第二处理单元320,具体用于:The second processing unit 320 is specifically used for:
若检测到发生碰撞,则获取所述机器人的第二实时位置,将所述第二实时位置标记为终止覆盖标记点。If a collision is detected, a second real-time position of the robot is acquired, and the second real-time position is marked as a termination coverage mark point.
所述第三处理单元330,具体用于:The third processing unit 330 is specifically used for:
若所述搜索区域内存在所述终止覆盖标记点以外的候选覆盖标记点,则获取各个所述候选覆盖标记点与所述终止覆盖标记点的第一目标距离;If there are candidate coverage markers other than the termination coverage marker in the search area, acquiring the first target distance between each candidate coverage marker and the termination coverage marker;
将最小的第一目标距离对应的候选覆盖标记点确定为矫正覆盖标记点;Determining the candidate coverage marker corresponding to the minimum first target distance as the correction coverage marker;
根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点。Correct the position of the terminating coverage marker according to the position of the rectifying coverage marker to obtain a corrected terminating coverage marker.
所述机器人3,还包括:The robot 3 also includes:
第五处理单元,用于当所述机器人进行沿边移动,根据所述机器人实时位置和沿边标记点标记规则确定目标沿边标记点,并根据所述目标沿边标记点确定第二搜索区域;a fifth processing unit, configured to determine a target edge mark point according to the real-time position of the robot and the edge mark point marking rule when the robot moves along the edge, and determine a second search area according to the target edge mark point;
第六处理单元,用于若所述第二搜索区域内存在所述目标沿边标记点以外的矫正沿边标记点,则根据所述矫正沿边标记点的位置对所述目标沿边标记点的位置进行矫正,得到矫正后的目标沿边标记点;A sixth processing unit, configured to correct the position of the target edgewise marking point according to the position of the corrected edgewise marking point if there is a corrected edgewise marking point other than the target edgewise marking point in the second search area , get the corrected target edge mark points;
第七处理单元,用于根据所述矫正后的目标沿边标记点构建沿边地图。The seventh processing unit is configured to construct an edge map according to the corrected target edge marking points.
所述第六处理单元,具体用于:The sixth processing unit is specifically used for:
若所述第二搜索区域内存在所述目标沿边标记点以外的候选沿边标记点,则获取各个所述候选沿边标记点与所述目标沿边标记点的第二目标距离;If there are candidate edge marking points other than the target edge marking points in the second search area, acquiring a second target distance between each of the candidate edge marking points and the target edge marking point;
将最小的第二目标距离对应的候选沿边标记点确定为矫正沿边标记点;Determining the candidate edgewise marking point corresponding to the smallest second target distance as the corrected edgewise marking point;
根据所述矫正沿边标记点的位置对所述目标沿边标记点的位置进行矫正,得到矫正后的目标沿边标记点。Correct the position of the target edge mark point according to the position of the corrected edge mark point, so as to obtain the corrected target edge mark point.
所述机器人3,还包括:The robot 3 also includes:
第八处理单元,用于根据所有所述覆盖线地图和所有所述沿边地图构建初始全局地图;an eighth processing unit, configured to construct an initial global map according to all the coverage line maps and all the edgewise maps;
第九处理单元,用于根据优化策略对所述初始全局地图进行优化,得到目标全局地图。A ninth processing unit, configured to optimize the initial global map according to an optimization strategy to obtain a target global map.
所述优化策略包括:墙体优化策略、外轮廓优化策略、障碍物优化策略中的一种或多种。The optimization strategy includes: one or more of a wall optimization strategy, an outer contour optimization strategy, and an obstacle optimization strategy.
图4是本申请第三实施例提供的机器人的示意图。如图4所示,该实施例的机器人4包括:处理器40、存储器41以及存储在所述存储器41中并可在所述处理器40上运行的计算 机程序42,例如地图构建程序。所述处理器40执行所述计算机程序42时实现上述各个地图构建方法实施例中的步骤,例如图1所示的步骤101至104。或者,所述处理器40执行所述计算机程序42时实现上述各装置实施例中各模块/单元的功能,例如图3所示模块310至340的功能。FIG. 4 is a schematic diagram of a robot provided by a third embodiment of the present application. As shown in Fig. 4, the robot 4 of this embodiment includes a processor 40, a memory 41, and a computer program 42, such as a map construction program, stored in the memory 41 and executable on the processor 40. When the processor 40 executes the computer program 42 , the steps in each of the above-mentioned embodiments of the map construction method are implemented, for example, steps 101 to 104 shown in FIG. 1 . Alternatively, when the processor 40 executes the computer program 42, the functions of the modules/units in the above-mentioned apparatus embodiments, for example, the functions of the modules 310 to 340 shown in FIG. 3 are implemented.
示例性的,所述计算机程序42可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器41中,并由所述处理器40执行,以完成本申请。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序42在所述机器人4中的执行过程。例如,所述计算机程序42可以被分割成第一处理单元、第二处理单元、第三处理单元、第四处理单元,各单元具体功能如下:Exemplarily, the computer program 42 may be divided into one or more modules/units, and the one or more modules/units are stored in the memory 41 and executed by the processor 40 to complete the this application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 42 in the robot 4 . For example, the computer program 42 can be divided into a first processing unit, a second processing unit, a third processing unit, and a fourth processing unit, and the specific functions of each unit are as follows:
第一处理单元,用于在覆盖线开始时,根据所述机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制所述机器人进行移动;a first processing unit, configured to determine an initial coverage mark point according to the first real-time position of the robot when the coverage line starts, and control the robot to move according to a preset movement strategy;
第二处理单元,用于在所述覆盖线结束时,根据所述机器人的第二实时位置记录终止覆盖标记点,并根据所述终止覆盖标记点确定第一搜索区域;a second processing unit, configured to record a termination coverage marker point according to the second real-time position of the robot when the coverage line ends, and determine a first search area according to the termination coverage marker point;
第三处理单元,用于若所述第一搜索区域内存在所述终止覆盖标记点以外的矫正覆盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;A third processing unit, configured to correct the position of the termination coverage marker according to the position of the rectified coverage marker if there is a rectified coverage marker other than the termination coverage marker in the first search area , get the corrected termination coverage mark point;
第四处理单元,用于根据所述起始覆盖标记点和所述矫正后的终止覆盖标记点,构建所述覆盖线的覆盖线地图。The fourth processing unit is configured to construct a coverage line map of the coverage line according to the start coverage marker point and the corrected end coverage marker point.
所述机器人可包括,但不仅限于,处理器40、存储器41。本领域技术人员可以理解,图4仅仅是机器人4的示例,并不构成对机器人4的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述机器人还可以包括输入输出设备、网络接入设备、总线等。The robot may include, but is not limited to, a processor 40 and a memory 41 . Those skilled in the art can understand that FIG. 4 is only an example of the robot 4, and does not constitute a limitation to the robot 4. It may include more or less components than the one shown in the figure, or combine some components, or different components, such as The robot may also include input and output devices, network access devices, buses, and the like.
所称处理器40可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field-Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。The so-called processor 40 may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), Off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
所述存储器41可以是所述机器人4的内部存储单元,例如机器人4的硬盘或内存。所述存储器41也可以是所述机器人4的外部存储设备,例如所述机器人4上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。所述机器人4还可以既包括所述机器人4的内部存储单元也包括外部存储设备。 所述存储器41用于存储所述计算机程序以及所述机器人所需的其他程序和数据。所述存储器41还可以用于暂时地存储已经输出或者将要输出的数据。The memory 41 may be an internal storage unit of the robot 4 , such as a hard disk or a memory of the robot 4 . The memory 41 can also be an external storage device of the robot 4, such as a plug-in hard disk equipped on the robot 4, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, Flash card (Flash Card) and so on. The robot 4 may also include both an internal storage unit of the robot 4 and an external storage device. The memory 41 is used to store the computer program and other programs and data required by the robot. The memory 41 can also be used to temporarily store data that has been output or will be output.
需要说明的是,上述装置/单元之间的信息交互、执行过程等内容,由于与本申请方法实施例基于同一构思,其具体功能及带来的技术效果,具体可参见方法实施例部分,此处不再赘述。It should be noted that the information exchange, execution process and other contents between the above-mentioned devices/units are based on the same concept as the method embodiments of the present application. For specific functions and technical effects, please refer to the method embodiments section. It is not repeated here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述系统中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. Module completion, that is, dividing the internal structure of the device into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment may be integrated in one processing unit, or each unit may exist physically alone, or two or more units may be integrated in one unit, and the above-mentioned integrated units may adopt hardware. It can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing from each other, and are not used to limit the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned system, reference may be made to the corresponding processes in the foregoing method embodiments, which will not be repeated here.
本申请实施例还提供了一种网络设备,该网络设备包括:至少一个处理器、存储器以及存储在所述存储器中并可在所述至少一个处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任意各个方法实施例中的步骤。An embodiment of the present application also provides a network device, the network device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, the processor executing The computer program implements the steps in any of the foregoing method embodiments.
本申请实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现可实现上述各个方法实施例中的步骤。Embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the steps in the foregoing method embodiments can be implemented.
本申请实施例提供了一种计算机程序产品,当计算机程序产品在移动终端上运行时,使得移动终端执行时实现可实现上述各个方法实施例中的步骤。The embodiments of the present application provide a computer program product, when the computer program product runs on a mobile terminal, the steps in the foregoing method embodiments can be implemented when the mobile terminal executes the computer program product.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质至少可以包括:能够将计算机程序代码携带到拍照装置/终端设备的任何实体或装置、记录介质、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,RandomAccess Memory)、电载波信号、电信信号以及软件分发介质。例如U盘、移动硬盘、磁碟或者光盘等。在某些司法管辖区,根据立法和专利实践,计算机可读介质不可以是电载波信号和电信信号。The integrated unit, if implemented in the form of a software functional unit and sold or used as an independent product, may be stored in a computer-readable storage medium. Based on this understanding, the present application realizes all or part of the processes in the methods of the above embodiments, which can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a computer-readable storage medium. When executed by a processor, the steps of each of the above method embodiments can be implemented. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file or some intermediate form, and the like. The computer-readable medium may include at least: any entity or device capable of carrying the computer program code to the photographing device/terminal device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), electrical carrier signals, telecommunication signals, and software distribution media. For example, U disk, mobile hard disk, disk or CD, etc. In some jurisdictions, under legislation and patent practice, computer readable media may not be electrical carrier signals and telecommunications signals.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部 分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For the parts that are not described or recorded in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所申请的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in conjunction with the embodiments applied herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Skilled artisans may implement the described functionality using different methods for each particular application, but such implementations should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置/网络设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/网络设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are only illustrative. For example, the division of the modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units. Or components may be combined or may be integrated into another system, or some features may be omitted, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above-mentioned embodiments are only used to illustrate the technical solutions of the present application, but not to limit them; although the present application has been described in detail with reference to the above-mentioned embodiments, those of ordinary skill in the art should understand that: it can still be used for the above-mentioned implementations. The technical solutions described in the examples are modified, or some technical features thereof are equivalently replaced; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions in the embodiments of the application, and should be included in the within the scope of protection of this application.

Claims (10)

  1. 一种地图构建方法,应用于机器人,所述方法包括:A map construction method, applied to a robot, comprising:
    在覆盖线开始时,根据所述机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制所述机器人进行移动;At the beginning of the coverage line, determining the initial coverage mark point according to the first real-time position of the robot, and controlling the robot to move according to a preset movement strategy;
    在所述覆盖线结束时,根据所述机器人的第二实时位置记录终止覆盖标记点,并根据所述终止覆盖标记点确定第一搜索区域;When the coverage line ends, record the termination coverage marker according to the second real-time position of the robot, and determine a first search area according to the termination coverage marker;
    若所述第一搜索区域内存在所述终止覆盖标记点以外的矫正覆盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;If there is a correction coverage mark point other than the end coverage mark point in the first search area, correct the position of the correction coverage mark point according to the position of the correction coverage mark point to obtain the corrected end coverage mark point mark point;
    根据所述起始覆盖标记点和所述矫正后的终止覆盖标记点,构建所述覆盖线的覆盖线地图。A coverage line map of the coverage line is constructed according to the start coverage marker point and the corrected end coverage marker point.
  2. 如权利要求1所述的地图构建方法,其中,所述在所述覆盖线结束时,根据机器人的第二实时位置记录终止覆盖标记点,包括:The map construction method according to claim 1, wherein, when the coverage line ends, terminating the coverage mark point according to the second real-time position record of the robot, comprising:
    若检测到发生碰撞,则获取所述机器人的第二实时位置,将所述第二实时位置标记为终止覆盖标记点。If a collision is detected, a second real-time position of the robot is acquired, and the second real-time position is marked as a termination coverage mark point.
  3. 如权利要求1至2任一项所述的地图构建方法,其中,所述若所述搜索区域内存在所述终止覆盖标记点以外的矫正覆盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点,包括:The map construction method according to any one of claims 1 to 2, wherein, if there is a correction coverage marker point other than the termination coverage marker point in the search area, according to the position of the correction coverage marker point Correct the position of the termination coverage mark point to obtain the corrected termination coverage mark point, including:
    若所述搜索区域内存在所述终止覆盖标记点以外的候选覆盖标记点,则获取各个所述候选覆盖标记点与所述终止覆盖标记点的第一目标距离;If there are candidate coverage markers other than the termination coverage marker in the search area, acquiring the first target distance between each candidate coverage marker and the termination coverage marker;
    将最小的第一目标距离对应的候选覆盖标记点确定为矫正覆盖标记点;Determining the candidate coverage marker corresponding to the minimum first target distance as the correction coverage marker;
    根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点。Correct the position of the terminating coverage marker according to the position of the rectifying coverage marker to obtain a corrected terminating coverage marker.
  4. 如权利要求1至3任一项所述的地图构建方法,其中,所述方法还包括:The map construction method according to any one of claims 1 to 3, wherein the method further comprises:
    当所述机器人进行沿边移动,根据所述机器人实时位置和沿边标记点标记规则确定目标沿边标记点,并根据所述目标沿边标记点确定第二搜索区域;When the robot moves along the edge, determine the target edge mark point according to the real-time position of the robot and the edge mark point marking rule, and determine the second search area according to the target edge mark point;
    若所述第二搜索区域内存在所述目标沿边标记点以外的矫正沿边标记点,则根据所述矫正沿边标记点的位置对所述目标沿边标记点的位置进行矫正,得到矫正后的目标沿边标记点;If there is a corrected edge marker point other than the target edge marker point in the second search area, correct the position of the target edge marker point according to the position of the corrected edge marker point to obtain the corrected edge edge marker mark point;
    根据所述矫正后的目标沿边标记点构建沿边地图。An edge map is constructed according to the corrected target edge marker points.
  5. 如权利要求4所述的地图构建方法,其中,所述若所述第二搜索区域内存在所述目标沿边标记点以外的矫正沿边标记点,则根据所述矫正沿边标记点的位置对所述目标沿边标 记点的位置进行矫正,得到矫正后的目标沿边标记点,包括:The map construction method according to claim 4, wherein, if there is a corrected edge marker point other than the target edge marker point in the second search area, then according to the position of the corrected edge marker point Correct the position of the target edge mark point, and obtain the corrected target edge mark point, including:
    若所述第二搜索区域内存在所述目标沿边标记点以外的候选沿边标记点,则获取各个所述候选沿边标记点与所述目标沿边标记点的第二目标距离;If there are candidate edge marking points other than the target edge marking points in the second search area, acquiring a second target distance between each of the candidate edge marking points and the target edge marking point;
    将最小的第二目标距离对应的候选沿边标记点确定为矫正沿边标记点;Determining the candidate edgewise marking point corresponding to the smallest second target distance as the corrected edgewise marking point;
    根据所述矫正沿边标记点的位置对所述目标沿边标记点的位置进行矫正,得到矫正后的目标沿边标记点。Correct the position of the target edge mark point according to the position of the corrected edge mark point, so as to obtain the corrected target edge mark point.
  6. 如权利要求4至5任一项所述的地图构建方法,其中,在所述根据所述矫正后的目标沿边标记点构建沿边地图之后,还包括:The method for constructing a map according to any one of claims 4 to 5, wherein after constructing an edgewise map according to the corrected target edgewise marking points, the method further comprises:
    根据所有所述覆盖线地图和所有所述沿边地图构建初始全局地图;constructing an initial global map from all of the coverage line maps and all of the edgewise maps;
    根据优化策略对所述初始全局地图进行优化,得到目标全局地图。The initial global map is optimized according to the optimization strategy to obtain the target global map.
  7. 如权利要求6所述的地图构建方法,其中,所述优化策略包括:墙体优化策略、外轮廓优化策略、障碍物优化策略中的一种或多种。The map construction method according to claim 6, wherein the optimization strategy includes one or more of a wall optimization strategy, an outer contour optimization strategy, and an obstacle optimization strategy.
  8. 一种机器人,包括:A robot comprising:
    第一处理单元,用于在覆盖线开始时,根据所述机器人的第一实时位置确定起始覆盖标记点,并根据预设移动策略控制所述机器人进行移动;a first processing unit, configured to determine an initial coverage mark point according to the first real-time position of the robot when the coverage line starts, and control the robot to move according to a preset movement strategy;
    第二处理单元,用于在所述覆盖线结束时,根据所述机器人的第二实时位置记录终止覆盖标记点,并根据所述终止覆盖标记点确定第一搜索区域;a second processing unit, configured to record a termination coverage marker point according to the second real-time position of the robot when the coverage line ends, and determine a first search area according to the termination coverage marker point;
    第三处理单元,用于若所述第一搜索区域内存在所述终止覆盖标记点以外的矫正覆盖标记点,则根据所述矫正覆盖标记点的位置对所述终止覆盖标记点的位置进行矫正,得到矫正后的终止覆盖标记点;a third processing unit, configured to correct the position of the termination coverage marker according to the position of the correction coverage marker if there is a correction coverage marker point other than the termination coverage marker point in the first search area , get the corrected termination coverage mark point;
    第四处理单元,用于根据所述起始覆盖标记点和所述矫正后的终止覆盖标记点,构建所述覆盖线的覆盖线地图。The fourth processing unit is configured to construct a coverage line map of the coverage line according to the start coverage marker point and the corrected end coverage marker point.
  9. 一种机器人,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至7任一项所述的方法。A robot comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the computer program as claimed in any one of claims 1 to 7 when the processor executes the computer program method described.
  10. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至7任一项所述的方法。A computer-readable storage medium storing a computer program, the computer program implementing the method according to any one of claims 1 to 7 when executed by a processor.
PCT/CN2021/139951 2020-12-23 2021-12-21 Map construction method, and robot WO2022135372A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011547372.8A CN112650250A (en) 2020-12-23 2020-12-23 Map construction method and robot
CN202011547372.8 2020-12-23

Publications (1)

Publication Number Publication Date
WO2022135372A1 true WO2022135372A1 (en) 2022-06-30

Family

ID=75359909

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/139951 WO2022135372A1 (en) 2020-12-23 2021-12-21 Map construction method, and robot

Country Status (2)

Country Link
CN (1) CN112650250A (en)
WO (1) WO2022135372A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112650250A (en) * 2020-12-23 2021-04-13 深圳市杉川机器人有限公司 Map construction method and robot

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6195415A (en) * 1984-10-17 1986-05-14 Hitachi Ltd Automatic traveling vehicle
TW201519842A (en) * 2013-11-18 2015-06-01 Weistech Technology Co Ltd Movement device with route correction function and its operation steps
CN105988471A (en) * 2015-02-15 2016-10-05 苏州宝时得电动工具有限公司 Intelligent mowing system of mower and mowing control method
CN108008728A (en) * 2017-12-12 2018-05-08 深圳市银星智能科技股份有限公司 Cleaning robot and shortest path planning method based on cleaning robot
JP2018185659A (en) * 2017-04-26 2018-11-22 シャープ株式会社 Automatic traveling device
CN110362079A (en) * 2019-07-11 2019-10-22 珠海市一微半导体有限公司 The traversal control method and chip and clean robot of robot
CN111185899A (en) * 2018-11-14 2020-05-22 苏州科瓴精密机械科技有限公司 Robot control method and robot system
CN111631639A (en) * 2020-05-26 2020-09-08 珠海市一微半导体有限公司 Map traversal block establishment method and chip of global grid map and mobile robot
CN112650250A (en) * 2020-12-23 2021-04-13 深圳市杉川机器人有限公司 Map construction method and robot

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105509748B (en) * 2015-12-29 2019-03-01 深圳先进技术研究院 The air navigation aid and device of robot
CN105717928B (en) * 2016-04-26 2018-03-30 北京进化者机器人科技有限公司 A kind of robot navigation of view-based access control model moves into one's husband's household upon marriage method
CN107831773A (en) * 2017-11-30 2018-03-23 深圳市沃特沃德股份有限公司 The method and sweeping robot that sweeping robot all standing cleans
CN108469826B (en) * 2018-04-23 2021-06-08 宁波Gqy视讯股份有限公司 Robot-based map generation method and system
CN111179339B (en) * 2019-12-13 2024-03-08 深圳市瑞立视多媒体科技有限公司 Coordinate positioning method, device, equipment and storage medium based on triangulation

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6195415A (en) * 1984-10-17 1986-05-14 Hitachi Ltd Automatic traveling vehicle
TW201519842A (en) * 2013-11-18 2015-06-01 Weistech Technology Co Ltd Movement device with route correction function and its operation steps
CN105988471A (en) * 2015-02-15 2016-10-05 苏州宝时得电动工具有限公司 Intelligent mowing system of mower and mowing control method
JP2018185659A (en) * 2017-04-26 2018-11-22 シャープ株式会社 Automatic traveling device
CN108008728A (en) * 2017-12-12 2018-05-08 深圳市银星智能科技股份有限公司 Cleaning robot and shortest path planning method based on cleaning robot
CN111185899A (en) * 2018-11-14 2020-05-22 苏州科瓴精密机械科技有限公司 Robot control method and robot system
CN110362079A (en) * 2019-07-11 2019-10-22 珠海市一微半导体有限公司 The traversal control method and chip and clean robot of robot
CN111631639A (en) * 2020-05-26 2020-09-08 珠海市一微半导体有限公司 Map traversal block establishment method and chip of global grid map and mobile robot
CN112650250A (en) * 2020-12-23 2021-04-13 深圳市杉川机器人有限公司 Map construction method and robot

Also Published As

Publication number Publication date
CN112650250A (en) 2021-04-13

Similar Documents

Publication Publication Date Title
US11763575B2 (en) Object detection for distorted images
JP6505939B1 (en) Method of identifying charging stand, device, robot, and computer readable storage medium
CN106924961A (en) A kind of intelligent Chinese chess is played chess control method and system
WO2022135372A1 (en) Map construction method, and robot
CN111813101A (en) Robot path planning method and device, terminal equipment and storage medium
WO2020220388A1 (en) Qr code recognition method and apparatus, qr code generation method and apparatus, qr code and trolley
WO2020093566A1 (en) Cerebral hemorrhage image processing method and device, computer device and storage medium
WO2024000616A1 (en) Traveling path boundary determination method and device, vehicle, storage medium, and terminal
WO2022099889A1 (en) Relocation method, robot, and computer-readable storage medium
CN112183476A (en) Obstacle detection method and device, electronic equipment and storage medium
CN110796598A (en) Autonomous mobile robot, map splicing method and device thereof, and readable storage medium
EP3716103A2 (en) Method and apparatus for determining transformation matrix, and non-transitory computer-readable recording medium
CN114394088A (en) Parking tracking track generation method and device, electronic equipment and storage medium
US11034028B2 (en) Pose determining method for mobile robot and apparatus and mobile robot thereof
CN115546313A (en) Vehicle-mounted camera self-calibration method and device, electronic equipment and storage medium
WO2021203868A1 (en) Data processing method and device
CN116360417A (en) Robot path planning method, device and equipment
CN112484729B (en) Navigation map switching method and device, terminal equipment and storage medium
CN111708357B (en) Cleaning end condition identification method and device and sweeping robot
US20240193961A1 (en) Parking space detection method, electronic device and computer-readable storage medium
CN109073387A (en) Method, device, terminal and storage medium for aligning multiple maps
CN116698038A (en) Positioning loss judging method and device of robot and robot
TWI819928B (en) Method for detecting skewing of vehicle and related devices
TWI823721B (en) Method for identifying lane line and related devices
CN113269006B (en) Target tracking method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21909368

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21909368

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 28.11.2023)