A method, apparatus, equipment and medium for autonomous exploration and mapping of robots
By listening to external control commands and identifying intentions for human intervention during the autonomous exploration main loop, and combining this with a continuous empty search threshold determination mechanism, the problem of control conflict and termination misjudgment in traditional robot autonomous exploration algorithms during human intervention is solved. This achieves full automation from exploration and mapping to autonomous recharging, improving task execution efficiency and system adaptability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-12
- Publication Date
- 2026-04-03
AI Technical Summary
Traditional robot autonomous exploration algorithms are prone to control conflicts and abnormal behavior when human intervention is required. Furthermore, the robustness of the exploration task termination determination is poor, making it impossible to achieve full-process automation and failing to meet the needs of unattended operations.
During the autonomous exploration main loop, external control commands are monitored synchronously to identify intentions for human intervention, enabling seamless switching between autonomous exploration mode and manual control mode. A judgment mechanism based on continuous empty search threshold is adopted to ensure the accuracy and integrity of exploration tasks and trigger the autonomous recharge process.
It enables safe switching between autonomous exploration mode and manual control mode, reduces the false judgment rate of exploration termination, improves the user-friendliness of human-computer interaction and the system's adaptability and robustness in complex environments, meets the needs of unmanned operation, and improves task execution efficiency.
Smart Images

Figure CN121297816B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of robotics, and in particular to a method, apparatus, equipment, and medium for autonomous exploration and mapping by a robot. Background Technology
[0002] In the field of autonomous robot exploration, traditional exploration algorithms mostly adopt a fully autonomous operation mode. When operators temporarily take over control via joysticks or software speed commands for safety management, task guidance, or other needs, conflicts between the autonomous algorithm and human commands can easily arise, leading to abnormal robot behavior or even safety risks. To avoid conflicts, the exploration task must be completely terminated, requiring manual restart after the manual operation, a cumbersome and inefficient process that hinders human-robot collaboration. Furthermore, the robustness of exploration task termination judgments is poor, especially in complex dynamic environments, easily resulting in incomplete map construction and exploration task failure. In addition, algorithms typically focus solely on completing map construction and cease operation after task termination, while robot charging relies on manual map verification and setting of recharge points, resulting in low automation, increased labor costs, and an inability to meet the needs of unattended operations. Summary of the Invention
[0003] The purpose of this invention is to provide a method, apparatus, device and medium for autonomous exploration and mapping of robots, which can significantly improve the friendliness of human-computer interaction and the adaptability and robustness of the system in complex dynamic environments, and realize the full automation of the process from exploration and mapping to autonomous recharging.
[0004] To address the aforementioned technical problems, this invention provides a method for autonomous exploration and mapping by a robot, comprising:
[0005] During the autonomous exploration main loop operation, it synchronously performs environment map construction and listens for external control commands;
[0006] When an intention to intervene is detected from the external control commands being monitored, the autonomous exploration task is paused and switched to manual control mode;
[0007] When no intention of human intervention is detected from the external control commands being monitored, the autonomous exploration mode is maintained, and an autonomous exploration task is performed using a judgment mechanism based on a continuous empty search threshold.
[0008] Once the autonomous exploration task is confirmed to be completed, a task chain is triggered and executed to navigate to a preset fixed point and call the recharging service to complete the autonomous recharging.
[0009] To address the aforementioned technical problems, the present invention also provides a robot autonomous exploration and mapping device, comprising:
[0010] The instruction monitoring module is used to synchronously construct the environment map and monitor external control instructions during the autonomous exploration main loop.
[0011] The mode switching module is used to pause the autonomous exploration task and switch to manual control mode when the intention of human intervention is detected from the external control commands being monitored.
[0012] The exploration and determination module is used to maintain the autonomous exploration mode and perform autonomous exploration tasks by adopting a determination mechanism based on a continuous empty search threshold when no intention of human intervention is identified from the external control commands being monitored.
[0013] The task chain execution module is used to trigger and execute a task chain that navigates to a preset fixed point and calls the recharge service after confirming the completion of the autonomous exploration task, so as to complete the autonomous recharge.
[0014] To address the aforementioned technical problems, the present invention also provides an electronic device, comprising:
[0015] Memory, used to store computer programs;
[0016] A processor is used to implement the steps of the above-described robot autonomous exploration mapping method when executing the computer program.
[0017] To address the aforementioned technical problems, the present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described robot autonomous exploration and mapping method.
[0018] As can be seen from the above technical solution, the robot autonomous exploration mapping method provided by the present invention includes: during the autonomous exploration main loop operation, synchronously executing environmental map construction and listening for external control commands; when the intention of human intervention is identified from the listened external control commands, pausing the autonomous exploration task and switching to the manual control mode; when no intention of human intervention is identified from the listened external control commands, maintaining the autonomous exploration mode and executing the autonomous exploration task using a judgment mechanism based on a continuous empty search threshold; after confirming that the autonomous exploration task is completed, triggering and executing a task chain of navigation to a preset fixed point and calling the recharging service to complete the autonomous recharging.
[0019] The beneficial effects of this invention are as follows: The above-mentioned robot autonomous exploration mapping method provided by this invention achieves seamless and safe switching between autonomous exploration mode and manual control mode by synchronously listening to external control commands and recognizing human intervention intentions during the autonomous exploration main loop. This avoids system anomalies or safety accidents caused by control conflicts and allows the exploration task to resume after human intervention, ensuring operational continuity and significantly improving the user-friendliness of human-computer interaction and the system's adaptability and robustness in complex dynamic environments. Relying on the judgment mechanism based on the continuous empty search threshold, the false judgment rate of exploration termination is greatly reduced, improving the accuracy and reliability of exploration task completion. At the same time, after the exploration is completed, the task chain of navigation to the preset fixed point and recharging service is automatically triggered, realizing the full automation of the process from exploration mapping to autonomous recharging. Energy replenishment can be completed without human intervention, meeting the needs of unmanned operation. Overall, it significantly improves the task execution efficiency of mobile robots and has extremely high practical value and promotion prospects.
[0020] In addition, the present invention also provides a corresponding robot autonomous exploration mapping device, electronic device and computer-readable storage medium for the robot autonomous exploration mapping method, which has the same or corresponding technical features as the robot autonomous exploration mapping method mentioned above, and has the same effect. Attached Figure Description
[0021] To more clearly illustrate the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A flowchart of a robot autonomous exploration mapping method provided in an embodiment of the present invention;
[0023] Figure 2 This is a flowchart illustrating the robot autonomous exploration and mapping method provided in an embodiment of the present invention.
[0024] Figure 3 This is a schematic diagram of the structure of the robot autonomous exploration and mapping device provided in an embodiment of the present invention. Detailed Implementation
[0025] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of the present invention.
[0026] It should be noted that, in the description of this invention, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., used in this invention are used to distinguish similar objects and are not used to describe a specific order or sequence.
[0027] To enable those skilled in the art to better understand the present invention, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0028] The specific application environment architecture or specific hardware architecture on which the execution of the robot's autonomous exploration mapping method depends is described here.
[0029] The embodiments of the present invention provide a method for autonomous exploration and mapping of robots, and the method is described in detail in conjunction with the execution flow of the autonomous exploration and mapping method of robots. Figure 1 A flowchart of the robot autonomous exploration mapping method provided in the embodiments of the present invention is shown below. Figure 1 As shown, the method includes:
[0030] S101. During the autonomous exploration main loop operation, the environment map is built synchronously, and external control commands are listened for.
[0031] It should be noted that in this invention, external control commands can be monitored in parallel. Parallel monitoring here refers to the simultaneous monitoring of external control commands through independent threads or processes while the Robot Operating System (ROS) is running its autonomous exploration task. This process does not block the execution of the main task; the two processes overlap in time, ensuring both the normal operation of the main task and real-time capture of external control commands, thereby achieving a low-latency response to human intervention intentions.
[0032] During step S101, two key tasks are simultaneously performed during the autonomous exploration main loop: First, the system collects environmental data in real time through sensors, calls mapping algorithms to generate and dynamically update the environmental map, ensuring that the map accurately reflects the robot's current spatial information and provides a basis for subsequent exploration decisions. Second, the system continuously allocates computing resources to listen for external control commands, capturing intervention signals that operators may send in real time (such as commands to adjust movement direction or pause the task), and then intelligently recognizing the user's control intentions. These two tasks are executed in parallel without blocking each other, ensuring the continuity of environmental map construction, avoiding interruption of the mapping process due to command listening, and ensuring that external intervention needs can be responded to in a timely manner. Here, "system" refers to the autonomous exploration software system running on the robot, i.e., the program of this invention, which is usually represented as a node in ROS.
[0033] S102. When an intention to intervene manually is detected from the external control commands being monitored, the autonomous exploration task is paused and switched to manual control mode.
[0034] In implementation, while the system continuously monitors external control commands, this invention can analyze the command information in real time to determine whether it contains intentions for human intervention (such as adjusting the robot's movement direction, emergency avoidance, designating exploration areas, etc.). Once such intentions are identified, the system can immediately trigger mode switching logic: first, suspend the currently executing autonomous exploration task (including frontal detection, target point calculation, navigation execution, etc.) to avoid control conflicts between the autonomous algorithm and human commands; then, seamlessly switch to Manual Control Mode. Manual Control Mode is a state that the system automatically enters when it detects a valid user control command. In this mode, the system suspends the autonomous exploration task, cancels the current navigation target, and completely hands over the robot's motion control to the external command flow until the control timeout. That is, at this time, the robot's motion state and the right to receive operation commands are completely handed over to human control. Operators can send commands through devices such as joysticks and host computers to directly take over the robot, meeting personalized intervention needs such as safety management and task guidance.
[0035] S103. When no intention of human intervention is detected from the external control commands monitored, maintain the autonomous exploration mode and use a judgment mechanism based on the continuous empty search threshold to perform the autonomous exploration task.
[0036] During implementation, if the system continuously monitors external control commands and no intention of human intervention is detected (i.e., no operator-initiated adjustments, pauses, or other intervention requests), the robot will remain in Autonomous Exploration Mode and continue its exploration task according to preset logic. Autonomous Exploration Mode is the state in which the robot runs autonomous exploration algorithms (such as front-line detection algorithms). In this mode, the robot autonomously decides its movement targets to maximize the construction of a map of the unknown environment. At this time, the system can activate a Consecutive Empty-search Threshold Mechanism to assist exploration. This mechanism is an interference-resistant method for determining the termination of the exploration task. The system requires that no valid target front point be found within multiple consecutive exploration cycles (reaching the preset empty-search threshold) before finally determining that the exploration task is complete, effectively avoiding misjudgments caused by temporary obstacles or sensor noise. For example, in each exploration cycle, the robot continuously detects whether there are new frontier regions that meet the conditions (i.e., the boundary between explored and unknown regions) in the environment, and counts the number of consecutive cycles in which no effective frontier is found. If the number does not reach the preset threshold, the robot continues to perform the complete exploration process, including frontier screening, target point planning, navigation movement, and map updating. This ensures that the robot can stably and orderly complete environmental exploration and map building without human intervention, significantly improving the accuracy of the exploration task.
[0037] S104. After confirming the completion of the autonomous exploration task, trigger and execute the task chain of navigating to the preset fixed point and calling the recharge service to complete the autonomous recharge.
[0038] It should be noted that in the scenario of autonomous robot exploration and mapping, autonomous recharging refers to the robot automatically completing the entire process of navigating to a charging station, precisely docking with the charging station, and initiating the charging process after completing the exploration and mapping task, without human intervention, through its own control system and hardware collaboration, ultimately achieving the function of energy replenishment. The task chain executed in step S104 includes at least two key steps: navigating to a fixed point (moving to preset coordinates in the environment) and calling the recharging service (initiating a charging request command to the underlying system), realizing a seamless connection from exploration to recharging.
[0039] In practice, when the system confirms, through a judgment mechanism based on a continuous empty search threshold, that there are no effective exploration fronts in the current environment and the autonomous exploration task has been fully completed, it can automatically trigger a preset subsequent task process. First, the system generates a navigation task with a preset fixed point as the target, driving the robot to move to that point according to the planned path; after the robot arrives accurately, it immediately calls the underlying recharging service, triggering a series of automated operations such as charging pile docking, cable connection, and charging initiation. Ultimately, the robot can autonomously recharge without human intervention, reserving energy for the next operation.
[0040] The robot autonomous exploration mapping method provided in this invention achieves seamless and safe switching between autonomous exploration mode and manual control mode by synchronously listening to external control commands and identifying human intervention intentions during the autonomous exploration main loop. This avoids system anomalies or safety accidents caused by control conflicts and allows the exploration task to resume after human intervention, ensuring operational continuity and significantly improving the user-friendliness of human-computer interaction and the system's adaptability and robustness in complex dynamic environments. Based on a judgment mechanism using a continuous empty search threshold, the method significantly reduces the false judgment rate of exploration termination, improving the accuracy and reliability of exploration task completion. Simultaneously, after exploration is completed, a task chain for navigation to a preset fixed point and recharging service is automatically triggered, achieving full automation from exploration mapping to autonomous recharging. Energy replenishment can be completed without human intervention, meeting the needs of unmanned operation. Overall, this significantly improves the task execution efficiency of mobile robots and solves the problems of traditional autonomous exploration algorithms, such as the inability to intelligently respond to human intervention, high false judgment rate of exploration termination, and lack of automated task connection after exploration. It possesses extremely high practical value and promising prospects for widespread application.
[0041] Figure 2 This is a flowchart illustrating the robot's autonomous exploration and mapping method provided in an embodiment of the present invention. Figure 2 As shown, before executing step S101, the present invention may further include: initializing and self-checking the system; starting each module of the robot and performing an initial drive test to confirm that the basic motion functions are normal.
[0042] During implementation, the system powers on and loads all functional modules, including autonomous exploration, sensor driving, and chassis control. Before executing the core task, the initial drive service is invoked to control the robot to perform a simple preset motion. This step aims to perform a power-on self-test, verifying the robot's motion mechanism and underlying drive communication are functioning correctly. Simultaneously, a full rotation of the robot provides richer mapping information, optimizing the subsequent autonomous exploration mapping process. If the self-test fails, the system reports an error and stops the startup process; if the self-test succeeds, it proceeds to the next step. This effectively prevents operation with faults and improves system reliability.
[0043] After system initialization and self-check, the process includes entering the autonomous exploration main loop. The robot runs autonomous exploration algorithms (such as frontier detection algorithms) to build an environmental map in real time.
[0044] In implementation, the system enters a main autonomous exploration loop operating at a fixed frequency (e.g., 0.5 Hz by default, once every 2 seconds; the frequency can be adjusted based on the size and openness of the space). Within each loop cycle, the system executes the following sub-steps:
[0045] Step 1: Obtain the robot's current pose in the global map by querying the Transform Tree (TF) or the localization module. The TF tree is a data structure in ROS used to manage the relationships between coordinate systems. A TF tree consists of multiple coordinate systems (frames) connected together through a series of transformation relationships to form a tree structure. The root node is typically the "map" coordinate system, representing the global map coordinate system. Other coordinate systems, such as "odom" (odometry coordinate system) and "base_link" (robot base coordinate system), are attached as child nodes under the root node or other parent nodes. Each coordinate system has a unique name, and in the tree structure, any coordinate system can only have one direct parent coordinate system, but can have multiple child coordinate systems. The purpose of the TF tree is to maintain the coordinate transformation relationships of the entire robot and even the map, corresponding to the transformation relationships between fixed coordinate systems at different robot positions, to display the robot's motion state. Through the TF tree, ROS can implement applications such as attitude control and navigation for various robot components. For example, during movement, the robot can use the TF tree to calculate its position in the world coordinate system based on the position information obtained by sensors.
[0046] Step 2: Based on the map information of the currently constructed grid map, run the front detection algorithm to search for the boundary points between the "explored" and "unknown" areas in the map, i.e., the front. At the same time, run the mapping algorithm based on radar or camera to obtain map information, and then execute the front detection algorithm based on the map information to obtain the front outline and front points.
[0047] Step 3: Filter all the searched frontier points. This filtering includes spatial filtering and radius filtering. Spatial filtering uses a spatial memory mechanism to filter out points located within the filtering radius of the previously explored point set (points that have been navigated in the past), avoiding repeated exploration. Radius filtering filters out points that are more than the preset maximum exploration radius (set by the user according to the required map range or scene requirements), thus confining the exploration range to a controllable area.
[0048] Step 4: From the filtered optimal frontier points, select the point with the lowest cost or the highest information gain. (The core definition of information gain is a metric used in information theory and machine learning (especially decision tree algorithms) to measure the contribution of a feature to reducing data uncertainty.) The highest information gain means that among all available features, that feature can reduce data confusion or uncertainty to the greatest extent. The point with the highest information gain is sent as the target point to the lower-level navigation stack, directing the robot to move towards that point. The system evaluates the set of effective frontier points obtained after filtering and calculates a comprehensive cost value for each point. This cost value is determined by the distance cost to reach the point and the expected information gain that the point can provide (cost = distance cost - information gain). Here, information gain specifically refers to the robot's arrival at the point. The size of the unknown region that the sensors can observe is typically estimated using the dimensions of the leading edge point itself. The system selects the point with the lowest overall cost as the final target point and encapsulates it as a standard navigation target message, sending it to the underlying navigation stack (a collection of software frameworks, such as move_base, that enable autonomous robot movement). Upon receiving the target, the navigation stack is responsible for executing specific path planning and motion control, directing the robot to move towards that point. The robot's movement is essentially a process of its sensors scanning and mapping the environment, with the ultimate goal of maximizing the discovery of the unknown region pointed to by the target point, thereby efficiently completing environmental exploration.
[0049] Furthermore, in a specific implementation, in the above-mentioned robot autonomous exploration mapping method provided in the embodiments of the present invention, step S101, which listens to external control commands, may specifically include: creating a subscriber object, which listens in parallel to the control topics managed by the robot operating system manager; opening a listening thread, which receives messages in the control topics and parses the speed commands in the messages; determining whether the speed command is a non-zero value based on the parsing result; if the speed command is a non-zero value, it is determined that a human intervention intention has been identified; if the speed command is zero, it is determined that no human intervention intention has been identified.
[0050] In practice, the robot autonomous exploration and mapping method of this invention is based on human-robot collaboration. Human-robot collaboration is a collaborative work paradigm in which the mobile robot can receive and respond to human control commands from the outside in real time through a specific communication interface (ROS topic), and can automatically resume the previously interrupted autonomous task after the human control ends, rather than a simple mode switch.
[0051] The system can first create a subscriber object, which continuously listens in parallel (through a separate callback thread) to control topics managed by the Robot Operating System Manager (ROS Master). Simultaneously, a separate listening thread continuously subscribes to the specified control topics. This thread receives messages (such as those of type `geometry_msgs::Twist`) from the control topics in real time and parses the velocity commands contained within them. Then, based on the parsing results, it determines whether the velocity commands (such as linear and angular velocities) are non-zero: if non-zero, it indicates a human intervention request, meaning a human intervention intention has been identified; if zero, it represents no human intervention signal, meaning no human intervention intention has been identified. This approach, using a separate thread and parallel listening, ensures real-time command reception. By using the non-zero velocity command criterion, it achieves real-time, low-latency perception of human intervention intentions, making the identification of human intervention intentions more accurate and effectively avoiding misjudgments.
[0052] Furthermore, in a specific implementation, in the above-mentioned robot autonomous exploration mapping method provided in the embodiments of the present invention, step S102 suspends the autonomous exploration task and switches to human-machine control mode, which may specifically include: calling a navigation target cancellation command to cancel the currently executing navigation target generated by the autonomous exploration algorithm; switching to manual control mode so that the robot's movement is controlled by externally input speed commands, maintaining the autonomous exploration mapping function, pausing the operation of sending the optimal point selected during the exploration process to the navigation system, and pausing the operation of recording the optimal point in the database.
[0053] In implementation, this invention immediately triggers a mode switch upon detecting a non-zero velocity command. First, it cancels the currently executing navigation target generated by the autonomous exploration algorithm by calling a navigation target cancellation command (such as the `cancelGoal` command of `move_base`). Then, it switches to manual control mode, allowing the robot's movement to be entirely dominated by externally input velocity commands. In manual control mode, the system maintains the normal operation of the autonomous exploration mapping function; that is, the system continues autonomously exploring and mapping to ensure uninterrupted environmental map construction. Simultaneously, it pauses two key operations: it does not send the optimal points selected during exploration to the navigation system, nor does it record them in the database, avoiding conflicts between autonomous exploration decisions and manual control. This satisfies the need for manual intervention in robot movement, ensures the continuity of map construction, and reduces system resource consumption by pausing irrelevant operations, thus balancing operational flexibility and mapping stability.
[0054] Furthermore, in a specific implementation, the above-mentioned robot autonomous exploration mapping method provided in the embodiments of the present invention may further include, after switching to manual control mode, starting a timeout timer; starting the timer from the last received external control command, and if no new external control command is received within the preset control timeout period, exiting manual control mode and switching back to autonomous exploration mode.
[0055] In implementation, after the system switches to manual control mode, a timeout timer can be started simultaneously. The timer's start point is calculated from the last time an external control command is received. If the system does not receive a new external control command (such as a new speed command) within the preset control timeout period (e.g., 1.0 second), it determines that the manual intervention operation has ended, automatically exits the manual control mode, and switches back to the autonomous exploration mode. The autonomous exploration main loop immediately re-executes a complete front-line detection, filtering, and cost assessment process based on the robot's latest pose and the updated environmental map, thereby calculating a new and optimal exploration target point. This allows the robot to resume autonomous exploration without manual triggering by the operator after the manual intervention is paused or ended. This avoids work stoppages caused by forgetting to switch modes, ensures the continuity of exploration and mapping tasks, and further improves the automation of system operation.
[0056] Furthermore, in specific implementation, the above-mentioned robot autonomous exploration mapping method provided in the embodiments of the present invention may further include the following after switching back to autonomous exploration mode: triggering the autonomous exploration main loop, re-executing the frontier detection, filtering and cost assessment process based on the robot's latest position and attitude and the updated environmental map, and calculating a new optimal exploration target point; encapsulating the new optimal exploration target point as a navigation target, sending it to the underlying navigation stack through the action library interface, and directing the robot to continue to perform the autonomous exploration task.
[0057] During implementation, after switching back to autonomous exploration mode, the system immediately triggers the main autonomous exploration loop. Using the robot's latest position and posture as a baseline, and combining this with the continuously updated environmental map from the manual control phase, the system re-executes the frontier detection, frontier filtering, and cost assessment processes to accurately calculate a new, optimal exploration target point suitable for the current environment. Subsequently, the system encapsulates this new target point into a standard navigation target and sends it to the underlying navigation stack (move_base) via an action library interface (such as the ActionLib interface). The navigation stack then plans the path and controls the robot's movement, allowing the autonomous exploration task to continue seamlessly. This enables the robot to restart exploration based on the latest environmental information, avoiding exploration gaps caused by mode switching, ensuring the continuity of map construction and the rationality of the exploration target, and effectively improving overall exploration efficiency.
[0058] Furthermore, in specific implementation, in the above-mentioned robot autonomous exploration mapping method provided in the embodiments of the present invention, step S103 adopts a judgment mechanism based on a continuous empty search threshold to perform the autonomous exploration task, which may specifically include: based on the latest environmental map, running a frontier detection algorithm to search for the boundary between explored and unknown areas; performing multi-dimensional filtering on the searched frontier clusters (a set of spatially continuous frontier points) to generate a valid frontier set; if the valid frontier set is empty, incrementing the value of the continuous empty search counter by one; if the valid frontier set is not empty, resetting the continuous empty search counter to zero; determining whether the value of the continuous empty search counter reaches or exceeds a preset empty search threshold: if yes, determining that the autonomous exploration task is completed; if no, determining that the exploration is not completed, and continuing to run the next autonomous exploration main loop.
[0059] It should be noted that the Frontier Detection Algorithm (FRD) is a core algorithm for autonomous exploration used by mobile robots to identify the boundaries between "explored" and "unknown" areas in their environment. This algorithm analyzes a grid map constructed from robot sensor data in real time, searches for adjacent points in free space (accessible areas) and unknown space (unexplored areas), clusters these points to generate a set of candidate boundary points (i.e., frontier points), and calculates the cost (e.g., distance, information gain) for each candidate set, thereby determining the optimal exploration target. This invention adds filtering and optimization strategies for these candidate targets based on this algorithm. A frontier point is a grid point identified by the Frontier Detection Algorithm that lies on the boundary between "explored accessible areas" and "completely unknown areas" in the map. A frontier point itself is known and accessible, but its adjacent points contain unknown areas. A large number of adjacent frontier points constitute a "frontier area," representing a potential passage or direction to the unknown environment, and is a key navigation target guiding the robot's autonomous exploration.
[0060] In implementation, within each execution cycle of the autonomous exploration main loop, after completing the frontier detection and target filtering steps on the global map, the system immediately determines whether the exploration is complete. The core criterion for this determination is whether the set of valid frontiers generated in the current cycle is empty. The specific process may include: based on the latest environmental map, the system runs a frontier detection algorithm to precisely search the boundaries of all "explored" and "unknown" regions to obtain frontier clusters; subsequently, it performs multi-dimensional filtering on all these searched frontier clusters (including but not limited to: minimum size filtering, blacklist filtering, exploration radius filtering, and spatial memory filtering) to generate a set of valid frontiers that meets the exploration conditions. This set contains all candidate target regions within the current global map range that meet the exploration conditions. Next, the system updates the continuous empty search counter based on the status of the valid frontier set: if the valid frontier set is empty, it indicates that no qualified exploration targets were found in this cycle, and the system increments the value of the continuous empty search counter by one; if the valid frontier set is not empty, it indicates that there are still unknown regions to be explored on the map, and the system immediately resets the continuous empty search counter to zero. Finally, the system checks if the consecutive empty search counter value has reached or exceeded a preset threshold (e.g., 3 times). If it has, the autonomous exploration task is considered complete, triggering the subsequent automatic recharge process. If it has not reached the threshold, the exploration is considered incomplete, and the next round of the autonomous exploration main loop continues. This mechanism only determines the exploration task is complete if no frontier is found for a consecutive empty search threshold number of cycles. This mechanism effectively avoids misjudgments caused by single detection failures (such as temporary obstruction by obstacles), greatly improving the robustness of the judgment. It effectively avoids single misjudgments caused by temporary obstacle obstruction, sensor noise, etc., significantly improving the accuracy and reliability of the exploration task termination judgment and ensuring the integrity of map construction.
[0061] Furthermore, in a specific implementation, in the above-mentioned robot autonomous exploration mapping method provided in the embodiments of the present invention, step S104 triggers and executes a task chain of navigating to a preset fixed point and calling the recharge service to complete autonomous recharge. Specifically, it may include: generating a navigation task with the preset fixed point as the target, sending it to the underlying navigation stack through the action library interface, so that the navigation stack performs path planning and motion control operations to drive the robot to move to the preset fixed point; after confirming that the robot has arrived at the preset fixed point, initiating a call to the recharge service of the robot's underlying control system through the built-in service client to notify the underlying control system to perform the corresponding operation and complete autonomous recharge.
[0062] In implementation, once exploration is complete, the exploration node generates a navigation task targeting a preset fixed point (e.g., the coordinates of a pre-calibrated charging station on the global map, an empirical value). This task is sent to the underlying navigation stack via an action library interface (such as the ActionLib interface). The navigation stack then takes over subsequent path planning and motion control, precisely guiding the robot to the fixed point. After confirming successful arrival at the fixed point, the robot initiates a call to the recharging service provided by the robot's underlying control system via a built-in service client. This service request encapsulates specific task instructions, instructing the underlying control system to perform the final precise docking, wiring, and charging hardware operations. Thus, the entire process from intelligent exploration to automatic recharging is completed automatically by the system without any human intervention. This complete process, requiring no human intervention, ensures the accuracy and safety of recharging and achieves seamless integration of exploration tasks and energy replenishment, providing crucial support for unmanned robot operation.
[0063] It should be noted that in this invention, the robot executes a mapping algorithm, scanning the surrounding environment using sensors such as radar and / or cameras to create a map. Simultaneously, the map information is transmitted to an exploration mapping algorithm, which periodically performs a frontier exploration algorithm on the map information to obtain frontier contours and frontier points. Spatial and temporal filtering logics are used to filter the frontier points and select the optimal target point. The robot navigates to the optimal target point and simultaneously records the optimal target point information to a database. The historical frontier points stored in the database can be used to set filtering conditions in the filtering step. When the robot receives a speed input signal (the user sends forward or backward movement signals to the robot via remote sensing or control devices) or a signal indicating that autonomous exploration mapping needs to be interrupted (e.g., switching to the recharging thread due to power failure), the mode switches to manual control mode. In manual control mode, the system still autonomously explores and maps, but after selecting the optimal point, it does not send the optimal point to the navigation system or record it in the database.
[0064] This invention dynamically perceives the user's control intentions by continuously monitoring speed and judging the continuity and non-zero nature of commands. When responding to human intervention, the system does not abruptly halt the entire exploration process, but rather precisely cancels the current navigation goal (move_base's cancelGoal), suspends the target point sending thread, and simultaneously maintains the normal operation of other modules such as map building. Furthermore, an outage countdown mechanism is introduced as the intelligent basis for returning from "human mode" to "autonomous mode," achieving automatic and seamless recovery after control ends. This completely solves the problems of control conflicts, behavioral anomalies, or process interruptions caused by the inability of traditional autonomous exploration algorithms to handle human intervention, enabling robots and humans to collaborate efficiently and safely in the same task. This not only allows operators to intervene flexibly as needed, avoiding system anomalies or safety accidents caused by control conflicts, but also automatically resumes the exploration task after human intervention, ensuring the continuity of the work process and greatly enhancing the system's adaptability and practicality in complex and dynamic environments.
[0065] Furthermore, this invention introduces a "continuous empty search threshold determination mechanism," transforming the determination condition from an instantaneous state to a continuous state. This effectively distinguishes between the temporary absence of a frontier caused by temporary environmental interference (such as dynamic obstacle occlusion) and the true completion of global exploration, greatly improving the reliability of the determination. Specifically, a counter (consecutive_empty_count) and a configurable threshold parameter (empty_threshold) are designed. The exploration is only considered complete when the system fails to detect any valid frontier for multiple consecutive planning cycles (e.g., 3 times). If a valid frontier is found in any cycle, the counter is immediately reset to zero. This ensures that temporary detection failures (such as brief occlusion by pedestrians) do not affect the final determination, effectively overcoming the defect of premature termination of the exploration task due to dynamic environmental interference and sensor noise. This ensures the integrity of map construction and the reliability of the task, guaranteeing that the system will only enter the next stage after the map is completely and reliably constructed, significantly improving the success rate of the task.
[0066] Furthermore, this invention integrates three originally independent functional modules (exploration, fixed-point navigation, and charging) into a fully automated, end-to-end task pipeline, integrating a navigation stack client and a charging service client in its software architecture. When the exploration determination module outputs a completion signal, the task chain execution module is automatically triggered, executing sequentially without manual intervention: sending preset fixed-point coordinates as the new target to the navigation stack; and automatically calling the standard service interface to issue a return-to-charge command after the robot has navigated to its destination (or simultaneously). This achieves a complete closed loop from environmental perception to autonomous return-to-charge, breaking through the limitations of isolated functions in traditional exploration algorithms and constructing a complete automated task chain. After determining that exploration is complete, the system can automatically navigate to the preset fixed point and call the return-to-charge service without any manual intervention. This greatly reduces the workload of operators, lowers labor costs, and provides key technical support for the long-term, autonomous operation of mobile robots.
[0067] This invention, building upon traditional frontier exploration algorithms, introduces optimization strategies in both spatial and temporal dimensions, significantly improving the intelligence, stability, and efficiency of decision-making. Specifically, the system maintains a list of explored points and sets a filtering radius. When selecting a new target, it proactively filters out candidate targets too close to already explored points, thus avoiding repeated patrols of explored areas and guiding the robot to truly unknown regions, improving efficiency. A minimum target duration parameter is introduced; after generating a navigation task for a target point, the system locks onto that target for that time period, ignoring other, slightly more cost-effective candidate targets that may appear during this period. This effectively smooths out frequent target point switching caused by map update jitter, making robot movement more stable. It solves the efficiency and stability problems of "repeatedly patrolling already explored areas" and "navigation target point jitter" in autonomous exploration, optimizes the robot's movement path, increases exploration efficiency, reduces unnecessary movement under the same task conditions, saves energy, and extends the duration of a single operation.
[0068] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.
[0069] Embodiments of the present invention also provide a robot autonomous exploration and mapping device. Figure 3 This is a schematic diagram of the robot autonomous exploration and mapping device provided in an embodiment of the present invention. This embodiment is based on functional modules, such as… Figure 3 As shown, the device includes:
[0070] The instruction monitoring module 10 is used to synchronously construct the environment map and monitor external control instructions during the autonomous exploration main loop.
[0071] The mode switching module 11 is used to pause the autonomous exploration task and switch to manual control mode when it detects the intention of human intervention from the external control commands it has been listening to.
[0072] The exploration and judgment module 12 is used to maintain the autonomous exploration mode and perform autonomous exploration tasks by adopting a judgment mechanism based on the continuous empty search threshold when no intention of human intervention is identified from the external control commands monitored.
[0073] The task chain execution module 13 is used to trigger and execute the task chain that navigates to a preset fixed point and calls the recharge service after confirming that the autonomous exploration task has been completed, so as to complete the autonomous recharge.
[0074] In the above-mentioned autonomous exploration and mapping device for robots provided in this embodiment of the invention, by simultaneously listening to external control commands and recognizing human intervention intentions in the autonomous exploration main loop, seamless and safe switching between autonomous exploration mode and manual control mode is achieved. This avoids system anomalies or safety accidents caused by control conflicts, and allows the exploration task to resume after human intervention, ensuring operational continuity and significantly improving the user-friendliness of human-computer interaction and the system's adaptability and robustness in complex dynamic environments. Relying on the judgment mechanism based on the continuous empty search threshold, the false judgment rate of exploration termination is greatly reduced, improving the accuracy and reliability of exploration task completion. At the same time, after the exploration is completed, the task chain of navigation to the preset fixed point and recharging service is automatically triggered, realizing the full automation of the process from exploration and mapping to autonomous recharging. Energy replenishment can be completed without human intervention, meeting the needs of unmanned operation. Overall, it significantly improves the task execution efficiency of mobile robots and has extremely high practical value and promotion prospects.
[0075] Since the embodiments of the robot autonomous exploration mapping device and the robot autonomous exploration mapping method correspond to each other, the descriptions of the features in the embodiments corresponding to the robot autonomous exploration mapping device can be found in the relevant descriptions of the embodiments corresponding to the robot autonomous exploration mapping method, and will not be repeated here. Furthermore, it has the same beneficial effects as the robot autonomous exploration mapping method mentioned above.
[0076] Embodiments of the present invention also provide an electronic device, including a memory and a processor, wherein the memory stores a computer program and the processor is configured to run the computer program to perform the steps in any of the above embodiments of the robot autonomous exploration mapping method.
[0077] Embodiments of the present invention also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above embodiments of the robot autonomous exploration mapping method when running.
[0078] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.
[0079] Embodiments of the present invention also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above embodiments of the robot autonomous exploration mapping method.
[0080] Embodiments of the present invention also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above embodiments of the robot autonomous exploration mapping method.
[0081] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0082] The foregoing has provided a detailed description of a robot autonomous exploration mapping method, apparatus, device, and medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only intended to help understand the method and core ideas of the present invention. It should be noted that those skilled in the art can make various improvements and modifications to the present invention without departing from its principles, and these improvements and modifications also fall within the protection scope of the present invention.
Claims
1. A method for autonomous exploration and mapping of robots, characterized in that, include: During the autonomous exploration main loop operation, environmental map construction is performed synchronously, and external control commands are monitored. Monitoring external control commands includes: creating subscriber objects, which listen in parallel to control topics managed by the robot operating system manager; opening a listening thread to receive messages from the control topics and parse speed commands within the messages; determining whether the speed command is a non-zero value based on the parsing result; if the speed command is a non-zero value, it is determined that an intention for human intervention has been detected; if the speed command is zero, it is determined that no intention for human intervention has been detected. When an intention to intervene is detected from the external control commands being monitored, the autonomous exploration task is paused and switched to manual control mode; When no intention of human intervention is detected from the external control commands being monitored, the autonomous exploration mode is maintained, and an autonomous exploration task is executed using a determination mechanism based on a continuous empty search threshold. This determination mechanism includes: running a frontier detection algorithm based on the latest environmental map to search for the boundary between explored and unknown areas; performing multi-dimensional filtering on the searched frontier clusters to generate a valid frontier set; updating the continuous empty search counter according to the state of the valid frontier set; incrementing the continuous empty search counter if the valid frontier set is empty; resetting the continuous empty search counter to zero if the valid frontier set is not empty; and determining whether the continuous empty search counter value has reached or exceeded a preset empty search threshold: if yes, the autonomous exploration task is considered complete; otherwise, the exploration is considered incomplete, and the next autonomous exploration main loop continues. Once the autonomous exploration task is confirmed to be completed, a task chain is triggered and executed to navigate to a preset fixed point and call the recharging service to complete the autonomous recharging.
2. The robot autonomous exploration mapping method according to claim 1, characterized in that, Pause autonomous exploration missions and switch to human-machine control mode, including: Invoke the navigation target cancellation command to cancel the currently executing navigation target generated by the autonomous exploration algorithm; Switch to manual control mode so that the robot's movement is controlled by externally input speed commands, maintain the autonomous exploration and mapping function, pause the operation of sending the selected optimal point to the navigation system during the exploration process, and pause the operation of recording the optimal point to the database.
3. The robot autonomous exploration mapping method according to claim 2, characterized in that, After switching to manual control mode, it also includes: Start the timeout timer; The timing starts from the last time the external control command is received. If no new external control command is received within the preset control timeout period, the manual control mode is exited and the autonomous exploration mode is switched back.
4. The robot autonomous exploration mapping method according to claim 3, characterized in that, After switching back to autonomous exploration mode, it also includes: Trigger the autonomous exploration main loop, and based on the robot’s latest position and pose and the updated environment map, re-execute the frontier detection, filtering and cost assessment process to calculate the new optimal exploration target point; The new optimal exploration target point is encapsulated as a navigation target and sent to the underlying navigation stack through the action library interface, instructing the robot to continue to perform autonomous exploration tasks.
5. The robot autonomous exploration mapping method according to claim 1, characterized in that, Trigger and execute a task chain that navigates to a preset fixed point and invokes the recharge service to complete autonomous recharge, including: A navigation task is generated with a preset fixed point as the target, and sent to the underlying navigation stack through the action library interface, so that the navigation stack can perform path planning and motion control operations to drive the robot to move to the preset fixed point; After confirming that the robot has arrived at the preset fixed point, it initiates a call to the recharging service of the robot's underlying control system through the built-in service client to notify the underlying control system to perform the corresponding operation and complete the autonomous recharging.
6. A robot autonomous exploration and mapping device, characterized in that, include: The instruction monitoring module is used to synchronously construct an environment map and monitor external control instructions during the autonomous exploration main loop. Monitoring external control instructions includes: creating a subscriber object that listens in parallel to control topics managed by the robot operating system manager; opening a monitoring thread to receive messages from the control topics and parse speed instructions within the messages; determining whether the speed instruction is a non-zero value based on the parsing result; if the speed instruction is non-zero, it is determined that an intention for human intervention has been detected; if the speed instruction is zero, it is determined that no intention for human intervention has been detected. The mode switching module is used to pause the autonomous exploration task and switch to manual control mode when the intention of human intervention is detected from the external control commands being monitored. The exploration and determination module is used to maintain the autonomous exploration mode and execute autonomous exploration tasks using a determination mechanism based on a continuous empty search threshold when no intention of human intervention is detected from the external control commands being monitored. This mechanism includes: running a frontier detection algorithm based on the latest environmental map to search for the boundary between explored and unknown areas; performing multi-dimensional filtering on the searched frontier clusters to generate a valid frontier set; updating the continuous empty search counter according to the state of the valid frontier set; incrementing the continuous empty search counter if the valid frontier set is empty; resetting the continuous empty search counter to zero if the valid frontier set is not empty; and determining whether the continuous empty search counter value has reached or exceeded a preset empty search threshold: if yes, the autonomous exploration task is considered complete; otherwise, the exploration is considered incomplete, and the next autonomous exploration main loop continues. The task chain execution module is used to trigger and execute a task chain that navigates to a preset fixed point and calls the recharge service after confirming the completion of the autonomous exploration task, so as to complete the autonomous recharge.
7. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the robot autonomous exploration mapping method as described in any one of claims 1 to 5 when executing the computer program.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the robot autonomous exploration mapping method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Interactive rapid mapping method and device, medium and electronic equipment
CN117308923A