Robot path planning method and device, computer equipment and storage medium
By selecting priority viewpoints and constructing a distance-cost matrix during autonomous robot exploration, the problem of robots repeatedly exploring already explored areas is solved, achieving more efficient path planning and exploration efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- TSINGHUA UNIVERSITY
- Filing Date
- 2025-12-24
- Publication Date
- 2026-04-14
AI Technical Summary
When robots autonomously explore unknown environments, they may repeatedly explore areas that have already been explored, resulting in low efficiency in autonomous exploration.
By determining the target viewpoint set in the world coordinate system based on robot sensor data, prioritizing viewpoints, constructing a distance-cost matrix, and determining the optimal path sequence, the robot can first go to the prioritizing viewpoints to avoid repeatedly exploring already explored areas.
It improves the efficiency of the robot's autonomous exploration, reduces the phenomenon of repeatedly exploring already explored areas, and enhances the rationality of path planning and the success rate of exploration.
Smart Images

Figure CN121857680A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of autonomous exploration technology for robots, and in particular to a path planning method, apparatus, computer equipment, and storage medium for robots. Background Technology
[0002] Autonomous exploration refers to a robot's ability to perceive its environment in an unknown setting using its onboard sensors and employing embedded algorithms for path planning, simultaneous localization, and mapping (SLAM). Path planning involves determining the next observation pose (viewpoint), autonomously planning and executing a movement path, and constructing a map. The goal is to achieve a systematic, efficient, and comprehensive environmental cognition and mapping process for unknown or partially unknown areas. For example, when a robotic vacuum cleaner is first activated, it autonomously plans its path and explores the entire room to build a map, facilitating subsequent cleaning of the floor based on this map.
[0003] In related technologies, when robots plan their autonomous exploration paths, there is a problem of repeatedly exploring already explored areas, resulting in low efficiency in autonomous exploration. Summary of the Invention
[0004] Therefore, it is necessary to provide a path planning method, device, computer equipment, and storage medium for robots that can improve the efficiency of autonomous exploration, in order to address the above-mentioned technical problems.
[0005] In a first aspect, this application provides a path planning method for a robot, comprising:
[0006] The target viewpoint set of the robot in the world coordinate system is determined based on the robot's sensor data;
[0007] Based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system, a priority viewpoint is determined from the target viewpoint set; wherein, the positive direction of the target coordinate axis is consistent with the initial forward direction of the robot when performing an autonomous exploration task;
[0008] Construct a distance cost matrix based on the preferred viewpoint, other viewpoints in the target viewpoint set, and the robot's position;
[0009] Based on the distance cost matrix, the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set is determined; wherein, in the optimal path sequence, the priority viewpoint is used as the first viewpoint.
[0010] In one embodiment, the distance cost matrix includes: a first value representing the distance cost from the robot's position to the preferred viewpoint, where the first value is less than all other distance costs in the distance cost matrix except for the first value; and a second value representing the distance cost from the preferred viewpoint to the robot's position, where the second value is greater than all other distance costs in the distance cost matrix except for the second value.
[0011] In one embodiment, the method further includes: determining actual distances between the other viewpoints and between the other viewpoints and the position of the robot; determining a first value based on the minimum of all the actual distances, wherein the first value is less than the minimum value; and determining a second value based on the maximum of all the actual distances, wherein the second value is greater than the maximum value.
[0012] In one embodiment, determining the preferred viewpoint from the target viewpoint set based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis of the world coordinate system includes: determining the target viewpoint with the smallest coordinate value under the target coordinate axis of the world coordinate system in the target viewpoint set as the preferred viewpoint.
[0013] In one embodiment, determining the target viewpoint set of the robot in the world coordinate system based on robot sensor data includes: constructing or updating a three-dimensional map based on robot sensor data; extracting boundary information between known and unknown areas from the three-dimensional map; generating a candidate viewpoint set of the robot based on the boundary information; and performing deduplication processing on the candidate viewpoint set to obtain the target viewpoint set.
[0014] In one embodiment, the step of deduplicating the candidate viewpoint set to obtain the target viewpoint set includes: clustering multiple candidate viewpoints in the candidate viewpoint set that observe the same unexplored area to obtain a candidate viewpoint subset; and determining a target viewpoint from each candidate viewpoint subset based on the distribution of each candidate viewpoint in each candidate viewpoint subset.
[0015] In one embodiment, the method further includes: controlling the robot to move sequentially to each of the target viewpoints according to the optimal path sequence, and acquiring new sensor data during the movement; redetermining a new set of target viewpoints based on the new sensor data, and generating a new optimal path sequence based on the new set of target viewpoints, until the termination condition of autonomous exploration is met.
[0016] Secondly, this application also provides a path planning device for a robot, comprising:
[0017] The first determining module is used to determine the target viewpoint set of the robot in the world coordinate system based on the robot's sensor data;
[0018] The second determining module is used to determine a priority viewpoint from the target viewpoint set based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system; wherein, the positive direction of the target coordinate axis is consistent with the initial forward direction of the robot when performing an autonomous exploration task;
[0019] The construction module is used to construct a distance cost matrix based on the preferred viewpoint, other viewpoints in the target viewpoint set, and the robot's position;
[0020] The third determining module is used to determine the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set based on the distance cost matrix; wherein, in the optimal path sequence, the priority viewpoint is used as the first viewpoint.
[0021] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the path planning method for the robot provided in the first aspect of this application.
[0022] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the path planning method for the robot provided in the first aspect of this application.
[0023] Fifthly, this application also provides a computer program product, including a computer program that, when executed by a processor, implements the path planning method for the robot provided in the first aspect of this application.
[0024] The aforementioned robot path planning method, apparatus, computer equipment, computer-readable storage medium, and computer program product determine the robot's target viewpoint set in the world coordinate system based on the robot's sensor data; determine priority viewpoints from the target viewpoint set based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system; wherein, the positive direction of the target coordinate axis is consistent with the initial forward direction of the robot when performing an autonomous exploration task; construct a distance cost matrix based on the priority viewpoint, other viewpoints in the target viewpoint set, and the robot's position; and determine the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set based on the distance cost matrix; wherein, in the optimal path sequence, the priority viewpoint is used as the first viewpoint. In related technologies, failure to select a priority viewpoint from among the target viewpoints based on the coordinate values under the target coordinate axis in the world coordinate system causes the robot to move to each viewpoint according to the shortest distance, and in the last movement, to move from the second-to-last viewpoint to the last viewpoint. During this movement, it is necessary to repeat the explored viewpoints, i.e., unavoidably repeat the explored areas, in order to move to the last viewpoint. In this embodiment, a priority viewpoint is determined from the set of target viewpoints based on the coordinate values of each target viewpoint under the target coordinate axis in the world coordinate system. A distance cost matrix is constructed based on the robot's position and each viewpoint. The final optimal path sequence is led by the priority viewpoint, so that the robot goes to the priority viewpoint first during path planning and will not go to the priority viewpoint again. This can reduce or avoid repeated exploration and thus improve the efficiency of autonomous exploration. Attached Figure Description
[0025] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the description of the embodiments of this application or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0026] Figure 1 This is an application environment diagram of the robot path planning method in one embodiment;
[0027] Figure 2 This is a flowchart illustrating the path planning method for a robot in one embodiment;
[0028] Figure 3 This is a schematic diagram showing the robot's position, optimal viewpoint, and distribution of other viewpoints in one embodiment.
[0029] Figure 4 This is a flowchart illustrating the process of determining the first and second values in one embodiment;
[0030] Figure 5This is a flowchart illustrating step 201 in one embodiment;
[0031] Figure 6 This is a flowchart illustrating the robot's path planning method in another embodiment;
[0032] Figure 7 This is a structural block diagram of a robot's path planning device in one embodiment;
[0033] Figure 8 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0034] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0035] It should be noted that the terms "first," "second," etc., used in this application can be used to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish the first element from the second element. The terms "comprising" and "having," and any variations thereof, used in this application, are intended to cover non-exclusive inclusion. The term "multiple" used in this application refers to two or more. The term "and / or" used in this application refers to one of the embodiments, or any combination of multiple embodiments.
[0036] Autonomous exploration path planning technology has been gradually applied in fields such as military reconnaissance, environmental exploration, disaster relief, and automated cleaning. However, current autonomous exploration algorithms have many problems with path planning:
[0037] (1) Repeated exploration: The robot repeatedly explores areas that have already been explored;
[0038] (2) Missed unexplored areas: The robot moves to other areas to explore without completing the exploration of the current area;
[0039] (3) High failure rate: The robot tends to wander back and forth between multiple unexplored areas, but does not reach any of the unexplored areas, thus getting stuck in a dead loop and causing exploration failure.
[0040] The reason for the above problems is that the path planning algorithms in related technologies rely too heavily on Traveling Salesman Problem (TSP) solvers, directly calculating the visiting order of each viewpoint in the topology map to minimize the path traversing all viewpoints. However, this method ignores the fact that the continuous expansion of the known environment leads to dynamic changes in the topology map, which in turn causes the autonomous exploration path to constantly change. In environments with complex obstacle shapes and distributions, the shortest traversal path planned at time t differs from the shortest path planned at time t+1. As a result, the robot may move to other unexplored areas without completing the exploration of the current area, wandering back and forth between multiple unexplored areas, repeatedly exploring already explored areas without reaching any unexplored areas.
[0041] To address the aforementioned issues, this application proposes a path planning method for robots. This method applies directional constraints to the viewpoint access order before solving the Time-of-Sight (TSS) algorithm, giving the robot's exploration directionality. This avoids unexplored areas behind the robot, significantly reducing redundant exploration and minimizing the robot's wandering between multiple unexplored areas, thereby improving autonomous exploration efficiency.
[0042] The robot path planning method of this application embodiment can be applied to unmanned systems such as drones, unmanned vehicles, and unmanned ships, and has broad application prospects.
[0043] The robot path planning method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on other network servers. Terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. Server 104 can be a standalone physical server, a server cluster or distributed system consisting of multiple physical servers, or a cloud server providing cloud computing services. Server 104 can be deployed on the robot or remotely and communicate with the robot to control it for autonomous exploration.
[0044] In one exemplary embodiment, such as Figure 2 As shown, a path planning method for a robot is provided, which can be applied to... Figure 1 The server in the robot is described, and the server is deployed in the robot, including the following steps 201 to 204. Wherein:
[0045] Step 201: Determine the robot's target viewpoint set in the world coordinate system based on the robot's sensor data.
[0046] The target viewpoint set includes all viewpoints (in world coordinates) that the robot needs to visit or reach for autonomous exploration. A viewpoint refers to the three-dimensional pose of the robot's onboard sensors, which includes spatial coordinates and may also include the orientation that aligns the sensors with the area to be explored. The target viewpoint set ensures that the sensors can most effectively scan a new, unexplored area when at a viewpoint.
[0047] For example, after the SLAM (Simultaneous Localization and Mapping) algorithm is started, the world coordinate system is first set according to the robot's coordinate system at the initial position. Figure 3 The diagram shows robot 301 moving from initial position 302 to current position p. r ,like Figure 3 As shown, the initial position 302 of robot 301 is taken as the origin of the world coordinate system for mapping, and the robot's orientation is taken as the positive x-axis direction of the world coordinate system. That is, in the initial state, the robot's coordinate system is the same as the world coordinate system, where the positive x-axis is the initial forward direction of the robot when performing autonomous exploration, the positive y-axis is the left side of the robot, and the positive z-axis is the up and down direction of the robot. The world coordinate system remains unchanged after being set, and subsequent path planning is performed within this world coordinate system.
[0048] Then, the robot's onboard sensors collect sensor data, and based on this data, the robot determines its target viewpoint set in the world coordinate system. Optionally, the sensor is a LiDAR (Light Detection and Ranging) system. A 3D map is constructed based on the area covered by the LiDAR; the covered area is the explored area, and the uncovered area is the unknown area. A candidate viewpoint set in the world coordinate system is determined based on the 3D map. This candidate viewpoint set undergoes preprocessing such as sampling and filtering to obtain the target viewpoint set, and all target viewpoint sets are saved. , Where p1 represents the i-th viewpoint in the target viewpoint set, 1≤i≤n, x n y n and z n Let p represent the nth viewpoint respectively. n The x-axis coordinates, y-axis coordinates, and z-axis coordinates.
[0049] Step 202: Determine the priority viewpoint from the target viewpoint set based on the coordinate values of each target viewpoint in the target coordinate axis of the world coordinate system.
[0050] In this context, the positive direction of the target coordinate axis is consistent with the initial forward direction (the robot's orientation at the initial position) when the robot performs an autonomous exploration task. Since the robot's coordinate system is the same as the world coordinate system at the initial position, and the initial forward direction (the robot's orientation at the initial position) in the robot coordinate system is the positive direction of the x-axis, the target coordinate axis in the world coordinate system is the x-axis.
[0051] A priority viewpoint is the first target viewpoint that a robot visits or goes to during path planning, and it is not the last viewpoint that it visits or goes to. In other words, during autonomous exploration, the robot needs to move to the priority viewpoint first, and then move from the priority viewpoint to the next target viewpoint.
[0052] For example, after obtaining the target viewpoint set, firstly, the target viewpoints in the set are sorted based on directional constraints, that is, sorted in ascending or descending order according to their coordinate values on the x-axis. Then, a priority viewpoint is selected from the sorted target viewpoints, where the first target viewpoint is selected as the priority viewpoint in ascending order and the last target viewpoint is selected as the priority viewpoint in descending order, so that the robot reaches the priority viewpoint first when autonomously exploring the path planning.
[0053] Step 203: Construct a distance cost matrix based on the priority viewpoint, other viewpoints in the target viewpoint set, and the robot's position.
[0054] Among these, "other viewpoints" refers to all target viewpoints other than the priority viewpoint. The robot's position refers to its current location.
[0055] The distance cost matrix is a matrix used to solve the TSP problem. Its elements include the distance costs of the robot moving from the current position to the current position, from the current position to the preferred viewpoint, from the preferred viewpoint to the current position, from the preferred viewpoint to the preferred viewpoint, from the current position to other viewpoints, from other viewpoints to the preferred viewpoint, from the preferred viewpoint to other viewpoints, and from other viewpoints to other viewpoints.
[0056] For example, firstly, the actual distances (e.g., Euclidean distances) between any two viewpoints in the target viewpoint set are determined, and the distance cost between viewpoints of the same type (e.g., current position to current position, priority viewpoint to priority viewpoint) is set to 0. Then, based on all actual distances, the distance cost from the robot's current position to the priority viewpoint is determined as a first value, and the distance cost from the priority viewpoint to the current position is determined as a second value. The first value is less than the second value, and neither the first value nor the second value is equal to the actual distance from the current position to the priority viewpoint. The first value ensures that the robot prioritizes moving to the priority viewpoint during autonomous exploration, while the second value ensures that the path from the priority viewpoint to the robot's position does not belong to the last segment of the path.
[0057] In other words, the distance cost matrix in this embodiment is constructed based on directional constraints and has the attribute of viewpoint priority: the robot first goes to the priority viewpoint and does not return to the robot's position from the priority viewpoint.
[0058] Step 204: Based on the distance cost matrix, determine the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set.
[0059] In the optimal path sequence, the preferred viewpoint is used as the first viewpoint. That is, during each path planning in autonomous exploration, the robot first goes to the preferred viewpoint, then to the next viewpoint, until all viewpoints have been explored.
[0060] For example, based on the distance-cost matrix described above, using the TSP solver to solve the path planning problem yields the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set: a shortest path connecting the robot's position, the preferred viewpoint, and other viewpoints. This optimal path sequence is used for autonomous exploration. This sequence is not static; rather, the target viewpoint set is updated (i.e., one viewpoint is reduced from the previous set) each time the robot reaches a new viewpoint, and the preferred viewpoint, distance-cost calculation, and optimal path sequence are determined based on the updated viewpoint set.
[0061] After obtaining the optimal path sequence, the robot prioritizes the preferred viewpoint for exploration. It then updates the preferred viewpoint, the robot's position, and other viewpoints, repeating this process until the termination condition for autonomous exploration is met. At the end of the loop, a planned 3D map (continuously expanded from the initial 3D map) is obtained to guide the robot's subsequent autonomous movements. During each path exploration, the robot always first proceeds to the preferred viewpoint, then to the next viewpoint, and never returns to the preferred viewpoint. This achieves autonomous exploration path planning based on direction constraints.
[0062] In the aforementioned robot path planning method, a set of target viewpoints for the robot in the world coordinate system is determined based on the robot's sensor data. Priority viewpoints are determined from the target viewpoint set based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system. The positive direction of the target coordinate axis is consistent with the initial forward direction of the robot when performing an autonomous exploration task. A distance-cost matrix is constructed based on the priority viewpoint, other viewpoints in the target viewpoint set, and the robot's position. Based on the distance-cost matrix, the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set is determined. In the optimal path sequence, the priority viewpoint is designated as the first viewpoint. In related technologies, failure to select a priority viewpoint from the target viewpoints based on the coordinate values under the target coordinate axis in the world coordinate system causes the robot to move to each viewpoint along the shortest distance. During the final movement, the robot moves from the second-to-last viewpoint to the last viewpoint, inevitably repeating explored viewpoints—that is, unavoidably repeating explored areas—in order to reach the last viewpoint. In this embodiment, a priority viewpoint is determined from the set of target viewpoints based on the coordinate values of each target viewpoint under the target coordinate axis in the world coordinate system. A distance cost matrix is constructed based on the robot's position and each viewpoint. The final optimal path sequence is led by the priority viewpoint, so that the robot goes to the priority viewpoint first during path planning and will not go to the priority viewpoint again. This can reduce or avoid repeated exploration and thus improve the efficiency of autonomous exploration.
[0063] In an exemplary embodiment, step 201 includes: identifying the target viewpoint with the smallest coordinate value under the target coordinate axis in the world coordinate system from the target viewpoint set as the priority viewpoint.
[0064] For example, firstly, by sorting the target viewpoint set in ascending order according to the coordinate values of the x-axis in the world coordinate system, a queue based on the positive x-axis direction constraint can be obtained. :
[0065]
[0066] in, , and They represent queues respectively. The first viewpoint, the second viewpoint, the nth viewpoint, and the last viewpoint in the story. These are the x-coordinates of the first, second, and last viewpoints in the world coordinate system, respectively.
[0067] Then, the queue The viewpoint p with the smallest x-axis value in the world coordinate system min (e.g., p) (1) Extract it and use it as the priority viewpoint: Among them, the x-value of the preferred viewpoint Minimum y and z values are not necessarily minimum. Assumption: Preferred viewpoint p min Location reference Figure 3 The other viewpoints include p1 and p2, p r This represents the robot's (current) position.
[0068] Therefore, this embodiment, by sorting viewpoints based on directional constraints and selecting the target viewpoint with the smallest x-axis as the priority viewpoint after sorting, can ensure that the robot's exploration is directional and that the priority viewpoint is explored first each time.
[0069] In an exemplary embodiment, the distance cost matrix includes: a first value for the distance cost from the robot's position to the preferred viewpoint, which is less than all other distance costs in the distance cost matrix except for the first value; and a second value for the distance cost from the preferred viewpoint to the robot's position, which is greater than all other distance costs in the distance cost matrix except for the second value.
[0070] For example, distance cost matrix for:
[0071] .
[0072] in, To start from the robot's position p r to itself p r The distance cost, since there is only one robot, is as follows:
[0073] .
[0074] From the priority viewpoint p min to itself p min The distance cost, since there is only one optimal viewpoint, is as follows:
[0075] .
[0076] To start from the robot's position p r To the optimal viewpoint p min The distance cost, to prioritize the robot going to p min ,set up The first value ,Right now:
[0077] .
[0078] To start from the optimal viewpoint p min To the robot's position p rThe distance cost, to avoid from p during the TSP solution process min to p r It's the last path segment, set. The second value ,Right now:
[0079] .
[0080] and To record the robot's position Distance cost matrix for distances to other viewpoints:
[0081] ;
[0082] .
[0083] and To record the optimal viewpoint Distance cost matrix for distances to other viewpoints:
[0084] ;
[0085] .
[0086] The distance matrix between other viewpoints:
[0087] .
[0088] Based on the above settings, construct a distance-cost matrix to improve viewpoint priority. :
[0089] .
[0090] Among them, the first value The minimum cost among all distance costs, the second value This is the maximum value among all distance costs.
[0091] by Figure 3 For example, in related technologies, the robot always goes to viewpoint p1 first, then to p2, and finally to viewpoint p. min That is, the last path is from the robot's position to the viewpoint p. min In this path, one needs to traverse the already explored area to return to viewpoint p. min Inevitably, repeated exploration of already explored viewpoints, such as p1, occurs, resulting in a long total exploration distance and low exploration efficiency. However, this embodiment utilizes the aforementioned distance-cost matrix to ensure the robot prioritizes moving from its current position to the preferred viewpoint p. minThen, we go to viewpoints p1 and p2, so that each path planning is based on directional constraints to go to the priority viewpoint. The first value ensures that the path from the robot's position to the priority viewpoint is the first path, and the second value ensures that the path from the priority viewpoint to the robot's (current) position is not the last path segment. This greatly reduces the robot's repeated exploration, makes the access order of viewpoints more reasonable, and makes the total exploration distance shorter.
[0092] In this embodiment, by setting the first value of the distance cost from the robot's position to the priority viewpoint as the minimum value among all distance costs in the distance cost matrix, it can be ensured that the robot goes to the priority viewpoint first. By setting the second value of the distance cost from the priority viewpoint to the robot's position as the maximum value among all distance costs in the distance cost matrix, it can be avoided that the robot repeatedly returns to its position from the priority viewpoint. The distance cost matrix with viewpoint priority is constructed based on directional constraints, making the access order of viewpoints more reasonable, greatly reducing the robot's repeated exploration, and improving exploration efficiency.
[0093] In one exemplary embodiment, such as Figure 4 As shown, the method further includes determining the first value and the second value through steps 401 to 403:
[0094] Step 401: Determine the actual distances between other viewpoints and between other viewpoints and the robot's position.
[0095] For example, for each pair of other viewpoints, calculate the actual distance (e.g., Euclidean distance) between each pair of viewpoints, and calculate the actual distance (e.g., Euclidean distance) between the robot's position and each other viewpoint, obtaining all the actual distances. Then, find the maximum and minimum values from all the actual distances.
[0096] Step 402: Determine the first value based on the minimum value among all actual distances; wherein the first value is less than the minimum value.
[0097] For example, to ensure that the preferred viewpoint has the highest priority in the TSP solution, the robot's position p is... r To the priority viewpoint p min The distance cost between them, i.e., the first value, is set to be much smaller than the minimum value in step 401. The minimum value can be multiplied by a positive number less than 1 (e.g., 0.1 or 0.01) to obtain the first value, thereby ensuring that the first value is less than the minimum value.
[0098] Step 403: Determine the second value based on the maximum value among all actual distances; wherein the second value is greater than the maximum value.
[0099] For example, to ensure that the TSP solver avoids selecting from the preferred viewpoint p min Return to the robot's position p rAs the final path, the distance cost between the preferred viewpoint and the robot's position, i.e., the second value, is set to a value much greater than the maximum value in step 401. This maximum value can be obtained by multiplying it by a positive number much greater than 1 (such as 100 or 1000), thus ensuring that the second value is greater than the maximum value.
[0100] Therefore, this embodiment determines the first and second values based on the minimum and maximum values among all actual distances, making going to the preferred viewpoint an absolutely advantageous choice and returning directly from the preferred viewpoint an absolutely disadvantageous choice, thus avoiding choosing to return directly from the preferred viewpoint as the optimal path.
[0101] In one exemplary embodiment, such as Figure 5 As shown, step 201 includes steps 501 to 504, wherein:
[0102] Step 501: Build or update a 3D map based on the robot's sensor data.
[0103] For example, the robot's lidar continuously acquires 3D point cloud data of the environment during movement. This data stream is then processed using a Simultaneous Localization and Mapping (SLAM) algorithm to obtain a 3D map (or octree map).
[0104] Step 502: Extract the boundary information between known and unknown areas from the 3D map.
[0105] For example, the 3D map includes explored areas (i.e., known areas) and unknown areas. The 3D map is scanned to identify the boundary voxels between the known and unknown areas. The set of all boundary voxels constitutes the frontier of the current exploration task, representing the geometric boundary between the known and unknown areas. The boundary voxels are adjacent to and face the unknown area, and their positions define the frontier of the current known point cloud surface (the boundary between the known and unknown areas is the point cloud surface).
[0106] Step 503: Generate a candidate viewpoint set for the robot based on the boundary information.
[0107] For example, candidate viewpoints are extracted from the point cloud surface. The viewpoint is the location of the LiDAR, and the effective recognition range of the LiDAR at that location can cover the surface. Optionally, for each extracted boundary voxel, a corresponding candidate observation pose (candidate viewpoint) is generated. First, the average normal vector of the boundary extraction on the local point cloud surface is calculated. This vector points directly into the unknown space. Then, starting from the unknown center of the boundary voxel, a preset safe distance is offset along the opposite direction of the normal vector (i.e., into the known free space) to obtain the three-dimensional coordinates of the candidate viewpoint. The three-dimensional coordinates of all candidate viewpoints constitute the candidate viewpoint set.
[0108] Step 504: Deduplication is performed on the candidate viewpoint set to obtain the target viewpoint set.
[0109] Deduplication refers to the process of removing redundant or duplicate viewpoints from the candidate viewpoint set. Redundant or duplicate viewpoints refer to various viewpoints that observe the same area.
[0110] For example, since there are multiple viewpoints observing the same area (i.e., the candidate viewpoint set has a lot of redundancy), sampling is required to ensure that there is only one viewpoint observing the same area. The sampled viewpoint is then used as the target viewpoint, resulting in the target viewpoint set. Optionally, based on the shortest path principle, the viewpoint with the shortest path among the multiple candidate viewpoints observing the same area is selected as the target viewpoint and added to the target viewpoint set.
[0111] Therefore, this embodiment can accurately locate the exploration frontier by extracting boundary information from the point cloud map; and by generating and optimizing candidate viewpoints, it provides a high-quality, non-redundant set of target viewpoints for subsequent global path planning.
[0112] In an exemplary embodiment, step 504 includes: clustering multiple candidate viewpoints observing the same unexplored area in the candidate viewpoint set to obtain a candidate viewpoint subset; and determining a target viewpoint from each candidate viewpoint subset based on the distribution of each candidate viewpoint in each candidate viewpoint subset.
[0113] For example, to eliminate redundancy in the candidate viewpoint set and generate a streamlined target viewpoint set, firstly, the overlap rate of the projected areas of the sensor fields of view of any two candidate viewpoints on the unexplored boundary is calculated. If the overlap rate exceeds a preset threshold (e.g., 50%), they are considered to be observing the same unexplored area. Subsequently, a clustering algorithm is used to group all overlapping candidate viewpoints into the same group, forming multiple candidate viewpoint subsets, each corresponding to an independent unexplored area. Then, for each candidate viewpoint subset, based on its internal spatial distribution, a unique representative point is selected as the target viewpoint for that area using at least one of the following criteria:
[0114] Center point criterion: Select the candidate viewpoint located at the geometric center of all viewpoints in the candidate viewpoint subset as the unique representative point to ensure a stable and balanced observation position;
[0115] Optimal coverage area criterion: Select the candidate viewpoint that is estimated to cover the largest unknown area as the sole representative point;
[0116] Shortest distance criterion: Select the candidate viewpoint that is closest to the robot's current unknown location as the sole representative point to reduce the movement cost of exploring the area.
[0117] Optionally, a weighted scoring method can be used to combine the above multiple criteria, and the candidate viewpoint with the highest weight can be selected as the sole representative viewpoint.
[0118] Therefore, all selected representative viewpoints together constitute the final target viewpoint set used for path planning. This method ensures that each area to be explored corresponds to only one optimal observation target, effectively eliminating redundancy and improving the efficiency of subsequent global planning.
[0119] The steps described above illustrate a single path planning iteration, where each iteration determines the target viewpoint set, preferred viewpoints, distance-cost matrix, and optimal path sequence. Multiple iterations of path planning complete a full autonomous exploration, as illustrated by this example.
[0120] In an exemplary embodiment, the method further includes: controlling the robot to move sequentially to each target viewpoint according to the optimal path sequence, and acquiring new sensor data during the movement; redetermining a new set of target viewpoints based on the new sensor data, and generating a new optimal path sequence based on the new set of target viewpoints, until the termination condition of autonomous exploration is met.
[0121] For example, after obtaining the optimal path sequence for the current cycle, the robot moves according to this optimal path sequence. During the movement, the LiDAR scans the environment in real time to acquire new sensor data and updates the 3D map based on the new sensor data. Then, it is determined whether the updated 3D map meets the termination conditions for autonomous exploration, such as the absence of unknown areas in the map or the exploration time and coverage reaching a set threshold. If the conditions are met, the entire exploration task is completed. If the termination conditions are not met, the process returns to step 201 and proceeds to the next iteration: based on the latest updated 3D map, the boundaries are re-extracted, and a new set of target viewpoints is generated and deduplicated. Based on this new set of target viewpoints, a new optimal path sequence is generated through steps 203 to 204. The robot then continues to move and perceive according to this new optimal path sequence, forming a closed loop of autonomous exploration: "planning → execution → updating → replanning," until the termination conditions for autonomous exploration are met, resulting in a complete 3D map, which is the result of the autonomous exploration and serves as the basis for subsequent robot movements.
[0122] Therefore, this embodiment gradually completes a dynamic autonomous exploration system that fully covers all unexplored areas through online iteration steps 201 to 204, realizing autonomous exploration based on directional constraints. By using directional constraints, the robot's back-and-forth movement in unexplored areas is reduced, and the exploration success rate is improved.
[0123] The path planning method of this application embodiment is described below through a specific example.
[0124] In a specific example, such as Figure 6As shown, the robot's path planning includes the following steps:
[0125] Step 601, determine the world coordinate system;
[0126] Step 602: Start the SLAM algorithm;
[0127] Step 603: Obtain the robot's sensor data;
[0128] Step 604: Construct a 3D map based on sensor processing;
[0129] Step 605: Extract the boundary information between known and unknown areas from the 3D map;
[0130] Step 606: Generate a candidate viewpoint set for the robot based on the boundary information;
[0131] Step 607: Deduplicate the candidate viewpoint set to obtain the target viewpoint set;
[0132] Step 608: Sort the target viewpoints based on the x-axis coordinate system;
[0133] Step 609: Select the target viewpoint with the smallest x-axis value as the priority viewpoint;
[0134] Step 610: Construct a distance-cost matrix based on orientation constraints, according to the preferred viewpoint, other viewpoints, and the robot's position.
[0135] Step 611: Solve the TSP based on the distance cost matrix to obtain the optimal path sequence;
[0136] Step 612: Control the robot to move to each target viewpoint in sequence according to the optimal path sequence, and acquire new sensor data during the movement, and update the 3D map based on the new sensor data;
[0137] Step 613: Determine whether the autonomous exploration termination condition is met; if yes, proceed to step 614; if no, return to step 605.
[0138] Step 614: Output the updated 3D map.
[0139] In summary, the embodiments of this application constrain the access order of the viewpoint before solving the TSP, which makes the robot's exploration directional, avoids the existence of unexplored areas behind the robot, and thus greatly reduces the situation where the robot wanders between multiple unexplored areas and repeatedly explores already explored areas, thereby improving the efficiency of autonomous exploration.
[0140] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages in other steps. It is understood that the steps in different embodiments can be freely combined as needed, and all non-contradictory solutions formed by such combinations are within the scope of protection of this application.
[0141] Based on the same inventive concept, this application also provides a path planning device for a robot to implement the path planning method of the robot described above. The solution provided by this device is similar to the solution described in the above method. Therefore, the specific limitations of one or more robot path planning device embodiments provided below can be found in the limitations of the robot path planning method above, and will not be repeated here.
[0142] In one exemplary embodiment, such as Figure 7 As shown, a path planning device for a robot is provided, comprising: a first determining module 701, a second determining module 702, a constructing module 703, and a third determining module 704, wherein:
[0143] The first determining module 701 is used to determine the target viewpoint set of the robot in the world coordinate system based on the robot's sensor data;
[0144] The second determining module 702 is used to determine a priority viewpoint from the target viewpoint set based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system; wherein, the positive direction of the target coordinate axis is consistent with the initial forward direction of the robot when performing an autonomous exploration task;
[0145] The construction module 703 is used to construct a distance cost matrix based on the preferred viewpoint, other viewpoints in the target viewpoint set, and the position of the robot.
[0146] The third determining module 704 is used to determine the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set based on the distance cost matrix; wherein, in the optimal path sequence, the priority viewpoint is used as the first viewpoint.
[0147] In one embodiment, the distance cost matrix includes: a first value for the distance cost from the robot's position to the preferred viewpoint, the first value being less than any other distance cost in the distance cost matrix other than the first value; and a second value for the distance cost from the preferred viewpoint to the robot's position, the second value being greater than any other distance cost in the distance cost matrix other than the second value.
[0148] In one embodiment, the apparatus further includes: a fourth determining module, configured to determine the actual distances between the other viewpoints and between the other viewpoints and the position of the robot; a fifth determining module, configured to determine the first value based on the minimum of all the actual distances, wherein the first value is less than the minimum value; and a sixth determining module, configured to determine the second value based on the maximum of all the actual distances, wherein the second value is greater than the maximum value.
[0149] In one embodiment, the second determining module 702 is specifically used to: determine the target viewpoint with the smallest coordinate value under the target coordinate axis of the world coordinate system as the priority viewpoint in the target viewpoint set.
[0150] In one embodiment, the first determining module 701 is specifically used for: constructing or updating a three-dimensional map based on the robot's sensor data; extracting boundary information between known and unknown areas from the three-dimensional map; generating a candidate viewpoint set for the robot based on the boundary information; and performing deduplication processing on the candidate viewpoint set to obtain the target viewpoint set.
[0151] In one embodiment, when the first determining module 701 performs deduplication processing on the candidate viewpoint set to obtain the target viewpoint set, it is specifically used to: cluster multiple candidate viewpoints in the candidate viewpoint set that observe the same unexplored area to obtain a candidate viewpoint subset; and determine a target viewpoint from each candidate viewpoint subset based on the distribution of each candidate viewpoint in each candidate viewpoint subset.
[0152] In one embodiment, the device further includes: an acquisition module, configured to control the robot to move sequentially to each of the target viewpoints according to the optimal path sequence, and acquire new sensor data during the movement; and a seventh determination module, configured to redetermine a new set of target viewpoints based on the new sensor data, and generate a new optimal path sequence based on the new set of target viewpoints, until the termination condition of autonomous exploration is met.
[0153] The various modules in the path planning device of the robot described above can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0154] In one exemplary embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 8 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides the environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores robot path planning data. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communication with external terminals via a network connection. When the computer program is executed by the processor, it implements a robot path planning method.
[0155] Those skilled in the art will understand that Figure 8 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0156] In one exemplary embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a path planning method for a robot.
[0157] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements a path planning method for a robot.
[0158] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements a path planning method for a robot.
[0159] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, artificial intelligence (AI) processors, etc., and are not limited to these.
[0160] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0161] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A path planning method for a robot, characterized in that, The method includes: The target viewpoint set of the robot in the world coordinate system is determined based on the robot's sensor data; Based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system, a priority viewpoint is determined from the target viewpoint set; wherein, the positive direction of the target coordinate axis is consistent with the initial forward direction of the robot when performing an autonomous exploration task; Construct a distance cost matrix based on the preferred viewpoint, other viewpoints in the target viewpoint set, and the robot's position; Based on the distance cost matrix, the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set is determined; wherein, in the optimal path sequence, the priority viewpoint is used as the first viewpoint.
2. The method according to claim 1, characterized in that, In the distance cost matrix: The distance cost from the robot's position to the preferred viewpoint is a first value, which is less than all other distance costs in the distance cost matrix except for the first value. The distance cost from the preferred viewpoint to the robot's position is a second value, which is greater than all other distance costs in the distance cost matrix except for the second value.
3. The method according to claim 2, characterized in that, The method further includes: Determine the actual distances between the other viewpoints and between the other viewpoints and the position of the robot; The first value is determined based on the minimum of all the actual distances; wherein the first value is less than the minimum value; The second value is determined based on the maximum value among all the actual distances; wherein the second value is greater than the maximum value.
4. The method according to claim 1, characterized in that, The step of determining the priority viewpoint from the target viewpoint set based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system includes: The target viewpoint with the smallest coordinate value under the target coordinate axis in the world coordinate system is determined as the priority viewpoint.
5. The method according to any one of claims 1 to 4, characterized in that, The determination of the robot's target viewpoint set in the world coordinate system based on robot sensor data includes: 3D maps can be built or updated based on sensor data from robots; Extract the boundary information between known and unknown areas from the 3D map; The candidate viewpoint set for the robot is generated based on the boundary information; The candidate viewpoint set is deduplicated to obtain the target viewpoint set.
6. The method according to claim 5, characterized in that, The process of deduplicating the candidate viewpoint set to obtain the target viewpoint set includes: Clustering multiple candidate viewpoints observing the same unexplored area from the candidate viewpoint set yields a subset of candidate viewpoints; Based on the distribution of each candidate viewpoint in each candidate viewpoint subset, a target viewpoint is determined from each candidate viewpoint subset.
7. The method according to claim 1, characterized in that, The method further includes: The robot is controlled to move sequentially to each of the target viewpoints according to the optimal path sequence, and new sensor data is acquired during the movement; Based on the new sensor data, a new set of target viewpoints is determined, and a new optimal path sequence is generated according to the new set of target viewpoints until the termination condition of autonomous exploration is met.
8. A path planning device for a robot, characterized in that, The device includes: The first determining module is used to determine the target viewpoint set of the robot in the world coordinate system based on the robot's sensor data; The second determining module is used to determine a priority viewpoint from the target viewpoint set based on the coordinate values of each target viewpoint in the target viewpoint set under the target coordinate axis in the world coordinate system; wherein, the positive direction of the target coordinate axis is consistent with the initial forward direction of the robot when performing the autonomous exploration task; The construction module is used to construct a distance cost matrix based on the preferred viewpoint, other viewpoints in the target viewpoint set, and the robot's position; The third determining module is used to determine the optimal path sequence for the robot to move to all target viewpoints in the target viewpoint set based on the distance cost matrix; wherein, in the optimal path sequence, the priority viewpoint is used as the first viewpoint.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 7.