Boundary map construction method and related equipment
By mapping the initial boundary map to a second boundary map and generating a target boundary map with the environment image, the problem of low accuracy of the self-mobile device when building the boundary map is solved, and higher boundary map accuracy and precise movement within the work area are achieved. .
Patent Information
- Application Number
- CN202411157976.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-11-29
AI Technical Summary
In the prior art, the accuracy of the self-mobile device is low due to the delay or error of the remote control signal when building the boundary map, and cannot accurately move along the boundary area boundary, resulting in low accuracy of the boundary map.
By obtaining the initial boundary map, mapping it as a second boundary map, and controlling movement from the mobile device along the second boundary, generating a third boundary map based on the environment image, and generating a target boundary map in combination with the initial and third boundary maps to improve the accuracy of the boundary map .
It effectively improves the construction accuracy of the boundary map, avoids the mobile device exceeding the boundary during the operation process, and improves the movement accuracy within the operation area.
Smart Images

Figure CN119048626A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of automatic navigation technology, and in particular to a boundary map construction method and related equipment. Background Art
[0002] With the continuous advancement of science and technology and the rapid development of artificial intelligence, the use of self-moving equipment (for example, mowing robots, cleaning robots, food delivery robots, etc.) to replace manual work can greatly improve work efficiency.
[0003] Before the self-moving device operates in the working area, it is necessary to construct a boundary map of the working area in advance. In the related art, it is usually necessary to manually remotely control the self-moving device to move along the boundary of the working area. During the movement of the self-moving device, the positioning coordinates are generated by the positioning device, and then the boundary map is constructed based on the positioning coordinates. However, due to the delay or error in the transmission of the remote control signal, the self-moving device cannot accurately move along the boundary of the working area, resulting in a low accuracy of the constructed boundary map. Summary of the invention
[0004] In view of this, an embodiment of the present application provides a boundary map construction method and related devices to solve the problem of low accuracy of the constructed boundary map.
[0005] In a first aspect, an embodiment of the present application provides a boundary map construction method, the method comprising: obtaining a first boundary map of an operating area, and scaling the first boundary map to obtain a second boundary map of the operating area, so as to ensure that a second boundary in the second boundary map reaches a preset distance value from a first boundary in the first boundary map; controlling a mobile device to move along the second boundary in the second boundary map, and obtaining an environmental image during the movement; identifying a boundary of the operating area in the environmental image, and generating a third boundary map of the operating area based on the boundary; and generating a target boundary map of the operating area based on the first boundary map and the third boundary map.
[0006] In a possible implementation, the center point coordinates of the first boundary map are obtained, and a preset ratio is determined based on the center point coordinates and the preset distance value; the first coordinates of all boundary position points in the first boundary map are converted into second coordinates based on the preset ratio; and the second boundary map is generated based on the second coordinates of all boundary position points.
[0007] In a possible implementation, determining the preset ratio based on the center point coordinates and the preset distance value includes: calculating the pixel distance between a boundary position point in the first boundary map and the corresponding boundary position point in the second boundary map based on the preset distance value and the actual distance corresponding to the per unit pixel distance in the first boundary map; and determining the preset ratio based on the pixel distance and the center point coordinates.
[0008] In a possible implementation, determining the preset ratio based on the pixel distance and the center point coordinates includes: determining the equation of a straight line on which the boundary position point in the first boundary map, the corresponding boundary position point in the second boundary map, and the center point of the first boundary map are located based on the first coordinates of the boundary position point in the first boundary map and the center point coordinates; determining the preset ratio based on the pixel distance, the straight line equation, and the relationship between the first coordinates of the boundary position point in the first boundary map, the second coordinates of the corresponding boundary position point in the second boundary map, and the preset ratio.
[0009] In a possible implementation, the identifying the boundary of the working area in the environmental image includes: identifying the environmental image by using an edge detection algorithm to obtain the boundary of the working area in the environmental image.
[0010] In one possible implementation, generating a third boundary map of the working area based on the boundary includes: detecting feature points on the boundary in the environmental image through a feature point detection algorithm; converting the pixel coordinates of each feature point into world coordinates, generating a virtual boundary line of the working area based on the world coordinates of all feature points, and generating the third boundary map based on the virtual boundary line.
[0011] In a possible implementation, generating the virtual boundary line of the working area based on the world coordinates of all the feature points includes: connecting or fitting all the feature points based on the world coordinates of all the feature points to generate the virtual boundary line of the working area.
[0012] In a possible implementation, generating a target boundary map of the working area based on the first boundary map and the third boundary map includes: fitting the first boundary map and the third boundary map into a target boundary map of the working area based on the coordinates of all boundary position points in the first boundary map and the coordinates of all feature points in the third boundary map.
[0013] In a second aspect, an embodiment of the present application provides a self-mobile device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned boundary map construction method when executing the computer program.
[0014] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned boundary map construction method is implemented.
[0015] The boundary map construction method and related equipment provided in the embodiment of the present application can map a pre-constructed first boundary map into a second boundary map, control the self-moving device to move based on the second boundary map, construct a third boundary map based on images acquired during the movement, and obtain a target boundary map of the working area based on the first boundary map and the third boundary map, thereby effectively improving the accuracy of the constructed boundary map and preventing the self-moving device from exceeding the boundary of the working area during the operation. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.
[0017] Figure 1 It is a structural schematic diagram of a self-moving device provided in one embodiment of the present application.
[0018] Figure 2 It is a schematic diagram of the structure of an electronic device provided in one embodiment of the present application.
[0019] Figure 3 It is a schematic diagram of the structure of a remote control terminal provided in one embodiment of the present application.
[0020] Figure 4 It is a flowchart of a boundary map construction method provided in one embodiment of the present application.
[0021] Figure 5 It is a schematic diagram of an operation area provided in an embodiment of the present application.
[0022] Figure 6 This is a flowchart of building a boundary map based on first positioning data provided by an embodiment of the present application.
[0023] Figure 7 This is a flowchart of a boundary map construction method provided by another embodiment of the present application.
[0024] Figure 8 It is a schematic diagram of a boundary map provided in an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to make the objectives, technical solutions and advantages of the present application clearer, the present application is described in detail below with reference to the accompanying drawings and specific embodiments.
[0026] It should be noted that in this application, "at least one" means one or more, and "more than one" means two or more than two. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone, where A and B can be singular or plural. The terms "first", "second", "third", "fourth", etc. (if any) in the specification, claims and drawings of this application are used to distinguish similar objects, rather than to describe a specific order or sequence.
[0027] In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. The following embodiments and features in the embodiments may be combined with each other without conflict.
[0028] With the continuous advancement of science and technology and the rapid development of artificial intelligence, the use of self-moving equipment (for example, mowing robots, cleaning robots, food delivery robots, etc.) to replace manual work can greatly improve work efficiency.
[0029] Before the self-moving device operates in the working area, it is necessary to construct a boundary map of the working area in advance. In the related art, it is usually necessary to manually remotely control the self-moving device to move along the boundary of the working area. During the movement of the self-moving device, the positioning coordinates are generated by the positioning device, and then the boundary map is constructed based on the positioning coordinates. However, due to the delay or error in the transmission of the remote control signal, the self-moving device cannot accurately move along the boundary of the working area, resulting in a low accuracy of the constructed boundary map.
[0030] In order to avoid the construction of a boundary map relying on manual remote control to move a mobile device along the boundary of an operating area, which results in low accuracy of the constructed boundary map, an embodiment of the present application provides a boundary map construction method, which maps an initial first boundary map into a second boundary map, controls the movement of the mobile device along the boundary of the second boundary map, generates a third boundary map based on environmental images taken by the mobile device during movement, and then generates a target boundary map based on the first boundary map and the third boundary map, thereby effectively improving the accuracy of the constructed boundary map and effectively avoiding the mobile device from exceeding the boundary of the operating area during operation.
[0031] See also Figure 1 , which is a schematic diagram of the structure of a self-moving device provided in one embodiment of the present application. The self-moving device 1 includes a main body and a memory 11, a processor 12, a power supply 13, a sensor 14, an operating mechanism 15, a communication module 16, a positioning module 17, a driving wheel 18 and a bus 19 arranged on the main body. The processor 12 is coupled to the memory 11, the power supply 13, the sensor 14, the operating mechanism 15, the communication module 16, the positioning module 17, and the driving wheel 18 through the bus 19. The self-moving device 1 is an electronic device with a self-moving function, such as a lawn mowing robot, a cleaning robot, a food delivery robot, etc.
[0032] The memory 11 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 12, and can be used to store executable programs (such as machine instructions) of the operating system or other running programs, and can also be used to store user and application data. The random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0033] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 12. The non-volatile memory may include a disk storage device and a flash memory.
[0034] The memory 11 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 12. The one or more computer programs include multiple instructions, and when the multiple instructions are executed by the processor 103, the boundary map construction method executed on the self-mobile device 1 can be implemented. In other embodiments, the self-mobile device 1 also includes an external memory interface for connecting an external memory to expand the storage capacity of the self-mobile device 1.
[0035] The processor 12 may include one or more processing units, for example, the processor 12 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0036] The processor 12 provides computing and control capabilities. For example, the processor 12 is used to execute a computer program stored in the memory 11 to implement the boundary map construction method of the embodiment of the present application.
[0037] The power source 13 is used to power the self-moving device. In one embodiment of the present application, the power source 13 may include any one or more power supply devices such as a battery, a fuel generator, a solar power generation module, a wind power generation module, etc.
[0038] The sensor 14 is used to obtain information for the mobile device 1, such as obtaining environmental information and movement information of the mobile device 1. In an embodiment of the present application, the sensor 14 may include one or more sensors such as a laser radar, a camera, an infrared sensor, and an encoder.
[0039] The operating mechanism 15 is used to perform corresponding operating tasks, such as mowing, cruising, sweeping, and spraying pesticides. In some embodiments of the present application, the operating mechanism 15 may include a motor, a transmission mechanism, and a cutter disc. In some embodiments of the present application, the motor can drive the cutter disc to rotate through the transmission mechanism to achieve the mowing function. The motor can also control the movement of the blade to adjust the mowing height and mowing area.
[0040] The communication module 16 is used to realize communication between the mobile device and other devices. In one embodiment of the present application, the communication module 16 can exchange data with other devices based on wired communication and / or wireless communication. The above-mentioned wireless communication can include one or more combinations of communication modes such as Bluetooth communication, Wi-Fi communication, Near Field Communication (NFC), LoRa (Long Range Radio, long-range radio), etc.
[0041] The positioning module 17 is used to determine the position of the self-mobile device. In some embodiments of the present application, the positioning module 17 may include one or more positioning modules of the type of global positioning system (GPS), inertial navigation system, real-time kinematic (RTK) carrier phase differential system, etc. The real-time kinematic carrier phase differential system is hereinafter referred to as the RTK positioning module. The RTK positioning module is used to receive satellite signals through an antenna and send differential data in the satellite signals to the communication module in the self-mobile device, so that the communication module in the self-mobile device sends the differential data to the RTK positioning module in the self-mobile device for differential positioning.
[0042] The driving wheel 18 is used to realize the movement of the self-moving device. In some embodiments of the present application, the driving wheel 18 can realize the movement function of the self-moving device according to the control of the processor 12. In some embodiments of the present application, the driving wheel 18 may include a left driving wheel and a right driving wheel.
[0043] The bus 19 is at least used to provide a channel for mutual communication among the memory 11 , the processor 12 , the power supply 13 , the sensor 14 , the operating mechanism 15 , the communication module 16 , the positioning module 17 , and the driving wheel 18 in the mobile device 1 .
[0044] In other embodiments of the present application, the self-moving device 1 may further include an anti-collision part and a steering assembly, etc. The anti-collision part may be used to prevent the driving wheel 18 from colliding with an obstacle in front of the self-moving device. The steering assembly may be used to enable the driving wheel 18 to adjust the driving direction.
[0045] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the self-moving device 1. In other embodiments of the present application, the self-moving device 1 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0046] See also Figure 2, which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 2 may include a memory 21, a processor 22, a communication module 23, an input / output (I / O) interface 24 and a bus 25. The processor 22 is coupled to the memory 21, the communication module 23, and the input / output interface 24 through the bus 25. The electronic device 2 is a control center for multiple self-mobile devices, which can be a personal computer, a server, etc.
[0047] The communication module 23 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as universal serial bus (USB), controller area network bus (CAN, Controller Area Network). The wireless communication module may provide one or more wireless communication solutions such as wireless fidelity (wireless fidelity, Wi-Fi), Bluetooth (Bluetooth, BT), mobile communication network, frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.
[0048] The memory 21 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 22, and can be used to store executable programs (such as machine instructions) of other running programs, and can also be used to store user and application data. The random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0049] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 23. The non-volatile memory may include a disk storage device and a flash memory.
[0050] The memory 21 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 22. The one or more computer programs include multiple instructions, and when the multiple instructions are executed by the processor 22, the boundary map construction method executed on the electronic device 2 can be implemented. In other embodiments, the electronic device 2 also includes an external memory interface for connecting an external memory to expand the storage capacity of the electronic device 2.
[0051] The processor 22 may include one or more processing units, for example, the processor 22 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0052] The processor 22 provides computing and control capabilities. For example, the processor 22 is used to execute a computer program stored in the memory 21 to implement the above-mentioned boundary map construction method.
[0053] The input / output interface 24 is used to provide a channel for user input or output. For example, the input / output interface 24 can be used to connect various input and output devices, such as a mouse, keyboard, touch device, display screen, etc., so that the user can enter information or visualize information.
[0054] The bus 25 is at least used to provide a channel for mutual communication among the communication module 23 , the memory 21 , the processor 22 , and the input / output interface 24 in the electronic device 2 .
[0055] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 2. In other embodiments of the present application, the electronic device 2 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0056] See also Figure 3 , which is a schematic diagram of the structure of a remote control terminal provided in an embodiment of the present application. The remote control terminal 3 may include a memory 31, a processor 32, a communication module 33 and a bus 34. The processor 32 is coupled to the communication module 33 and the memory 31 through the bus 34. The remote control terminal 3 may be a mobile terminal such as a smart phone, a tablet computer, or other devices for remotely controlling a mobile device, such as a remote controller.
[0057] The communication module 33 may include a wired communication module and / or a wireless communication module. The wired communication module may provide one or more wired communication solutions such as universal serial bus (USB), controller area network bus (CAN, Controller Area Network). The wireless communication module may provide one or more wireless communication solutions such as wireless fidelity (wireless fidelity, Wi-Fi), Bluetooth (Bluetooth, BT), mobile communication network, frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR), etc.
[0058] The memory 31 may include one or more random access memories (RAM) and one or more non-volatile memories (NVM). The random access memory can be directly read and written by the processor 32, and can be used to store executable programs (such as machine instructions) of other running programs, and can also be used to store user and application data. The random access memory may include static random-access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), etc.
[0059] The non-volatile memory may also store executable programs and user and application data, etc., and may be loaded into the random access memory in advance for direct reading and writing by the processor 23. The non-volatile memory may include a disk storage device and a flash memory.
[0060] The memory 31 is used to store one or more computer programs. The one or more computer programs are configured to be executed by the processor 32. The one or more computer programs include multiple instructions, and when the multiple instructions are executed by the processor 32, the boundary map construction method executed on the remote control terminal 3 can be implemented. In other embodiments, the remote control terminal 3 also includes an external memory interface for connecting an external memory to expand the storage capacity of the remote control terminal 3.
[0061] The processor 32 may include one or more processing units, for example, the processor 32 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.
[0062] The processor 32 provides computing and control capabilities. For example, the processor 32 is used to execute a computer program stored in the memory 31 to implement the above-mentioned boundary map construction method.
[0063] The bus 34 is at least used to provide a channel for mutual communication among the communication module 33 , the memory 31 , the processor 32 , and the input / output interface 24 in the remote control terminal 3 .
[0064] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the remote control terminal 3. In other embodiments of the present application, the remote control terminal 3 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0065] See also Figure 4 FIG. 1 is a flowchart of a boundary map construction method provided by an embodiment of the present application. The boundary map construction method can be applied to Figure 1 The self-mobile device 1 shown, Figure 2The electronic device 2 shown or Figure 3 The remote control terminal 3 shown. The boundary map construction method includes the following steps:
[0066] S101, in response to a map building instruction, obtaining first positioning data collected by the remote control terminal during movement along a boundary of an operation area.
[0067] See also Figure 5 As shown, it is a schematic diagram of the working area provided by one embodiment of the present application. In one embodiment of the present application, when it is necessary to construct a boundary map of a working area, a map construction instruction is sent from a mobile device or electronic device to a remote control terminal. After the remote control terminal receives the map construction instruction, it turns on the positioning function, such as the GPS (Global Positioning System) function. After the remote control terminal turns on the positioning function, it can be carried by the user and moved along the boundary of the working area. In the process of moving along the boundary of the working area, the remote control terminal collects first positioning data based on a preset frequency, thereby obtaining multiple first positioning data, each of which corresponds to a boundary position point. For example, the preset frequency can be 30Hz, 60Hz, 90Hz or other values. The positioning data can be GPS coordinates, such as longitude and latitude coordinates.
[0068] In another embodiment of the present application, the remote control terminal can send the collected first positioning data to the self-mobile device or electronic device through a wireless communication network. The remote control terminal can send the collected first positioning data to the self-mobile device or electronic device in real time during the movement, or send all collected first positioning data to the self-mobile device or electronic device after completing the movement along the boundary of the working area.
[0069] S102: Calibrate the first positioning data based on the RTK differential signal.
[0070] In one embodiment of the present application, the remote control terminal is connected to the RTK base station in communication, receives the RTK differential signal sent by the RTK base station, and calibrates the first positioning data based on the RTK differential signal. The RTK base station receives the GPS signal, calculates the pseudo-range observation value based on the GPS signal, and obtains the RTK differential signal based on the actual position data and the pseudo-range observation value of the RTK base station. For example, the pseudo-range error is obtained by calculating the distance between the pseudo-range observation value and the actual position data, and the pseudo-range error is encoded to form an RTK differential signal, and then the GPS signal received by the remote control terminal is calibrated by the RTK differential signal to obtain the calibrated first positioning data.
[0071] In one embodiment of the present application, before the remote control terminal moves along the boundary of the working area, when the remote control terminal and the self-moving device are in the same position, for example, the remote control terminal can be placed on the self-moving device to obtain the second positioning data collected by the remote control terminal and the third positioning data collected by the self-moving device. Wherein, the second positioning data and the third positioning data are obtained after calibration based on the RTK differential signal, and the method of calibrating the second positioning data and the third positioning data based on the RTK differential signal is the same as the method of calibrating the first positioning data based on the RTK differential signal, which will not be repeated here. Calculate the error positioning data between the second positioning data and the third positioning data, and calibrate the first positioning data based on the error positioning data. Wherein, the error positioning data can be the coordinate difference between the coordinates corresponding to the second positioning data and the coordinates corresponding to the third positioning data, and superimpose the coordinate difference on all positioning coordinates in the first positioning data, so as to convert the positioning coordinates of the remote control terminal into the positioning coordinates of the self-moving device, thereby further calibrating the first positioning data. For example, the first positioning data is P1(m1,n1), the second positioning data is P2(m2,n2), the error positioning data is ΔP(m2-m1,n2-n1), and the second positioning data corresponding to the first positioning data is the sum of the first positioning data and the error positioning data.
[0072] In one embodiment of the present application, the calibration of the first positioning data based on the error positioning data can be performed in the mobile device or the remote control terminal. In other embodiments of the present application, the calibration of the first positioning data based on the error positioning data can be performed each time a first positioning data is acquired, or all the first positioning data can be calibrated after all the first positioning data are acquired.
[0073] S103: construct a boundary map of the operation area based on the first positioning data.
[0074] In one embodiment of the present application, a plurality of boundary position points corresponding to the first positioning data are fitted to obtain a boundary map of the operating area.
[0075] See also Figure 6 The above is a flowchart of building a boundary map based on the first positioning data provided in an embodiment of the present application.
[0076] S1021, extracting the outline of the working area based on the image of the working area.
[0077] In one embodiment of the present application, the image of the work area is obtained by taking a bird's-eye view of the work area with a camera device, and is pre-stored in the remote control terminal, the self-moving device and / or the electronic device. The image of the work area can also be transmitted between the remote control terminal, the self-moving device and the electronic device, so that the image of the work area can be used as a reference when constructing boundary maps in different devices.
[0078] In one embodiment of the present application, edge feature recognition is performed on the image of the work area to extract the contour of the work area. The edge feature recognition can be performed on the image of the work area by a preset edge detection algorithm to extract the contour of the work area. For example, the preset edge detection algorithm can be a canny edge detection algorithm, a sobel operator, a prewitt operator, etc.
[0079] S1022: Fit the first positioning data based on the outline of the working area to obtain a boundary map of the working area.
[0080] In one embodiment of the present application, based on the outline of the operating area, multiple boundary position points corresponding to the first positioning data are connected in a generation order to obtain a virtual boundary line of the operating area, and a boundary map of the operating area is generated based on the virtual boundary line. The generation order refers to the generation time sequence of the first positioning data corresponding to the boundary position points. Based on the outline of the operating area, the starting position point in the first positioning data is connected to the next boundary position point to form a line segment, the generation timestamp of the positioning data corresponding to the starting position point is adjacent to the generation timestamp of the positioning data corresponding to the next boundary position point, the next boundary position point is connected to the next boundary position point to form a line segment, the generation timestamp of the positioning data corresponding to the next boundary position point is adjacent to the generation timestamp of the positioning data of the next boundary position point, and so on, all the boundary position points are connected to multiple line segments, and multiple line segments are connected end to end to generate a virtual boundary line of the operating area, and a boundary map of the operating area is generated based on the virtual boundary line.
[0081] In another embodiment of the present application, multiple boundary position points corresponding to the first positioning data are screened, and the screened multiple boundary position points are connected in a generation order to obtain a virtual boundary line of the operation area, and a boundary map of the operation area is generated based on the virtual boundary line. The virtual boundary line is stored in the operation map corresponding to the operation area, thereby generating a boundary map of the operation area.
[0082] In another embodiment of the present application, the starting position point of the remote control terminal in the outline of the working area is determined, and the corner point adjacent to the starting position point in the outline of the working area is detected, and the corner point is used as the first reference position point. Based on the pixel coordinates and world coordinates of the starting position point in the working area image (i.e., the positioning coordinates corresponding to the starting position point), the conversion parameters are determined, and the pixel coordinates of the first reference position point in the working area image are converted into world coordinates based on the conversion parameters. Among them, the conversion parameters include the internal parameters and external parameters of the camera device that shoots the working area image. Based on the world coordinates of the starting position point and the world coordinates of the first reference position point, the starting position point and the first reference position point are connected to form a line segment L1, and the boundary position points between the starting position point and the first reference position point are traversed to determine whether each boundary position point exceeds the fitting range corresponding to the line segment L1. If any boundary position point exceeds the fitting range corresponding to the line segment, the boundary position point that exceeds the fitting range is deleted. If the positioning coordinates corresponding to a boundary position point are on line segment L1, it is determined that the boundary position point does not exceed the fitting range corresponding to line segment L1; if the positioning coordinates corresponding to the boundary position point are not on line segment L1, it is determined that the boundary position point exceeds the fitting range corresponding to the line segment. Among them, the corner points in the outline of the operating area can be detected by a feature point extraction algorithm. For example, the feature point extraction algorithm can be a Harris corner point detector, a Shi-Tomasi corner point detector, a FAST feature detector, etc.
[0083] In another embodiment of the present application, a corner point adjacent to the first reference position point in the outline of the working area is detected, and the corner point is used as the second reference position point. The pixel coordinates of the second reference position point in the working area image are converted into world coordinates based on the conversion parameters. Based on the world coordinates of the first reference position point and the world coordinates of the second reference position point, the first reference position point and the second reference position point are connected into a line segment L2, and the boundary position points between the first reference position point and the second reference position point are traversed to determine whether each boundary position point exceeds the fitting range corresponding to the line segment L2. If any boundary position point exceeds the fitting range corresponding to the line segment L2, the boundary position point that exceeds the fitting range is deleted. Similarly, all the reference position points in the outline of the working area are determined, and all boundary position points that exceed the fitting range are deleted based on the reference position points.
[0084] In another embodiment of the present application, the multiple boundary position points after screening are connected in the order of generation to obtain a virtual boundary line of the operation area. Alternatively, the multiple boundary position points after screening are fitted to obtain the virtual boundary line of the operation area. For example, a preset fitting algorithm is used to fit the multiple boundary position points after screening to obtain the virtual boundary line of the operation area. The preset fitting algorithm can be a least squares method, a machine learning algorithm, etc.
[0085] The above-mentioned embodiments of the present application can obtain the positioning data collected by the remote control terminal during the movement along the boundary of the working area, and construct a boundary map of the working area based on the positioning data collected by the remote control terminal. There is no need for manual remote control to move the mobile device along the boundary of the working area, which effectively improves the efficiency and accuracy of building the boundary map.
[0086] In one embodiment of the present application, before obtaining the first positioning data of the remote control terminal other than the starting position point, the method further includes: detecting whether the remote control terminal is in a moving state, if the remote control terminal is in a moving state, obtaining the first positioning data collected by the remote control terminal during the moving process, and if the remote control terminal is not in a moving state, the remote control terminal stops collecting the first positioning data. If the remote control terminal stops collecting the first positioning data, the construction of the boundary map is terminated, thereby saving the energy consumption of the remote control terminal. For example, an inertial measurement unit (IMU) can be used to detect whether the remote control terminal is in a moving state.
[0087] In one embodiment of the present application, the method further includes: if the remote control terminal receives an instruction to end mapping or return to the starting position, then the collection of the first positioning data is stopped, and the construction of the boundary map is ended.
[0088] In one embodiment of the present application, if the boundary map is constructed in a self-mobile device or electronic device, the self-mobile device or electronic device can send the constructed boundary map to the remote control terminal for display. Alternatively, the self-mobile device or electronic device can send the fitted boundary line to the remote control terminal in real time, and the remote control terminal loads the received boundary line into the operation map of the operation area and displays it, thereby presenting the creation process of the boundary map for easy viewing by the user.
[0089] See also Figure 7 FIG. 1 is a flowchart of a boundary map construction method provided by another embodiment of the present application. The boundary map construction method can be applied to Figure 1 The self-mobile device 1 shown. The boundary map construction method includes the following steps:
[0090] S301, obtaining a first boundary map of the operation area, and scaling the first boundary map to obtain a second boundary map of the operation area, so as to ensure that a second boundary in the second boundary map and a first boundary in the first boundary map reach a preset distance value.
[0091] In one embodiment of the present application, the first boundary map is Figure 4 The boundary map constructed by the process shown in the figure can be found in Figure 8As shown. Based on a preset ratio, the first boundary map is mapped to a second boundary map, and the first boundary map is scaled to obtain a second boundary map of the working area to ensure that the second boundary in the second boundary map reaches a preset distance value from the first boundary in the first boundary map. Among them, the preset ratio is less than 1, for example, it can be 0.7, 0.8, 0.9 or other values. The preset distance value is between 0.5 and 1 meters, for example, it can be 0.5 meters, 0.8 meters, 1 meter or other distance values. Mapping the first boundary map to the second boundary map can shrink the first boundary map to prevent the self-moving device from exceeding the boundary of the working area during movement.
[0092] In one embodiment of the present application, the center point coordinates of the first boundary map are obtained, a preset ratio is determined based on the center point coordinates and a preset distance value, the first coordinates of all boundary position points in the first boundary map are converted into second coordinates based on the preset ratio, and a second boundary map is generated based on the second coordinates of all boundary position points. The center point coordinates may be preset coordinates or coordinates obtained by calculating the average of the first coordinates of all boundary position points.
[0093] If the coordinates of the center point are (x0, y0), the preset ratio is s, and the first coordinates of the boundary point are (x1, y1), then in the second coordinates (x2, y2), x2=s*(x1-x0)+x0, y2=s*(y1-y0)+y0. For example, if the coordinates of the center point are (100, 100), the preset ratio is 0.9, and the first coordinates of the boundary point are (150, 150), then in the second coordinates (x2, y2), x2=0.9*(150-100)+100=145, y2=0.9*(150-100)+100=145, that is, the second coordinate is (145, 145). Wherein, the first coordinate and the second coordinate are both pixel coordinates.
[0094] It can be understood that the preset distance value D between a border position point in the first border map and the corresponding border position point in the second border map is D=d*R, where d is the pixel distance between the two border position points, and R is the actual distance corresponding to the per-unit pixel distance in reality. Specifically, the first coordinate of the border position point in the first border map is (x1, y1), and the second coordinate of the corresponding border position point in the second border map is (x2, y2), then the pixel distance between the two border position points can be calculated as Assuming that the pixel distance between two boundary points in the image is 200 pixels, and the actual distance R corresponding to each pixel is 0.005 meters / pixel, then the actual distance = 200 × 0.005 = 1 meter.
[0095] In one embodiment of the present application, based on a preset distance value and the actual distance corresponding to the per unit pixel distance in the first boundary map, the pixel distance between a boundary position point in the first boundary map and the corresponding boundary position point in the second boundary map is calculated, and based on the pixel distance and the center point coordinates, a preset ratio is determined.
[0096] In one embodiment of the present application, based on the first coordinates of the boundary position point in the first boundary map and the coordinates of the center point, the equation of the straight line on which the boundary position point in the first boundary map, the corresponding boundary position point in the second boundary map, and the center point of the first boundary map are located is determined, and based on the pixel distance, the straight line equation, and the relationship between the first coordinates of the boundary position point in the first boundary map, the second coordinates of the corresponding boundary position point in the second boundary map, and the preset ratio, the preset ratio is determined.
[0097] The equation of the straight line is determined based on the first coordinates of the boundary position points in the first boundary map and the coordinates of the center point. The pixel distance between the two boundary position points is The relationship between the first coordinate of the boundary position point in the first boundary map, the second coordinate of the corresponding boundary position point in the second boundary map and the preset ratio is x2=s*(x1-x0)+x0, y2=s*(y1-y0)+y0.
[0098] In one embodiment of the present application, all boundary position points with the second coordinates are connected in sequence to generate a virtual boundary line, and a second boundary map is generated based on the virtual boundary line. The generation order of all boundary position points with the second coordinates is the same as the generation order of the corresponding boundary position points with the first coordinates. In another embodiment of the present application, all boundary position points with the second coordinates may also be fitted to generate a virtual boundary line, and a second boundary map may be generated based on the virtual boundary line.
[0099] S302, controlling the mobile device to move along the second boundary in the second boundary map, and acquiring an environment image during the movement.
[0100] In one embodiment of the present application, the mobile device moves along the second boundary in the second boundary map, and captures multiple environmental images during the movement through a camera at preset intervals during the movement. For example, the preset time may be 0.5 seconds, 1 second, 1.5 seconds, or other time.
[0101] S303, identifying the boundary of the working area in the environment image, and generating a third boundary map of the working area based on the boundary.
[0102] In one embodiment of the present application, multiple environmental images are identified by an edge detection algorithm to obtain the boundaries of the working area in the multiple environmental images. The feature points on the boundary in each environmental image are detected by a feature point detection algorithm. The feature points may be corner points on the boundary. The pixel coordinates of each feature point are converted into world coordinates based on conversion parameters. Based on the world coordinates of all feature points, a virtual boundary line of the working area is generated, and a third boundary map is generated based on the virtual boundary line. The conversion parameters are the internal and external parameters of the camera device.
[0103] In one embodiment of the present application, all feature points are connected based on the world coordinates of all feature points to generate a virtual boundary line of the operation area. In another embodiment of the present application, all feature points may be fitted to generate a virtual boundary line. Figure 6 The implementation method of S1022 in the flowchart is the same and will not be described in detail here.
[0104] S304: Generate a target boundary map of the operation area based on the first boundary map and the third boundary map.
[0105] In one embodiment of the present application, based on the coordinates of all boundary position points in the first boundary map and the coordinates of all feature points in the third boundary map, the first boundary map and the third boundary map are fitted into a target boundary map of the operation area. Figure 6 In the implementation of S1022 in the flowchart shown in the figure, all boundary position points in the first boundary map and all feature points in the third boundary map are fitted into a virtual boundary line, and a target boundary map is generated based on the virtual boundary line. The target boundary map can be referred to in Figure 8 shown.
[0106] The above-mentioned embodiments of the present application can map a pre-constructed first boundary map into a second boundary map, control the self-moving device to move based on the second boundary map, construct a third boundary map based on images taken during the movement, and obtain a target boundary map of the working area based on the first boundary map and the third boundary map, thereby effectively improving the accuracy of the constructed boundary map and preventing the self-moving device from exceeding the boundary of the working area during the operation.
[0107] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. The computer program includes program instructions. The method implemented when the program instructions are executed can refer to the methods in the above-mentioned embodiments of the present application.
[0108] The computer-readable storage medium may be the internal memory of the self-mobile device described in the above embodiment, such as the hard disk or memory of the self-mobile device. The computer-readable storage medium may also be an external storage device of the self-mobile device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the self-mobile device.
[0109] In one embodiment of the present application, the computer-readable storage medium may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function, etc.; the data storage area may store data constructed based on the use of the self-mobile device, etc.
[0110] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0111] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in 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. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0112] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0113] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0114] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A boundary map construction method, characterized in that: The method comprises: Acquire a first boundary map of the operation area, and scale the first boundary map to acquire a second boundary map of the operation area, so as to ensure that a second boundary in the second boundary map reaches a preset distance value from a first boundary in the first boundary map; Controlling the mobile device to move along the second boundary in the second boundary map, and acquiring an environment image during the movement; Identifying a boundary of the working area in the environment image, and generating a third boundary map of the working area based on the boundary; A target boundary map of the work area is generated based on the first boundary map and the third boundary map.
2. The boundary map construction method according to claim 1, characterized in that: The step of scaling the first boundary map to obtain a second boundary map of the operation area includes: Acquire the center point coordinates of the first boundary map, and determine a preset ratio based on the center point coordinates and the preset distance value; Converting first coordinates of all boundary position points in the first boundary map into second coordinates based on the preset ratio; The second boundary map is generated based on the second coordinates of all boundary location points.
3. The boundary map construction method according to claim 2, characterized in that: The determining the preset ratio based on the center point coordinates and the preset distance value includes: Calculating a pixel distance between a boundary position point in the first boundary map and a corresponding boundary position point in the second boundary map based on the preset distance value and an actual distance corresponding to the per-unit pixel distance in the first boundary map; The preset ratio is determined based on the pixel distance and the center point coordinates.
4. The boundary map construction method according to claim 3, characterized in that: The determining the preset ratio based on the pixel distance and the center point coordinates includes: Determine, based on the first coordinates of the border position point in the first border map and the coordinates of the center point, an equation of a straight line including the border position point in the first border map, the corresponding border position point in the second border map, and the center point of the first border map; The preset ratio is determined based on the pixel distance, the straight line equation, and the relationship between the first coordinates of the boundary position point in the first boundary map, the second coordinates of the corresponding boundary position point in the second boundary map, and the preset ratio.
5. The boundary map construction method according to claim 1, characterized in that: The identifying the boundary of the working area in the environment image includes: The environment image is identified by an edge detection algorithm to obtain the boundary of the working area in the environment image.
6. The boundary map construction method according to claim 1, characterized in that: The step of generating a third boundary map of the operation area based on the boundary includes: Detecting feature points on the boundary of the environment image by a feature point detection algorithm; The pixel coordinates of each feature point are converted into world coordinates, a virtual boundary line of the operation area is generated based on the world coordinates of all feature points, and the third boundary map is generated based on the virtual boundary line.
7. The boundary map construction method according to claim 5, characterized in that: The step of generating a virtual boundary line of the operation area based on the world coordinates of all feature points includes: Based on the world coordinates of all the feature points, all the feature points are connected or fitted to generate a virtual boundary line of the working area.
8. The boundary map construction method according to claim 1, characterized in that: The step of generating a target boundary map of the operation area based on the first boundary map and the third boundary map includes: Based on the coordinates of all boundary position points in the first boundary map and the coordinates of all feature points in the third boundary map, the first boundary map and the third boundary map are fitted into a target boundary map of the operation area.
9. A self-propelled device, characterized in that: The self-mobile device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the boundary map construction method according to any one of claims 1 to 8 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor in a mobile device, implements the boundary map construction method according to any one of claims 1 to 8.
