A collaborative harvesting control method for dual-arm robots based on master-slave roles
By adopting a master-slave role-based control method, combined with task decomposition, initial role allocation and dynamic adjustment, the problems of trajectory interference and environmental changes in fruit tree harvesting by dual-arm robots are solved, and efficient and safe collaborative operation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SOUTH CHINA AGRICULTURAL UNIVERSITY
- Filing Date
- 2026-03-03
- Publication Date
- 2026-06-02
Smart Images

Figure CN122125694A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of agricultural robot technology, specifically relating to a collaborative harvesting control method for dual-arm robots based on master-slave roles. Background Technology
[0002] With the development of agricultural automation and intelligence, dual-arm collaborative robots are gradually being applied in complex operation scenarios such as fruit and vegetable harvesting. However, due to the often dense and dynamic growing environment of fruit trees, dual-arm robots still face many challenges when performing harvesting tasks: simultaneous movement of both arms in a confined space can easily lead to trajectory interference and mutual occlusion between the robotic arms; the presence of swaying branches and leaves, fruit occlusion, or other dynamic obstacles in the environment makes it difficult for traditional planning methods to respond in a timely manner; and the lack of a flexible adjustment mechanism for the division of roles and cooperation between the two arms leads to a decrease in overall work efficiency.
[0003] To address the aforementioned issues, existing technologies have proposed various solutions. For example, some methods divide the workspace into non-overlapping or partially overlapping regions and combine them with optimization techniques such as genetic algorithms to improve the harvesting sequence. However, these methods are usually limited to static single-cycle planning and lack the ability to replan in real-time when tasks fail or the environment changes. Other research transforms the harvesting sequence problem into a multi-traveling salesman problem with time window constraints and utilizes swarm intelligence algorithms to improve path generation efficiency; however, trajectory conflict risks still exist in dense or chaotic environments. Another type of method employs an asynchronous master-slave coordination mechanism, using dynamic safety zones and pre-scheduling to avoid collisions, but this often sacrifices operational efficiency. In summary, existing technologies have made some progress in dual-arm collaborative harvesting, covering various methods such as space partitioning, path optimization, and asynchronous coordination. However, these solutions generally lack real-time adjustment mechanisms, easily leading to delays and trajectory conflicts during execution, limiting the system's application effectiveness in complex dynamic environments. Therefore, there is an urgent need to propose a new cooperative control method that can achieve real-time adaptive adjustment of the roles of the two arms while maintaining efficient path planning, in order to further improve the overall performance of agricultural harvesting robots. Summary of the Invention
[0004] The main objective of this invention is to overcome the shortcomings and deficiencies of the prior art and propose a dual-arm robot collaborative harvesting control method based on master-slave roles. Through intelligent role allocation and dynamic adjustment, the smoothness and efficiency of dual-arm collaborative operation are significantly improved while ensuring no collisions.
[0005] To achieve the above objectives, the present invention adopts the following technical solution:
[0006] A collaborative harvesting control method for a dual-arm robot based on master-slave roles includes the following steps:
[0007] S1. Task decomposition and key posture recognition: The picking task is divided into two stages: picking and placing, and key postures are identified.
[0008] S2. Initial master-slave role allocation: Before the harvesting task begins, the master arm and slave arm are allocated based on spatial interference detection and path cost calculation.
[0009] S3. Dynamic adjustment of roles during continuous harvesting: During the harvesting operation, the master and slave roles are switched in real time according to the task status and path interference to avoid deadlock and waiting.
[0010] Compared with the prior art, the present invention has the following advantages and beneficial effects:
[0011] 1. Regarding role allocation, existing technologies often employ fixed partitioning or random allocation methods, which can easily lead to overlapping paths between the two arms or planning failures. This invention utilizes an initial master-slave role allocation strategy that combines spatial interference detection and path cost calculation. This strategy can rationally determine the master and slave arms at the start of the task, avoiding path conflicts caused by random allocation, thereby improving the success rate and efficiency of the initial harvesting task.
[0012] 2. In continuous operation, existing asynchronous master-slave coordination methods typically rely on preset safety zones or preemptive scheduling. While these can reduce collision risks, they lack real-time performance and often sacrifice efficiency. This invention proposes a dynamic master-slave role adjustment strategy. Through modules such as task status assessment, task stage identification, and path interference detection, it achieves real-time monitoring and role switching, enabling the two arms to flexibly adjust their roles according to task progress and environmental changes, reducing waiting time and mitigating trajectory conflict risks. Therefore, this invention significantly improves the real-time performance and overall harvesting efficiency of the two-arm collaboration while ensuring safety. Attached Figure Description
[0013] Figure 1 This is an overall flowchart of the method of the present invention.
[0014] Figure 2 It is a diagram of three key postures and two main stages.
[0015] Figure 3 This is a schematic diagram of two-way spatial interference.
[0016] Figure 4 This is a schematic diagram of unidirectional spatial interference.
[0017] Figure 5 This is a schematic diagram of path segment interference.
[0018] Figure 6 This is a schematic diagram of a dynamic continuous collaborative strategy.
[0019] Figure 7 This is a schematic diagram of path interference detection. Detailed Implementation
[0020] The present invention will be further described in detail below with reference to the embodiments and accompanying drawings, but the embodiments of the present invention are not limited thereto.
[0021] Examples; such as Figure 1 As shown, a collaborative harvesting control method for a dual-arm robot based on master-slave roles includes the following steps:
[0022] S1. Task decomposition and key posture recognition; The picking task is divided into two stages: picking and placing, and key postures are identified; In this embodiment, specifically:
[0023] The entire harvesting task is divided into two main stages and three key phases, such as... Figure 2 As shown, the three key poses are as follows:
[0024] The initial posture is with both arms in a ready starting position, serving as the starting point for the movement planning;
[0025] The target picking posture is determined, and the end effector aligns with the fruit stem to complete the cutting and grasping;
[0026] The fruit bunch placement posture, the posture of placing the picked fruit bunch into the designated collection basket;
[0027] Based on three key postures, the harvesting task is divided into two phases:
[0028] During the picking phase, the machine moves from its initial posture to the target picking posture and completes the grasping process.
[0029] During the placement phase, the machine moves from the picking posture to the placement posture, and returns to the initial posture after placement is completed.
[0030] S2. Initial Master-Slave Role Assignment; Before the harvesting task begins, the master arm and slave arm are assigned based on spatial interference detection and path cost calculation; specifically including:
[0031] S21, Dual-arm independent path pre-planning; specifically:
[0032] Each arm independently plans a path without role constraints based on the location of its respective target fruit, generating a preliminary trajectory. and .
[0033] S22. Determine whether there is bidirectional spatial interference between the two arms; specifically:
[0034] like Figure 3 As shown, if any of the following conditions are met, it is determined to be bidirectional spatial interference:
[0035] The planned path of arm A interferes with the target position of arm B, and the planned path of arm B interferes with the starting position of arm A.
[0036] The planned path of arm B interferes with the target position of arm A, and the planned path of arm A interferes with the starting position of arm B.
[0037] Interference detection employs a bounding box-based collision detection algorithm; the minimum distance between the bounding box of arm A's trajectory and the bounding box of arm B's target position is calculated, and if it is less than a safety threshold, it is determined to be interference.
[0038] At this point, regardless of who is in charge, it is impossible to complete the collaborative planning, replan the paths for both parties, or adjust the picking order.
[0039] S23. If there is no two-way spatial interference, then determine whether there is one-way spatial interference; specifically:
[0040] If there is no bidirectional interference, determine whether unidirectional interference exists, such as... Figure 4 As shown, there are two categories:
[0041] The first scenario involves interference between the path of arm A and the starting / target position of arm B. In this case, arm B is designated as the master arm and arm A as the slave arm. The master arm prioritizes planning a collision-free trajectory and defines the spatiotemporal region where its trajectory is generated as a constraint space. When planning its path, the slave arm avoids this constraint space as a dynamic obstacle and replans its path.
[0042] The second scenario involves interference between the path of arm B and the starting / target position of arm A. In this case, arm A is assumed to be the master arm and arm B to be the slave arm, and the path of the slave arm is replanned.
[0043] S24. If only path segment interference exists, the master / slave roles are determined by the path cost; specifically:
[0044] like Figure 5 As shown, when the paths of the two arms intersect in the middle section but do not touch the start and end points of the other, the master and slave roles are determined by the path cost; the path cost is defined as the length of the robotic arm's trajectory, and the calculation formula is as follows:
[0045]
[0046] in, For the first The joint angle vector of a robotic arm The joint angular velocity vector. Indicates the length of the vector. For the estimated exercise time;
[0047] set up Let be the path costs of the two arms respectively, and let . , ;like If the path with the lower cost is the main arm, the other arm is the secondary arm, and the path is replanned.
[0048] S25. If there is absolutely no interference, then master and slave roles are assigned according to path cost; specifically:
[0049] If there is no interference between the two arm paths, assign master and slave roles according to formula (1) in step S24 to ensure strategy consistency.
[0050] S3. Dynamic adjustment of roles during continuous harvesting; During the harvesting operation, the master and slave roles are switched in real time according to the task status and path interference to avoid deadlock and waiting; In this embodiment, specifically:
[0051] In continuous harvesting, a dynamic continuous collaboration strategy is adopted to perceive task status and path interference in real time and dynamically switch master and slave roles; for example... Figure 6 As shown, the dynamic continuous collaborative strategy includes a three-level decision-making process: task status assessment, task phase identification, and path interference detection.
[0052] Specifically, the task status assessment includes:
[0053] If there are no tasks to be harvested in the forearm, it will enter the completed state and will not participate in the planning.
[0054] If there is a task, it is considered a potential main arm, and task phase identification is performed.
[0055] Task phase identification specifically includes:
[0056] Real-time monitoring of the companion arm's current stage:
[0057] If the other arm is in the placement phase, the current arm can directly execute its planned path;
[0058] If the other arm is in the harvesting stage, path interference detection is performed.
[0059] like Figure 7 As shown, path interference detection specifically involves:
[0060] Interference judgment is made between the newly planned path of the current arm and the trajectory being executed by the other arm, including the following two cases:
[0061] Non-target point interference: Interference occurs in the middle of the path and does not involve the target picking point; the current arm turns into a slave arm and attempts to plan a new collision-free trajectory; if the planning is successful and there is no interference, the trajectory is executed; if multiple planning attempts still fail, it enters a waiting state and continuously monitors the other arm's task phase; once the other arm enters the placement phase, the current arm turns into the master arm role to perform path planning.
[0062] Target point interference: The target picking point of the current arm overlaps with the current execution trajectory space of the other arm; since the target point cannot be changed, the current arm immediately enters a waiting state;
[0063] In addition, to prevent the current arm from waiting indefinitely due to the failure of the other arm, a waiting timeout threshold is set; if the timeout occurs and the other arm has not yet left the conflict area, the task is reassigned.
[0064] This embodiment achieves intelligent collaboration of a dual-arm robot through the steps described above. First, during the task initialization phase, spatial interference detection and path cost calculation scientifically allocate master and slave roles, avoiding planning failures caused by random allocation. Second, during the continuous operation phase, a dynamic continuous collaboration strategy is used to perceive task status and path interference in real time, dynamically switching master and slave roles, ensuring both safety and maximizing operational efficiency. The entire solution is highly interpretable and can be deployed without requiring extremely high-performance computing equipment.
[0065] In terms of initial assignment of master and slave roles, existing technologies mostly use fixed work area division or random assignment to determine the master and slave roles of the two arms. This approach is prone to failure when the fruit location is unpredictable or paths overlap, as the arm assigned as the "slave arm" may be unable to find a valid path, leading to task failure or the need for repeated replanning. This invention proposes an initial role assignment strategy based on spatial interference detection and path cost calculation. Specifically, it first performs independent path pre-planning for both arms, then uses a bounding box algorithm to detect whether there is bidirectional or unidirectional spatial interference. If there is no interference or only path segment interference, the arm with the lower cost is assigned as the master arm by calculating the path cost of the joint velocity integral. Compared with existing technologies, this invention avoids the path conflict problem caused by random assignment, ensuring the feasibility and efficiency of the initial harvesting task from the outset.
[0066] In terms of dynamic adjustment for continuous operations, existing asynchronous master-slave coordination methods typically rely on preset safety zones or simple preemptive scheduling. While these methods reduce collision risks, they often lack fine-grained awareness of task status, leading to unnecessary waiting between the two arms and sacrificing operational efficiency. This invention proposes a continuous operation role adjustment strategy based on a three-level dynamic decision-making mechanism. Specifically, it monitors the status of both arms in real time through three modules: task status assessment, task stage identification (picking / placement stage), and path interference detection. When path conflicts or inconsistent task progress are detected, the system dynamically switches master and slave roles and performs path replanning, rather than simply waiting. Compared to existing technologies, this invention achieves finer-grained collaboration in its specific control logic, significantly improving the collaborative efficiency and robustness of the two arms during continuous picking while ensuring safety.
[0067] It should also be noted that, in this specification, terms such as "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0068] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A collaborative harvesting control method for a dual-arm robot based on master-slave roles, characterized in that, Includes the following steps: S1. Task decomposition and key posture recognition: The picking task is divided into two stages: picking and placing, and key postures are identified. S2. Initial master-slave role allocation: Before the harvesting task begins, the master arm and slave arm are allocated based on spatial interference detection and path cost calculation. S3. Dynamic adjustment of roles during continuous harvesting: During the harvesting operation, the master and slave roles are switched in real time according to the task status and path interference to avoid deadlock and waiting.
2. The method for collaborative harvesting control of a dual-arm robot based on master-slave roles as described in claim 1, characterized in that, Step S1 is as follows: The entire harvesting task is divided into two main stages and three key phases; the three key phases are as follows: The initial posture is with both arms in a ready starting position, serving as the starting point for the movement planning; The target picking posture is determined, and the end effector aligns with the fruit stem to complete the cutting and grasping; The fruit bunch placement posture, the posture of placing the picked fruit bunch into the designated collection basket; Based on three key postures, the harvesting task is divided into two phases: During the picking phase, the machine moves from its initial posture to the target picking posture and completes the grasping process. During the placement phase, the machine moves from the picking posture to the placement posture, and returns to the initial posture after placement is completed.
3. The method for collaborative harvesting control of a dual-arm robot based on master-slave roles according to claim 1, characterized in that, Step S2 specifically includes: S21, Dual-arm independent path pre-planning; S22. Determine whether there is bidirectional spatial interference between the two arms; S23. If there is no two-way spatial interference, then determine whether there is one-way spatial interference. S24. If only path segment interference exists, the master-slave role is determined by the path cost. S25. If there is no interference, then master and slave roles are assigned according to path cost.
4. The method for collaborative harvesting control of a dual-arm robot based on master-slave roles according to claim 3, characterized in that, Step S21 is as follows: Each arm independently plans a path without role constraints based on the location of its respective target fruit, generating a preliminary trajectory. and .
5. A collaborative harvesting control method for a dual-arm robot based on master-slave roles according to claim 3, characterized in that, Step S22 is as follows: If any of the following conditions are met, it is determined to be bidirectional spatial interference: The planned path of arm A interferes with the target position of arm B, and the planned path of arm B interferes with the starting position of arm A. The planned path of arm B interferes with the target position of arm A, and the planned path of arm A interferes with the starting position of arm B. Interference detection employs a bounding box-based collision detection algorithm; the minimum distance between the bounding box of arm A's trajectory and the bounding box of arm B's target position is calculated, and if it is less than a safety threshold, it is determined to be interference; At this point, regardless of who is in charge, it is impossible to complete the collaborative planning, replan the paths for both parties, or adjust the picking order. Step S23 is as follows: If there is no two-way spatial interference, to determine whether there is one-way spatial interference, there are two cases: The first scenario involves interference between the path of arm A and the starting / target position of arm B. In this case, arm B is designated as the master arm and arm A as the slave arm. The master arm prioritizes planning a collision-free trajectory and defines the spatiotemporal region where its trajectory is generated as the constraint space. During path planning, the arm avoids this constraint space as a dynamic obstacle and replans the arm's path. The second type is the interference between the path of arm B and the starting / target position of arm A; Now, let arm A be the master arm and arm B be the slave arm, and replan the slave arm path.
6. The method for collaborative harvesting control of a dual-arm robot based on master-slave roles according to claim 3, characterized in that, Step S24 is as follows: When the paths of the two arms intersect in the middle section but do not touch the start and end points of the other, the master and slave roles are determined by the path cost; the path cost is defined as the length of the robotic arm's trajectory, and the calculation formula is: in, For the first The joint angle vector of a robotic arm The joint angular velocity vector. Indicates the length of the vector. For the estimated exercise time; set up Let be the path costs of the two arms respectively, and let . , ;like If the path with the lower cost is the main arm, the other arm is the secondary arm, and the path is replanned. Step S25 is as follows: If there is no interference between the two arm paths, assign master and slave roles according to formula (1) in step S24 to ensure strategy consistency.
7. A collaborative harvesting control method for a dual-arm robot based on master-slave roles according to claim 2, characterized in that, Step S3 is as follows: In continuous harvesting, a dynamic continuous collaboration strategy is adopted to perceive the task status and path interference in real time and dynamically switch the master and slave roles. The dynamic continuous collaboration strategy includes a three-level decision-making process, namely task status assessment, task stage identification and path interference detection.
8. A collaborative harvesting control method for a dual-arm robot based on master-slave roles as described in claim 7, characterized in that, Task status assessment, specifically: If there are no tasks to be harvested in the forearm, it will enter the completed state and will not participate in the planning. If there is a task, it is considered a potential main arm, and task phase identification is performed.
9. A collaborative harvesting control method for a dual-arm robot based on master-slave roles as described in claim 8, characterized in that, Task phase identification, specifically: Real-time monitoring of the companion arm's current stage: If the other arm is in the placement phase, the current arm directly executes its planned path; If the other arm is in the harvesting stage, path interference detection is performed.
10. A collaborative harvesting control method for a dual-arm robot based on master-slave roles according to claim 9, characterized in that, Path interference detection, specifically: Interference judgment is made between the newly planned path of the current arm and the trajectory being executed by the other arm, and the following two cases are considered: Non-target point interference: The interference occurs in the middle of the path and does not involve the target picking point; the front arm turns into the secondary arm and attempts to plan a new collision-free trajectory; If the planning is successful and there is no interference, the trajectory will be executed; if multiple planning attempts still fail, the process will enter a waiting state and continuously monitor the other arm of the task. Once the other arm enters the placement phase, the current arm transforms into the main arm role for path planning. Target point interference: The target acquisition point of the current arm overlaps with the current execution trajectory space of the other arm; Since the target point cannot be changed, the forearm immediately enters a waiting state; To prevent the current arm from waiting indefinitely due to the failure of the other arm, a waiting timeout threshold is set; if the timeout occurs and the other arm has not yet left the conflict area, the task is reassigned.