Method, device, robot and medium for dynamically updating maps of mobile robots
By using coordinated work of positioning nodes and map building nodes in mobile robots, publishing and aligning the map coordinate system, the robot can update the map in a dynamic environment in real time, solving the problem of poor positioning accuracy, and improving the accuracy and efficiency of map updates.
Patent Information
- Application Number
- CN202411537060.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-04-04
AI Technical Summary
The existing mobile robot update map method has poor positioning accuracy in dynamic environments and cannot effectively adapt to various on-site environments and needs.
The first transformation information between the map coordinate system and the odometer coordinate system is published through the preset positioning node. Based on the first transformation information, the second transformation information between the map reference system and the map coordinate system is published through the preset map construction node. It is determined that the new map and the original map are coordinated, and the original map is expanded and the point assignment is updated according to the edge coordinates of the newly created map.
It realizes that mobile robots update maps in real time and accurately in dynamic environments, ensuring the accuracy of robot location information, adapting to environmental changes, and improving the accuracy and efficiency of map updates.
Smart Images

Figure CN119756325A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robot positioning technology, and in particular to a method, device, robot and medium for dynamically updating a map of a mobile robot. Background Art
[0002] In existing mobile robot technology, robots rely on pre-built maps for navigation. However, in actual applications, the environment may change, such as the appearance of new obstacles or the need to expand the exploration area. Traditional static maps are easily outdated in this case, resulting in the robot being unable to accurately plan paths and avoid obstacles. Therefore, there is currently a method for updating maps for mobile robots.
[0003] However, in the existing map updating method, when the mobile robot runs the positioning and mapping functions at the same time, both will publish coordinate transformation information, which can easily cause coordinate system confusion, making it impossible for the robot to determine which coordinate system its position information is relative to, thereby affecting the robot's positioning accuracy and limiting the application of mobile robots in dynamic environments. As a result, the current map updating method has poor accuracy and cannot effectively adapt to various on-site environments and needs. Summary of the invention
[0004] The purpose of the present invention is to solve at least one of the technical problems existing in the prior art, and provides a method for dynamically updating a map of a mobile robot, a mobile robot and a storage medium, which can publish transformation information based on a positioning node through a mapping node to ensure that the positioning node continues to work throughout the entire process, so that the robot can update the map in real time more accurately and effectively during movement, maintain accurate positioning, and thus adapt to various on-site environments and needs.
[0005] In a first aspect, an embodiment of the present invention provides a method for dynamically updating a map of a mobile robot, comprising: publishing first transformation information between a map coordinate system and an odometer coordinate system through a preset positioning node; based on the first transformation information, publishing second transformation information between a mapping reference system and the map coordinate system through a preset mapping node, wherein the mapping reference system takes the current posture of the mobile robot as the origin; determining a new map corresponding to the mapping reference system and an original map corresponding to the map coordinate system, and aligning the coordinates of the new map and the original map based on the second transformation information; expanding the map size of the original map according to the edge coordinates of the new map, and assigning and updating corresponding points in the original map according to the new map to obtain an updated map corresponding to the original map.
[0006] In some embodiments, the coordinate alignment of the newly created map and the original map based on the second transformation information includes: obtaining a coordinate change matrix from the newly created map to the original map according to the second transformation information; and coordinate alignment of the newly created map and the original map based on the coordinate change matrix.
[0007] In some embodiments, the map size expansion of the original map according to the edge coordinates of the newly created map includes: obtaining the first edge coordinates of the newly created map and the second edge coordinates of the original map; obtaining the third edge coordinates according to the first edge coordinates and the second edge coordinates, so that the first edge coordinates and the second edge coordinates are within the map range corresponding to the third edge coordinates; and expanding the map size of the original map according to the expansion size information corresponding to the third edge coordinates.
[0008] In some embodiments, assigning and updating corresponding points in the original map according to the newly created map includes: dividing the newly created map into regions based on an update reserved region corresponding to the original map to determine a target update region in the newly created map; and assigning and updating corresponding points in the original map according to points in the newly created map that are within the target update region.
[0009] In some embodiments, assigning values to and updating corresponding points in the original map based on points in the target update area in the newly created map includes: obtaining area update requirements; based on the area update requirements, determining multiple assigned points from the points in the target update area; and assigning values to and updating corresponding points in the original map based on the multiple assigned points.
[0010] In some embodiments, based on the area update requirement, multiple assignment points are determined from each point in the target update area, including: when the update requirement represents a coverage update of the target update area, each point in the target update area is determined as an assignment point; when the update requirement represents a partial update of the target update area, the assignment points are determined according to the pixel values of each point in the target update area to obtain multiple assignment points.
[0011] In some embodiments, the method further includes: when the mobile robot runs to a preset target map area, starting the mapping node to confirm the second transformation information corresponding to the target map area, and updating the assignment of points in the target map area based on the second transformation information to obtain an updated map corresponding to the target map area; when the mobile robot runs out of the target map area, closing the mapping node.
[0012] In a second aspect, an embodiment of the present invention provides a mobile robot dynamic map update device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the mobile robot dynamic map update method as described in the embodiment of the first aspect above.
[0013] In a third aspect, an embodiment of the present invention provides a mobile robot, comprising the mobile robot dynamic map update device as described in the embodiment of the second aspect above.
[0014] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method for dynamically updating a map of a mobile robot as described in the embodiment of the first aspect above.
[0015] The method for dynamically updating a map of a mobile robot, the device for dynamically updating a map of a mobile robot and the storage medium provided by the embodiments of the present invention have at least the following beneficial effects: the embodiments of the present application can publish the current position information of the robot through the positioning node, which can publish the odometer information by measuring the distance and direction traveled by the robot after starting from the starting point, and convert it into the position information in the map coordinate system to obtain the first transformation information, thereby ensuring that the robot can know its position relative to the global map at any time, as a basis for subsequent map updates; further, the first transformation information provided by the positioning node (i.e., the current position of the robot) is used by the mapping node to construct a local mapping reference system, the origin of which is the current position and posture of the robot, so that the mapping node can collect environmental information and construct new map data based on the current state of the robot, This can avoid the situation where the mobile robot simultaneously publishes coordinate transformation information for positioning and mapping, causing coordinate system confusion, and the map can be updated at any time when the robot moves; further, the present application can determine the new map data generated by the mapping reference system, and compare and align it with the existing global map data, and ensure the consistency between the new and old maps through the second transformation information to achieve coordinate alignment, ensuring that the new map data can be seamlessly integrated into the existing map, and ensuring the continuity and integrity of the map; further, if the newly created map exceeds the boundary of the original map, then the size of the original map is expanded to include the data of the new map. At the same time, the information in the newly created map is integrated into the corresponding position in the original map, ensuring that the map can be dynamically expanded to adapt to environmental changes, and the information in the map is updated in real time to keep the map up to date. It can be understood that through the above steps, the present application can realize real-time dynamic update of the map of the mobile robot during movement. Through the coordinated work of positioning nodes and mapping nodes, the robot's position information is ensured to be always accurate, and new map data can be constructed based on the current position, avoiding errors caused by coordinate system asynchrony. The map size expansion and point value update ensure that the map can adapt to environmental changes and reflect the latest environmental information in a timely manner, which can effectively improve the accuracy and efficiency of map updates and enhance the robot's adaptability in complex and dynamic environments.
[0016] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the description, claims and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation to the technical solution of the present invention.
[0018] The present invention is further described below in conjunction with the accompanying drawings and embodiments;
[0019] Figure 1 It is a schematic diagram of the flow of a method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0020] Figure 2 It is a schematic diagram of publishing transformation information in the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0021] Figure 3 is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0022] Figure 4 It is a schematic diagram of performing map expansion in the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0023] Figure 5 is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0024] Figure 6 is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0025] Figure 7 is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0026] Figure 8 is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0027] Fig. 9 is a flowchart of a method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention;
[0028] Fig.10 It is a structural schematic diagram of a mobile robot dynamic map updating device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0029] This section will describe in detail the specific embodiments of the present invention. The preferred embodiments of the present invention are shown in the accompanying drawings. The purpose of the accompanying drawings is to supplement the description of the text part of the specification with graphics, so that people can intuitively and vividly understand each technical feature and the overall technical solution of the present invention, but it cannot be understood as a limitation on the scope of protection of the present invention.
[0030] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed", etc. are understood to exclude the number itself, "above", "below", "within", etc. are understood to include the number itself, "any one" means one or more, "at least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. If there is a description of the first and the second, it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0031] It should be noted that the terms such as setting, installing, and connecting in the embodiments of the present invention should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the embodiments of the present invention in combination with the specific content of the technical solution. For example, the term "connection" can be a mechanical connection, an electrical connection, or mutual communication; it can be directly connected or indirectly connected through an intermediate medium.
[0032] It should be noted that the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0033] In the existing mobile robot technology, the robot relies on pre-built maps for navigation. However, in actual applications, the environment may change, such as the appearance of new obstacles or the need to expand the exploration area. In this case, the traditional static map is easily outdated, resulting in the robot being unable to accurately plan the path and avoid obstacles. Therefore, there is currently a method for updating the map of the mobile robot. However, in the existing map updating method, when the mobile robot runs the positioning and mapping functions at the same time, since both will publish coordinate transformation information, it is easy to cause confusion in the coordinate system, making it impossible for the robot to determine which coordinate system its position information is relative to, thereby affecting the positioning accuracy of the robot, limiting the application of the mobile robot in a dynamic environment, resulting in the poor accuracy of the current map updating method, and being unable to effectively adapt to various on-site environments and needs. Based on this, the embodiment of the present application provides a method for dynamically updating the map of a mobile robot, a mobile robot and a storage medium, which can be positioned based on auxiliary landmarks in a variable path area with a high positioning loss rate, so as to improve the positioning accuracy and reliability of the mobile robot in the area.
[0034] The embodiments of the present invention are further described below in conjunction with the accompanying drawings.
[0035] refer to Figure 1 , Figure 11 is a flow chart of a method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention; in a first aspect, an embodiment of the present invention provides a method for dynamically updating a map of a mobile robot, including but not limited to the following steps:
[0036] Step S110, publishing first transformation information between the map coordinate system and the odometer coordinate system through a preset positioning node;
[0037] Step S120, based on the first transformation information, publishing second transformation information between the mapping reference system and the map coordinate system through a preset mapping node, wherein the mapping reference system takes the current posture of the mobile robot as the origin;
[0038] Step S130, determining a newly created map corresponding to the mapping reference system and an original map corresponding to the map coordinate system, and aligning the coordinates of the newly created map and the original map based on the second transformation information;
[0039] Step S140, expanding the map size of the original map according to the edge coordinates of the newly created map, and assigning and updating values to corresponding points in the original map according to the newly created map, so as to obtain an updated map corresponding to the original map.
[0040] Among them, the positioning node and the mapping node are both robot system components. The positioning node is responsible for tracking and publishing the robot's position and posture information relative to the global map, and the mapping node is responsible for creating or updating the map of the environment, using the robot's current position and posture to build new map information. In the ROS framework, the map topic is usually used to represent the global map coordinate system, while the odom topic represents the odometer coordinate system. The mapping reference system is a coordinate system established with the robot's current position and posture as the origin, which is used to describe the environment information in the robot's current field of view.
[0041] In some embodiments, the first transformation information is the dynamic TF transformation between map and odom normally published by the positioning node, and the second transformation information is other names published by the mapping node, such as map_ctgrf. Its child coordinate system is no longer odom but the dynamic TF transformation of the map of the positioning node. Due to the different names, the dynamic TF transformation of the TF of the mapping node is based on the TF of the positioning node. The problem that the mapping node and the positioning node cannot exist at the same time will not occur because odom can only have one parent coordinate system. Therefore, the coexistence of the mapping node and the positioning node can be guaranteed.
[0042] In some embodiments, the newly created map is a map fragment created by the mapping node based on the current robot position and environmental information, the original map is the map information that has been previously created and stored, and the assignment update is to integrate the information in the newly created map (such as obstacle positions, etc.) into the corresponding positions in the original map to update the content of the original map.
[0043] Among them, the embodiment of the present application can be responsible for publishing the current position information of the robot through the positioning node, which can publish odometer information by measuring the distance and direction traveled by the robot from the starting point, and convert it into position information in the map coordinate system to obtain the first transformation information, thereby ensuring that the robot can know its position relative to the global map at any time, as a basis for subsequent map updates; further, the mapping node uses the first transformation information provided by the positioning node (that is, the current position of the robot) to construct a local mapping reference system, the origin of the mapping reference system is the current position and posture of the robot, so that the mapping node can collect environmental information and construct new map data based on the current state of the robot, thereby avoiding the mobile robot from running the positioning and mapping functions at the same time. When the coordinate transformation information is released by both at the same time, the coordinate system is confused, and the map is updated at any time when the robot moves; further, the present application can determine the new map data generated by the mapping reference system, and compare and align it with the existing global map data. Through the second transformation information, the consistency between the new and old maps is ensured to achieve coordinate alignment, ensuring that the new map data can be seamlessly integrated into the existing map, and ensuring the continuity and integrity of the map; further, if the newly created map exceeds the boundary of the original map, then the size of the original map is expanded to include the data of the new map. At the same time, the information in the newly created map is integrated into the corresponding position in the original map to ensure that the map can be dynamically expanded to adapt to environmental changes, and the information in the map is updated in real time to keep the map up to date. It can be understood that through the above steps, the present application can realize real-time dynamic update of the map of the mobile robot during movement. Through the coordinated work of positioning nodes and mapping nodes, the robot's position information is ensured to be always accurate, and new map data can be constructed based on the current position, avoiding errors caused by coordinate system asynchrony. The map size expansion and point value update ensure that the map can adapt to environmental changes and reflect the latest environmental information in a timely manner, which can effectively improve the accuracy and efficiency of map updates and enhance the robot's adaptability in complex and dynamic environments.
[0044] refer to Figure 2 , Figure 2 is a schematic diagram of publishing transformation information in a method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention; wherein, Figure 2 The ROS (Robot Operating System) message passing structure is shown, which contains the ROS topic names used in this application. The following are each topic and its meaning in ROS:
[0045] map_ctgrf, this topic name is the custom topic name in this application, corresponding to the construction reference system of the new map;
[0046] map, which is a standard map topic in ROS and is used to publish a map representation of the robot environment, corresponding to the map coordinate system of the original map;
[0047] odom, which is the standard odometer topic in ROS, is used to publish information about the robot's relative position and speed, corresponding to the odometer coordinate system;
[0048] base_footpr int, which is the standard topic name in ROS and is used to publish the base footprint model of the robot, that is, the geometry of the robot chassis, corresponding to the current position of the mobile robot;
[0049] It is understandable that the first transformation information in this application refers to the transformation relationship between the map coordinate system (map) and the odometer coordinate system (odom) published by the positioning node. This transformation information reflects the current position of the robot in the map, that is, through the odometer and other sensor data, the coordinate position of the robot relative to the original map is determined to ensure that the robot can update its position in the global map in real time during movement. This is the basis for the robot to navigate and locate.
[0050] The second transformation information refers to the transformation relationship between the mapping reference system (map_ctgrf) and the map coordinate system (map) released by the mapping node. The mapping reference system is a coordinate system established with the current position (base_footpr int) of the mobile robot as the origin. It is used to describe the environmental information perceived by the robot at the current position and build new map data based on it. The coordinate information in the newly created map can be converted to the coordinate system of the original map through the second transformation information, thereby realizing the coordinate alignment between the new and old maps and ensuring that the newly created map is highly consistent with the original map.
[0051] It is worth noting that in order to allow the positioning node and the mapping node to coexist and resolve possible coordinate system conflicts between them, the present application has taken the following measures: the positioning node normally publishes the dynamic tf transformation between map and odom, which is to provide the robot with the current location information. The mapping node does not publish the transformation from map to odom, but publishes the transformation from map_ctgrf to map. Here map_ctgrf is a new coordinate system, and its child coordinate system is the map of the positioning node, not odom. This is done to avoid conflicts in the parent coordinate system of odom and to ensure that the coordinate system transformation of the mapping node is based on the coordinate system of the positioning node. Through such a design, the robot can build a map at the current position, and during the movement process, the mapping node always performs coordinate transformation based on the location information provided by the positioning node, thereby ensuring a high degree of overlap between the newly built map and the original map.
[0052] In summary, the first transformation information ensures that the robot can accurately locate the robot body in the environment and provides the necessary coordinate transformation basis for mapping. The second transformation information enables the robot to construct new map data at the current position and, through appropriate coordinate transformation, seamlessly integrate this new data into the original global map, thereby realizing dynamic updating of the map. Through these two transformation information, the present application solves the problem of real-time map updating of the robot in a dynamic environment, ensures the accuracy and real-time nature of the map, and enhances the robot's adaptability.
[0053] refer to Figure 3 , Figure 3 is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention; in some embodiments, the coordinates of the newly created map and the original map are aligned based on the second transformation information, including but not limited to the following steps:
[0054] Step S310, obtaining a coordinate change matrix from the newly created map to the original map according to the second transformation information;
[0055] Step S320: aligning the coordinates of the newly created map and the original map based on the coordinate change matrix.
[0056] It can be understood that the existence of the positioning node in the present application ensures that the robot can update its position information in real time throughout the process. By using map_ctgrf instead of directly using map, the potential conflict between the mapping node and the positioning node is resolved, and the coexistence of the two is achieved. Furthermore, during the movement process, the robot can update the map in real time without interrupting its workflow. Coordinate transformation can be performed through steps S310 to S320 to ensure the alignment between the newly created map and the original map, thereby achieving a smooth transition of the map.
[0057] It is worth mentioning that the map is composed of pixels, so the overlap of the two maps can be regarded as the assignment of pixel points. Assigning the pixel values of each coordinate of the newly created map to the original map can be regarded as the overlap of the two maps. Since the origins of the two maps do not overlap, the coordinates of the same point in the two maps are different. The coordinates of the points in the newly created map need to be converted to the coordinate system of the original map before the assignment and overlap can be performed; and the conversion of coordinates definitely requires a coordinate system transformation. In the above embodiment, it is mentioned that the mapping node is built on the positioning node. It can be understood that the origin of the mapping node in this application is the current position of the robot, so the coordinate transformation between the newly created map and the original map is the transformation between base and map at that time. Therefore, after the mapping node is started, it is sufficient to listen to the transformation between base and map. However, there will definitely be errors in the movement of the robot. After part of the map is created, the accuracy of the original base to map transformation may be reduced, which leads to the failure of alignment of the two maps. Therefore, in this application, since the origin of the coordinate system when the mapping node is started is the current position of the robot, the coordinate transformation between map_ctgrf and map can be directly monitored. Because the sub-coordinate system of map_ctgrf is map, map_ctgrf is relative to map during the movement process, and each time before the new map and the original map are aligned based on the coordinate change matrix, the second transformation information corresponding to the coordinate transformation between map_ctgrf and map can be monitored once to ensure real-time alignment of the two maps.
[0058] In some embodiments, the second transformation information obtained from the mapping node, that is, the transformation information from map_ctgrf to map, may include rotation and translation vectors represented by quaternions, and a 4x4 homogeneous transformation matrix Tmap_ctgrf→map is calculated using the quaternions and translation vectors. The matrix includes rotation and translation information, and then for each point or feature in the newly created map, the transformation matrix Tmap_ctgrf→map is applied to calculate the position of the point in the original map coordinate system, so as to insert the transformed point or feature into the corresponding position in the original map, ensuring that the overlapping area between the two matches to the greatest extent.
[0059] refer to Figure 4 , Figure 4It is a schematic diagram of map expansion in the method for dynamically updating a map by a mobile robot provided in an embodiment of the present invention; in some embodiments, the map size of the original map is expanded according to the edge coordinates of the newly created map, including but not limited to the following steps: obtaining the first edge coordinates of the newly created map and the second edge coordinates of the original map; obtaining the third edge coordinates according to the first edge coordinates and the second edge coordinates, so that the first edge coordinates and the second edge coordinates are located within the map range corresponding to the third edge coordinates; and expanding the map size of the original map according to the expansion size information corresponding to the third edge coordinates.
[0060] It can be understood that the present application can determine the boundary coordinates of the newly created map (first edge coordinates) and the boundary coordinates of the original map (second edge coordinates), where the edge coordinates usually include the coordinates of the four corner points of the map, namely the leftmost, rightmost, topmost and bottommost coordinate points of the map; by determining the boundary of the newly created map and the original map, the maximum range of the coverage area of the two maps can be found, and now a new boundary coordinate set (third edge coordinates) can be calculated based on the boundary coordinates of the newly created map and the original map, and this new boundary coordinate should include all the coverage ranges of the two maps.
[0061] Specifically, by comparing the leftmost, rightmost, topmost, and bottommost coordinate points of the newly created map and the original map, the leftmost coordinate can be taken as the leftmost coordinate of the new map, the rightmost coordinate can be taken as the rightmost coordinate of the new map, the topmost coordinate can be taken as the topmost coordinate of the new map, and the bottommost coordinate can be taken as the bottommost coordinate of the new map. The third edge coordinate obtained in this way is the new boundary of the expanded map. Then, the map size of the original map can be expanded according to the expanded size information corresponding to the third edge coordinate, so that the newly expanded map can contain all existing and newly added map information.
[0062] In some embodiments, Figure 4 As shown, A1~A4: boundary coordinates of the original map; B1~B4: boundary coordinates of the newly created map. The present application can find new boundary coordinates C1~C4 through the above embodiment, so that the expanded map can completely cover all areas of the original map and the newly created map, compare A1 and B1, take the minimum value as the new leftmost coordinate (C1), compare A2 and B2, take the maximum value as the new rightmost coordinate (C2), compare A3 and B3, take the maximum value as the new topmost coordinate (C3), compare A4 and B4, take the minimum value as the new bottommost coordinate (C4), and the final C1~C4 are the boundary coordinates of the expanded map.
[0063] It is understandable that the expansion of the map size meets the operating scenarios at different times and with different needs. There is no need to worry about the reconstruction of the map. When the scene is large, you can first build a part and save it, and then continue to build the map. There is no need to build the entire map at one time, which provides great convenience for operators and equipment.
[0064] refer to Figure 5 , Figure 5 : is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention; in some embodiments, the corresponding points in the original map are assigned values and updated according to the newly created map, including but not limited to the following steps:
[0065] Step S510, dividing the newly created map into regions based on the update reserved regions corresponding to the original map, so as to determine the target update region in the newly created map;
[0066] Step S520: updating the corresponding points in the original map according to the points in the newly created map that are within the target update area.
[0067] In some embodiments, corresponding to step S510, the present application may first determine which areas need to be updated and which areas need to remain unchanged. The steps of the present application may be implemented by selecting the areas that need to be updated on the original map. The selected areas are called target update areas. For example, the parts that need to be updated are manually or automatically selected on the original map. Based on the selection results, the newly created map is divided into regions to identify which points belong to the target update area. After determining the target update area, all points in the newly created map are traversed, and for the points in the target update area, their information is copied to the corresponding points in the original map.
[0068] refer to Figure 6 , Figure 6 : is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention; in some embodiments, assigning and updating corresponding points in the original map according to points in the target update area in the newly created map includes but is not limited to the following steps:
[0069] Step S610, obtaining the area update requirement;
[0070] Step S620, based on the area update requirement, determining a plurality of assigned points from the points in the target update area;
[0071] Step S630: updating the values of the corresponding points in the original map according to the multiple valued points.
[0072] In some embodiments, by obtaining regional update requirements, the present application can clarify the update requirements and determine whether to perform a comprehensive coverage update or a partial update of the target update area. The regional update requirements can be set for users or systems. According to the update requirements set by the user, select which points need to be updated. For example, if the requirement is a coverage update, all points in the target update area need to be updated. If the requirement is a partial update, it is necessary to further determine which points need to be updated, and then the information in the newly created map can be updated to the original map based on the determined assigned points.
[0073] In some embodiments, for overlay updates, the corresponding point information in the original map can be directly replaced by the point information in the newly created map; for partial updates, it is necessary to further determine which points need to be updated. Normally, only those points with new information (non-zero pixel values) are updated.
[0074] refer to Figure 7 , Figure 7 1 is another flow chart of a method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention; in some embodiments, based on the regional update requirement, multiple assigned points are determined from various points in the target update area, including but not limited to the following steps:
[0075] Step S710, when the update requirement characterization covers and updates the target update area, all points in the target update area are determined as assigned points;
[0076] Step S720 , when the update requirement indicates that a partial update is to be performed on the target update region, the assigned points are determined according to the pixel values of the points in the target update region to obtain a plurality of assigned points.
[0077] In some embodiments, when the update requirement represents a coverage update of the target update area, each point in the target update area is determined as an assigned point. When the update requirement is a coverage update, all points in the target update area need to be updated. For example, all points in the target update area are traversed and all points are marked as assigned points that need to be updated.
[0078] In some embodiments, when the update requirement is a partial update, only those points with valid information (such as non-zero pixel values) need to be updated. For example, all points in the target update area are traversed, and for each point, its pixel value is checked to see if it is non-zero. If the pixel value is non-zero, the point is marked as a valued point that needs to be updated.
[0079] Through the above steps, the method of the present application can realize flexible updating of the original map, which can not only meet the needs of comprehensive coverage update, but also support the needs of partial update, thereby making the map update more accurate and efficient.
[0080] refer to Figure 8 , Figure 8 is another flow chart of the method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention; in some embodiments, the method further includes but is not limited to the following steps:
[0081] Step S810, when the mobile robot runs to a preset target map area, the map building node is started to confirm the second transformation information corresponding to the target map area, and the assignment of points in the target map area is updated based on the second transformation information to obtain an updated map corresponding to the target map area;
[0082] Step S820: When the mobile robot runs out of the target map area, close the map building node.
[0083] In some embodiments, the present application proposes a scheme for autonomously updating a map in a method for dynamically updating a map of a mobile robot, triggering a dynamic mapping function through a preset target map area, and turning off the mapping function when the robot leaves the area. Specifically, when the robot enters a preset target map area, the mapping node is started to start updating the map information of the area. The robot can detect whether it has entered the preset target map area through sensors (such as lidar, camera, etc.). Once the robot is detected to have entered the area, the mapping node is started to record and process the environmental information of the area. The transformation information (i.e., the second transformation information) between the mapping reference system (map_ctgrf) and the map coordinate system (map) is obtained through the mapping node, and the points in the target map area are assigned and updated, that is, the information in the newly created map (such as obstacle locations, environmental features, etc.) is updated to the corresponding positions in the original map. Through the above steps, an updated map corresponding to the target map area is finally obtained.
[0084] In some embodiments, when the robot leaves a preset target map area, the mapping node is closed and map updates for the area are stopped. For example, the robot may continue to monitor its own position. Once it is detected that the robot has left the preset target map area, the operation of closing the mapping node is triggered. The mapping node is closed and recording and processing of environmental information of the area are stopped to prevent unnecessary resource consumption.
[0085] It is understandable that the present application ensures the existence of positioning nodes when dynamically updating the map, and can ensure the positioning accuracy of the robot in the process of updating the map during the operation of the robot, so as to avoid the robot losing its positioning during the dynamic mapping process. In this case, the updated map area will be incorrect, which may cause the original map to be destroyed. Therefore, in practical applications, it is necessary to increase the judgment of the current position and posture of the robot. For example, the positioning information of the robot can be regularly verified to ensure the accuracy of its position and posture, or by immediately stopping the mapping when the positioning is lost or the deviation is too large, and taking measures to restore the positioning before continuing to ensure the positioning accuracy of the robot, and a variety of positioning technologies (such as visual SLAM, laser SLAM, GPS, etc.) can be combined to improve the reliability and accuracy of positioning.
[0086] refer to Fig. 9 , Fig. 9 It is a flow chart of a method for dynamically updating a map of a mobile robot provided by an embodiment of the present invention. The present application can be implemented by, according to the flow chart, the present application scheme is a method for dynamically updating a map, which is mainly divided into the following steps: retaining the positioning node and starting the map-building node, subscribing to the original map and the newly-built map, so as to obtain the coordinate change matrix from the newly-built map to the original map, and then expanding the map size, and overlapping the newly-built map with the original map; further, assigning values to the pixels of the two maps to overlap, and selecting whether to update the entire area or the local area according to the requirements, if it is a full-area update, assigning values to all the pixels of the newly-built map to the original map; if it is a local area update, only assigning values to the pixels in the specified area; finally, publishing the updated dynamic map for use by robots or other systems. In this way, the present application realizes the dynamic update of the map, which can meet the requirements of comprehensive coverage update and support the requirements of partial update, so that the map update is more accurate and efficient. In addition, the problem of map size expansion is also taken into account, so that the map can adapt to a larger operating environment, while reducing the workload of rebuilding the map. In summary, this application provides a map updating method with a high degree of automation and strong flexibility, which enables the robot to autonomously update the map in a specific area, reducing the need for human intervention. At the same time, a strict positioning verification mechanism is used to ensure the accuracy and reliability of map updates. It is suitable for dynamic environments where maps need to be updated frequently, such as logistics warehouses, smart factories and other scenarios.
[0087] Second, refer to Fig.10 , Fig.10It is a structural diagram of a mobile robot dynamic map update device 1000 provided in an embodiment of the present invention, wherein the operation control device 1000 includes: a memory 1010, a processor 1020, and a computer program stored in the memory 1010 and executable on the processor 1020, and when the processor 1020 executes the computer program, it implements the mobile robot dynamic map update method as in the above embodiment.
[0088] The memory 1010 is a non-transitory computer-readable storage medium that can be used to store non-transitory software programs and non-transitory computer executable programs, such as the method for dynamically updating a map of a mobile robot in the above embodiment of the present invention. The processor 1020 implements the method for dynamically updating a map of a mobile robot in the above embodiment of the present invention by running the non-transitory software programs and instructions stored in the memory 1010.
[0089] The memory 1010 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data required for executing the method for dynamically updating a map of a mobile robot in the above embodiment, etc. In addition, the memory 1010 may include a high-speed random access memory 1010, and may also include a non-transitory memory 1010, such as at least one disk storage device, a flash memory device, or other non-transitory solid-state storage device. It should be noted that the memory 1010 may optionally include a memory 1010 remotely arranged relative to the processor 1020, and these remote memories 1010 may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0090] The non-transient software program and instructions required to implement the method for dynamically updating a map of a mobile robot in the above embodiment are stored in a memory. When executed by one or more processors, the method for dynamically updating a map of a mobile robot in the above embodiment is executed. For example, Figure 1 Steps S110 to S140 of the method, Figure 3 Steps S310 to S320 of the method, Figure 5 Steps S510 to S520 of the method, Figure 6 Steps S610 to S630 of the method, Figure 7 Steps S710 to S720 of the method, Figure 8 Method steps S810 to S820.
[0091] In a third aspect, the present invention provides a mobile robot, the mobile robot comprising a mobile robot dynamic map update device as in the second aspect.
[0092] In a fourth aspect, the present invention further provides a computer-readable storage medium, the computer-readable storage medium storing computer-executable instructions, the computer-executable instructions being used to cause a computer to execute the method for dynamically updating a map of a mobile robot in the embodiment of the first aspect, for example, to execute the method of dynamically updating a map in the embodiment above. Figure 1 Steps S110 to S140 of the method, Figure 3 Steps S310 to S320 of the method, Figure 5 Steps S510 to S520 of the method, Figure 6 Steps S610 to S630 of the method, Figure 7 Steps S710 to S720 of the method, Figure 8 Method steps S810 to S820.
[0093] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to output requirements to achieve the purpose of the present embodiment.
[0094] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed methods above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium or a non-transitory medium and a communication medium or a temporary medium. As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk DVD or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0095] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge scope of ordinary technicians in the technical field without departing from the purpose of the present invention.
Claims
1. A method for dynamically updating a map of a mobile robot, characterized in that: include: Publishing first transformation information between the map coordinate system and the odometer coordinate system through a preset positioning node; Based on the first transformation information, second transformation information between a mapping reference system and the map coordinate system is published through a preset mapping node, wherein the mapping reference system takes the current posture of the mobile robot as an origin; Determining a newly created map corresponding to the mapping reference system and an original map corresponding to the map coordinate system, and aligning the coordinates of the newly created map and the original map based on the second transformation information; The map size of the original map is expanded according to the edge coordinates of the newly created map, and the corresponding points in the original map are updated according to the newly created map to obtain an updated map corresponding to the original map.
2. The method for dynamically updating a map of a mobile robot according to claim 1, characterized in that: The performing coordinate alignment on the newly created map and the original map based on the second transformation information includes: Obtaining a coordinate change matrix from the newly created map to the original map according to the second transformation information; The coordinates of the newly created map and the original map are aligned based on the coordinate change matrix.
3. The method for dynamically updating a map of a mobile robot according to claim 1, characterized in that: The step of expanding the map size of the original map according to the edge coordinates of the newly created map includes: Obtaining first edge coordinates of the newly created map and second edge coordinates of the original map; Obtaining a third edge coordinate according to the first edge coordinate and the second edge coordinate, so that the first edge coordinate and the second edge coordinate are located within a map range corresponding to the third edge coordinate; The map size of the original map is expanded according to the expansion size information corresponding to the third edge coordinates.
4. The method for dynamically updating a map of a mobile robot according to claim 1, characterized in that: The updating of the corresponding points in the original map according to the newly created map includes: Dividing the newly created map into regions based on the update reserved region corresponding to the original map to determine a target update region in the newly created map; According to the points in the newly created map that are within the target update area, corresponding points in the original map are assigned values and updated.
5. The method for dynamically updating a map of a mobile robot according to claim 4, characterized in that: The updating of the corresponding points in the original map according to the points in the newly created map that are within the target update area includes: Get regional update requirements; Based on the area update requirement, determining a plurality of assigned points from the points within the target update area; The corresponding points in the original map are updated with values according to the multiple valued points.
6. The method for dynamically updating a map of a mobile robot according to claim 5, characterized in that: The step of determining a plurality of value assignment points from the points in the target update area based on the area update requirement includes: In the case where the update requirement representation covers and updates the target update area, all points in the target update area are determined as assigned points; In the case where the update requirement represents a partial update of the target update region, the assignment point is determined according to the pixel value of each point in the target update region to obtain a plurality of assignment points.
7. The method for dynamically updating a map of a mobile robot according to claim 1, characterized in that: The method further comprises: When the mobile robot runs to a preset target map area, the mapping node is started to confirm the second transformation information corresponding to the target map area, and the assignment of points in the target map area is updated based on the second transformation information to obtain an updated map corresponding to the target map area; When the mobile robot runs out of the target map area, the mapping node is closed.
8. A mobile robot dynamic map updating device, characterized in that: It comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method for dynamically updating a map of a mobile robot as described in any one of claims 1 to 7.
9. A mobile robot, characterized in that: Including the mobile robot dynamic map update device as described in claim 8.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the method for dynamically updating a map of a mobile robot as described in any one of claims 1 to 7.