CN113720337A - Map editing method and device for sweeping robot, storage medium and electronic equipment - Google Patents

Map editing method and device for sweeping robot, storage medium and electronic equipment Download PDF

Info

Publication number
CN113720337A
CN113720337A CN202110961623.5A CN202110961623A CN113720337A CN 113720337 A CN113720337 A CN 113720337A CN 202110961623 A CN202110961623 A CN 202110961623A CN 113720337 A CN113720337 A CN 113720337A
Authority
CN
China
Prior art keywords
target area
sub
color values
area
room
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110961623.5A
Other languages
Chinese (zh)
Inventor
郭颖珊
梁慧勇
许金秧
刘旭阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Original Assignee
Gree Electric Appliances Inc of Zhuhai
Zhuhai Lianyun Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Gree Electric Appliances Inc of Zhuhai, Zhuhai Lianyun Technology Co Ltd filed Critical Gree Electric Appliances Inc of Zhuhai
Priority to CN202110961623.5A priority Critical patent/CN113720337A/en
Publication of CN113720337A publication Critical patent/CN113720337A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C21/00Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00
    • G01C21/26Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network
    • G01C21/28Navigation; Navigational instruments not provided for in groups G01C1/00 - G01C19/00 specially adapted for navigation in a road network with correlation of data from several navigational instruments
    • G01C21/30Map- or contour-matching
    • G01C21/32Structuring or formatting of map data
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47LDOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
    • A47L11/00Machines for cleaning floors, carpets, furniture, walls, or wall coverings
    • A47L11/40Parts or details of machines not provided for in groups A47L11/02 - A47L11/38, or not restricted to one of these groups, e.g. handles, arrangements of switches, skirts, buffers, levers
    • A47L11/4061Steering means; Means for avoiding obstacles; Details related to the place where the driver is accommodated
    • AHUMAN NECESSITIES
    • A47FURNITURE; DOMESTIC ARTICLES OR APPLIANCES; COFFEE MILLS; SPICE MILLS; SUCTION CLEANERS IN GENERAL
    • A47LDOMESTIC WASHING OR CLEANING; SUCTION CLEANERS IN GENERAL
    • A47L2201/00Robotic cleaning machines, i.e. with automatic control of the travelling movement or the cleaning operation
    • A47L2201/04Automatic control of the travelling movement; Automatic obstacle detection

Landscapes

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

Abstract

The invention discloses a map editing method and device of a sweeping robot, a storage medium and electronic equipment, and belongs to the field of computers. Wherein, the method comprises the following steps: selecting a target area to be segmented in a room map of the sweeping robot; detecting a sliding track on the room map, and generating a cutting line on the target area according to the sliding track; and dividing the target area into a first sub-area and a second sub-area according to the cutting line. According to the invention, the technical problem that the room map of the sweeping robot cannot be edited in a user-defined manner in the related art is solved, and the control precision and the control efficiency of the sweeping robot are improved based on the most accurate room map.

Description

Map editing method and device for sweeping robot, storage medium and electronic equipment
Technical Field
The invention relates to the field of computers, in particular to a map editing method and device for a sweeping robot, a storage medium and electronic equipment.
Background
In the related art, more and more technologies are applied to the technical field of artificial intelligence, but the technical field of artificial intelligence also puts higher requirements on the technologies, such as higher requirements on maps of sweeping machines.
In the related art, the sweeping robot can roughly identify and construct a room map through the hardware of the robot body, and the constructed room map is displayed through the software APP, so that the constructed map has the problem of inaccurate construction due to the hardware principle or other reasons, sweeping is performed based on the inaccurate map, the sweeping efficiency of the sweeping robot is reduced, and in some cases, the room map needs to be customized again after the room is normalized again.
In view of the above problems in the related art, no effective solution has been found at present.
Disclosure of Invention
The embodiment of the invention provides a map editing method and device of a sweeping robot, a storage medium and electronic equipment, and aims to solve the technical problem that a room map of the sweeping robot cannot be edited in a user-defined mode in the related art.
According to an aspect of the embodiments of the present application, there is provided a map editing method for a sweeping robot, including: selecting a target area to be segmented in a room map of the sweeping robot; detecting a sliding track on the room map, and generating a cutting line on the target area according to the sliding track; and dividing the target area into a first sub-area and a second sub-area according to the cutting line.
Further, generating a cutting line on the target area according to the sliding trajectory includes: acquiring a starting coordinate and an ending coordinate of the sliding track; positioning two intersection points of the sliding track and the target area according to the starting coordinate and the ending coordinate; and outputting a connecting line between the two intersection points as a cutting line of the target area.
Further, locating two intersection points of the sliding trajectory with the target area according to the start coordinate and the end coordinate comprises: extracting an abscissa value x1 and an ordinate value y1 of the start coordinate, and extracting an abscissa value xt and an ordinate value yt of the end coordinate; generating a trajectory formula y ═ ax + b based on x1, y1, xt, yt, wherein a and b are constants; and traversing and extracting color values of pixel points on the sliding track by adopting the track formula, and positioning two intersection points of the sliding track and the target area according to the color values.
Further, traversing and extracting color values of pixel points on the sliding track by adopting the track formula, and positioning two intersection points of the sliding track and the target area according to the color values comprises the following steps: traversing from the origin abscissa of the coordinate system until the abscissa value x1 of the starting coordinate is located at the intersection: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; if the color value of the traversal point (xi, yi) is the same as that of the target area, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target area, determining that the current traversal point is a cross point; traversing from the abscissa value xt of the end coordinate until the origin abscissa of the coordinate system or the intersection point is located: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; and if the color value of the traversal point (xi, yi) is the same as that of the target region, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target region, determining that the current traversal point is the intersection point.
Further, segmenting the target region into a first sub-region and a second sub-region according to the cut line comprises: filling a coverage area of the first sub-area with a first color and a coverage area of the second sub-area with a second color in the room map; and establishing a virtual fence in the target area by taking the cutting line as a ground base line.
Further, the method further comprises: selecting a target area to be merged in the room map, wherein the target area comprises a plurality of adjacent sub-areas; filling the same color values on the coverage areas of the plurality of adjacent sub-areas in the room map, and removing the virtual fence between the plurality of adjacent sub-areas.
Further, after dividing the target region into a first sub-region and a second sub-region according to the cutting line, the method further comprises: deleting the configuration information of the target area on a server, and generating the configuration information of the first sub-area and the second sub-area; and deleting the target area reservation information on the server, wherein the server is connected with the sweeping robot.
According to another aspect of the embodiments of the present application, there is also provided a map editing apparatus for a sweeping robot, including: the first selection module is used for selecting a target area to be segmented in a room map of the sweeping robot; the generating module is used for detecting a sliding track on the room map and generating a cutting line on the target area according to the sliding track; and the segmentation module is used for segmenting the target area into a first sub-area and a second sub-area according to the cutting line.
Further, the generating module includes: an acquisition unit configured to acquire a start coordinate and an end coordinate of the sliding trajectory; the positioning unit is used for positioning two intersection points of the sliding track and the target area according to the starting coordinate and the ending coordinate; and the output unit is used for outputting a connecting line between the two intersection points as a cutting line of the target area.
Further, the positioning unit includes: an extraction subunit, configured to extract an abscissa value x1 and an ordinate value y1 of the start coordinate, and extract an abscissa value xt and an ordinate value yt of the end coordinate; the generating subunit is used for generating a trajectory formula y ═ ax + b based on x1, y1, xt, yt, wherein a and b are constants; and the positioning subunit is used for traversing and extracting the color values of the pixel points on the sliding track by adopting the track formula, and positioning two intersection points of the sliding track and the target area according to the color values.
Further, the positioning subunit is further configured to: traversing from the origin abscissa of the coordinate system until the abscissa value x1 of the starting coordinate is located at the intersection: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; if the color value of the traversal point (xi, yi) is the same as that of the target area, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target area, determining that the current traversal point is a cross point; traversing from the abscissa value xt of the end coordinate until the origin abscissa of the coordinate system or the intersection point is located: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; and if the color value of the traversal point (xi, yi) is the same as that of the target region, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target region, determining that the current traversal point is the intersection point.
Further, the segmentation module includes: a filling unit for filling a coverage area of the first sub-area with a first color and a coverage area of the second sub-area with a second color in the room map; and the new building unit is used for building a virtual fence in the target area by taking the cutting line as a ground baseline.
Further, the apparatus further comprises: a second selecting module, configured to select a target area to be merged in the room map, where the target area includes a plurality of adjacent sub-areas; a processing module for filling the same color values on the coverage areas of the plurality of adjacent sub-areas in the room map and removing the virtual fence between the plurality of adjacent sub-areas.
Further, the apparatus further comprises: a deleting module, configured to delete the configuration information of the target region on a server after the dividing module divides the target region into a first sub-region and a second sub-region according to the cutting line, and generate the configuration information of the first sub-region and the second sub-region; and deleting the target area reservation information on the server, wherein the server is connected with the sweeping robot.
According to another aspect of the embodiments of the present application, there is also provided a storage medium including a stored program that executes the above steps when the program is executed.
According to another aspect of the embodiments of the present application, there is also provided an electronic device, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus; wherein: a memory for storing a computer program; a processor for executing the steps of the method by running the program stored in the memory.
Embodiments of the present application also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform the steps of the above method.
According to the invention, the target area to be segmented is selected in the room map of the sweeping robot, the sliding track is detected on the room map, the cutting line is generated on the target area according to the sliding track, the target area is segmented into the first sub-area and the second sub-area according to the cutting line, and the rooms in the room map are segmented by adopting the detected sliding track, so that a free and flexible room segmentation mode is realized, the technical problem that the room map of the sweeping robot cannot be edited by self definition in the related technology is solved, and the control precision and the control efficiency of the sweeping robot are improved based on the most accurate room map.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the invention and together with the description serve to explain the invention without limiting the invention. In the drawings:
fig. 1 is a block diagram of a hardware structure of a mobile phone according to an embodiment of the present invention;
fig. 2 is a flowchart of a map editing method of a sweeping robot according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a partitioned room in accordance with an embodiment of the present invention;
FIG. 4 is a schematic view of a merging room according to an embodiment of the present invention;
fig. 5 is a block diagram of a map editing apparatus of a sweeping robot according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only partial embodiments of the present application, but not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application. It should be noted that the embodiments and features of the embodiments in the present application may be combined with each other without conflict.
It should be noted that the terms "first," "second," and the like in the description and claims of this application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Example 1
The method provided by the first embodiment of the present application may be executed in a mobile phone, a computer, a tablet or a similar computing device. Taking the operation on a mobile phone as an example, fig. 1 is a block diagram of a hardware structure of a mobile phone according to an embodiment of the present invention. As shown in fig. 1, the handset may include one or more (only one shown in fig. 1) processors 102 (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, and optionally may also include a transmission device 106 for communication functions and an input-output device 108. It will be understood by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting to the structure of the mobile phone. For example, a cell phone may also include more or fewer components than shown in FIG. 1, or have a different configuration than shown in FIG. 1.
The memory 104 may be used to store a mobile phone program, for example, a software program and a module of an application software, such as a mobile phone program corresponding to a map editing method of a sweeping robot in an embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the mobile phone program stored in the memory 104, so as to implement the method. The memory 104 may include high speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory located remotely from the processor 102, which may be connected to a cell phone over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission device 106 is used to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of a cellular phone. In one example, the transmission device 106 includes a Network adapter (NIC) that can be connected to other Network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet in a wireless manner.
In this embodiment, a map editing method for a sweeping robot is provided, and fig. 2 is a flowchart of the map editing method for the sweeping robot according to the embodiment of the present invention, and as shown in fig. 2, the flowchart includes the following steps:
step S202, selecting a target area to be divided in a room map of the sweeping robot;
the room map of this embodiment is that the robot of sweeping the floor cleans the room after for the first time, on-line map based on the scope of cleaning the orbit and generating, the robot of sweeping the floor accomplishes once and cleans, with the automatic subregion of the map of cleaning to upload to the server, when the robot of sweeping the floor cleans, from the charging seat, mark the coordinate of charging seat and be coordinate system initial point (0,0), the area of cleaning will be followed the initial point and is made the mark, finally generate a map, the equal proportion shows on APP, the user can use the room to further edit as the unit to the room map on APP.
Different rooms in the room map are distinguished by corresponding identification information, such as color values, brightness values, and the like. The target area in this embodiment may be an area of one room, an area of a plurality of rooms, or a partial area in a single room.
Step S204, detecting a sliding track on the room map, and generating a cutting line on the target area according to the sliding track;
the sliding track of the present embodiment is a sliding track that slides on a room map through a control medium (e.g., a stylus, a finger, a mouse), etc. In addition to this, the cutting instruction may also be triggered by voice or the like, such as "cut room a in half" or the like.
Step S206, dividing the target area into a first sub-area and a second sub-area according to the cutting line.
Through the steps, the target area to be divided is selected from the room map of the sweeping robot, the sliding track is detected on the room map, the cutting line is generated on the target area according to the sliding track, the target area is divided into the first sub-area and the second sub-area according to the cutting line, and the rooms in the room map are divided by adopting the detected sliding track, so that a free and flexible room dividing mode is realized, the technical problem that the room map of the sweeping robot cannot be edited in a user-defined mode in the related art is solved, and the control precision and the control efficiency of the sweeping robot are improved based on the most accurate room map.
In the internet of things of this embodiment, the method includes: the robot that sweeps floor, install APP, the server on user terminal. The robot of sweeping the floor has the electricity and under the condition of start, sends the hotspot, uses APP scanning equipment two-dimensional code (the two-dimensional code carries the model information of the robot of sweeping the floor etc., and APP learns the type name of equipment hotspot according to the model information), APP junction device hotspot. And the APP transmits the WiFi name and the WiFi password to the equipment. The sweeping robot is connected with the network according to the WiFi information and is connected to the server.
In the present embodiment, generating the cutting line on the target area according to the sliding trajectory includes:
s11, acquiring the initial coordinate and the end coordinate of the sliding track;
s12, positioning two intersection points of the sliding track and the target area according to the starting coordinate and the ending coordinate;
in one embodiment of the present embodiment, the positioning of the two intersection points of the sliding trajectory and the target area according to the start coordinate and the end coordinate includes: extracting an abscissa value x1 and an ordinate value y1 of the start coordinate, and extracting an abscissa value xt and an ordinate value yt of the end coordinate; generating a trajectory formula y ═ ax + b based on x1, y1, xt, yt, wherein a and b are constants; and traversing and extracting color values of pixel points on the sliding track by adopting a track formula, and positioning two intersection points of the sliding track and the target area according to the color values.
In some examples, traversing and extracting color values of pixel points on the sliding track by adopting a track formula, and positioning two intersection points of the sliding track and the target area according to the color values comprises:
traversing from the origin abscissa of the coordinate system until the abscissa value x1 of the starting coordinate is located at the intersection: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting a track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as those of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from those of the target area or not; if the color value of the traversal point (xi, yi) is the same as that of the target area, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target area, determining the current traversal point as an intersection point;
traversing from the abscissa value xt of the end coordinate until the origin abscissa of the coordinate system or the intersection point is located: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting a track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as those of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from those of the target area or not; and if the color value of the traversal point (xi, yi) is the same as that of the target area, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target area, determining the current traversal point as an intersection point, wherein i is more than or equal to 2 and less than or equal to t.
By adopting the traversing mode of the embodiment, the intersection point of the sliding track and the room grid can be positioned without completely traversing the sliding track, and the generating speed and the generating efficiency of the cutting line are improved.
And S13, outputting a connecting line between the two intersection points as a cutting line of the target area.
In some embodiments of this embodiment, dividing the target region into the first and second sub-regions according to the cutting line comprises: filling a coverage area of the first sub-area with a first color and filling a coverage area of the second sub-area with a second color in the room map; and (5) taking the cutting line as a foundation line, and newly building a virtual fence in the target area.
Optionally, after the target region is divided into the first sub-region and the second sub-region according to the cutting line, the areas of the first sub-region and the second sub-region may be further compared, and the original configuration information (such as a room name and a filling color) and reservation information of the target region are inherited to the sub-region with a large area.
By newly building the virtual fence in the room map, when the sweeping robot is close to the virtual fence, the default is the solid wall, and automatic obstacle avoidance is triggered. In some examples, after the virtual fence is newly built in the target area, a virtual channel can be generated in the virtual fence, the virtual channel connects the first sub-area and the second sub-area, and the sweeping robot can enter from one sub-area to the other sub-area based on the virtual channel.
Optionally, the first color is a color obtained by increasing a preset chromaticity based on the original color value of the target region, and the second color is a color obtained by decreasing the preset chromaticity based on the original color value of the target region.
Optionally, after dividing the target region into a first sub-region and a second sub-region according to the cutting line, the method further includes: deleting the configuration information of the target area on the server and generating the configuration information of the first sub-area and the second sub-area; and deleting the target area reservation information on the server, wherein the server is connected with the sweeping robot. After the cutting is completed, the reservation function will be disabled because the map of the originally set reservation has changed, not the previous map, and the user is required to reset if the reservation is to be set.
Fig. 3 is a schematic diagram of dividing a room according to an embodiment of the present invention, where a user needs to edit the room, a room area, namely a living room, is selected on a map, a line is drawn in the room area, start and stop coordinates drawn by the user are obtained, an intersection point between the line and the room is calculated, the room division is completed, and the living room is divided into a room 1 and a room 2.
The operation flow on APP for dividing the room comprises the following steps: selecting a room → drawing a line in the room where splitting is desired → clicking save → splitting into two regions. After entering the map editing mode, if no room is selected, a prompt message "please select a room to be divided" is output. After the room is selected, a prompt message "please draw a dividing line within the selected room area" is output. A user draws a dividing line on a map by a single finger, and the map can be dragged and zoomed by double fingers. The dividing line is automatically attracted to the room boundary. If the dividing line is drawn at a position outside the selected room, the dividing line is not effective, and a prompt message 'please draw the dividing line in the selected room area' is output. Saving operation, output prompt information "after dividing a room, relevant settings of the divided room will be invalid, such as a room name, a reservation task of the divided room, and the like". Selecting "determine" then divides the room into 2 rooms, naming "room 1", "room 2" and so on by default. The selection cancellation stays in the editing split room.
The user selects a target area on the map and obtains the color value of the room. The user draws a line on the map, and obtains the horizontal and vertical coordinate values of the starting point (x1, y1) and the end point (xt, yt) according to the starting point and the end point of the line, so as to obtain the slope formula y ═ ax + b (substituting the original formula, y1 ═ ax1+ b, y2 ═ ax2+ b, and obtain the formulas a and b, and then obtain y ═ ax + b). And traversing the X value from 0 to obtain the Y value thereof, and then obtaining the color value of the fixed point to judge whether the color value is the color value of the selected room. If so, this point is within the selected room. Similarly, starting from XT, it is traversed to 0 to determine if it is the color value of the selected room. Finally, two intersections of the straight line divided by the user and the selected room are obtained. From these two intersections, a straight line between the two points is calculated in the same manner, and the map room is divided into two areas.
In another aspect of the present embodiment, multiple rooms may be merged in addition to the division of the rooms. The method comprises the following steps: selecting a target area to be merged in a room map, wherein the target area comprises a plurality of adjacent sub-areas; filling the same color value on the coverage area of a plurality of adjacent sub-areas in the room map, and removing the virtual fence between the plurality of adjacent sub-areas.
Optionally, after the target area to be merged is selected in the room map, the areas of the multiple adjacent sub-areas may be further compared, and the original configuration information (such as the room name and the filling color) and the reservation information of the sub-area with the largest area are inherited to the merged room.
Fig. 4 is a schematic diagram of a merged room according to an embodiment of the present invention, in which a living room and a balcony are merged into the living room, and an operation flow of the merged room includes: selecting two adjacent rooms → click to merge → two rooms will merge into one room. If the user does not select a room, a prompt message "please select two adjacent rooms" is output, when a room is selected, a prompt message "please select two adjacent rooms" is output if two non-adjacent rooms are selected, the operation is saved, and a prompt message "after the rooms are merged, the relevant settings of the merged rooms will be invalid, such as the room name, the reservation task of the merged room, etc. Selecting "ok" merges 2 rooms into 1 room, naming "room 1", "room 2" and so on by default, and canceling the selection cancels. And realizing the description, selecting 2 adjacent rooms, acquiring the color values of the 2 adjacent rooms, and adjusting the 2 color values into a new color value, namely completing the merging area.
In the embodiment, when the room is edited, the suction force and the water volume of the sweeping robot can be adjusted, and when the sweeping robot cleans the room, the cleaning robot cleans the room according to the preset suction force and water volume. If the suction force and the water amount are adjusted during room cleaning, the room is effectively cleaned at this time, and other rooms are cleaned according to set gears; when cleaning next time, cleaning according to the set gear, and adjusting the water quantity when editing the water quantity in the room, if installing the mop, the water quantity can be adjusted.
Through the above description of the embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but the former is a better implementation mode in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (e.g., ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (e.g., a mobile phone, a computer, a server, or a network device) to execute the method according to the embodiments of the present invention.
Example 2
In this embodiment, a map editing apparatus for a sweeping robot is further provided, which is used to implement the foregoing embodiments and preferred embodiments, and the description already made is omitted for brevity. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. Although the means described in the embodiments below are preferably implemented in software, an implementation in hardware, or a combination of software and hardware is also possible and contemplated.
Fig. 5 is a block diagram of a map editing apparatus of a sweeping robot according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: a first selection module 50, a generation module 52, a segmentation module 54, wherein,
a first selecting module 50, configured to select a target area to be segmented in a room map of the sweeping robot;
a generating module 52, configured to detect a sliding track on the room map, and generate a cutting line on the target area according to the sliding track;
a dividing module 54, configured to divide the target region into a first sub-region and a second sub-region according to the cutting line.
Optionally, the generating module includes: an acquisition unit configured to acquire a start coordinate and an end coordinate of the sliding trajectory; the positioning unit is used for positioning two intersection points of the sliding track and the target area according to the starting coordinate and the ending coordinate; and the output unit is used for outputting a connecting line between the two intersection points as a cutting line of the target area.
Optionally, the positioning unit includes: an extraction subunit, configured to extract an abscissa value x1 and an ordinate value y1 of the start coordinate, and extract an abscissa value xt and an ordinate value yt of the end coordinate; the generating subunit is used for generating a trajectory formula y ═ ax + b based on x1, y1, xt, yt, wherein a and b are constants; and the positioning subunit is used for traversing and extracting the color values of the pixel points on the sliding track by adopting the track formula, and positioning two intersection points of the sliding track and the target area according to the color values.
Optionally, the positioning subunit is further configured to: traversing from the origin abscissa of the coordinate system until the abscissa value x1 of the starting coordinate is located at the intersection: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; if the color value of the traversal point (xi, yi) is the same as that of the target area, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target area, determining that the current traversal point is a cross point; traversing from the abscissa value xt of the end coordinate until the origin abscissa of the coordinate system or the intersection point is located: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; and if the color value of the traversal point (xi, yi) is the same as that of the target region, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target region, determining that the current traversal point is the intersection point.
Optionally, the segmentation module includes: a filling unit for filling a coverage area of the first sub-area with a first color and a coverage area of the second sub-area with a second color in the room map; and the new building unit is used for building a virtual fence in the target area by taking the cutting line as a ground baseline.
Optionally, the apparatus further comprises: a second selecting module, configured to select a target area to be merged in the room map, where the target area includes a plurality of adjacent sub-areas; a processing module for filling the same color values on the coverage areas of the plurality of adjacent sub-areas in the room map and removing the virtual fence between the plurality of adjacent sub-areas.
Optionally, the apparatus further comprises: a deleting module, configured to delete the configuration information of the target region on a server after the dividing module divides the target region into a first sub-region and a second sub-region according to the cutting line, and generate the configuration information of the first sub-region and the second sub-region; and deleting the target area reservation information on the server, wherein the server is connected with the sweeping robot.
It should be noted that, the above modules may be implemented by software or hardware, and for the latter, the following may be implemented, but not limited to: the modules are all positioned in the same processor; alternatively, the modules are respectively located in different processors in any combination.
Example 3
Embodiments of the present invention also provide a storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the above method embodiments when executed.
Alternatively, in the present embodiment, the storage medium may be configured to store a computer program for executing the steps of:
s1, selecting a target area to be divided in a room map of the sweeping robot;
s2, detecting a sliding track on the room map, and generating a cutting line on the target area according to the sliding track;
and S3, dividing the target area into a first sub-area and a second sub-area according to the cutting line.
Optionally, in this embodiment, the storage medium may include, but is not limited to: various media capable of storing computer programs, such as a usb disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic disk, or an optical disk.
Embodiments of the present invention also provide an electronic device comprising a memory having a computer program stored therein and a processor arranged to run the computer program to perform the steps of any of the above method embodiments.
Optionally, the electronic device may further include a transmission device and an input/output device, wherein the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in this embodiment, the processor may be configured to execute the following steps by a computer program:
s1, selecting a target area to be divided in a room map of the sweeping robot;
s2, detecting a sliding track on the room map, and generating a cutting line on the target area according to the sliding track;
and S3, dividing the target area into a first sub-area and a second sub-area according to the cutting line.
Optionally, the specific examples in this embodiment may refer to the examples described in the above embodiments and optional implementation manners, and this embodiment is not described herein again.
The above-mentioned serial numbers of the embodiments of the present application are merely for description and do not represent the merits of the embodiments.
In the above embodiments of the present application, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed technology can be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one type of division of logical functions, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, units or modules, and may be in an electrical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a removable hard disk, a magnetic or optical disk, and other various media capable of storing program codes.
The foregoing is only a preferred embodiment of the present application and it should be noted that those skilled in the art can make several improvements and modifications without departing from the principle of the present application, and these improvements and modifications should also be considered as the protection scope of the present application.

Claims (10)

1. A map editing method of a sweeping robot is characterized by comprising the following steps:
selecting a target area to be segmented in a room map of the sweeping robot;
detecting a sliding track on the room map, and generating a cutting line on the target area according to the sliding track;
and dividing the target area into a first sub-area and a second sub-area according to the cutting line.
2. The method of claim 1, wherein generating a cut line on the target region from the sliding trajectory comprises:
acquiring a starting coordinate and an ending coordinate of the sliding track;
positioning two intersection points of the sliding track and the target area according to the starting coordinate and the ending coordinate;
and outputting a connecting line between the two intersection points as a cutting line of the target area.
3. The method of claim 2, wherein locating two intersection points of the sliding trajectory with the target region according to the start and end coordinates comprises:
extracting an abscissa value x1 and an ordinate value y1 of the start coordinate, and extracting an abscissa value xt and an ordinate value yt of the end coordinate;
generating a trajectory formula y ═ ax + b based on x1, y1, xt, yt, wherein a and b are constants;
and traversing and extracting color values of pixel points on the sliding track by adopting the track formula, and positioning two intersection points of the sliding track and the target area according to the color values.
4. The method of claim 3, wherein traversing and extracting color values of pixel points on the sliding track by using the track formula, and locating two intersection points of the sliding track and the target region according to the color values comprises:
traversing from the origin abscissa of the coordinate system until the abscissa value x1 of the starting coordinate is located at the intersection: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; if the color value of the traversal point (xi, yi) is the same as that of the target area, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target area, determining that the current traversal point is a cross point;
traversing from the abscissa value xt of the end coordinate until the origin abscissa of the coordinate system or the intersection point is located: acquiring a yi value corresponding to the abscissa xi of the sliding track by adopting the track formula, acquiring color values of traversal points (xi, yi), and judging whether the color values of the traversal points (xi, yi) are the same as the color values of the target area or not and whether the color values of the historical traversal points (xi-1, yi-1) are different from the color values of the target area or not; and if the color value of the traversal point (xi, yi) is the same as that of the target region, and the color value of the historical traversal point (xi-1, yi-1) is different from that of the target region, determining the current traversal point as an intersection point, wherein i is more than or equal to 2 and less than or equal to t.
5. The method of claim 1, wherein segmenting the target region into a first sub-region and a second sub-region according to the cut line comprises:
filling a coverage area of the first sub-area with a first color and a coverage area of the second sub-area with a second color in the room map; and establishing a virtual fence in the target area by taking the cutting line as a ground base line.
6. The method of claim 1, further comprising:
selecting a target area to be merged in the room map, wherein the target area comprises a plurality of adjacent sub-areas;
filling the same color values on the coverage areas of the plurality of adjacent sub-areas in the room map, and removing the virtual fence between the plurality of adjacent sub-areas.
7. The method of claim 1, wherein after segmenting the target region into a first sub-region and a second sub-region according to the cut line, the method further comprises:
deleting the configuration information of the target area on a server, and generating the configuration information of the first sub-area and the second sub-area; and deleting the target area reservation information on the server, wherein the server is connected with the sweeping robot.
8. The utility model provides a sweep floor map editing device of robot which characterized in that includes:
the first selection module is used for selecting a target area to be segmented in a room map of the sweeping robot;
the generating module is used for detecting a sliding track on the room map and generating a cutting line on the target area according to the sliding track;
and the segmentation module is used for segmenting the target area into a first sub-area and a second sub-area according to the cutting line.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein the program is operative to perform the method steps of any of the preceding claims 1 to 7.
10. An electronic device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus; wherein:
a memory for storing a computer program;
a processor for performing the method steps of any of claims 1 to 7 by executing a program stored on a memory.
CN202110961623.5A 2021-08-20 2021-08-20 Map editing method and device for sweeping robot, storage medium and electronic equipment Pending CN113720337A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110961623.5A CN113720337A (en) 2021-08-20 2021-08-20 Map editing method and device for sweeping robot, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110961623.5A CN113720337A (en) 2021-08-20 2021-08-20 Map editing method and device for sweeping robot, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN113720337A true CN113720337A (en) 2021-11-30

Family

ID=78677156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110961623.5A Pending CN113720337A (en) 2021-08-20 2021-08-20 Map editing method and device for sweeping robot, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN113720337A (en)

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5519817A (en) * 1992-02-24 1996-05-21 Tokyo Gas Co., Ltd. Method and apparatus for searching line data in graphic data base system
JPH1131232A (en) * 1997-07-10 1999-02-02 Yamaha Corp Method and device for plotting polygon
CN101101203A (en) * 2006-07-05 2008-01-09 三星电子株式会社 Apparatus, method, medium and mobile robot using characteristic point for dividing area
CN102073975A (en) * 2009-11-20 2011-05-25 株式会社理光 User terminal apparatus, drawing processing system and drawing processing method
CN103092524A (en) * 2013-01-31 2013-05-08 广东欧珀移动通信有限公司 Method for realizing screenshot through touch screen and mobile terminal
US20150109400A1 (en) * 2012-06-05 2015-04-23 Huawei Technologies Co., Ltd. Method, Apparatus and System for Controlling Multipicture Display
CN106530946A (en) * 2016-11-30 2017-03-22 北京贝虎机器人技术有限公司 Indoor map editing method and device
CN106793905A (en) * 2014-08-19 2017-05-31 三星电子株式会社 Clean robot and the control device for clean robot, control system and control method
CN107000207A (en) * 2014-09-24 2017-08-01 三星电子株式会社 The method of clean robot and control clean robot
US20180074508A1 (en) * 2016-09-14 2018-03-15 Irobot Corporation Systems and methods for configurable operation of a robot based on area classification
CN110081885A (en) * 2019-04-02 2019-08-02 北京云迹科技有限公司 Operation area partitioning method and device
CN110415315A (en) * 2019-06-27 2019-11-05 五八有限公司 Touch method, apparatus, terminal and the storage medium in map making region
US20200069138A1 (en) * 2018-08-30 2020-03-05 Irobot Corporation Map based training and interface for mobile robots
CN111429548A (en) * 2020-02-25 2020-07-17 合肥四相至新科技有限公司 Digital map generation method and system
CN111596817A (en) * 2020-04-24 2020-08-28 维沃移动通信有限公司 Icon moving method and electronic equipment
CN112022002A (en) * 2020-08-21 2020-12-04 苏州三六零机器人科技有限公司 Map editing method, device, equipment and storage medium for sweeper

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5519817A (en) * 1992-02-24 1996-05-21 Tokyo Gas Co., Ltd. Method and apparatus for searching line data in graphic data base system
JPH1131232A (en) * 1997-07-10 1999-02-02 Yamaha Corp Method and device for plotting polygon
CN101101203A (en) * 2006-07-05 2008-01-09 三星电子株式会社 Apparatus, method, medium and mobile robot using characteristic point for dividing area
CN102073975A (en) * 2009-11-20 2011-05-25 株式会社理光 User terminal apparatus, drawing processing system and drawing processing method
US20150109400A1 (en) * 2012-06-05 2015-04-23 Huawei Technologies Co., Ltd. Method, Apparatus and System for Controlling Multipicture Display
CN103092524A (en) * 2013-01-31 2013-05-08 广东欧珀移动通信有限公司 Method for realizing screenshot through touch screen and mobile terminal
CN106793905A (en) * 2014-08-19 2017-05-31 三星电子株式会社 Clean robot and the control device for clean robot, control system and control method
CN107000207A (en) * 2014-09-24 2017-08-01 三星电子株式会社 The method of clean robot and control clean robot
US20180074508A1 (en) * 2016-09-14 2018-03-15 Irobot Corporation Systems and methods for configurable operation of a robot based on area classification
CN106530946A (en) * 2016-11-30 2017-03-22 北京贝虎机器人技术有限公司 Indoor map editing method and device
US20200069138A1 (en) * 2018-08-30 2020-03-05 Irobot Corporation Map based training and interface for mobile robots
CN110081885A (en) * 2019-04-02 2019-08-02 北京云迹科技有限公司 Operation area partitioning method and device
CN110415315A (en) * 2019-06-27 2019-11-05 五八有限公司 Touch method, apparatus, terminal and the storage medium in map making region
CN111429548A (en) * 2020-02-25 2020-07-17 合肥四相至新科技有限公司 Digital map generation method and system
CN111596817A (en) * 2020-04-24 2020-08-28 维沃移动通信有限公司 Icon moving method and electronic equipment
CN112022002A (en) * 2020-08-21 2020-12-04 苏州三六零机器人科技有限公司 Map editing method, device, equipment and storage medium for sweeper

Similar Documents

Publication Publication Date Title
CN111176301A (en) Map construction method and sweeping method of sweeping robot
WO2023051227A1 (en) Control method and apparatus for cleaning device
CN109426884B (en) Distribution scheme determination method, device and computer readable storage medium
EP3974778A1 (en) Method and apparatus for updating working map of mobile robot, and storage medium
CN103793178B (en) Vector graph editing method of touch screen of mobile device
CN108113580A (en) The method and sweeper of sweeper automatic cleaning regional area
CN112971645B (en) Cleaning method, cleaning device and computer storage medium
CN113080768A (en) Sweeper control method, sweeper control equipment and computer readable storage medium
CN109542278B (en) Touch data processing method and device and touch equipment
CN111857136A (en) Target map processing method and device
CN115268471A (en) Route generation method and device of sweeping robot and storage medium
CN110413161B (en) Component configuration method and device and electronic equipment
CN106708508B (en) A kind of interface data processing method and device
CN113720337A (en) Map editing method and device for sweeping robot, storage medium and electronic equipment
CN111898557B (en) Map creation method, device, equipment and storage medium of self-mobile equipment
CN110201394B (en) Generation method and device of accessory model, storage medium, processor and terminal
CN110428505B (en) Method for removing video projection interferents in three-dimensional map and computer storage medium
CN109363578B (en) Cleaning monitoring method and device, dust collector and mobile terminal
US11132002B2 (en) Method and device for displaying motion path of robot and robot
CN113806455A (en) Map construction method, map construction equipment and storage medium
CN103995638A (en) Data processing apparatus, data processing system, and non-transitory computer readable medium
CN110962132B (en) Robot system
CN113647866A (en) Cleaning method, cleaning device, storage medium, and electronic device
WO2023179398A1 (en) Map display method, apparatus, storage medium and electronic apparatus
CN107392843A (en) The method, apparatus and system of a kind of image procossing

Legal Events

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