Robot mapping method, device, electronic device and storage medium

By storing the actual position of the vertex of the target area in the robot's map and drawing order index, the color noise problem caused by image storage is solved, and efficient and flexible functional area management is achieved.

CN115638785BActive Publication Date: 2025-08-12KEENON ROBOTICS CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211190541.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-28
Publication Date
2025-08-12
Estimated Expiration
2042-09-28

AI Technical Summary

Technical Problem

In the prior art, when saving the robot's functional area in the form of a picture, there is a color noise problem, which affects the analysis of the navigation algorithm, and it is impossible to modify the drawing content of the functional area.

Method used

By storing the actual position of the vertices of the target area and drawing sequential indexes, avoiding area filling and ensuring accurate positioning and modification of the target area.

Benefits of technology

It solves the color noise problem, improves the efficiency of map construction, simplifies data transmission, and supports flexible modification of functional areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115638785B_ABST
    Figure CN115638785B_ABST
Patent Text Reader

Abstract

The present invention discloses a robot mapping method, device, electronic device and storage medium, which relate to the field of robots. The specific implementation scheme includes: obtaining the environmental map of the target place sent by the robot operating system and rendering and displaying it; in response to the drawing operation of the target area on the environmental map, determining the drawing order index of each vertex of the target area, and the actual position of each vertex in the environmental map; storing the drawing order index and actual position of each vertex of the target area in the robot operating system. In the scheme of the present invention, when mapping, the drawn target area is saved by storing the actual position and drawing order index of the vertices of the area, so that the area filling does not need to be performed during the target area saving process, and the target area can also be modified by modifying the vertex position coordinates, which effectively solves the problems and limitations brought about by saving the target area in the form of pictures.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of robotics technology, and in particular to a robot mapping method, device, electronic device, and storage medium. Background Art

[0002] With the rapid development of the robotics industry, various service robots are emerging one after another, and robots are being used more and more widely in our lives and work.

[0003] Typically, before a robot begins working, it needs to create a navigation map of its workplace. This provides an important foundation for the robot's subsequent real-time positioning and navigation planning. Navigation maps often consist of two parts: an environmental map and a functional area. Both the functional area and the navigation map are transcoded and stored as images. However, this method of storing functional areas as images has certain problems and limitations. For example, when saving as images, the functional areas need to be filled with color, and this area filling may contain color noise, causing problems with the navigation algorithm's parsing and affecting the robot's normal movement. Furthermore, once the functional area is successfully saved, the drawn functional area cannot be modified. Summary of the Invention

[0004] The present invention provides a robot mapping method, device, electronic device and storage medium, which can effectively solve the problems and limitations brought about by the existing storage of functional areas through pictures.

[0005] According to one aspect of the present invention, a robot mapping method is provided, the method comprising:

[0006] Obtain the environment map of the target location sent by the robot operating system and render it for display;

[0007] In response to a drawing operation on a target area on the environment map, determining a drawing order index of each vertex of the target area and an actual position of each vertex in the environment map;

[0008] The drawing order index and the actual position of each vertex in the target area are stored in the robot operating system in correspondence.

[0009] According to another aspect of the present invention, a robot mapping device is provided, the device comprising:

[0010] The environment map acquisition module is used to obtain the environment map of the target location sent by the robot operating system and render and display it;

[0011] a position determination module, configured to determine, in response to a drawing operation on a target area on the environment map, a drawing order index of each vertex of the target area and an actual position of each vertex in the environment map;

[0012] The storage module is used to store the drawing order index and the actual position of each vertex in the target area in the robot operating system.

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

[0014] at least one processor; and

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

[0016] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can perform the robot mapping method described in the embodiment of the present invention.

[0017] 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 mapping method according to an embodiment of the present invention when executed.

[0018] The technical solution of the embodiment of the present invention saves the drawn target area by storing the actual positions of the vertices in the area and the drawing order index when building the map, so that the area filling does not need to be performed during the target area saving process, and there is no problem of introducing color noise; and the target area can also be modified by modifying the vertex position coordinates, which effectively solves the problems and limitations brought about by saving the target area in the form of an image.

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

[0020] 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.

[0021] Figure 1a 1 is a flow chart of a robot mapping method according to the first embodiment of the present invention;

[0022] Figure 1b This is a schematic diagram of drawing a target area on an environment map provided by Embodiment 1 of the present invention;

[0023] Figure 2a 1 is a flow chart of a robot mapping method according to the second embodiment of the present invention;

[0024] Figure 2b This is a relative position diagram of the drawn positions and actual positions of vertices after dragging the environment map according to the second embodiment of the present invention;

[0025] Figure 2c A relative position diagram of the drawn positions and actual positions of vertices after scaling the environment map according to the second embodiment of the present invention;

[0026] Figure 3a 1 is a flow chart of a robot mapping method according to a third embodiment of the present invention;

[0027] Figure 3b This is a schematic diagram of an elevator area drawn according to the third embodiment of the present invention;

[0028] Figure 4 2 is a schematic structural diagram of a robot mapping device according to a fourth embodiment of the present invention;

[0029] Figure 5 2 is a schematic diagram of the structure of an electronic device for implementing the robot mapping method according to an embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions 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 embodiments described 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 making creative efforts should fall within the scope of protection of the present invention.

[0031] Example 1

[0032] Figure 1a A flowchart of a robot mapping method is provided for the first embodiment of the present invention. This embodiment is applicable to robot mapping scenarios where functional areas are stored in the form of vertex position coordinates of the storage area. The method can be executed by a robot mapping device, which can be implemented in the form of hardware and / or software. The robot mapping device can be configured in an electronic device, such as a robot, a laptop computer, or a pad.

[0033] like Figure 1a As shown, the robot mapping method includes:

[0034] S101: Obtain an environment map of a target location sent by a robot operating system and render and display it.

[0035] The robot operating system can include Robot or ROS. This embodiment uses ROS as an example. ROS is an open-source software framework for implementing robot programming and developing complex robotic applications. While ROS can perform many of the functions of an operating system, it still needs to be installed on an operating system such as Linux, and is therefore often referred to as a meta-operating system or middleware software framework. In this embodiment, ROS can serve as an important component of the robot's algorithm layer, connecting the robot's UI layer and execution layer.

[0036] The target location can be a place where the robot needs to work, for example, a hotel, a restaurant, a hospital, a school, etc.

[0037] In this embodiment, optionally, the robot maps are built by a pre-installed mapping tool (such as a laser mapping tool). Exemplarily, the mapping tool can be installed on the user's laptop. The process of obtaining the environment map and rendering the display is as follows: first, start the laser mapping tool and connect to the robot hotspot; then, the laser mapping tool enters the scanning mode; wherein, the scanning mode of the laser mapping tool is mainly used to obtain a newly scanned map or continue to edit the map when the environment changes; after entering the scanning mode, the laser mapping tool subscribes to the ROS scanning service and receives the environment map returned by the ROS scanning service in real time, and the environment map can be the robot's laser radar scanning the target place environment to obtain the environment image, and then transmit the map information in Base64 encoding form; optionally, the laser mapping tool can receive the Base64 encoding form of the environment map returned by the scanning service based on the full-duplex communication protocol websocket; after obtaining the latest Base64 encoding of the map, the laser mapping tool uses Canvas canvas technology to render the environment map in real time on the display device, for example, the web end of the laser mapping tool on the laptop, or the display screen of the robot.

[0038] S102 : In response to a drawing operation on a target area on the environment map, determine a drawing order index of each vertex in the target area and an actual position of each vertex in the environment map.

[0039] Among them, the actual position can refer to the coordinates of the vertex in the environment map. For example, the range of an environment map after rendering can be enclosed by four points in the canvas: (0,0), (0,100), (100,100), and (100,0). It can be understood that the range can be adaptively determined based on the environmental data scanned by the lidar. Then, the actual position of a vertex can be expressed in the form of coordinates, such as (40,40). When there are multiple floors in the application scenario, it can be expressed in the form of (a, b, c), where c only needs to represent the corresponding floor. For example, c = 1 means that the current environment map and the target area correspond to one floor.

[0040] In this embodiment, the target area can include any of the following functional areas: acceleration area, deceleration area, disinfection area, elevator area, avoidance area, and prohibited area. After acquiring and rendering the environment map, the corresponding target area can be added to the currently displayed environment map so that the robot can subsequently perform corresponding operations or tasks based on the added target area.

[0041] Especially for disinfection robots used in disinfection scenarios, such as those in hospitals, the location, size, and disinfection strategy of the disinfection area often need to change depending on actual use. Storing the disinfection area in graphical form presents the following problems: Secondary editing and adjustment are difficult, requiring the disinfection area to be regenerated each time; encoding the image during transmission, resulting in large data volumes and high rendering pressure; and representing the attributes of the functional area requires color filling of all pixels within the area, which is prone to missing fills and increases the labor cost of map creation.

[0042] In an optional embodiment, a region drawing layer is set above the layer currently displaying the environment map. Users can use corresponding drawing operations to draw target areas in the region drawing layer. The drawing operation can be a click or drag operation on the region drawing layer using an input device such as a mouse, or a touch operation on the region drawing layer to generate a corresponding target area, which can be used as a functional area.

[0043] In the prior art, after drawing a target area, the drawn target area is saved as an image. The target area needs to be filled using color values agreed upon with ROS, and then the filled target area image is converted into a Base64 encoding for storage. However, this approach has certain drawbacks: color noise may occur when filling the target area, causing problems with algorithm parsing and affecting the robot's normal movement. Color noise refers to pixels with incorrect color values near the target area due to incomplete filling or incorrect operation. Furthermore, because the target area is saved on a single image, it is impossible to modify a specific area after the target area is successfully saved. Given these drawbacks, the present invention avoids using an image to save the target area. While researching other methods for saving user-drawn target areas, the applicant discovered that most target areas are polygonal areas composed of one or more sub-areas. According to the definition of a polygon, a planar figure consisting of three or more line segments connected end-to-end is called a polygon. Therefore, by obtaining and saving the actual position of each vertex in the target area within the environment map and the order in which each vertex is drawn, a target area can be uniquely identified within the environment map, without the need to save the target area as an image. Therefore, the user's drawing operation on the target area on the environment map is detected in real time, and the drawing order index of each vertex in the target area and the actual position of each vertex in the environment map are determined according to the drawing operation; wherein, the drawing order index of the vertex is identification data used to represent the order of drawing a certain vertex, for example, if the drawing order index of a vertex is the number "1", it means that this vertex is the starting point of the target area; the actual position can be optionally the actual coordinate position of the vertex in the environment map.

[0044] It should be noted that the process of determining the drawing order index of any vertex is as follows: if it is detected that the user generates a click operation in the area drawing layer, it is determined that the user has drawn a vertex; determine whether other vertices have been drawn before drawing this vertex; if there are no other vertices, then this vertex is the starting point of the target area; if there are other vertices, determine the target vertex drawn last time from the other vertices, and the drawing order index of the target vertex; add one to the drawing order index of the target vertex to obtain the drawing order index of the vertex.

[0045] For example, see Figure 1b, which shows a schematic diagram of drawing a target area on an environmental map, wherein the target area includes four vertices A, B, C, and D, and the drawing order indexes corresponding to the four vertices are 1, 2, 3, and 4, respectively, that is, vertex A is the starting point of the target area, and then the three vertices B, C, and D are drawn in sequence. Taking the drawing of vertex C as an example, when drawing vertex C, first determine the actual position of vertex C in the environmental map, and then determine that the vertex drawn last time is B, and the drawing order index of vertex B is 2, which is 3 after adding 1, so the drawing order index of vertex C is 3, indicating the third vertex C drawn. On the basis of the above, as long as the actual positions of the four vertices A, B, C, and D in the environmental map and the drawing order indexes of the four vertices A, B, C, and D are determined during the process of the user drawing the target area. It can be understood that according to the order index and position of each vertex, each vertex is connected according to the order index, and the last vertex and the initial vertex are connected, so that the target area can be uniquely determined in the environmental map.

[0046] S103 , storing the corresponding drawing order index and actual position of each vertex in the target area in the robot operating system.

[0047] Through step S102, the actual position of each vertex of the target area in the environmental map and the drawing order index of each vertex can be obtained. It is only necessary to store the drawing order index and actual position of each vertex of the target area in the robot operating system. Subsequently, the target area can be uniquely determined in the environmental map based on the drawing order index and actual position of each vertex of the target area stored. In addition, the coordinates of the actual position of each vertex can be adjusted to adjust the target area, thereby solving the limitation that the target area cannot be adjusted when it is saved in the form of an image. Storing the target area in the form of the drawing order index and actual position of each vertex has a small amount of data, low transmission pressure, and is easy to render compared to the image form. It is especially suitable for scenarios with many functional areas and large amounts of map data. By storing the sequential index, it can be ensured that the drawn area is correct, avoiding the problem of defining different areas due to different drawing orders for the same vertex.

[0048] For example, the vertex in the target area can be recorded with "posNum: 1" with a drawing order index of 1, and the coordinates of the point can be recorded as (100, 100) using "point: {"x": 100, "y: 100", "z": 1}", which is located in the first layer. After all the vertices in the target area are recorded in this way, the recorded data is sent to ROS in the form of a pointInfo collection. After receiving it, ROS stores it in the database for rendering the navigation map during the robot's driving and for map transmission during map modification. When the robot is driving, it can accurately determine whether the robot is in the target area by judging whether its current positioning coordinates are within the range enclosed by the vertices in the target area.

[0049] In this embodiment, when building a map, the target area to be drawn is saved by storing the actual positions of the vertices in the area and the drawing order index, so that the area filling does not need to be performed during the target area saving process, avoiding the problem of introducing color noise. At the same time, the mapping process is simplified and the mapping efficiency is improved. The target area can also be modified by modifying the vertex position coordinates, which effectively solves the problems and limitations brought about by saving the target area in the form of pictures.

[0050] Example 2

[0051] Figure 2a This is a flow chart of a robot mapping method provided in Example 2 of the present invention. Figure 2a The method flow includes the following steps:

[0052] S201: Obtain an environment map of the target location sent by the robot operating system and render and display it.

[0053] The entity implementation process of step S201 can be found in the above embodiment and will not be described again here.

[0054] In this embodiment, after the environment map is rendered and displayed, a region drawing layer is set above the layer displaying the environment map to facilitate user editing and modification. The user can draw the target area in the region drawing layer through corresponding drawing operations. That is, the target area and the environment map are in different layers. When the user zooms in or out of the environment map, or drags the environment map, because the target area and the environment map belong to different layers, that is, the target area is not part of the environment map, the target area cannot adapt to changes as part of the environment map. Therefore, it is necessary to determine the actual position of the target area vertices on the environment map according to the changes in the environment map. Optionally, the process of determining the actual position of each vertex of the target area in the environment map and the drawing order index can be seen in S202-S203.

[0055] S202 : In response to a drawing operation on any vertex in the target area, determine a drawing position of the vertex and a drawing order index of the vertex.

[0056] Among them, the drawing operation of any vertex of the target area can be optionally performed by the user clicking or touching the mouse on the area drawing layer, that is, the user clicks or touches on the area drawing layer to complete the drawing of the vertex of the target area, and the user's mouse click position or touch position is used as the drawing position of the vertex; at the same time, the drawing order index of the vertex is determined. The specific confirmation process can be referred to the above embodiment and will not be repeated here. It should be noted that because the user drags or scales the environment map before drawing the target area, the drawing position of the vertex of the target area is not the actual position of the vertex in the environment map. Therefore, it is necessary to determine the actual position of the vertex according to step S203.

[0057] S203: Determine the actual position of the vertex in the environment map according to the drawing position and the current display parameters of the environment map.

[0058] The current display parameters of the environment map are parameters used to measure whether the user drags or zooms the environment map, and illustratively include at least one of the current map zoom ratio and offset of the environment map. Based on this, the actual position of the vertex in the environment map is determined based on the drawing position and the current display parameters of the environment map, including: adjusting the drawing position based on the current map zoom ratio and / or offset of the environment map to obtain the actual position of the vertex in the environment map.

[0059] For example, see Figure 2b , which shows the relative position diagram of the drawing position and actual position of the vertex after dragging the environment map; among them, point A is the drawing position with coordinates (x, y), and point B is the actual position of the vertex to be determined in the environment map with coordinates (x′, y′); because the user drags the environment map, an offset (Δx, Δy) is generated, so the actual position of the vertex in the environment map can be directly calculated through the formulas x′=x+Δx and y′=y+Δy.

[0060] See also Figure 2c , which shows the relative position diagram of the drawing position and actual position of the vertex after scaling the environment map; where O(x0, y0) is the scaling center, point A is the drawing position with coordinates (x, y), and point B is the actual position of the vertex to be determined in the environment map with coordinates (x′, y′); since the user scales the environment map, the map scaling scale is generated, so the actual position of the vertex in the environment map can be directly calculated through the formulas x′=(x-x0)*scale and y′=(y-y0)*scale.

[0061] It should be noted that if the environment map is dragged and then scaled, the horizontal and vertical coordinates of the actual position of the vertex in the environment map can be calculated according to the following formula: x′=(x+Δx-x0)*scale; y′=(y+Δy-y0)*scale.

[0062] S204 : Correspondingly storing the drawing order index and the actual position of each vertex in the target area in the robot operating system.

[0063] Through S202-S203, the actual position of each vertex in the target area in the environmental map and the drawing order index of each vertex can be obtained. It is only necessary to store the drawing order index and actual position of each vertex in the target area in correspondence to the robot operating system. Subsequently, the target area can be uniquely determined in the environmental map based on the drawing order index and actual position of each vertex in the target area saved.

[0064] In this embodiment, based on the drawn position of a vertex in the target area, as well as the offset and / or map zoom ratio of the environment map, the actual position of the vertex in the environment map can be accurately calculated, thereby ensuring the accuracy of the drawn target area and providing a guarantee for the subsequent robot to accurately reach or pass through the target area.

[0065] Example 3

[0066] Figure 3a This is a flow chart of a robot mapping method provided by Example 3 of the present invention. Figure 3a The method flow includes the following steps:

[0067] S301: Obtain the environment map of the target location sent by the robot operating system and render and display it.

[0068] S302 : In response to a drawing operation on a target area on the environment map, determine a drawing order index of each vertex in the target area and an actual position of each vertex in the environment map.

[0069] S303: Verify the drawn target area according to the attribute information of the target area.

[0070] In this embodiment, after the target area is drawn and the actual position and drawing order index of each vertex are determined in step S302, the drawn target area needs to be verified to determine whether the drawn target area is accurate. Optionally, the drawn target area is verified based on the attribute information of the target area.

[0071] In some embodiments, the number of sub-regions of the drawn target area is verified based on the attribute information of the target area. For example, different target areas may correspond to different numbers of sub-regions. For example, the elevator and gate areas include at least two sub-regions, while the deceleration area may consist of only one sub-region. Therefore, the number of corresponding sub-regions can be determined based on the attribute information of the target area, that is, the type of target area, and then verified. For a target area containing at least two sub-regions, it can be drawn based on the stored vertices and sequential indexes, and the drawing must be able to form at least two closed figures.

[0072] Optionally, other checks can be performed based on the attribute information of the target area. For example, for the disinfection area, when the drawing is completed, it is necessary to verify whether the corresponding disinfection parameters are configured, such as disinfection duration, disinfection route, disinfection type, etc., to avoid the robot being unable to determine the corresponding disinfection strategy when it runs to the area later. These disinfection parameters can be stored in ROS together with the actual position and sequence index of the vertices of the target area. For the deceleration area, it can also be verified whether the regional driving speed is set, and whether the set value is lower than the robot's default driving speed.

[0073] In this embodiment, to further illustrate the verification process, the target area is an elevator area on any floor of the target location. The elevator area includes an interior sub-area (i.e., the area where the robot rides the elevator) and an elevator waiting sub-area (the area where the robot waits for the elevator, or the area where the robot stops after exiting the elevator). The attribute information of the elevator area may include information about the elevator area type, the location and width of the elevator door, and the positional relationship between the interior sub-area and the waiting sub-area. When drawing the elevator area, the interior sub-area and the waiting sub-area can be understood as two sub-areas within the elevator area. These two sub-areas must have an overlapping edge with no blank space between them. Otherwise, the robot may experience operational failures such as loss of positioning and failed boarding. Based on this, the drawn target area is verified based on the target area's attribute information. This includes determining whether the interior sub-area and the waiting sub-area meet preset verification conditions. The preset verification conditions include: the interior sub-area and the waiting sub-area have an overlapping edge, and the length of the overlapping edge is greater than the width of the elevator door. If so, the drawn elevator area is determined to be accurate. Otherwise, the drawn target area is inaccurate, and the user is prompted to redraw it. Optionally, to determine whether the elevator interior sub-area and the elevator waiting area overlap, simply check whether the elevator interior sub-area and the elevator waiting area share common vertices. If so, consider the line connecting these vertices as the overlapping edge. The overlapping edge corresponds to the location of the elevator door. Only when the overlapping edge is greater than the elevator door width can the robot enter and exit the elevator normally.

[0074] Optionally, you can also verify whether waiting and exit points are set within the elevator waiting sub-area, as well as whether boarding points are set within the elevator interior sub-area. This helps the robot accurately reach the corresponding position during subsequent driving, reduces position deviation after entering and exiting the elevator, and reduces the probability of losing positioning.

[0075] The attribute information of the target area may be determined before the current area is drawn, or after the target area is drawn.

[0076] For example, see Figure 3b , which shows a schematic diagram of the drawn elevator area, where the two vertices A and B are the same vertices in the elevator internal sub-area and the elevator waiting sub-area, and the line connecting the two vertices A and B is the overlapping edge of the two sub-areas.

[0077] S304: Store the drawing order index and actual position of each vertex in the target area in the robot operating system. Optionally, attribute information of the target area can be bound and stored in the robot operating system, such as disinfection strategy, driving speed, elevator waiting point coordinates, etc.

[0078] In this embodiment, before saving the positions of each vertex and the drawing order index of the target area, the target area is verified to ensure the accuracy of the drawn target area, thereby ensuring the accuracy of the stored actual vertex positions and the drawing order index.

[0079] Furthermore, before the drawing order index and the actual position of each vertex in the target area are stored in correspondence in the robot operating system, the method further includes: binding the actual position of each vertex in the elevator area with the elevator identifier and the elevator stop floor.

[0080] It is understandable that there may be multiple elevators in the application scenario, and different elevators may stop at different floors, such as in office buildings, hotels, hospitals and other scenarios. When building the map, the layout of different floors may be basically the same. Therefore, it is possible to draw and adjust the area on the environmental map of a certain floor scanned by the robot to draw the navigation map of multiple floors. During the mapping process, the elevator area can be bound and stored with the corresponding elevator identifier, such as the elevator number, and the stop floor. This makes it possible to draw a target area and use the navigation maps of multiple floors. For floors that do not stop, the corresponding elevator area can be automatically modified to a prohibited area during verification, which improves the efficiency of mapping and avoids the robot from driving incorrectly later.

[0081] Furthermore, if the target area includes multiple sub-areas, after drawing any sub-area, the user will be fed back prompt information for drawing the next sub-area (such as the starting point or starting edge of the next sub-area) based on the attribute information of the target area and the vertices of the drawn sub-area, so as to improve the efficiency of area drawing. For example, taking the drawing of the elevator area as an example, see Figure 3b If the elevator interior sub-region is drawn first, after the elevator interior sub-region is drawn, the adjacent edges between the elevator interior sub-region and the elevator waiting sub-region are determined based on the elevator door position information. The edges in the elevator interior sub-region close to the elevator door are the edges adjacent to the elevator waiting sub-region, such as the line connecting vertex A and vertex B. The line connecting vertex A and vertex B is prompted to the user as the starting edge of the elevator waiting sub-region, so that the user can start drawing the elevator waiting sub-region from vertex A or vertex B. This improves mapping efficiency and reduces mapping errors.

[0082] Example 4

[0083] Figure 4 This is a schematic diagram of the structure of a robot mapping device provided by the fourth embodiment of the present invention. This embodiment is applicable to the robot mapping scene, where the functional area is stored in the form of the coordinates of the vertex positions of the storage area. Figure 4 As shown, the device includes:

[0084] An environment map acquisition module 401 is used to acquire an environment map of a target location sent by the robot operating system and render and display it;

[0085] a position determination module 402 for determining, in response to a drawing operation on a target area on an environment map, a drawing order index of each vertex of the target area and an actual position of each vertex in the environment map;

[0086] The storage module 403 is used to store the corresponding drawing order index and actual position of each vertex in the target area in the robot operating system.

[0087] Optionally, in some embodiments, the location determination module includes:

[0088] a position and index determining unit, configured to determine a drawing position of any vertex and a drawing order index of the vertex in response to a drawing operation on any vertex in the target area;

[0089] The position correction unit is used to determine the actual position of the vertex in the environment map according to the drawing position and the current display parameters of the environment map.

[0090] Optionally, in some embodiments, the current display parameter includes at least one of a current map zoom ratio and an offset of the environment map;

[0091] Accordingly, the position correction unit is also used to:

[0092] The drawing position is adjusted according to the current map zoom ratio and / or offset of the environment map to obtain the actual position of the vertex in the environment map.

[0093] Optionally, in some embodiments, the method further includes:

[0094] The verification module is used to verify the drawn target area according to the attribute information of the target area.

[0095] Optionally, in some embodiments, the target area includes an elevator area on any floor of the target location; wherein the elevator area includes an elevator interior sub-area and an elevator waiting sub-area; the attribute information of the elevator area includes the position and width of the elevator door, and the positional relationship between the elevator interior sub-area and the elevator waiting sub-area;

[0096] Accordingly, the verification module is also used to:

[0097] Determine whether the elevator interior sub-area and the elevator waiting sub-area meet preset verification conditions; wherein the preset verification conditions include: the elevator interior sub-area and the elevator waiting sub-area have overlapping edges, and the length of the overlapping edges is greater than the width of the elevator door;

[0098] If satisfied, it is determined that the drawn elevator area is accurate.

[0099] Optionally, in some embodiments, the method further includes:

[0100] The information binding module is used to bind the actual position of each vertex in the elevator area with the elevator logo and the elevator stop floor.

[0101] Optionally, in some embodiments, the method further includes:

[0102] The drawing reminder module is used to provide the user with prompt information for drawing the next sub-region based on the attribute information of the target region and the vertices of the drawn sub-region after any sub-region is drawn if the target region includes multiple sub-regions.

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

[0104] Example 5

[0105] Figure 5A schematic diagram of the structure of an electronic device 10 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 claimed herein.

[0106] like Figure 5 As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., which is communicatively connected to the at least one processor 11. The memory stores a computer program that can be executed by the at least one processor. The processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 into the random access memory (RAM) 13. Various programs and data required for the operation of the electronic device 10 can also be stored in the RAM 13. The processor 11, ROM 12, and RAM 13 are connected to each other via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0107] Multiple components in the electronic device 10 are connected to the I / O interface 15, including an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a magnetic disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.

[0108] The processor 11 can be any general-purpose and / or specialized processing component with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various specialized artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as executing the robotic mapping method.

[0109] In some embodiments, the robotic mapping method can be implemented as a computer program that is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the robotic mapping method described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to execute the robotic mapping method in any other appropriate manner (e.g., by means of firmware).

[0110] Various embodiments of the systems and techniques described above 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), system-on-chip systems (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include being implemented in one or more computer programs that are executable and / or interpreted on a programmable system that includes 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.

[0111] 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, such that when the computer program is executed by the processor, the functions / operations specified in the flowcharts and / or block diagrams are implemented. The computer program may be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0112] In the context of the present invention, computer-readable storage media can be tangible media that can contain or store a computer program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Computer-readable storage media can include but are not limited to electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, computer-readable storage media can be machine-readable signal media. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0113] To provide interaction with a user, the systems and techniques described herein can 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0114] The systems and techniques described herein can be implemented in a computing system that includes back-end 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 front-end components (e.g., a user computer with a graphical user interface or 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 back-end components, middleware components, or front-end components. The components of the system can 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.

[0115] A computing system may include clients and servers. The clients and servers are typically remote from each other and typically interact via a communication network. This client-server relationship arises through computer programs running on the respective computers, creating a client-server relationship. The server may be a cloud server, also known as a cloud computing server or cloud host. This server is a hosting product within the cloud computing service ecosystem that addresses the management difficulties and limited scalability of traditional physical hosting and VPS services.

[0116] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in the present invention can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved. This is not limited herein.

[0117] The above specific embodiments do not limit the scope of protection of the present invention. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may be made based on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention are intended to be included within the scope of protection of the present invention.

Claims

1. A robot mapping method, characterized in that: include: Obtain the environment map of the target location sent by the robot operating system and render it for display; The target location is the location where the robot needs to work; In response to a drawing operation on a target area on the environment map, determining a drawing order index of each vertex of the target area and an actual position of each vertex in the environment map; Verifying the drawn target area according to the attribute information of the target area; storing the corresponding drawing order index and actual position of each vertex in the target area in the robot operating system; The step of determining the drawing order index of each vertex of the target area and the actual position of each vertex in the environment map in response to the drawing operation on the target area on the environment map includes: In response to a drawing operation on any vertex of the target area, determining a drawing position of the vertex and a drawing order index of the vertex; determining an actual position of the vertex in the environment map according to the drawing position and current display parameters of the environment map; The step of verifying the drawn target area according to the attribute information of the target area includes: According to the attribute information of the target area, the number of sub-areas of the drawn target area is verified, wherein different target areas correspond to different numbers of sub-areas; In a case where the target area includes at least an elevator area on any floor of the target location, and the elevator area includes an elevator interior sub-area and an elevator waiting sub-area, determining whether the elevator interior sub-area and the elevator waiting sub-area meet a preset verification condition based on the attribute information of the target area; wherein the attribute information of the elevator area includes the position and width of an elevator door, and the positional relationship between the elevator interior sub-area and the elevator waiting sub-area; the preset verification condition includes: there is an overlapping edge between the elevator interior sub-area and the elevator waiting sub-area, and the length of the overlapping edge is greater than the width of the elevator door; if so, determining that the drawn elevator area is accurate; Verify whether a waiting point and an exit point are set in the elevator waiting sub-area, and verify whether an elevator stop is set in the elevator interior sub-area; In the process of drawing the target area, if the target area includes multiple sub-areas, after drawing any sub-area, prompt information for drawing the next sub-area is fed back to the user based on the attribute information of the target area and the vertices of the drawn sub-area, prompting the starting point or starting edge of the next sub-area; wherein: if the elevator interior sub-area is drawn first, after drawing the elevator interior sub-area, the adjacent edges of the elevator interior sub-area and the elevator waiting sub-area are determined based on the position information of the elevator door, wherein the edge of the elevator interior sub-area close to the elevator door is the edge adjacent to the elevator waiting sub-area; the adjacent edges of the elevator interior sub-area and the elevator waiting sub-area are prompted to the user as the starting edge of the elevator waiting sub-area.

2. The method according to claim 1, characterized in that The current display parameter includes at least one of a current map zoom ratio and an offset of the environment map; Accordingly, determining the actual position of the vertex in the environment map according to the drawing position and the current display parameters of the environment map includes: The drawing position is adjusted according to the current map zoom ratio and / or offset of the environment map to obtain the actual position of the vertex in the environment map.

3. The method according to claim 1, characterized in that Also includes: The actual position of each vertex in the elevator area is bound to the elevator logo and the elevator stop floor.

4. The method according to claim 1, wherein The target area also includes a disinfection area in the target location; Accordingly, the method further includes: checking whether the disinfection area is configured with corresponding disinfection parameters; wherein the disinfection parameters include disinfection duration, disinfection route, and disinfection type.

5. The method according to claim 1, wherein Obtain the environment map of the target location sent by the robot operating system and render it for display, including: Start the laser mapping tool and connect to the robot hotspot; The laser mapping tool enters a scanning mode; wherein the scanning mode of the laser mapping tool is used to obtain a newly scanned map or to continue editing the map when the environment changes; After entering the scanning mode, the laser mapping tool subscribes to the scanning service of the robot operating system ROS and receives the environment map returned by the scanning service of the robot operating system ROS in real time; wherein, the laser mapping tool receives the environment map returned by the scanning service in Base64 encoding format based on the full-duplex communication protocol websocket; After obtaining the latest Base64 encoding of the map, the laser mapping tool uses Canvas technology to render the environment map in real time and display it on the display device.

6. The method according to claim 1, characterized in that Storing the corresponding drawing order index and actual position of each vertex in the target area in the robot operating system, including: The vertices in the target area are recorded with posNum to record the drawing order index and point:{x,y,z} to record the vertex coordinates; After recording all vertices in the target area, the recorded data is sent to the robot operating system ROS storage in the form of pointInfo collection.

7. The method according to claim 1, characterized in that After the environment map is rendered and displayed, it also includes: On top of the layer displaying the environment map, a region drawing layer is set up so that the user can draw the target area through corresponding drawing operations in the region drawing layer; When the user zooms in or out of the environment map, or drags the environment map, the actual position of the vertex of the target area on the environment map is determined according to the changes in the environment map.

8. A robot mapping device, characterized in that: include: The environment map acquisition module is used to obtain the environment map of the target location sent by the robot operating system and render and display it; The target location is the location where the robot needs to work; a position determination module, configured to determine, in response to a drawing operation on a target area on the environment map, a drawing order index of each vertex of the target area and an actual position of each vertex in the environment map; A verification module is used to verify the drawn target area according to the attribute information of the target area; A storage module, configured to store the drawing order index and the actual position of each vertex in the target area in correspondence with each other in the robot operating system; The position determination module includes: a position and index determining unit, configured to determine a drawing position of any vertex and a drawing order index of the vertex in response to a drawing operation on any vertex in the target area; a position correction unit, for determining the actual position of the vertex in the environment map according to the drawing position and current display parameters of the environment map; The verification module is specifically used for: According to the attribute information of the target area, the number of sub-areas of the drawn target area is verified, wherein different target areas correspond to different numbers of sub-areas; In a case where the target area includes at least an elevator area on any floor of the target location, and the elevator area includes an elevator interior sub-area and an elevator waiting sub-area, determining whether the elevator interior sub-area and the elevator waiting sub-area meet a preset verification condition based on the attribute information of the target area; wherein the attribute information of the elevator area includes the position and width of an elevator door, and the positional relationship between the elevator interior sub-area and the elevator waiting sub-area; the preset verification condition includes: there is an overlapping edge between the elevator interior sub-area and the elevator waiting sub-area, and the length of the overlapping edge is greater than the width of the elevator door; if so, determining that the drawn elevator area is accurate; Verify whether a waiting point and an exit point are set in the elevator waiting sub-area, and verify whether an elevator stop is set in the elevator interior sub-area; The device further includes a drawing reminder module, which is used to: During the process of drawing the target area, if the target area includes multiple sub-areas, after drawing any sub-area, prompt information for drawing the next sub-area is fed back to the user based on the attribute information of the target area and the vertices of the drawn sub-area, indicating the starting point or starting edge of the next sub-area. Specifically, if the elevator interior sub-area is drawn first, after drawing the elevator interior sub-area, the adjacent edges of the elevator interior sub-area and the elevator waiting sub-area are determined based on the position information of the elevator door, wherein the edge of the elevator interior sub-area close to the elevator door is the edge adjacent to the elevator waiting sub-area; and the adjacent edges of the elevator interior sub-area and the elevator waiting sub-area are prompted to the user as the starting edge of the elevator waiting sub-area.

9. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor. The computer program is executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method according to any one of claims 1 to 7 when executed.

Citation Information

Patent Citations

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

    CN110706305A