A ros2-based inter-plant robot path planning method and system
By predicting spatial conflicts among multiple robots in the ROS2 system and adjusting paths according to task priorities, the problems of path conflicts and congestion in multi-robot workshop cleaning were solved, thereby improving task response efficiency and optimizing the work process.
Patent Information
- Application Number
- CN202511140565.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-15
- Publication Date
- 2025-12-09
- Estimated Expiration
- 2045-08-15
AI Technical Summary
In workshop cleaning scenarios with multiple robots, multiple tasks, and multiple priorities, existing technologies struggle to optimize the collective movement of robot teams when priorities are interrupted, resulting in excessively high density of moving objects within the area, overlapping paths, and low task response efficiency.
By acquiring the robot's current task information and short-term planned path information, spatial conflicts within future time windows can be predicted, and paths can be adjusted according to task priorities to enable low-priority robots to avoid high-priority robots, thus achieving collaborative path planning using the ROS2 system.
It improved the response efficiency of high-priority tasks, reduced ineffective avoidance and congestion between robots, and optimized the overall work process.
Smart Images

Figure CN120721094B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of robots, and particularly relates to a workshop robot path planning method and system based on ROS2. BACKGROUND
[0002] Manufacturing workshop floor cleaning is a repetitive and important task, and its efficiency directly affects the production environment and product quality. Traditional cleaning methods rely on manual operation, which is inefficient and difficult to cover large areas. With the development of automation technology, it has become a trend to use multiple autonomous mobile cleaning robots to work together. In a typical manufacturing workshop environment, floor cleaning is performed by a system composed of multiple autonomous mobile cleaning robots. The robot system usually uses advanced software architecture, such as ROS2 (Robot Operating System 2), to realize communication between individual robots, environmental perception, task decision, and motion control.
[0003] Robots are usually equipped with various sensing devices to obtain environmental information, such as map construction, positioning, and real-time detection of obstacles. The central control system is responsible for managing the entire robot team, including assigning cleaning tasks to robots. Each task usually specifies the range to be cleaned, cleaning requirements, and task priority. After receiving the task information, the robot combines its current state information, such as energy level and consumable reserves, to plan a path to the task area and perform cleaning operations.
[0004] In the early stage of system deployment, the workshop area is often simply divided into several cleaning areas based on its geometric shape or preset grid, and these areas are fixedly assigned to specific robots or groups of robots. In order to cope with the differences in cleaning requirements of different areas, the system introduces a more flexible task assignment mechanism. This mechanism can dynamically determine the task priority of different areas based on real-time dirt perception data or preset cleaning plans.
[0005] When there are multiple robots and multiple tasks with priorities exist at the same time, the central system needs to coordinate the task assignment. However, in such a multi-robot, multi-task, multi-priority coexisting environment, when multiple high-priority tasks are concentrated in a certain area or require the robot to pass through the same necessary channel, multiple robots independently plan paths to the high-priority area, which may cause the density of moving bodies in these areas or on the path to be too high or the paths to be seriously overlapped. Such task switching and path changing without effective coordination with other robots can easily disrupt the existing work flow. More importantly, if there is a robot that has updated a new priority task in the middle of the way, and a new path is planned for the execution of the new priority task, the robot may conflict with the paths currently being executed or planned by other robots in the workshop. This not only may delay its arrival time at the spill location, but also reduce the response efficiency of the emergency task.
[0006] Therefore, in the workshop multi-robot collaborative cleaning scene where dynamic high-priority tasks appear and the current task needs to be interrupted for path re-planning, how to optimize the collective movement of the entire robot team when the priority interruption occurs, while trying to maintain the progress of other low-priority tasks, avoid forming bottlenecks in key areas, and reduce invalid movement or repeated cleaning work, has become a technical challenge that needs to be solved.
[0007] In view of the above problems in the prior art, the prior art needs to be improved. SUMMARY
[0008] In view of the above problems in the prior art, the prior art needs to be improved.
[0009] In the first aspect, a ROS2-based workshop robot path planning method is provided, and the method comprises the steps of:
[0010] S1: obtaining current task information and short-term planned path information of each of a plurality of robots;
[0011] S2: predicting whether there is a space conflict among the plurality of robots within a future time window according to the current task information and the short-term planned path information;
[0012] S3: when it is predicted that there is a space conflict, determining the task priority of the robot involved in the conflict according to the current task information;
[0013] S4: According to the task priority, adjust the short-term planning path of the robot involved in the conflict, so that the low-priority robot avoids the high-priority robot.
[0014] The application provides a ROS2-based path planning method for robots in a workshop. By obtaining current task information and short-term planning path information, necessary data support is provided for subsequent conflict prediction and resolution. By predicting within a "future time window", potential problems can be identified before the conflict actually occurs, time is gained for subsequent intervention and adjustment, temporary and passive obstacle avoidance behavior is avoided, and response efficiency is improved. By obtaining and utilizing current task information, the system can identify robots executing high-priority tasks, thereby prioritizing their passage rights during conflict resolution. After determining the task priorities of the conflicting parties, path adjustment is performed according to the task priorities, and the principle of "low-priority robots avoiding high-priority robots" is clearly defined, avoiding disordered or inefficient avoidance behavior. Therefore, the application has the advantages of being able to effectively predict potential spatial conflicts between multiple robots, and performing collaborative path adjustment according to task priorities, thereby improving the response efficiency of high-priority tasks, reducing inefficient avoidance and congestion between robots, and optimizing the overall work process.
[0015] Further, step S1 comprises:
[0016] S11: receiving current task information published by each of the multiple robots;
[0017] S12: receiving a message from each of the multiple robots, the message containing short-term planning path information, timestamp information associated with the short-term planning path information, and a format identifier representing the short-term planning path information;
[0018] S13: according to the format identifier, performing format conversion on the short-term planning path information to obtain short-term planning path information in a unified format;
[0019] S14: according to the timestamp information, determining the short-term planning path information for subsequent conflict prediction from the short-term planning path information in the unified format.
[0020] The application provides a ROS2-based path planning method for robots in a workshop. The specific implementation of obtaining current task information and short-term planning path information of each of the multiple robots is defined in detail, solving the problem of how to reliably, accurately and timely obtain heterogeneous and distributed task information and short-term planning path information required for conflict prediction in a multi-robot system.
[0021] Further, step S2 comprises:
[0022] S21: Obtain restricted area information of a manufacturing workshop and a passing rule associated with the restricted area information;
[0023] S22: Determine a moving characteristic parameter of each robot according to the current task information;
[0024] S23: Predict spatial occupation information of each robot in a future time window according to the short-term planning path information, the restricted area information, the passing rule, and the moving characteristic parameter;
[0025] S24: Determine whether there is a spatial conflict of the robots in the future time window according to the spatial occupation information.
[0026] The application provides a ROS2-based workshop robot path planning method, which improves the accuracy of spatial conflict prediction by comprehensively considering the workshop environment constraints and the robot characteristics.
[0027] Further, step S23 comprises:
[0028] S231: Obtain environment dynamic information of the manufacturing workshop and real-time state information of each robot;
[0029] S232: Determine an execution deviation range of each robot in the future time window according to the short-term planning path information, the restricted area information, the passing rule, the moving characteristic parameter, the environment dynamic information, and the real-time state information;
[0030] S233: Predict spatial occupation information of each robot in the future time window according to the short-term planning path information, the restricted area information, the passing rule, the moving characteristic parameter, and the execution deviation range.
[0031] The application provides a ROS2-based workshop robot path planning method, which improves the accuracy of spatial conflict prediction by introducing environment dynamic information and real-time state information of the robot, and calculating an execution deviation range of the robot based on the information, so as to more accurately predict the actual spatial occupation of the robot.
[0032] Further, step S232 comprises:
[0033] S2321: Obtain real-time state information of each robot;
[0034] S2322: Determine an expected spatial occupation area of each robot along the short-term planning path in the future time window according to the short-term planning path information, the restricted area information, the passing rule, the moving characteristic parameter, and the environment dynamic information;
[0035] S2323: determining, according to the real-time state information, an additional space occupation area of each of the plurality of robots within the future time window caused by positioning uncertainty;
[0036] S2324: combining the expected space occupation area and the additional space occupation area to obtain an execution deviation range of each of the plurality of robots within the future time window.
[0037] Further, step S233 includes:
[0038] S2331: determining, according to the movement characteristic parameters, an expected trajectory point sequence of each of the plurality of robots along the short-term planning path within the future time window, the movement characteristic parameters including robot size information;
[0039] S2332: for each trajectory point in the expected trajectory point sequence, determining an initial space occupation area of the robot at the trajectory point according to the position of the trajectory point, the robot size information, and the execution deviation range corresponding to the trajectory point;
[0040] S2333: modifying the initial space occupation area according to the restricted area information and the passing rule to obtain a space occupation area of the robot at the trajectory point;
[0041] S2334: combining the space occupation areas of the plurality of trajectory points after modification to obtain space occupation information of each of the plurality of robots within the future time window.
[0042] Further, step S3 includes:
[0043] obtaining current task information of each of the robots involved in the conflict, the current task information including task type information and task timeliness information;
[0044] S31: obtaining area information where each of the robots involved in the conflict is located and overall state information of the workshop;
[0045] S32: obtaining real-time state information of each of the robots involved in the conflict, the real-time state information at least including robot power information;
[0046] S33: comprehensively determining a task priority of each of the robots involved in the conflict according to the task type information, the task timeliness information, the area information, the overall state information of the workshop, and the robot power information.
[0047] Further, step S33 includes:
[0048] S331: determining respective base task priorities of the robots involved in the conflict according to the task type information;
[0049] S332: calculating respective task urgency degrees of the robots involved in the conflict according to the task time-sensitive information;
[0050] S333: determining respective environment impact factors of the robots involved in the conflict according to the area information and the overall state information of the workshop;
[0051] S334: determining respective power impact factors of the robots involved in the conflict according to the power information of the robots;
[0052] S335: comprehensively determining respective task priorities of the robots involved in the conflict according to the base task priorities, the task urgency degrees, the environment impact factors and the power impact factors.
[0053] Further, step S4 comprises:
[0054] S41: obtaining first current task information and first short-term planning path information of a low-priority robot involved in a conflict, and second short-term planning path information of a high-priority robot involved in a conflict according to the task priorities;
[0055] S42: obtaining restricted area information and traffic rules of a manufacturing workshop;
[0056] S43: determining feasible avoidance areas or path segments of the low-priority robot within a future time window according to the first short-term planning path information, the second short-term planning path information, the restricted area information and the traffic rules;
[0057] S44: planning an adjustment path of the low-priority robot according to the first current task information, the feasible avoidance areas or path segments and the second short-term planning path information, the adjustment path being used to avoid the high-priority robot.
[0058] In a second aspect, a ROS2-based workshop robot path planning system is applied in the steps of the method described above, and the system comprises:
[0059] An obtaining module: obtaining respective current task information and short-term planning path information of a plurality of robots;
[0060] A prediction module: predicting whether there is a spatial conflict among the plurality of robots within a future time window according to the current task information and the short-term planning path information;
[0061] A priority determination module: when it is predicted that there is a space conflict, according to the current task information, the task priority of the robot involved in the conflict is determined;
[0062] A planning module: according to the task priority, the short-term planning path of the robot involved in the conflict is adjusted to make the low-priority robot avoid the high-priority robot.
[0063] Advantages: the robot path planning method and system based on ROS2 proposed in the present application provide necessary data support for subsequent conflict prediction and resolution by acquiring current task information and short-term planning path information; by predicting within the "future time window", potential problems can be identified before the conflict actually occurs, time is gained for subsequent intervention and adjustment, temporary and passive obstacle avoidance behavior is avoided, and response efficiency is improved; by acquiring and utilizing current task information, the system can identify robots executing high-priority tasks, so as to prioritize their right-of-way in conflict resolution; after determining the task priorities of the conflict parties, path adjustment is performed according to the task priority, which clearly defines the principle of adjustment as "low-priority robot avoiding high-priority robot", avoiding disordered or inefficient avoidance behavior. Therefore, the present application has the advantages of being able to effectively predict potential space conflicts among multiple robots and perform collaborative path adjustment according to task priority, thereby improving the response efficiency of high-priority tasks, reducing inefficient avoidance and congestion among robots, and optimizing the overall work process. BRIEF DESCRIPTION OF DRAWINGS
[0064] Figure 1 A flowchart of a robot path planning method based on ROS2 proposed in the present application.
[0065] Figure 2 A structure diagram of a robot path planning system based on ROS2 proposed in the present application.
[0066] Figure 3 An architecture diagram of a robot path planning system based on ROS2 proposed in the present application.
[0067] Label explanation: 201, acquisition module; 202, prediction module; 203, priority determination module; 204, planning module. DETAILED DESCRIPTION
[0068] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and indicated in the drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the claimed present application, but only represents selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0069] It should be noted that similar reference numerals and letters indicate similar items in the following drawings, and therefore, once an item is defined in one drawing, it need not be further defined and explained in subsequent drawings. Meanwhile, in the description of the present application, the terms "first", "second", and the like are only used to distinguish the description, and cannot be understood as indicating or implying relative importance.
[0070] Please refer to Figure 1 A ROS2-based workshop robot path planning method, the method comprising the steps of:
[0071] S1: obtaining current task information and short-term planning path information of each of a plurality of robots;
[0072] S2: predicting whether there is a spatial conflict among the plurality of robots within a future time window according to the current task information and the short-term planning path information;
[0073] S3: when it is predicted that there is a spatial conflict, determining the task priority of the robot involved in the conflict according to the current task information;
[0074] S4: adjusting the short-term planning path of the robot involved in the conflict according to the task priority, so that the low-priority robot avoids the high-priority robot.
[0075] The current task information includes the type, target, priority, etc. of the task currently assigned to the robot, which can be implemented in a structured data format, such as containing fields of task identification, task type, target position or area, task priority value, etc., which is mainly to understand the current work content and importance of the robot.
[0076] The short-term planning path information refers to the moving trajectory data that the robot plans to follow in the future, which can be represented by a series of ordered pose points and associated time stamps, describing the expected moving trajectory of the robot in the future, which is mainly to predict the spatial occupation of the robot in the future.
[0077] Spatial conflict refers to the overlap of the predicted spatial occupancy regions of multiple robots in a future time window in terms of time and space, mainly to discover potential collision or congestion risks in advance.
[0078] Future time window refers to the time range for conflict prediction, which can be dynamically determined according to factors such as robot speed, communication delay, etc., mainly to limit the range of prediction and balance computing resources and prediction accuracy.
[0079] Task priority refers to the execution order or right level of passage determined according to factors such as task type, timeliness, importance, etc., mainly to determine the order of resource allocation in resource competition. Adjusting the short-term planning path refers to modifying the original short-term planning path of the robot according to the conflict prediction result and task priority, generating a new feasible path, and realizing the orderly avoidance between robots.
[0080] As a preferred embodiment, the scheme of the present application is implemented as follows:
[0081] In a manufacturing workshop environment, multiple autonomous mobile robots and a central coordination system (hereinafter referred to as the system) are deployed. The system periodically receives messages from each robot through a communication mechanism, which contain the current task identification of the robot, the task type, and the short-term planning path generated by the local planner of the robot within the next few seconds.
[0082] After receiving this information, the system analyzes the short-term planning paths of all robots. It models each robot as a geometric body with a certain size, and predicts the spatial occupancy region sequence of each robot within a future time window according to the path information and the movement characteristics of the robot.
[0083] By checking whether the spatial occupancy region sequences of different robots overlap in time, the system predicts whether there is a spatial conflict. If a conflict is detected, the system queries the task information of the robots involved in the conflict, and determines the priority of the conflicting parties according to the preset task priority rules.
[0084] Suppose robot A performs a low-priority task and robot B performs a high-priority task, and it is predicted that they will collide in a certain area. The system will calculate the feasible avoidance path or area of robot A within the conflict time period, such as a temporary parking point or a detour path. Then, the system generates a new short-term planning path for robot A, which guides robot A to perform avoidance actions to avoid collision with robot B. The new path is sent to robot A for execution. Robot B continues to execute its high-priority task path.
[0085] By the above scheme, the application solves the path conflict and interference problem of low-priority tasks caused by high-priority tasks in a multi-robot cooperative working environment. The method avoids the inefficiency and uncertainty caused by temporary obstacle avoidance by prospectively predicting spatial conflicts between robots. The conflict resolution mechanism based on task priority ensures the rapid response and execution of high-priority tasks and reduces the interference. At the same time, by guiding the low-priority robots to avoid, the negative impact of high-priority tasks on other ongoing low-priority task processes is minimized, and the cooperative efficiency and smoothness of the entire robot system are improved.
[0086] Further, step S1 comprises:
[0087] S11: receiving current task information published by each of the plurality of robots;
[0088] S12: receiving a message from each of the plurality of robots, the message comprising short-term planning path information, timestamp information associated with the short-term planning path information, and a format identifier representing the short-term planning path information;
[0089] S13: converting the short-term planning path information according to the format identifier to obtain short-term planning path information in a unified format;
[0090] S14: determining short-term planning path information for subsequent conflict prediction from the short-term planning path information in the unified format according to the timestamp information.
[0091] In one specific embodiment, the message receiving and publishing can be implemented using the ROS2 message mechanism.
[0092] Each robot can publish its current task information (e.g., a custom TaskStatus message containing task ID, type, priority, target position, etc.) and short-term planning path information (e.g., a Path message containing a series of PoseStamped points and an additional Header field containing a timestamp and frame_id, which can be used as a format identifier) through the ROS2 Publisher. The system can subscribe to these messages as a Subscriber.
[0093] For short-term planning path information, different robots or different path planning algorithms may generate different types of Path messages (e.g., containing speed information or not). The system can call the corresponding format conversion function according to the message type (i.e., format identifier).
[0094] Specifically, the implementation of calling the corresponding format conversion function according to the message type (i.e., the format identifier) includes: when the system receives the path message published by the robot, the message format is first identified by parsing the type field or the topic name of the message, for example, identified as a PathWithVelocity type, a standard Path type or a custom path format. For PathWithVelocity type messages, the conversion function extracts the poses array therein, ignores the velocity field, retains the position coordinates (x, y, z) and the orientation quaternion, and then re-encapsulates it into the standard nav_msgs::Path message format. For custom path messages containing additional time information, the conversion function extracts the waypoint sequence and the corresponding timestamp sequence, and reorganizes the data structure according to the standard format. During the conversion process, the frame_id is uniformly set to the "map" coordinate system, ensuring that all path information is processed in the same reference coordinate system.
[0095] For example, if a custom PathWithVelocity message containing velocity information is received, the conversion function can extract the position information and the timestamp therein and convert it into the standard nav_msgs / Path message format. The converted uniform format Path message is stored in a buffer and managed according to the timestamp in its Header. Before conflict prediction, the system can query the buffer and select the Path message with a timestamp within a certain threshold range in the recent past as valid short-term planning path information for processing.
[0096] Specifically, the timestamp-based management mechanism is as follows: the system maintains a hash table with the robot ID as the key value, and each key value corresponds to a path message queue arranged in descending order of timestamp. When a new path message is received, the system first checks the stamp field in the message Header to obtain the timestamp, and then compares it with the current system time. The time validity threshold is set to 5 seconds, i.e., only messages with a publication time within 5 seconds of the current time are retained. For messages that meet the time requirement, they are inserted into the message queue of the corresponding robot in timestamp order, and historical messages exceeding the time threshold are removed from the queue. When performing conflict prediction, the system selects the latest path information with the latest timestamp from each robot's message queue as the valid short-term planning path. The queue length is limited to a maximum of 10 messages, and when the limit is exceeded, the oldest messages are automatically deleted, ensuring the rationality of memory usage and the real-time nature of the data.
[0097] Through the above method, the system can reliably obtain and preprocess the current task information and short-term planning path information published by multiple robots.
[0098] Further, step S2 comprises:
[0099] S21: Obtain restricted area information of the manufacturing workshop and passing rules associated with the restricted area information;
[0100] S22: Determine the movement characteristic parameters of each of the plurality of robots according to the current task information;
[0101] S23: Predict the spatial occupancy information of each of the plurality of robots within a future time window according to the short-term planned path information, the restricted area information, the passing rules, and the movement characteristic parameters;
[0102] S24: Determine whether there is a spatial conflict among the plurality of robots within the future time window according to the spatial occupancy information.
[0103] Specifically, the restricted area information of the manufacturing workshop and the passing rules associated with the restricted area information are obtained, which can include forbidden areas, one-way traffic areas, speed limit areas, etc. marked in the workshop map, and movement regulations that the robots must comply with in these areas. These information provides important environmental constraints for subsequent spatial occupancy prediction.
[0104] Determine the movement characteristic parameters of each of the plurality of robots, which can reflect the physical size, maximum speed, acceleration, turning radius, positioning accuracy, etc. of the robot, and can be adjusted according to the type of task (e.g. emergency task or regular task) or load state currently performed by the robot. These parameters are the basis for predicting the spatial demand and dynamic behavior of the robot during actual movement.
[0105] Predict the spatial occupancy information of each of the plurality of robots within a future time window, which is based on the short-term planned path information, the obtained workshop environment constraint information, and the determined robot characteristic information. By considering these factors comprehensively, a more accurate spatial range that the robot may occupy at different times in the future can be predicted, for example, considering the actual size of the robot, the additional space required when turning, the speed and position restrictions in narrow areas or restricted areas, etc. This prediction based on multi-dimensional information significantly improves the fineness and accuracy of spatial occupancy prediction.
[0106] Finally, according to the predicted spatial occupancy information of each of the plurality of robots within a future time window, it is determined whether there is a spatial conflict among them. Since more accurate and more realistic spatial occupancy prediction is provided, the conflict determination based on these prediction information is also more reliable, which can more effectively identify potential collisions, congestion or other forms of spatial conflicts.
[0107] Further, step S23 comprises:
[0108] S231: Obtain environment dynamic information of the manufacturing workshop, and real-time state information of each of the plurality of robots;
[0109] S232: Determine an execution deviation range of each of the plurality of robots within a future time window according to the short-term planning path information, the restricted area information, the traffic rule, the movement characteristic parameter, the environment dynamic information, and the real-time state information.
[0110] S233: Predict spatial occupancy information of each of the plurality of robots within the future time window according to the short-term planning path information, the restricted area information, the traffic rule, the movement characteristic parameter, and the execution deviation range.
[0111] In a specific embodiment, the environment dynamic information can include receiving real-time obstacle position and velocity information published from a sensor network deployed in the workshop, such as position data of temporary piles or moving forklifts detected by laser radar scanning.
[0112] The real-time state information of each of the plurality of robots can include receiving a positioning accuracy estimation value reported by a current positioning system of each robot and a tracking error reported by a motion controller thereof.
[0113] When determining the execution deviation range of each of the plurality of robots within the future time window, a basic expected spatial occupancy area can be calculated based on an expected position point on the short-term planning path in combination with the movement characteristic parameter.
[0114] The calculation process specifically includes: first, determining the geometric shape of the robot body according to the movement characteristic parameter of the robot, and usually modeling the robot as a circular area with the center of the robot as the center and the maximum outer contour size of the robot as the radius, or modeling the robot as a rectangular area according to the length and width of the robot. Second, place the geometric shape of the robot at each trajectory point along the short-term planning path to form an initial occupancy area at that moment. Then, according to the maximum speed and acceleration information in the movement characteristic parameter of the robot, calculate the maximum distance that the robot can deviate from the path when moving between adjacent trajectory points, and take this deviation distance as a safety boundary to perform inflation processing on the initial occupancy area.
[0115] According to the obtained environment dynamic information, such as whether there is a dynamic obstacle near the path and its movement trend, an additional potential spatial occupancy area caused by uncertainty is calculated.
[0116] The calculation method can be: first, the sensor obtains the dynamic obstacle position coordinates and velocity vector information within a certain range (for example, a radius of 3 meters) around the expected path of the robot, and then according to the current position and motion trend of the dynamic obstacle, the position area that the dynamic obstacle can reach in the future time window is predicted, and the calculation formula is: obstacle future position area = current position + velocity vector x time range. When the predicted obstacle motion area intersects with the expected path of the robot, the intersection area and the safety distance (usually set to 1.5 times the size of the robot) around it are taken as the potential space occupation that the robot needs to consider additionally, so as to ensure that the robot can adjust the trajectory in time to avoid the dynamic obstacle.
[0117] For example, for a robot with low positioning accuracy, the additional space occupation area can be a larger circular or elliptical area. The final execution deviation range can be determined by combining the basic expected space occupation area with the additional potential space occupation area (for example, performing a set union operation or envelope calculation).
[0118] When predicting the respective space occupation information of multiple robots in the future time window, the expected trajectory points at a series of future time instants can be determined according to the movement characteristic parameters (including the size of the robot) and the expected speed of the robot along the short-term planning path. For each expected trajectory point, place the robot size shape at the point, and combine it with the execution deviation range at the point (for example, inflate or convolve the robot shape with the deviation range) to obtain an initial space occupation area. Then, according to the restricted area information and the traffic rules, the initial area is modified, for example, if part of the area is located in the prohibited traffic area, the part is removed or marked from the space occupation area. Combining the space occupation areas at all trajectory points after modification (for example, calculating the union set of all areas), the predicted space occupation information of the robot in the future time window can be obtained.
[0119] By obtaining the dynamic information of the manufacturing workshop environment and the real-time state information of each of the multiple robots, and determining the execution deviation range of each of the multiple robots in the future time window based on these information, the scheme can more accurately predict the space that the robot can actually occupy in a dynamic and uncertain environment. By incorporating the execution deviation range into the space occupation prediction, the prediction result is closer to the actual situation, thereby improving the accuracy of subsequent space conflict judgment. This helps to reduce false positives or false negatives caused by inaccurate prediction, and improves the reliability and efficiency of multi-robot collaborative operation.
[0120] Further, step S232 includes:
[0121] S2321: Obtain real-time state information of each of the multiple robots;
[0122] S2322: Determine the expected space occupation area of each robot along the short-term planned path within the future time window according to the short-term planned path information, the restricted area information, the traffic rules, the movement characteristic parameters, and the environmental dynamic information;
[0123] S2323: Determine the additional space occupation area of each robot within the future time window caused by the positioning uncertainty according to the real-time state information;
[0124] S2324: Combine the expected space occupation area and the additional space occupation area to obtain the execution deviation range of each robot within the future time window.
[0125] The real-time state information refers to data reflecting the current running state of the robot, which can include the current position, pose, speed, acceleration of the robot, and information related to the positioning accuracy.
[0126] The expected space occupation area refers to the space range that the robot is expected to occupy based on its size and movement characteristics and in combination with environmental restrictions under ideal conditions, i.e., the robot moves strictly according to the planned path and does not consider positioning errors.
[0127] The additional space occupation area refers to the additional space range beyond the expected space occupation area due to the uncertainty of the actual positioning of the robot, which may deviate from the expected position. The positioning uncertainty refers to the error of the robot's estimation of its own position, which is caused by sensor noise, environmental changes, map accuracy, or algorithm limitations.
[0128] In a specific embodiment, determining the execution deviation range of each robot within the future time window can be implemented as follows:
[0129] In step S2321, the real-time state information of each robot is obtained by subscribing to the ` / odom` or ` / amcl_pose` topics of ROS2, which contains the current pose (position and attitude) of the robot and the related covariance matrix that can be used to represent the positioning uncertainty.
[0130] In step S2322, according to the short-term planning path information published by the robot, combining the static restricted area information of the manufacturing workshop, the preset traffic rules, the size and maximum speed of the robot and other movement characteristic parameters, and the dynamic environment information (such as the position and speed of dynamic obstacles) obtained through the sensor, the expected space occupation area of the robot along the short-term planning path is calculated. This can be to discretize the planning path into a series of trajectory points, at each trajectory point, generate an area (such as a circle or rectangle) representing the robot body according to the robot size information, and modify it considering the environmental restrictions, and then combine these areas along the path.
[0131] In step S2323, according to the covariance matrix in the real-time state information, at each expected trajectory point within the future time window, the additional space occupation area caused by positioning uncertainty is calculated. This can be to calculate a confidence ellipse or ellipsoid from the covariance matrix, which represents the range in which the robot's true position falls with a certain probability, which constitutes the additional space occupation area.
[0132] In step S2324, the expected space occupation area calculated along the short-term planning path and the additional space occupation area calculated by the positioning uncertainty are combined, for example, the union of the two, to obtain the respective execution deviation range of the robot within the future time window.
[0133] Further, step S233 includes:
[0134] S2331: Along the short-term planning path, according to the movement characteristic parameters, determine the expected trajectory point sequence of multiple robots along the short-term planning path within the future time window, the movement characteristic parameters including robot size information;
[0135] S2332: For each trajectory point in the expected trajectory point sequence, according to the position of the trajectory point, the robot size information and the corresponding execution deviation range at the trajectory point, determine the initial space occupation area of the robot at the trajectory point;
[0136] S2333: According to the restricted area information and the traffic rules, modify the initial space occupation area to obtain the space occupation area of the robot at the trajectory point;
[0137] S2334: Combine the modified space occupation areas at multiple trajectory points to obtain the respective space occupation information of multiple robots within the future time window.
[0138] Among them, the movement characteristic parameters refer to a set of parameters describing the motion and physical properties of the robot, which can be represented by a parameter set including the maximum speed, maximum acceleration, turning radius of the robot and robot size information, etc.
[0139] The execution deviation range refers to the maximum deviation area of the actual position of the robot relative to its planned position after considering the environmental dynamics and the real-time state of the robot (e.g., positioning accuracy), which can be represented by an area (e.g., a circle, an ellipse, or a polygon) centered on the planned position with a specific shape and size.
[0140] The present application systematically predicts the space area that each robot may occupy in the future time window through a series of steps. Specifically:
[0141] Step S2331 generates a series of discrete expected trajectory points along the short-term planned path of each robot according to its movement characteristic parameters. This process converts the continuous path into a series of expected positions at different time points, providing a discretized basis for subsequent space occupation calculation. It is precisely because the path is discretized that a detailed space occupation analysis can be performed at each specific expected position.
[0142] Step S2332 not only considers the volume of the robot itself, but more importantly, incorporates the deviation range caused by positioning or control errors that may exist during actual execution. It is precisely because the robot size is combined with the execution deviation range that the predicted area can more realistically reflect the maximum space that the robot may actually occupy near the expected position, thereby improving the reliability of the prediction.
[0143] In step S2333, the initial area may extend to areas that the robot is not allowed to enter or stay in, such as walls, fixed obstacles, or no-go areas, due to the consideration of deviations. It is precisely because the initial area is modified according to environmental constraints that the final space occupation area conforms to the limitations of the actual environment, avoiding the prediction area from exceeding the feasible range in terms of physics or rules, thereby improving the accuracy and practicality of the prediction.
[0144] In step S2334, it is precisely because the prediction results at discrete time points are integrated into a whole that this information can comprehensively represent the space demand of the robot in the future period of time, providing a comprehensive and reliable basis for subsequent judgment of whether there is a space conflict between multiple robots.
[0145] Through the synergistic effect of the above steps, the present application can more accurately predict the space occupation of the robot, especially in complex workshop environments with execution deviations and environmental constraints, thereby providing a solid foundation for conflict detection and avoidance in multi-robot collaborative path planning.
[0146] Further, step S3 includes:
[0147] obtain current task information of the robots involved in the conflict, the current task information including task type information and task timeliness information;
[0148] S31: obtain area information where the robots involved in the conflict are located and overall state information of the workshop;
[0149] S32: obtain real-time state information of the robots involved in the conflict, the real-time state information at least including robot power information;
[0150] S33: comprehensively determine task priorities of the robots involved in the conflict according to the task type information, the task timeliness information, the area information, the overall state information of the workshop and the robot power information.
[0151] Based on the above technical features, the task priority determination process of the present application is as follows.
[0152] Through step S31, the system further obtains area information where the robots are located and overall state information of the workshop. The introduction of these environmental factors makes the priority determination no longer limited to the task itself, but can consider the specific environment where the robot is located and its influence on the overall process of the workshop. For example, the robot in the key production area or the robot executing the task when the overall load of the workshop is high, the importance of its task may be relatively improved.
[0153] Through step S32, the system obtains real-time state information of the robots involved in the conflict, with particular attention to robot power information. Considering the real-time state of the robot, especially the power level, is crucial because it directly affects the ability and flexibility of the robot to execute tasks, for example, a robot with insufficient power may need to prioritize charging, or its ability to perform complex avoidance actions is limited.
[0154] In step S33, the system comprehensively considers the task type information, task timeliness information, area information, overall state information of the workshop and robot power information obtained above to determine the task priority of each robot involved in the conflict. This comprehensive determination method organically combines task attributes, environmental factors and robot state, which can more accurately and comprehensively evaluate the relative importance and urgency of each conflicting robot. This more detailed and context-aware priority determination result provides a more reasonable and effective basis for subsequent path adjustment.
[0155] For example, even if a robot with a high task type priority has very low power, the system may consider this factor when determining its priority, or a robot with a low task type priority may have its priority appropriately improved if it is in a critical area where it must pass quickly.
[0156] In this way, the improvement of the present application enables the whole path planning method to better balance the needs of different tasks when solving robot conflicts, more effectively utilize robot resources, thereby improving the efficiency and rationality of conflict resolution, and optimizing the overall system performance.
[0157] Further, step S33 comprises:
[0158] S331: determining the respective base task priority of the robots involved in the conflict according to the task type information;
[0159] S332: calculating the respective task urgency of the robots involved in the conflict according to the task timeliness information;
[0160] S333: determining the respective environmental impact factor of the robots involved in the conflict according to the area information and the overall state information of the workshop;
[0161] S334: determining the respective power impact factor of the robots involved in the conflict according to the robot power information;
[0162] S335: comprehensively determining the respective task priority of the robots involved in the conflict according to the base task priority, the task urgency, the environmental impact factor, and the power impact factor.
[0163] The base task priority refers to the initial priority given according to the inherent importance or preset level of the task itself, which can be realized by using a predefined task type and priority mapping table.
[0164] The task urgency refers to the degree of urgency of task completion, which can be realized by using a function calculation based on task deadline or remaining time.
[0165] The environmental impact factor refers to the influence of the area environment or the overall running state of the workshop on the importance of the task, which can be realized by using evaluation or table lookup based on area type (such as key area, ordinary area) or workshop congestion degree, equipment running state, etc.
[0166] The power impact factor refers to the influence of the current power level of the robot on the task execution ability, which can be realized by using calculation or grading based on the current power percentage or remaining endurance time of the robot.
[0167] Comprehensive determination refers to integrating multiple influence factors to obtain the final task priority, which can be realized by using weighted summation.
[0168] In a specific embodiment, the above priority determination process can be realized as follows.
[0169] In step S331, a task type priority table can be preset, for example, the basic priority of an emergency spill cleaning task is set to 5 (highest), the basic priority of a high-flow area daily cleaning task is set to 4, the basic priority of a general area periodic cleaning task is set to 3, the basic priority of a low-flow area maintenance cleaning task is set to 2, and the basic priority of a charging task is set to 1 (lowest). When a conflict occurs, the respective task types of the conflicting robots are queried to obtain the corresponding basic priorities.
[0170] In step S332, the task urgency can be calculated according to the remaining time of the task, for example, the closer to the task deadline, the higher the urgency, and an inverse proportional function or a piecewise function can be used to calculate the urgency score, for example, if the remaining time is less than 5 minutes, the urgency is 5; if the remaining time is 5-15 minutes, the urgency is 4; if the remaining time is 15-30 minutes, the urgency is 3; and if the remaining time is greater than 30 minutes, the urgency is 2.
[0171] In step S333, the environmental influence factor can be determined according to the type of the area where the robot is located and the overall state of the workshop, for example, in a key production area or a main transportation channel, the environmental influence factor is set to high (for example, the factor value is 1.2), in a general area, the environmental influence factor is set to medium (for example, the factor value is 1.0), and in a non-key area, the environmental influence factor is set to low (for example, the factor value is 0.8). If the overall congestion degree of the workshop is high, the environmental influence factor of all tasks can be appropriately increased.
[0172] In step S334, the power influence factor can be determined according to the current power of the robot, for example, if the power is higher than 80%, the factor value is 1.0, if the power is 60%-80%, the factor value is 0.9, if the power is 40%-60%, the factor value is 0.8, and if the power is lower than 40%, the factor value is 0.7 (assuming that low power will reduce the execution efficiency or need to be charged in priority). In step S335, the basic task priority, the task urgency score, the environmental influence factor, and the power influence factor can be comprehensively calculated, for example, by using a weighted summation method: final priority = weight 1 * basic task priority + weight 2 * task urgency + weight 3 * environmental influence factor + weight 4 * power influence factor, wherein the weights can be adjusted according to actual needs. The higher the final priority value calculated, the higher the task priority.
[0173] Through this specific calculation method, a quantitative task priority can be obtained for subsequent path adjustment decisions.
[0174] Further, the method further comprises:
[0175] S41: obtaining, according to the task priority, first current task information and first short-term planning path information of a low-priority robot involved in the conflict, and second short-term planning path information of a high-priority robot involved in the conflict;
[0176] S42: Obtain the restricted area information and the passing rule of the manufacturing workshop;
[0177] S43: Determine the feasible avoidance area or path segment of the low-priority robot in the future time window according to the first short-term planning path information, the second short-term planning path information, the restricted area information, and the passing rule;
[0178] S44: Plan the adjustment path of the low-priority robot according to the first current task information, the feasible avoidance area or path segment, and the second short-term planning path information, and the adjustment path is used for avoiding the high-priority robot.
[0179] The present scheme elaborates how to specifically execute the path adjustment process of the low-priority robot avoiding the high-priority robot after predicting the spatial conflict between the robots and determining the task priority.
[0180] The core lies in: by comprehensively considering the path information of the conflict parties, the task information of the low-priority robot, and the environmental constraints of the workshop, the feasible avoidance options of the low-priority robot are intelligently determined, and an effective adjustment path is planned based on these options.
[0181] Specifically: first, the basic information acquisition for avoidance planning is performed, by obtaining the first current task information of the low-priority robot involved in the conflict and its original first short-term planning path information according to the determined task priority, the state, target, and original planned moving track of the low-priority robot before avoidance can be known.
[0182] At the same time, the second short-term planning path information of the high-priority robot involved in the conflict is obtained, and the spatial area or path segment that the low-priority robot needs to avoid is determined, providing target information for subsequent avoidance analysis.
[0183] Then, the restricted area information and traffic rules of the manufacturing workshop are obtained, which provide important environmental constraints for the avoidance planning. These information limits the legal movement range and behavior specification of the robots in the workshop. In the subsequent determination of the avoidance area or path segment and the planning of the adjusted path, these constraints must be obeyed to ensure the safety and feasibility of the avoidance behavior, and to avoid the low-priority robot entering the dangerous area or violating the workshop regulations for avoidance. Then, the avoidance options of the low-priority robot are determined. By comprehensively utilizing the original path information of the low-priority robot, the path information of the high-priority robot, and the environmental restricted area information and traffic rules, the system can calculate and determine which areas the low-priority robot can safely enter or along which path segments the low-priority robot can move in the future time window, both avoiding the high-priority robot and not violating the environmental constraints. Here, "feasible" is the core, which filters out all the infeasible or unsafe avoidance options, providing an effective candidate space for the final path planning. Finally, the avoidance path is generated. According to the first current task information of the low-priority robot, combined with the determined feasible avoidance area or path segment (as the planning constraint or target space), and the second short-term planning path information of the high-priority robot (to ensure that the planned path can effectively avoid the high-priority robot), the system plans the adjusted path of the low-priority robot, thereby realizing the orderly avoidance of the low-priority robot to the high-priority robot and reducing conflicts and congestion.
[0184] Please refer to Figure 2 、 Figure 3 A workshop robot path planning system based on ROS2 is applied in the steps of any one of the above methods, and the system comprises:
[0185] An acquisition module 201 acquires the current task information and short-term planning path information of each of the plurality of robots.
[0186] A prediction module 202 predicts whether there is a spatial conflict among the plurality of robots in a future time window according to the current task information and the short-term planning path information.
[0187] A priority determination module 203 determines the task priority of the robots involved in the conflict according to the current task information when it is predicted that there is a spatial conflict.
[0188] A planning module 204 adjusts the short-term planning path of the robots involved in the conflict according to the task priority, so that the low-priority robot avoids the high-priority robot.
[0189] Wherein, the module refers to a software or hardware unit with a specific function in the system, which can be realized by software processes, threads, function libraries, hardware circuits or their combinations.
[0190] Specifically, the acquisition module 201 refers to a unit responsible for receiving or reading data from external sources.
[0191] The prediction module 202 refers to a unit that analyzes and infers future states or events based on input data.
[0192] The priority determination module 203 refers to a unit that ranks the importance of objects according to preset rules or input information.
[0193] The planning module 204 refers to a unit that generates action plans or paths according to goals and constraints.
[0194] The system realizes the above method steps by dividing them into different functional modules.
[0195] The acquisition module 201 is responsible for collecting real-time state information of all robots in the system, including details of the tasks they are currently performing and their respective short-term movement paths. These information is the basis for the system to make subsequent decisions. The prediction module 202 receives the data provided by the acquisition module, uses these data to analyze the expected spatial occupancy of the robots in the future period of time, and thus judges whether there is a potential spatial conflict, such as path intersection or overlap. When the prediction module detects a conflict, the priority determination module 203 is triggered, which determines the relative importance of the tasks of the robots involved in the conflict according to their respective task information, such as task type, timeliness, etc., and thus determines the priority order. Finally, the planning module 204 adjusts the short-term planning path of the low-priority robot according to the result given by the priority determination module. This adjustment aims to guide the low-priority robot to avoid the expected path of the high-priority robot, thus solving the spatial conflict without affecting the execution of high-priority tasks.
[0196] The whole process forms a closed loop, and the system continuously acquires information, predicts, judges and adjusts to ensure the collaborative and efficient operation of multiple robots in dynamic environment. Through this modular design, the system can clearly implement each link of the method, so that the prediction of conflict, the determination of priority and the adjustment of path can be effectively executed, thus converting the above method into operational system functions.
[0197] In this document, relational terms such as first and second and the like can be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions.
[0198] The above only describes the embodiments of the present application and does not limit the protection scope of the present application. For those skilled in the art, the present application can have various modifications and changes. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. A ROS2-based inter-plant robot path planning method, characterized in that, The method comprises steps of: S1: obtaining current task information and short-term planning path information of each robot; S2: obtaining restricted area information of the manufacturing plant and passing rule associated with the restricted area information; determining movement characteristic parameters of each robot according to the current task information; predicting spatial occupation information of each robot in a future time window according to the short-term planning path information, the restricted area information, the passing rule and the movement characteristic parameters; judging whether there is a spatial conflict among the robots in the future time window according to the spatial occupation information; S3: when it is predicted that there is a spatial conflict, obtaining current task information of each robot involved in the conflict, the current task information comprising task type information and task timeliness information; obtaining area information where each robot involved in the conflict is located and overall state information of the plant; obtaining real-time state information of each robot involved in the conflict, the real-time state information at least comprising robot power information; comprehensively determining task priority of each robot involved in the conflict according to the task type information, the task timeliness information, the area information, the overall state information of the plant and the robot power information; S4: adjusting the short-term planning path of each robot involved in the conflict according to the task priority, so that a low-priority robot avoids a high-priority robot.
2. The ROS2-based intra-factory robot path planning method of claim 1, wherein, Step S1 comprises: S11: receiving current task information published by each robot; S12: receiving a message comprising short-term planning path information, timestamp information associated with the short-term planning path information and format identification representing the short-term planning path information, the message being published by each robot; S13: performing format conversion on the short-term planning path information according to the format identification to obtain short-term planning path information in a unified format; S14: determining the short-term planning path information used for subsequent conflict prediction from the short-term planning path information in the unified format according to the timestamp information.
3. The ROS2-based intra-factory robot path planning method of claim 1, wherein, Step S2 comprises: S231: obtaining environmental dynamic information of the manufacturing plant and real-time state information of each robot; S232: determining execution deviation range of each robot in a future time window according to the short-term planning path information, the restricted area information, the passing rule, the movement characteristic parameters, the environmental dynamic information and the real-time state information; S233: predicting spatial occupation information of each robot in a future time window according to the short-term planning path information, the restricted area information, the passing rule, the movement characteristic parameters and the execution deviation range.
4. The ROS2-based inter-plant robot path planning method of claim 3, wherein, Step S232 comprises: S2321: obtaining real-time state information of each robot; S2322: determining expected spatial occupation area of each robot along the short-term planning path in a future time window according to the short-term planning path information, the restricted area information, the passing rule, the movement characteristic parameters and the environmental dynamic information; S2323: determining, according to the real-time state information, an additional space occupation area of each of the plurality of robots within the future time window caused by positioning uncertainty; S2324: combining the expected space occupation area and the additional space occupation area to obtain an execution deviation range of each of the plurality of robots within the future time window.
5. The ROS2-based intra-factory robot path planning method of claim 3, wherein, Step S233 includes: S2331: determining, according to the movement characteristic parameters, an expected trajectory point sequence of each of the plurality of robots along the short-term planning path within the future time window, the movement characteristic parameters including robot size information; S2332: for each trajectory point in the expected trajectory point sequence, determining an initial space occupation area of the robot at the trajectory point according to the position of the trajectory point, the robot size information, and the execution deviation range corresponding to the trajectory point; S2333: correcting the initial space occupation area according to the restricted area information and the traffic rule to obtain a space occupation area of the robot at the trajectory point; S2334: combining the corrected space occupation areas at the plurality of trajectory points to obtain space occupation information of each of the plurality of robots within the future time window.
6. The ROS2-based intra-factory robot path planning method of claim 1, wherein, Step S3 includes: S331: determining a basic task priority of each of the robots involved in the conflict according to the task type information; S332: calculating a task urgency of each of the robots involved in the conflict according to the task timeliness information; S333: determining an environmental impact factor of each of the robots involved in the conflict according to the area information and the overall state information of the workshop; S334: determining a power impact factor of each of the robots involved in the conflict according to the robot power information; S335: comprehensively determining a task priority of each of the robots involved in the conflict according to the basic task priority, the task urgency, the environmental impact factor, and the power impact factor.
7. The ROS2-based intra-factory robot path planning method of claim 1, wherein, Step S4 includes: S41: obtaining first current task information and first short-term planning path information of a low-priority robot involved in the conflict, and second short-term planning path information of a high-priority robot involved in the conflict according to the task priority; S42: obtaining restricted area information and traffic rules of the manufacturing workshop; S43: determining a feasible avoidance area or path segment of the low-priority robot within the future time window according to the first short-term planning path information, the second short-term planning path information, the restricted area information, and the traffic rules; S44: planning an adjustment path of the low-priority robot according to the first current task information, the feasible avoidance area or path segment, and the second short-term planning path information, the adjustment path being used to avoid the high-priority robot.
8. A ROS2-based intra-factory robot path planning system, characterized in that, The system applied to the steps of the method of any one of claims 1-7 includes: an acquisition module: acquiring current task information and short-term planning path information of each of the plurality of robots; The prediction module: acquires restricted area information of a manufacturing workshop and a passing rule associated with the restricted area information; determines a moving characteristic parameter of each robot according to the current task information; predicts spatial occupation information of each robot in a future time window according to the short-term planning path information, the restricted area information, the passing rule, and the moving characteristic parameter; and judges whether there is a spatial conflict among the robots in the future time window according to the spatial occupation information. The priority determination module: when it is predicted that there is a spatial conflict, acquires current task information of each robot involved in the conflict, the current task information including task type information and task timeliness information; acquires area information where each robot involved in the conflict is located and overall state information of the workshop; acquires real-time state information of each robot involved in the conflict, the real-time state information at least including robot power information; and comprehensively determines a task priority of each robot involved in the conflict according to the task type information, the task timeliness information, the area information, the overall state information of the workshop, and the robot power information. The planning module: adjusts a short-term planning path of each robot involved in the conflict according to the task priority, so that a low-priority robot avoids a high-priority robot.
Citation Information
Patent Citations
Robot distribution task priority scheduling method
CN120373785A