Robot movement map generation method, device, equipment and storage medium

By real-time detection of the distance between the pointing position of the map editing pointing position and the alternative boundary point, the new boundary point is automatically determined and the closed area is generated, which solves the problem of complex and inaccurate generation of closed areas in the prior art, and improves the security of the robot's mobile map.

CN115493581BActive Publication Date: 2025-03-25KEENON ROBOTICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211173576.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-26
Publication Date
2025-03-25
Estimated Expiration
2042-09-26

AI Technical Summary

Technical Problem

In the prior art, the generation operation of the closed area on the robot mobile map is complicated and difficult to accurately locate, resulting in the generated closed area not being closed or multiple clicks are required to generate, reducing the security of the robot.

Method used

By detecting the edited pointing position in the map in real time, obtain the straight line distance between the position and the alternative boundary point, and compare it with the preset distance, respond to the click event to determine the new boundary point, and generate a closed area when the new boundary point coincides with the alternative boundary point.

Benefits of technology

The generation operation of closed areas on the map is simplified, the generation accuracy and drawing efficiency of closed areas are improved, and the safety of the robot is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115493581B_ABST
    Figure CN115493581B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, equipment and storage medium for generating a robot mobile map, wherein the method for generating a robot mobile map includes: detecting the edit pointing position in the map in real time, the map is generated by a sensor scanning the target environment; obtaining the straight-line distance between the edit pointing position and the alternative boundary point in the map, and comparing the straight-line distance with the preset distance; responding to a click event at the edit pointing position, determining a new boundary point according to the comparison result; generating a closed area when the new boundary point coincides with any alternative boundary point, so that the robot determines the movement strategy according to the closed area in the map. Through the above technical solution, the present invention simplifies the generation operation of the closed area on the robot mobile map, improves the accuracy of the generation of the closed area in the robot mobile map, improves the efficiency of drawing the closed area in the robot mobile map, and improves the safety of the robot.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of map technology, and in particular to a method, device, equipment and storage medium for generating a robot mobile map. Background Art

[0002] Currently, the robot's movement route needs to be planned according to the conditions of certain areas, which are usually specified in the map when the user builds the map.

[0003] Because the shape, size and outline of the area need to adapt to the actual environment, when generating these closed areas on the map, users need to manually close them. However, it is difficult to accurately locate the closed points, which results in the generated areas on the map not being closed or requiring repeated clicks to generate closed areas, making it difficult and complicated to generate these closed areas on the map, thereby reducing the safety of the robot. Summary of the invention

[0004] The present invention provides a robot movement map generation method, device, equipment and storage medium to simplify the generation operation of closed areas on the map, improve the accuracy of closed area generation in the robot movement map, improve the efficiency of drawing closed areas in the robot movement map, and improve the safety of the robot.

[0005] According to one aspect of the present invention, a method for generating a robot movement map is provided, comprising:

[0006] Real-time detection of edit pointing positions in a map generated by sensors scanning the target environment;

[0007] Obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compare the straight-line distance with the preset distance;

[0008] In response to a click event at the edit pointing position, determining a new boundary point according to the comparison result;

[0009] In the case where the new boundary point coincides with any candidate boundary point, a closed area is generated so that the robot determines the movement strategy according to the closed area in the map.

[0010] According to another aspect of the present invention, there is provided a robot movement map generating device, which is configured in a mobile transportation device, and comprises:

[0011] An editing pointing position detection module is used to detect the editing pointing position in the map in real time. The map is generated by the sensor scanning the target environment.

[0012] The edit distance detection module is used to obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compare the straight-line distance with the preset distance;

[0013] A click response module, for responding to a click event at the editing pointing position and determining a new boundary point according to a comparison result;

[0014] The closed area generation module is used to generate a closed area when a new boundary point coincides with any candidate boundary point, so that the robot determines a movement strategy according to the closed area in the map.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] at least one processor; and

[0017] a memory communicatively connected to at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the robot movement map generation method according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the robot movement map generation method of any embodiment of the present invention when executed.

[0020] The technical solution of the embodiment of the present invention is to detect the edit pointing position in the map in real time, the map is generated by the sensor scanning the target environment, obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compare the straight-line distance with the preset distance, and then respond to the click event at the edit pointing position, determine the new boundary point according to the comparison result, and generate a closed area when the new boundary point coincides with any candidate boundary point, so that the robot determines the movement strategy according to the closed area in the map. The above technical solution sets the candidate boundary point, compares the straight-line distance between the edit pointing position and the candidate boundary point in the map with the preset distance, determines the position of the new boundary point, and determines the generation of the closed area by judging whether the new boundary point coincides with any candidate boundary point in the map. Compared with the existing drawing that requires the user to accurately connect the endpoints to close the area, the generation operation of the closed area on the map is simplified, the accuracy of the generation of the closed area in the robot mobile map is improved, the efficiency of drawing the closed area in the robot mobile map is improved, and the safety of the robot is improved.

[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0023] Figure 1A is a flow chart of a method for generating a robot movement map according to Embodiment 1 of the present invention;

[0024] Figure 1B It is a moving process map of a closed area generated by a robot moving map generation method;

[0025] Figure 1C It is a replication process map of a closed area generated by a robot mobile map generation method;

[0026] Figure 1D It is a diagram of the generation process of new boundary points and new boundary lines in the process of generating a closed area by the robot mobile map generation method;

[0027] Figure 2A is a flow chart of a method for generating a robot movement map according to a second embodiment of the present invention;

[0028] Figure 2B It is a schematic diagram showing the animation effect at the editing pointing position during the closed area generation process;

[0029] Figure 3A is a flow chart of a method for generating a robot movement map according to Embodiment 3 of the present invention;

[0030] Figure 3B It is the result image of rasterizing the generated closed area;

[0031] Figure 3C It is a schematic diagram of color filling of the generated closed area;

[0032] Figure 3D It is another schematic diagram for color filling of the generated closed area;

[0033] Figure 4 is a schematic diagram of the structure of a robot movement map generating device provided according to Embodiment 3 of the present invention;

[0034] Figure 5 It is a structural schematic diagram of an electronic device for implementing the robot movement map generating method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0035] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0036] It should be noted that the terms "alternative", "target", "first", "second", "third", "left" and "right" in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices. In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of the data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.

[0037] Embodiment 1

[0038] Figure 1A This is a flowchart of a method for generating a robot movement map provided in the first embodiment of the present invention. This embodiment is applicable to the case of drawing an area on a map of robot navigation movement. The method can be executed by a robot movement map generating device. The robot movement map generating device can be implemented in the form of hardware and / or software. The robot movement map generating device can be configured in an electronic device, which can be a mobile phone, tablet, computer, vehicle-mounted terminal, robot or server, etc. Figure 1A As shown, the method includes:

[0039] S101, detecting in real time the editing pointing position in the map, where the map is generated by a sensor scanning a target environment.

[0040] The editing pointing position may be a position to be edited, for example, in a map editing interface, it may be the position where the user's mouse is located. The target environment refers to the actual working environment of the robot, which may include: restaurants, hotels, hospitals, warehouses, production workshops or residences.

[0041] Specifically, a sensor is used to scan the target environment, and a corresponding map is generated according to the scanning result, and then the map is displayed, and the editing pointing position in the map is detected in real time. The sensor can be a laser sensor, such as a laser radar, or a visual sensor, such as a camera.

[0042] Exemplarily, a laser radar is used to scan a restaurant and generate a map of the overall environment of the restaurant. The map is displayed in a corresponding interface in an electronic device, and the mouse position in the map is detected in real time.

[0043] S102: Obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compare the straight-line distance with a preset distance.

[0044] Among them, the boundary points include points on the boundary line of the closed area in the map. The candidate boundary points may refer to the boundary points of a closed area to be generated in the map, which can be used to form the corresponding closed area. When a closed area is generated, the candidate boundary points constituting the closed area are updated to the actual boundary points of the closed area, and accordingly, the candidate boundary points do not exist in the map at this time. In fact, multiple candidate boundary points in the map may belong to the same closed area. The so-called closed area to be generated refers to an area that has not yet been closed, which can be closed by connecting the existing boundaries to generate a closed area.

[0045] Among them, the straight-line distance may refer to the distance between the edited pointing position and the alternative boundary point, which can be specifically calculated by the length of the line segment formed by the point pointed to by the edited pointing position and the alternative boundary point and the drawing scale. The preset distance is used to compare with the straight-line distance to determine whether a prompt can be generated for a closed area. The preset distance can be set as needed. Exemplarily, the preset distance can be determined based on the width of the robot and the obstacle avoidance distance. For another example, it can be determined based on the width of the user. For another example, it can be determined based on the actual environment, such as the ground material, the width of the aisle, or the placement and display of items. Exemplarily, the preset distance can be 1m. Exemplarily, if the robot width is 1m and the obstacle avoidance distance is 0.3m, the preset distance can be 1.6m.

[0046] Exemplarily, a distance perception function on the map is used to obtain the straight-line distance between the edit pointing position and the alternative boundary point in the map, and the straight-line distance is compared with the preset distance. The distance perception function on the map may be LngLat.distance. The distance perception function is used to calculate the straight-line distance between two points on the map. Exemplarily, the drawing straight-line distance between the edit pointing position and the coordinates of the alternative boundary point in the map can be determined based on the coordinates of the edit pointing position and the coordinates of the alternative boundary point in the map, and then the actual straight-line distance between the two can be determined based on the drawing scale, and the actual straight-line distance can be compared with the preset distance.

[0047] S103: In response to a click event at the editing pointing position, determine a new boundary point according to the comparison result.

[0048] The click event may refer to an event generated by a click operation input by a user at the edit pointing position, and specifically may refer to an event generated by a user clicking a mouse at the edit pointing position where the mouse icon is located in the map. The comparison result may include: the straight-line distance between the edit pointing position and the candidate boundary point in the map is greater than a preset distance; or the straight-line distance between the edit pointing position and the candidate boundary point in the map is less than or equal to a preset distance. The new boundary point and the pre-generated candidate boundary point are used to generate the same closed area.

[0049] Specifically, determining the new boundary point according to the comparison result may be detecting whether the new boundary point to be generated coincides with the candidate boundary point according to the comparison result, thereby determining whether to generate the new boundary point.

[0050] Furthermore, when there is no candidate boundary point in the map, in response to a click event at the edit pointing position, a candidate boundary point is generated at the edit pointing position.

[0051] S104: When the new boundary point coincides with any candidate boundary point, a closed area is generated, so that the robot determines a movement strategy according to the closed area in the map.

[0052] Among them, the new boundary point coincides with any alternative boundary point, indicating that the new boundary point and a certain alternative boundary point can be regarded as the same point. Specifically, it indicates that the overlapping alternative boundary point is used as the starting point, the new boundary point is used as the end point, and other alternative boundary points and the new boundary point (overlapping alternative boundary points) are connected. The area formed by multiple connecting lines is determined to be a closed area.

[0053] The robot determines the movement strategy according to the closed area in the map by configuring attributes for the closed area in the map. In the process of planning the movement route, the robot can determine the movement strategy of the robot according to the attributes set in at least one closed area in the map. The movement strategy may include the movement route and / or the movement state, etc. Exemplarily, the attribute may include at least one of the following: information on whether it is passable and information on the change of the movement speed, etc.

[0054] The robot may be a robot in any scenario. For example, the robot may be a restaurant delivery robot, a warehouse handling robot, a production workshop transport robot, or a household cleaning robot.

[0055] Exemplarily, the robot is a restaurant delivery robot. The closed area generated by the overlap of the new boundary point and any candidate boundary point includes fixed obstacles, and the closed area can be set as a no-go zone. The restaurant delivery robot obtains information about the closed area and chooses other routes to bypass the closed area.

[0056] For example, the robot is a warehouse handling robot. The closed area generated by the overlap of the new boundary point and any candidate boundary point is an area where warehouse personnel move less frequently. The closed area is set as an acceleration area, and the warehouse handling robot obtains information about the closed area and chooses to accelerate through the closed area.

[0057] Exemplarily, the robot is a household cleaning robot. The closed area generated by the overlap of the new boundary point and any candidate boundary point is an area in the house where family members frequently move around. The closed area is set as a deceleration area, and the household cleaning robot obtains information about the closed area and chooses to decelerate through the closed area.

[0058] The technical solution of the embodiment of the present invention detects the edit pointing position in the map in real time, and the map is generated by scanning the target environment by the sensor, and then obtains the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compares the straight-line distance with the preset distance, and then responds to the click event at the edit pointing position. According to the comparison result, a new boundary point is determined, and when the new boundary point coincides with any candidate boundary point, a closed area is generated, so that the robot determines the movement strategy according to the closed area in the map. The above technical solution sets the candidate boundary point, compares the straight-line distance between the edit pointing position and the candidate boundary point in the map with the preset distance, determines the position of the new boundary point, and determines the generation of the closed area by judging whether the new boundary point coincides with any candidate boundary point in the map. Compared with the existing drawing that requires the user to accurately connect the endpoints to close the area, the generation operation of the closed area on the map is simplified, the accuracy of the generation of the closed area in the robot mobile map is improved, the efficiency of drawing the closed area in the robot mobile map is improved, and the safety of the robot is improved.

[0059] It should be understood that the closed area generated by the robot mobile map generation method can be moved and copied.

[0060] For example, after the closed area is drawn, if it is found that the position of the closed area is offset, the closed area can be moved by pressing and dragging the closed area, thereby adjusting the position of the closed area. Figure 1BAs shown, after the closed area is drawn, it is at the left position (where the dotted closed area is located). The user can continue to hold down the closed area with the mouse and drag it to the right position (where the solid closed area is located), thereby adjusting the position of the closed area in the map and improving drawing efficiency.

[0061] For example, the enclosed area drawn on the map for a symmetrical site is repeated, which can be achieved by holding down the ctrl key on the keyboard while dragging the enclosed area, which can reduce the number of manual editing of the enclosed area. Figure 1C As shown, from left to right, the first rectangle is the first generated closed area, and the second rectangle (the rectangle in the middle) is the same as the first rectangle. You can hold down the ctrl key on the keyboard and drag the first rectangle to get the second rectangle. Similarly, you can hold down the ctrl key on the keyboard and drag the second rectangle to get the third rectangle. Finally, you get three identical rectangles, which improves drawing efficiency.

[0062] On the basis of the above embodiment, as an optional manner of the embodiment of the present invention, the robot mobile map generation method, before responding to a click event at the editing pointing position, may also include: obtaining an alternative boundary point generated at the moment before the current moment; generating a line between the editing pointing position and the alternative boundary point generated at the moment before the current moment; while determining a new boundary point based on the comparison result, it also includes: constructing a line segment between the alternative boundary point generated at the moment before the current moment and the new boundary point as the boundary line of the closed area; and updating the alternative boundary point generated at the moment before the current moment according to the new boundary point.

[0063] Among them, generally speaking, alternative boundary points can be generated one by one, and different alternative boundary points are generated at different times. The line between the edit pointing position and the alternative boundary point generated at the previous moment is used to display the position of the alternative boundary point generated at the previous moment, and to display the boundary formed by the alternative boundary point to be generated at the current moment and the alternative boundary point generated at the previous moment. The boundary line is used to form the boundary of a closed area to distinguish the closed area from other areas on the map. When determining a new boundary point, the new boundary point is actually the alternative boundary point generated at the current moment. If the area continues to be drawn, the current moment has been updated, and the original current moment becomes the moment before the updated current moment. At the same time, the new boundary point is the alternative boundary point generated at the moment before the edit pointing position at the current moment, and the new boundary point is connected to the edit pointing position at the current moment.

[0064] For example, Figure 1DAs shown, the alternative boundary point 10 generated at the previous moment is obtained; a line 30 is generated between the editing pointing position 20 and the alternative boundary point 10 generated at the previous moment; when the editing pointing position 20 moves, when determining a new boundary point 50, a line segment 60 between the alternative boundary point 10 generated at the previous moment and the new boundary point 50 is constructed as the boundary line of the closed area, and the new boundary point 50 becomes the alternative boundary point generated at the previous moment.

[0065] The technical solution of the embodiment of the present invention generates a line between the edit pointing position and the alternative boundary point generated at the previous moment by acquiring the alternative boundary point generated at the previous moment, and then determines the new boundary point based on the comparison result, constructs a line segment between the alternative boundary point generated at the previous moment and the new boundary point as the boundary line of the closed area, and then updates the alternative boundary point generated at the previous moment based on the new boundary point. The above technical solution can ensure that in the process of drawing a closed area, the edit pointing position is always connected to the boundary point generated at the previous moment before the closed area is generated, so that the user can clearly know the boundary of the closed area being drawn, and the user can more intuitively browse the shape of the drawing area, thereby assisting the user to draw an area of ​​a specified shape, thereby improving the accuracy of the generation of closed areas in the robot mobile map.

[0066] Embodiment 2

[0067] Figure 2A This is a flowchart of a method for generating a robot mobile map provided in the second embodiment of the present invention. Based on the above embodiments, the present embodiment of the present invention specifies the "preset distance" as follows: the preset distance is determined according to the minimum travel distance of the robot, and "determine a new boundary point according to the comparison result" as follows: when the distance between the edit pointing position and each candidate boundary point is greater than the minimum travel distance, the edit pointing position is determined as a new boundary point; when the distance between the edit pointing position and the target candidate boundary point is less than or equal to the minimum travel distance, the target candidate boundary point is determined as a new boundary point. Figure 2A As shown, the method specifically includes:

[0068] S201, detecting the edited pointing position in a map in real time, where the map is generated by a sensor scanning a target environment.

[0069] S202: Obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compare the straight-line distance with a preset distance, where the preset distance is determined according to the minimum travel distance of the robot.

[0070] Among them, the minimum travel distance may refer to the minimum width that the robot can pass through. The closed area in the map is used in the application scenario of robot movement. Correspondingly, if the distance between two points is less than the minimum travel distance, it means that the robot cannot form a channel with the two points as the boundary. Therefore, even if there is a certain distance between the two points, they can be considered as the same point for the robot. Specifically, the minimum travel distance of the robot can be determined as a preset distance. Or the sum of the minimum travel distance and the preset distance threshold can be determined as the preset distance.

[0071] S203: Respond to a click event at the editing pointing position.

[0072] S204, detecting whether the distance between the edit pointing position and each candidate boundary point is greater than the minimum pass distance, if yes, executing S205; otherwise, executing S206.

[0073] S205: When the distance between the edit pointing position and each candidate boundary point is greater than the minimum pass distance, the edit pointing position is determined as a new boundary point, and S202 is executed.

[0074] Specifically, when the distance between the edit pointing position and the target candidate boundary point is greater than the minimum pass distance, it indicates that the distance between the edit pointing position and the target candidate boundary point is far, and the robot can pass through, thereby determining that the user needs to generate a new boundary point.

[0075] S206 . When the distance between the edit pointing position and the target candidate boundary point is less than or equal to the minimum travel distance, the target candidate boundary point is determined as a new boundary point, and S207 is executed.

[0076] The target candidate boundary point may refer to a candidate boundary point whose distance from the edit pointing position is less than or equal to the minimum travel distance. The target candidate boundary point may be the first generated candidate boundary point or any one of the pre-generated candidate boundary points.

[0077] Specifically, when the distance between the edit pointing position and the target alternative boundary point is less than or equal to the minimum travel distance, it indicates that the edit pointing position is within the preset distance range of the target alternative boundary point. At this time, it is considered that the new boundary point generated by clicking the mouse at the edit pointing position is too close to the target alternative boundary point, and the robot cannot pass through the channel formed by the two points. Therefore, the new boundary point and the target alternative boundary point can be regarded as the same point, so the target alternative boundary point is determined as the new boundary point.

[0078] S207: When the new boundary point coincides with any candidate boundary point, a closed area is generated so that the robot determines a movement strategy according to the closed area in the map.

[0079] The technical solution of the embodiment of the present invention detects whether to generate a new boundary point at the edit pointing position according to the minimum travel distance of the robot, and when the distance between the edit pointing position and the target candidate boundary point is less than or equal to the minimum travel distance, the target candidate boundary point is determined as the new boundary point, which simplifies the generation operation of closed areas on the map, improves the efficiency of drawing closed areas in the robot's mobile map, and improves the accuracy of generating closed areas in the robot's mobile map, so that the robot can avoid danger during movement, thereby improving the safety of the robot.

[0080] On the basis of the above embodiments, as an optional method of the embodiments of the present invention, the robot mobile map generation method, before comparing the straight-line distance with the preset distance, may also include: obtaining the actual minimum pass size of the robot, the actual minimum pass size corresponding to the type of robot; obtaining the size scaling ratio between the map and the corresponding real area; adjusting the actual minimum pass size according to the size scaling ratio to determine the minimum pass distance of the robot.

[0081] The actual minimum pass size may include the width of the robot and / or the height of the robot, etc. The type of robot may include a cleaning robot and / or a transportation robot, etc. The actual area may refer to the area where the robot actually works. The size scaling ratio is used to determine the distance between the pixels of the map and the actual area. The size scaling ratio is determined according to the ratio between the unit distance of the map and the unit distance of the actual area. That is, the ratio of the minimum pass distance to the actual minimum pass size is the size scaling ratio.

[0082] For example, the actual minimum passage size of the robot is 1.2m, the pixels of the current map are 400 pixels*400 pixels, and the actual area corresponding to the map is 20m*20m. Then the actual distance of the current map corresponding to 1 pixel is: 1pixel=20 / 400=0.05m, that is, the size scaling ratio of the current map is 0.05.

[0083] In the above formula, pixel represents one pixel. If the actual minimum pass size of the robot is known to be 1.2m and the current map size scaling ratio is 0.05m, the minimum pass distance = actual minimum pass size / current map size scaling ratio, that is, the minimum pass distance = 1.2 / 0.05 = 24 pixels.

[0084] Specifically, the type of robot corresponds to different models, and the width and height of robots of different models may be different. Therefore, the actual minimum pass size of the robot can be determined according to the type of robot. The size scaling ratio between the map and the corresponding real area is obtained in order to accurately draw the closed area on the map. According to the size scaling ratio, the actual minimum pass size of the robot is scaled to the map according to the same size scaling ratio, and then the minimum pass distance of the robot is determined according to the width of the minimum pass size of the robot on the map.

[0085] The technical solution of the embodiment of the present invention adjusts the actual minimum pass size of the robot according to the size scaling ratio between the map and the corresponding real area, thereby improving the accuracy of the robot's minimum pass distance detection.

[0086] On the basis of the above embodiment, as an optional method of the embodiment of the present invention, the robot mobile map generation method, after comparing the straight-line distance with the preset distance, may also include: when the distance between the editing pointing position and any alternative boundary point is less than or equal to the preset distance, generating an animation effect at the editing pointing position to prompt the user that a closed area can be generated; when the distance between the editing pointing position detected again and each alternative boundary point is greater than the preset distance, stopping the generation of the animation effect.

[0087] The animation effect may refer to an animation effect for prompting the user to generate a closed area by clicking the mouse at the edit pointing position. The animation effect may include bolding and flashing the edit pointing position, generating a dotted line connecting the target candidate boundary point and the edit pointing position, or color magnification of the edit pointing position.

[0088] Specifically, taking the preset distance as the minimum travel distance of the robot as an example, when the straight-line distance between the editing pointing position and the target alternative boundary point is less than or equal to the minimum travel distance of the robot, an animation effect is generated at the editing pointing position to prompt the user to click the mouse here to generate a closed area; if the user does not want to click the mouse at the editing pointing position at the current moment, but moves the mouse to other positions, the editing pointing position changes at this time, and it is necessary to re-detect the editing pointing position and re-detect the distance between the editing pointing position and each alternative boundary point. If the straight-line distance between the editing pointing position and each alternative boundary point is greater than the minimum travel distance of the robot, stop generating the animation effect at the editing pointing position.

[0089] For example, the animation effect is to bold and flash at the editing pointing position. Figure 2B As shown, Figure 2BThe arrow in represents the editing pointing position. Assume that the straight-line distance between the editing pointing position and the earliest generated candidate boundary point in a is less than or equal to the minimum travel distance of the robot, and the straight-line distance between the editing pointing position and the earliest generated candidate boundary point in b is greater than the minimum travel distance of the robot. Then a bold flashing rectangle will appear at the editing pointing position in a to prompt the user "click the mouse here to generate a closed area". At this time, the user's confirmation operation can be responded to. The confirmation operation can be, for example, the user clicks the mouse to use the earliest generated candidate boundary point as the new boundary point, that is, a closed area is generated; b describes the result after the user sees the prompt at the editing pointing position in a and does not want to generate a closed area at the editing pointing position, and moves the editing pointing position to another position. Compared with the editing pointing position in a, the editing pointing position in b has changed, and it is necessary to re-detect the editing pointing position and re-detect the distance between the editing pointing position and each candidate boundary point. It is found that the distance between the editing pointing position and each candidate boundary point is greater than the minimum travel distance of the robot, and the editing pointing position stops flashing boldly.

[0090] The technical solution of the embodiment of the present invention generates an animation effect at the editing pointing position when the distance between the editing pointing position and any candidate boundary point is less than or equal to the minimum pass distance, so as to prompt the user that a closed area can be generated; when the distance between the editing pointing position and each candidate boundary point detected again is greater than the minimum pass distance, the generation of the animation effect is stopped. This ensures the accurate generation of the closed area, improves the accuracy of the generation of the closed area in the robot's mobile map, and thus improves the safety of the robot.

[0091] Embodiment 3

[0092] Figure 3A This is a flowchart of a robot mobile map generation method provided according to the third embodiment of the present invention. Based on the above embodiment, the present embodiment further optimizes the above robot mobile map generation method. After generating the closed area, it can also include: obtaining the boundary line of the closed area, the boundary line is determined by smoothing; rasterizing the boundary line of the closed area to obtain the grid vertices corresponding to the boundary line; connecting the grid vertices corresponding to each boundary line to update the closed area. Figure 3A As shown, the method specifically includes:

[0093] S301 , detecting in real time the editing pointing position in the map, where the map is generated by a sensor scanning the target environment.

[0094] S302: Obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compare the straight-line distance with a preset distance.

[0095] S303: In response to a click event at the editing pointing position, determine a new boundary point according to the comparison result.

[0096] S304: When the new boundary point coincides with any candidate boundary point, a closed area is generated.

[0097] S305: Obtain the boundary line of the closed area, where the boundary line is determined through smoothing.

[0098] Among them, smoothing can refer to using color adjustment technology to process the sharp places of the boundary line of the closed area, and adjust the pixels there from the original black and white pixels to black, white and gray three-color pixels, so that the transition from outside the closed area to inside the closed area is smoother.

[0099] In the process of generating a closed area, the drawing tool performs smoothing on the boundary lines of the closed area drawn on the canvas by default.

[0100] S306 , performing rasterization processing on the boundary lines of the closed area to obtain grid vertices corresponding to the boundary lines.

[0101] Among them, the rasterization process is used to sharpen the border line of the closed area, and convert the pixels in the grid through which the border line passes from gray pixels to black or white pixels, so that the border line of the closed area can be accurate to each pixel. One grid is one pixel. Specifically, the grid through which the border line of the closed area passes is converted into a line along the grid boundary. The grid through which the border line passes is obtained, and the vertices of the grid through which it passes are determined, and determined as the grid vertices corresponding to the border line.

[0102] For example, Figure 3B As shown in the figure, the left image is a closed area drawn on the canvas. The Bresenham algorithm is used to rasterize the border lines of the dotted frame of the closed area in the left image, converting this part of the border lines into grid vertices, and connecting these grid vertices to obtain the rasterized appearance of this part of the border lines in the right image. Among them, the Bresenham algorithm is a straight line rasterization algorithm in computer graphics.

[0103] S307: Connect the grid vertices corresponding to the boundary lines and update the closed area, so that the robot determines the movement strategy according to the closed area in the map.

[0104] Specifically, the Bresenham algorithm is used to rasterize the boundary lines of the closed area to obtain grid vertices corresponding to each boundary line, and these grid vertices are connected so that the boundary line of the closed area will not split a grid, so that the closed area only includes complete grids, and the boundary line of the closed area is updated so that each grid vertex on the boundary line of the closed area corresponds to a black pixel, so that the robot determines the movement strategy according to the closed area in the map.

[0105] Exemplarily, the robot can recognize black pixels and white pixels, but cannot recognize grayscale pixels. Black pixels represent inaccessible areas, and white pixels represent accessible areas. The robot determines whether it is accessible by detecting the boundary line of the closed area. However, there are gray pixels on the smooth boundary line, which makes it impossible for the robot to correctly identify whether it is accessible. For the rasterized boundary line, after obtaining the boundary line of the closed area, the robot analyzes whether the grid vertex corresponding to the boundary line of the closed area is a black pixel. If the grid vertex corresponding to the boundary line of the closed area is a black pixel, the robot believes that this place is inaccessible and chooses other routes to bypass the area. If the grid vertex corresponding to the boundary line of the closed area is not a black pixel but a white pixel, the robot believes that this place is accessible and then chooses whether to enter the area and at what speed to pass through the area. For example, the robot chooses to enter the area and accelerate through the area.

[0106] The technical solution of the embodiment of the present invention performs rasterization on the boundary lines of closed areas so that the closed areas can be distinguished by black and white pixels, avoiding the appearance of grayscale pixels in the boundary lines of closed areas, allowing the robot to accurately identify whether it is passable, thereby improving the accuracy of closed area generation in the robot's mobile map and further improving the safety of the robot.

[0107] On the basis of the above-mentioned embodiment, as an optional method of the embodiment of the present invention, after generating a closed area, it may also include: obtaining functional parameters of multiple closed areas, and determining that the functional parameters include an area where passage is prohibited, and determining it as a target area; obtaining a prohibited area on a map, and determining it as a target area, and the prohibited area on the map is determined by sensor scanning; obtaining the minimum interval distance between any two target areas; comparing the minimum passage distance of the robot with each minimum interval distance; and adjusting the boundary line of each target area according to the comparison result.

[0108] Among them, multiple closed areas refer to at least two closed areas. The area where passage is prohibited is referred to as a prohibited area. Functional parameters are used to indicate the functions of the closed areas and can be set in advance as needed. Exemplarily, the functions of the closed areas are numbered in advance, and the set numbers are the functional parameters. For example, "1" is set as a prohibited area, "2" is set as an acceleration area, and "3" is set as a deceleration area, where 1, 2 and 3 are functional parameters.

[0109] The target area may refer to a prohibited area, which may specifically include a closed area with a function set to be prohibited, and / or a prohibited area on a map. A prohibited area on a map may include a prohibited area obtained by a sensor scan, such as a wall. A prohibited area on a map is usually an area obtained by scanning, rather than a drawn closed area. The minimum spacing distance between any two target areas may refer to the shortest straight-line distance between the boundary lines of the two target areas.

[0110] Specifically, functional parameters of multiple closed areas are obtained, and according to the obtained functional parameters, a prohibited area in the closed area is found, and the prohibited area is determined as the target area, and / or a prohibited area in the map is found in advance through sensor scanning, and the prohibited area is determined as the target area. The minimum interval distance between any two target areas is obtained, and the minimum travel distance of the robot is compared with the minimum interval distance between any two target areas. If the minimum travel distance of the robot is less than or equal to the minimum interval distance between any two target areas, the boundary lines of each target area are kept unchanged. If the minimum travel distance of the robot is greater than the minimum interval distance between any two target areas, the two target areas whose minimum interval distance is less than the minimum travel distance of the robot are merged to generate a new target area, and the boundary line of the target area is readjusted.

[0111] Exemplarily, the closed area numbered "1" is a no-entry zone. The functional parameters of the six closed areas are obtained, and according to the number of each closed area, the closed area numbered "1" among the six closed areas is found, and one of these closed areas is selected as the first target area; a map no-entry area in the map is found through sensor scanning, and the map no-entry area is determined as the second target area; the minimum interval distance between the first target area and the second target area is obtained; and the minimum travel distance of the robot is compared with the minimum interval distance. If the minimum travel distance of the robot is less than or equal to the minimum interval distance, it means that the robot can safely pass through the minimum interval distance, so the boundary line between the first target area and the second target area is not adjusted; if the minimum travel distance of the robot is greater than the minimum interval distance, it means that the robot cannot pass through the minimum interval distance, so it is necessary to adjust the boundary line of the first target area and the second target area, merge the first target area and the second target area into a new target area, that is, a new no-entry zone, and adjust the boundary line of the no-entry zone.

[0112] The technical solution of the embodiment of the present invention compares the minimum travel distance of the robot with the minimum spacing distance between any two prohibited areas, and adjusts the boundary lines of any two prohibited areas based on the comparison results, thereby achieving reasonable correction of the boundary lines of the prohibited areas, avoiding the situation where the aisles between the drawn closed areas are too narrow and the robot cannot pass through, thereby improving the safety of the robot.

[0113] In addition, the closed area can be automatically filled with colors according to its function parameters, and different colors are used for different functions. After the closed area is generated, the method further includes: filling the closed area with colors according to the function parameters of the robot in the closed area.

[0114] The corresponding relationship between the function parameters and the colors can be preset. When setting the function parameters for the closed area, the closed area can be filled according to the color corresponding to the function parameters.

[0115] For example, each layer has the function and color of the corresponding closed area. Multiple layers are created according to the function and color of the closed area. When creating a layer, the function and color of the defined closed area are automatically assigned to the layer. Figure 3CAs shown, two layers are created, namely the first layer and the second layer. Now we plan to draw two closed areas, the first closed area is the obstacle area and the second closed area is the scheduling area. Assume that the color corresponding to the obstacle area is white and the color corresponding to the scheduling area is black. According to the function and color of the defined closed area, the first layer is set as the obstacle area, and its color is white, and the second layer is set as the scheduling area, and its color is black. At this time, if you draw a triangular closed area in the first layer, the function of the triangular closed area will be automatically changed to the obstacle area, and the color will be automatically filled with white. Similarly, if you draw a circular closed area in the second layer, the function of the circular closed area will be automatically changed to the scheduling area, and the color will be automatically filled with black.

[0116] For example, after the closed area is drawn, the user is provided with a corresponding color at the completion point. Figure 3D As shown in the figure, it is assumed that the closed area on the left side of the figure is the speed area, and the interface diagram on the right side is used to set the speed. At the same time, the color of the closed area is automatically filled according to different speeds by default. After drawing the closed area on the left side of the figure, the user selects the speed according to the interface diagram on the right side, and the drawing software automatically fills the color of the closed area on the left side according to the selected speed. For example, if the user sets the speed to slow, the drawing software automatically sets the color of the closed area on the left side to yellow.

[0117] By using different colors to distinguish different functions, the functional attributes of the area can be increased, and the use of color distinction can better enable the robot to identify, thereby performing corresponding mobile control, enriching map data, and improving the diversity of control.

[0118] Embodiment 4

[0119] Figure 4 This is a schematic diagram of the structure of a robot movement map generation device provided in Embodiment 4 of the present invention. This embodiment is applicable to the case of drawing an area on a map of robot navigation movement, and the robot movement map generation device can be implemented in the form of hardware and / or software, and the robot movement map generation device can be configured in an electronic device, which can be a mobile phone, a tablet, a computer, a vehicle-mounted terminal, a robot or a server, etc.

[0120] like Figure 4 As shown, the device comprises:

[0121] The editing pointing position detection module 401 is used to detect the editing pointing position in the map in real time, and the map is generated by the sensor scanning the target environment;

[0122] The edit distance detection module 402 is used to obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and compare the straight-line distance with a preset distance;

[0123] A click response module 403, for responding to a click event at the editing pointing position and determining a new boundary point according to the comparison result;

[0124] The closed area generating module 404 is used to generate a closed area when the new boundary point coincides with any candidate boundary point, so that the robot determines the movement strategy according to the closed area in the map.

[0125] The technical solution of the embodiment of the present invention is to detect the edit pointing position in the map in real time through the edit pointing position detection module, and the map is generated by scanning the target environment by the sensor, and then the edit distance detection module is used to obtain the straight-line distance between the edit pointing position and the candidate boundary point in the map, and the straight-line distance is compared with the preset distance, and then the click response module is used to respond to the click event at the edit pointing position, and the new boundary point is determined according to the comparison result, and then the closed area generation module is used to generate a closed area when the new boundary point coincides with any candidate boundary point, so that the robot determines the movement strategy according to the closed area in the map. The above technical solution, by setting the alternative boundary point, compares the straight-line distance between the edit pointing position and the candidate boundary point in the map with the preset distance, to determine the position of the new boundary point, and determines the generation of the closed area by judging whether the new boundary point coincides with any candidate boundary point in the map. Compared with the existing drawing that requires the user to accurately connect the endpoints to close the area, the generation operation of the closed area on the map is simplified, the accuracy of the generation of the closed area in the robot mobile map is improved, the drawing efficiency of the closed area in the robot mobile map is improved, and the safety of the robot is improved.

[0126] Optionally, the preset distance is determined according to the minimum travel distance of the robot, and the edit distance detection module 402 is specifically used to: when the distance between the edit pointing position and each alternative boundary point is greater than the minimum travel distance, determine the edit pointing position as a new boundary point; when the distance between the edit pointing position and the target alternative boundary point is less than or equal to the minimum travel distance, determine the target alternative boundary point as the new boundary point.

[0127] Optionally, the robot movement map generating device may further include:

[0128] A minimum pass size acquisition module is used to obtain the actual minimum pass size of the robot before comparing the straight-line distance with the preset distance, and the actual minimum pass size corresponds to the type of the robot;

[0129] A size scaling ratio acquisition module is used to obtain the size scaling ratio between the map and the corresponding real area;

[0130] The minimum travel distance determination module is used to adjust the actual minimum travel size according to the size scaling ratio to determine the minimum travel distance of the robot.

[0131] Optionally, the robot movement map generating device may further include:

[0132] An animation special effect generation module, for generating an animation special effect at the editing pointing position after comparing the straight-line distance with the preset distance, if the distance between the editing pointing position and any candidate boundary point is less than or equal to the preset distance, to prompt the user that a closed area can be generated;

[0133] The animation special effect stopping module is used to stop generating the animation special effect when the distance between the editing pointing position detected again and each candidate boundary point is greater than a preset distance.

[0134] Optionally, the robot movement map generating device may further include:

[0135] A boundary line acquisition module is used to acquire the boundary line of the closed area after the closed area is generated, and the boundary line is determined by smoothing;

[0136] A grid vertex acquisition module is used to perform rasterization processing on the boundary lines of the closed area to obtain grid vertices corresponding to the boundary lines;

[0137] The closed area update module is used to connect the grid vertices corresponding to each boundary line and update the closed area.

[0138] Optionally, the robot movement map generating device may further include:

[0139] A candidate boundary point acquisition module, used to acquire a candidate boundary point generated at a previous moment before the current moment, before responding to a click event at the editing pointing position;

[0140] A line generation module, used to generate a line between the edit pointing position and the candidate boundary point generated at the previous moment;

[0141] A boundary line construction module is used to determine a new boundary point according to the comparison result, and to construct a line segment between the candidate boundary point generated at the previous moment and the new boundary point as the boundary line of the closed area;

[0142] The candidate boundary point updating module is used to update the candidate boundary points generated at the previous moment according to the new boundary points.

[0143] Optionally, the robot movement map generating device may further include:

[0144] The target area determination module is used to obtain the functional parameters of multiple closed areas after the closed area is generated, and determine the functional parameters include a prohibited area, and determine it as the target area; obtain the prohibited area on the map, and determine it as the target area, and the prohibited area on the map is determined by sensor scanning;

[0145] A minimum interval distance acquisition module is used to obtain the minimum interval distance between any two target areas;

[0146] A comparison module, used for comparing the minimum travel distance of the robot with each minimum interval distance;

[0147] The boundary line adjustment module is used to adjust the boundary lines of each target area according to the comparison result.

[0148] The robot movement map generating device provided in the embodiment of the present invention can execute the robot movement map generating method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0149] Embodiment 5

[0150] Figure 5 A schematic diagram of the structure of an electronic device 500 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0151] like Figure 5 As shown, the electronic device 500 includes at least one processor 501, and a memory connected to the at least one processor 501 in communication, such as a read-only memory (ROM) 502, a random access memory (RAM) 503, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 501 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 502 or the computer program loaded from the storage unit 508 to the random access memory (RAM) 503. In RAM503, various programs and data required for the operation of the electronic device 500 can also be stored. The processor 501, ROM502 and RAM503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0152] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, such as a keyboard, a mouse, etc.; an output unit 507, such as various types of displays, speakers, etc.; a storage unit 508, such as a disk, an optical disk, etc.; and a communication unit 509, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 509 allows the electronic device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0153] The processor 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 501 executes the various methods and processes described above, such as a robot mobile map generation method.

[0154] In some embodiments, the robot movement map generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the processor 501, one or more steps of the robot movement map generation method described above can be performed. Alternatively, in other embodiments, the processor 501 can be configured to execute the robot movement map generation method in any other appropriate manner (for example, by means of firmware).

[0155] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0156] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0157] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0158] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0159] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0160] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0161] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0162] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for generating a robot mobile map, characterized in that: include: Real-time detection of the edited pointing position in a map generated by a sensor scanning a target environment; Obtaining a straight-line distance between the edit pointing position and a candidate boundary point in the map, and comparing the straight-line distance with a preset distance; wherein the candidate boundary point refers to a boundary point of an unclosed area in the map; In response to a click event at the editing pointing position, determining a new boundary point according to the comparison result; In the case where the new boundary point coincides with any candidate boundary point, generating a closed area so that the robot determines a movement strategy according to the closed area in the map; According to the comparison result, a new boundary point is determined, including: When the straight-line distance between the editing pointing position and the target candidate boundary point is greater than the preset distance, the editing pointing position is determined as a new boundary point; When the straight-line distance between the editing pointing position and the target candidate boundary point is less than or equal to the preset distance, the target candidate boundary point is determined as a new boundary point.

2. The method according to claim 1, characterized in that The preset distance is determined according to the minimum travel distance of the robot.

3. The method according to claim 2, characterized in that Before comparing the straight-line distance with the preset distance, the method further includes: Acquire an actual minimum passage size of the robot, where the actual minimum passage size corresponds to the type of the robot; Obtaining a size scaling ratio between the map and a corresponding real area; The actual minimum travel size is adjusted according to the size scaling ratio to determine the minimum travel distance of the robot.

4. The method according to claim 1, characterized in that: After comparing the straight-line distance with the preset distance, the method further includes: When the distance between the editing pointing position and any candidate boundary point is less than or equal to the preset distance, an animation effect is generated at the editing pointing position to prompt the user that a closed area can be generated; When the distance between the edit pointing position detected again and each of the candidate boundary points is greater than the preset distance, the generation of the animation special effect is stopped.

5. The method according to claim 1, characterized in that After generating the closed area, it also includes: Acquire a boundary line of the closed area, wherein the boundary line is determined by smoothing; Performing rasterization processing on the boundary lines of the closed area to obtain grid vertices corresponding to the boundary lines; The grid vertices corresponding to the boundary lines are connected to update the closed area.

6. The method according to claim 1, characterized in that Before responding to a click event at the editing pointing position, the method further includes: Get the candidate boundary points generated at the moment before the current moment; Generating a line between the editing pointing position and the candidate boundary point generated at the previous moment; While determining the new boundary point based on the comparison results, it also includes: Constructing a line segment between the candidate boundary point generated at the previous moment and the new boundary point as a boundary line of the closed area; The candidate boundary points generated at a moment before the current moment are updated according to the new boundary points.

7. The method according to claim 1, characterized in that After generating the closed area, it also includes: Acquire functional parameters of a plurality of closed areas, and determine that the functional parameters include a prohibited area as a target area; Obtaining a prohibited area on a map and determining it as a target area, wherein the prohibited area on the map is determined by scanning with a sensor; Obtaining the minimum interval distance between any two target areas; Comparing the minimum travel distance of the robot with each of the minimum separation distances; According to the comparison result, the boundary line of each target area is adjusted.

8. A robot mobile map generating device, characterized in that: include: An editing pointing position detection module, used for detecting in real time the editing pointing position in a map, wherein the map is generated by a sensor scanning a target environment; An edit distance detection module, used to obtain a straight-line distance between the edit pointing position and a candidate boundary point in the map, and compare the straight-line distance with a preset distance; wherein the candidate boundary point refers to a boundary point of an unclosed area in the map; A click response module, for responding to a click event at the editing pointing position and determining a new boundary point according to a comparison result; A closed area generation module, used for generating a closed area when the new boundary point coincides with any candidate boundary point, so that the robot determines a movement strategy according to the closed area in the map; Wherein, the edit distance detection module is specifically used for: When the straight-line distance between the editing pointing position and the target candidate boundary point is greater than the preset distance, the editing pointing position is determined as a new boundary point; When the straight-line distance between the editing pointing position and the target candidate boundary point is less than or equal to the preset distance, the target candidate boundary point is determined as a new boundary point.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the robot movement map generation method as described in any one of claims 1-7 is implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the robot movement map generation method as described in any one of claims 1-7 is implemented.

Citation Information

Patent Citations

  • Method and device for drawing area in map application and computer device

    CN110706306A

  • Operation path determination method and device, storage medium and electronic equipment

    CN111750883A