Collaborative operation method based on multiple robots and electronic equipment
By adopting wireless communication connection and target synchronization timestamp mechanisms in the multi-robot collaborative operation system, the problem of insufficient flexibility and applicability of robots in non-fixed positions is solved, and high-reliability collaborative operation is achieved.
Patent Information
- Application Number
- CN202510432491.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-06-13
AI Technical Summary
The existing multi-robot collaborative operation method cannot be applied to robots perform collaborative operation in non-fixed positions, resulting in insufficient flexibility and applicability.
By introducing a wireless communication connection in the multi-robot collaborative operating system, the master robot and the slave robot respond to the start operation, calculate the target synchronization timestamp, and send a main job synchronization message carrying the timestamp. The slave robot determines the target synchronization timestamp based on the message, and executes a preset slave job when the timestamp is reached.
The master-slave robot performs collaborative operations in non-fixed positions, improves the flexibility and applicability of collaborative operations, and improves the reliability of collaborative operations through a two-way synchronization mechanism.
Smart Images

Figure CN120134310A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robot control technology, and particularly to a collaborative operation method based on multiple robots and an electronic device. Background Art
[0002] A multi-robot collaborative operation system is an intelligent system that completes complex tasks by multiple robots sharing information, coordinating actions, and cooperating in division of labor. Its core lies in swarm intelligence and distributed decision-making, which can significantly improve efficiency, robustness, and scenario adaptability.
[0003] In the prior art, when multiple robots are used to achieve multi-robot collaborative operation, the situation where robots perform collaborative operation at fixed positions is mainly considered. Therefore, the master robot and the slave robots can be directly connected through a network cable, which enables the slave robots to simply rely on the synchronization signals from the master robot to trigger collaborative operation.
[0004] However, when the robots are equipped with mobile chassis and need to perform collaborative operation under non-fixed position conditions, the existing multi-robot collaborative methods will not be applicable. Summary of the Invention
[0005] The purpose of this application is to provide, in view of the above deficiencies in the prior art, a collaborative operation method based on multiple robots and an electronic device, which can enable the master robot and the slave robots to perform collaborative operation at non-fixed positions, and improve the flexibility and applicability of the collaborative operation method.
[0006] To achieve the above purpose, the technical solutions adopted in the embodiments of this application are as follows:
[0007] In a first aspect, the present invention provides a collaborative operation method based on multiple robots, which is applied to the master robot in a multi-robot collaborative operation system, and the master robot is wirelessly communicatively connected to at least one slave robot in the multi-robot collaborative operation system. The method includes:
[0008] In response to a start operation, calculate a target synchronization timestamp corresponding to the master operation synchronization message according to the current master system time of the master robot;
[0009] Send a master operation synchronization message carrying the target synchronization timestamp to the slave robots, and monitor the current master system time of the master robot. Wherein, the slave robots are used to determine the target synchronization timestamp in the slave operation synchronization message according to the master operation synchronization message, return a master operation response message to the master robot, and execute a preset slave operation in the slave operation synchronization message when the current slave system time of the slave robots reaches the target synchronization timestamp;
[0010] If the master job response message is received and the current master system time of the master robot reaches the target synchronization timestamp, then execute the preset master job corresponding to the master job synchronization message.
[0011] In an alternative embodiment, the master job synchronization message includes: a plurality of sub-job process master synchronization messages, and each of the sub-job process master synchronization messages includes a corresponding active action sequence and a synchronization timestamp; the slave job synchronization message includes: a plurality of sub-job process slave synchronization messages, and each of the sub-job process slave synchronization messages includes a corresponding slave action sequence and a synchronization timestamp;
[0012] Calculating the target synchronization timestamp corresponding to the master job synchronization message according to the current master system time of the master robot includes:
[0013] According to the current master system time of the master robot, calculate the first synchronization timestamp corresponding to the first sub-job process master synchronization message;
[0014] Sending the master job synchronization message carrying the target synchronization timestamp to the slave robot and monitoring the current master system time of the master robot includes:
[0015] Send the first sub-job process master synchronization message carrying the first synchronization timestamp to the slave robot, and monitor the current master system time of the master robot. Wherein, the slave robot is used to determine the first synchronization timestamp in the first sub-job process slave synchronization message after receiving the first sub-job process master synchronization message, send a first response message to the master robot, and execute the first slave action sequence corresponding to the first sub-job process slave synchronization message when the current slave system time of the slave robot reaches the first synchronization timestamp;
[0016] The step of if the master job response message is received and the current master system time of the master robot reaches the target synchronization timestamp, then execute the preset master job corresponding to the master job synchronization message includes:
[0017] If the first response message is received and the current master system time of the master robot reaches the first synchronization timestamp, then execute the first active action sequence corresponding to the first sub-job process master synchronization message.
[0018] In an alternative embodiment, each sub-job process master synchronization message also carries a synchronization sequence number, the first sub-job process master synchronization message carries a first synchronization sequence number, and the first response message carries the first synchronization sequence number.
[0019] In an alternative embodiment, after sending the first sub-job process master synchronization message carrying the first synchronization timestamp to the slave robot, it further includes:
[0020] Start the first timer. If the first response message has not been received when the timing time of the first timer exceeds the first preset time threshold, then execute the step of calculating the first synchronization timestamp corresponding to the first sub-job process master synchronization message according to the current master system time of the master robot.
[0021] In an alternative embodiment, the master job synchronization message further includes a termination message after a plurality of sub-job process master synchronization messages, and the slave job synchronization message further includes a termination message after a plurality of sub-job process slave synchronization messages. After executing the first active action sequence corresponding to the first sub-job process master synchronization message, the method further includes:
[0022] A. Calculate the next synchronization timestamp corresponding to the next sub-job process master synchronization message according to the current master system time of the master robot and the master job synchronization message;
[0023] B. Send the next sub-job process master synchronization message carrying the next synchronization timestamp to the slave robot, and monitor the current master system time of the master robot. The slave robot is configured to determine the next synchronization timestamp corresponding to the next sub-job process slave synchronization message after receiving the next sub-job process master synchronization message, send a next response message to the master robot, and execute the next slave action sequence corresponding to the next sub-job process slave synchronization message when the current slave system time of the slave robot reaches the next synchronization timestamp;
[0024] C. If the next sub-job process master synchronization message is received and the current master system time of the master robot reaches the next synchronization timestamp, then execute the next active action sequence corresponding to the next sub-job process master synchronization message;
[0025] D. Repeat steps A - C until the termination message is obtained, and send the termination message to the slave robot so that the slave robot stops executing actions according to the termination message.
[0026] In an alternative embodiment, the method further includes:
[0027] If the termination message is obtained, then send the termination message to the slave robot and start the second timer;
[0028] If the timing time of the second timer exceeds the second preset time threshold and the termination response message sent by the slave robot has not been received, then re-send the termination message to the slave robot until the termination response message sent by the slave robot is received.
[0029] In an alternative embodiment, calculating a first synchronization timestamp corresponding to a first sub-job process master synchronization message according to the current master system time of the master robot includes:
[0030] Calculating the first synchronization timestamp corresponding to the first sub-job process master synchronization message according to the current master system time of the master robot, a preset response reception time, and a preset processing time margin.
[0031] In an alternative embodiment, before calculating a target synchronization timestamp corresponding to a master job synchronization message according to the current master system time of the master robot in response to a start operation, the method further includes:
[0032] The initial master system time of the master robot and the initial slave system times of the slave robots are obtained after clock synchronization according to a preset clock synchronization algorithm.
[0033] In a second aspect, the present invention provides a multi-robot collaborative operation method, which is applied to a slave robot in a multi-robot collaborative operation system, and the slave robot is wirelessly communicatively connected to a master robot in the multi-robot collaborative operation system. The method includes:
[0034] Receiving a master job synchronization message carrying a target synchronization timestamp sent by the master robot; wherein, the target synchronization timestamp is calculated by the master robot according to the current master system time of the master robot in response to a start operation;
[0035] Determining a target synchronization timestamp in a slave job synchronization message according to the target synchronization timestamp in the master job synchronization message;
[0036] Returning a master job response message to the master robot, and executing a preset slave job in the slave job synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp. The master robot is used to monitor the current master system time of the master robot after receiving the master job response message. If it is determined that the current master system time reaches the target synchronization timestamp, the preset master job corresponding to the master job synchronization message is executed.
[0037] In a third aspect, the present invention provides an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device runs, the processor communicates with the storage medium through the bus. The processor executes the machine-readable instructions to perform the steps of the multi-robot collaborative operation method according to any one of the foregoing embodiments.
[0038] Fourthly, the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the multi-robot collaborative operation method according to any one of the foregoing embodiments.
[0039] The beneficial effects of the present application are as follows:
[0040] In the multi-robot collaborative operation method and the electronic device provided by the embodiments of the present application, the master robot, in response to a start operation, calculates a target synchronization timestamp corresponding to a master operation synchronization message according to the current master system time of the master robot; sends the master operation synchronization message carrying the target synchronization timestamp to the slave robot, and monitors the current master system time of the master robot. The slave robot is used to determine the target synchronization timestamp in the slave operation synchronization message according to the master operation synchronization message, return a master operation response message to the master robot, and execute a preset slave operation in the slave operation synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp; if a master operation response message is received and the current master system time of the master robot reaches the target synchronization timestamp, then execute the preset master operation corresponding to the master operation synchronization message, realizing that the master and slave robots can perform collaborative operations at non-fixed positions based on a wireless network, improving the flexibility and applicability of the multi-robot collaborative operation system; in addition, by setting a master operation response message between the slave robot and the master robot, it is realized that the master robot only performs collaborative operations after the slave robot confirms the correct reception of the synchronization message, avoiding the failure of the synchronization process caused by one-way synchronization, and improving the reliability of the collaborative operation. Description of the Drawings
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present application, so they should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0042] Figure 1 It is an architecture diagram of a multi-robot collaborative operation system provided by an embodiment of the present application;
[0043] Figure 2 It is an application scenario of a multi-robot collaborative operation system provided by an embodiment of the present application;
[0044] Figure 3 It is another application scenario of a multi-robot collaborative operation system provided by an embodiment of the present application;
[0045] Figure 4 It is a flowchart of a multi-robot collaborative operation method provided by an embodiment of the present application;
[0046] Figure 5 It is a schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of the present application;
[0047] Figure 6 It is a schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of the present application;
[0048] Figure 7 It is a schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of the present application;
[0049] Figure 8 It is a schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of the present application;
[0050] Figure 9 It is a schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of the present application;
[0051] Figure 10 It is a schematic diagram of functional modules of a collaborative operation device based on multiple robots provided by an embodiment of the present application;
[0052] Figure 11 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present application. Detailed implementation manners
[0053] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Apparently, the described embodiments are some, but not all, of the embodiments of the present application. The components of the embodiments of the present application described and illustrated herein generally can be arranged and designed in various different configurations.
[0054] 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 present application claimed, but merely represents selected embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.
[0055] It should be noted that like reference numerals and letters denote like items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings.
[0056] In the prior art, when multiple robots are used to achieve multi-robot collaborative operations, the situation where robots perform collaborative operations at fixed positions is mainly considered. Therefore, the master robot and the slave robots can be directly connected through a network cable, which enables the slave robots to simply rely on the synchronization signals from the master robot to trigger collaborative operations. However, when the robots are equipped with mobile chassis and need to perform collaborative operations under non-fixed position conditions, the existing multi-robot collaborative methods will not be applicable.
[0057] In view of this, the embodiments of the present application provide a collaborative operation method based on multiple robots. Applying this method can support the master robot and the slave robots to perform collaborative operations under non-fixed position conditions, and has the characteristics of strong applicability.
[0058] Figure 1 It is an architecture diagram of a multi-robot collaborative operation system provided by an embodiment of the present application. As Figure 1 shown, the multi-robot collaborative operation system may include a master robot 10 and at least one slave robot 20. Among them, the master robot 10 and each slave robot 20 can perform wireless communication through a wireless network 30 (for example, a 5G network). During the collaborative work process, the master robot 10 can control the behaviors of each slave robot 20, and each slave robot 20 can perform corresponding collaborative operations according to the control of the master robot 10.
[0059] In addition, in some embodiments, the multi-robot collaborative operation system may further include a robot management server 40, which can be used to coordinate, monitor, and optimize the collaborative behaviors of multiple robots to ensure the efficiency, safety, and reliability of the overall system. For example, it can manage the online and offline of the master robot and the slave robots, or it can implement the registration management and mutual discovery of robots, or it can be used for clock synchronization between the master robot and the slave robots. This is not limited here and can be flexibly configured according to the actual application scenario.
[0060] Figure 2 It is an application scenario of a multi-robot collaborative operation system provided by an embodiment of the present application. Figure 3 It is another application scenario of a multi-robot collaborative operation system provided by an embodiment of the present application. Optionally, the multi-robot collaborative operation system can be applied in scenarios such as industrial manufacturing, logistics warehousing, agriculture, medical care, services, rescue, and security. For example, as Figure 2 shown, in the industrial manufacturing scenario, the master robot A1 and a slave robot B1 can simultaneously perform grasping and placing operations on the same workpiece C1, so as to achieve synchronous movement of the master robot A1 and the slave robot B1 in the Cartesian space and avoid shear force on the workpiece; or, as Figure 3As shown, the master robot A2 can grasp the workpiece C2, and the slave robot B2 performs processing and grinding. Through the collaborative work of multiple robots, the slave robot B2 can perform synchronous movement according to the tool position of the master robot A2 to complete the processing of the workpiece C2.
[0061] Of course, the specific application scenarios are not limited to this. In addition, the present application does not limit the number of slave robots in the multi-robot collaborative operation system, which may include one or more according to the actual application scenarios.
[0062] Figure 4 It is a schematic flow chart of a collaborative operation method based on multiple robots provided by an embodiment of the present application. Among them, this method can be applied to the master robot in the above multi-robot collaborative operation system, such as Figure 4 As shown, this method includes:
[0063] Step 101, in response to the start operation, calculate the target synchronization timestamp corresponding to the master operation synchronization message according to the current master system time of the master robot.
[0064] Optionally, the master robot can be configured to include a master operation synchronization message, and its representation form can be M(t, a), where t represents the target synchronization timestamp corresponding to the master operation synchronization message, and a represents the preset master operation corresponding to the master operation synchronization message. Among them, the target synchronization timestamp is also the execution time of the preset master operation.
[0065] It should be noted that the target synchronization timestamp in the master operation synchronization message is a value to be calculated, which can be determined according to the current master system time when the master robot starts, and the target synchronization timestamp should be later than the current master system time; and the preset master operation in the master operation synchronization message can be a preset master operation sequence, and this master operation sequence can include multiple master execution actions.
[0066] In some embodiments, the start operation can be generated by a preset start button on the master robot, or can be generated according to a remote start signal sent by the robot management server. This is not limited here and can be flexibly set according to the actual application scenarios.
[0067] In response to this start operation, the master robot can obtain the current master system time and determine the target synchronization timestamp corresponding to the master operation synchronization message according to a preset algorithm, that is, determine the execution time of the preset master operation in the master operation synchronization message. It can be understood that since it is a multi-robot collaborative operation scenario, the determination of the target synchronization timestamp can be based on the communication time between the slave robot and the master robot, so that the slave robot can execute a specific preset slave operation at a fixed time when its current system time reaches the target synchronization timestamp.
[0068] Step 102: Send a master job synchronization message carrying the target synchronization timestamp to the slave robot, and monitor the current master system time of the master robot.
[0069] Among them, the slave robot is used to determine the target synchronization timestamp in the slave job synchronization message according to the master job synchronization message, return a master job response message to the master robot, and execute the preset slave job in the slave job synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp.
[0070] For each slave robot, the slave robot can be configured to include a slave job synchronization message, and its representation form can be N(t, b), where t represents the target synchronization timestamp corresponding to the slave job synchronization message, and b represents the preset slave job corresponding to the slave job synchronization message. Among them, the target synchronization timestamp is also the execution time of the preset slave job.
[0071] Among them, after calculating the target synchronization timestamp, the master robot can send the master job synchronization message to the slave robot and monitor the current system time of the master robot in real time. After receiving the master job synchronization message, the slave robot can extract the target timestamp, determine the target synchronization timestamp in the slave job synchronization message (that is, determine the execution time of the preset slave job in the slave job synchronization message), and return a master job response message to the master robot.
[0072] Based on the above description, it can be seen that for the slave job synchronization message, the target synchronization timestamp in the slave job synchronization message is a value to be calculated, which can be determined according to the master job synchronization message sent by the master robot, and the target timestamp in the slave job synchronization message is the same as the target timestamp in the master job synchronization message; and the preset slave job in the slave job synchronization message can be a preset slave job sequence, and the slave job sequence can include multiple slave execution actions.
[0073] In addition, for the slave robot, it can monitor its own current master system time in real time. If its current slave system time reaches the target synchronization timestamp, the slave robot can execute the preset slave job in the slave job synchronization message.
[0074] Of course, it should be noted that this application does not limit the relationship between the preset master job and the preset slave job here. According to the actual application scenario, such as Figure 2 shown, the two can be set to be the same, or, as Figure 3 shown, the two can be set to be different, which is not limited here and can be flexibly set according to the actual application scenario.
[0075] Step 103: If a master job response message is received and the current master system time of the master robot reaches the target synchronization timestamp, execute the preset master job corresponding to the master job synchronization message.
[0076] Based on the above, it can be seen that the synchronization mechanism between the master robot and the slave robot is a two-way synchronization method. For the master robot, if it receives the master job response message and at the same time determines through real-time monitoring that the current master system time of the master robot reaches the target synchronization timestamp, then it can execute the preset master job corresponding to the master job synchronization message.
[0077] Furthermore, it can be understood that although the target timestamps in the slave job synchronization message and the master job synchronization message are the same, and the slave job synchronization message corresponds to a preset slave job while the master job synchronization message corresponds to a preset master job. Therefore, it can be ensured that at the target timestamp, the master robot executes the preset master job and the slave robot executes the preset slave job, realizing the collaborative operation of the master robot and the slave robot.
[0078] Applying the embodiments of the present application, by setting the master robot and the slave robot to communicate based on a wireless network, the master and slave robots can perform collaborative operations at non-fixed positions based on the wireless network, improving the flexibility and applicability of the multi-robot collaborative operation system; in addition, by setting the master job response message between the slave robot and the master robot, it is realized that the master robot only performs collaborative operations after the slave robot confirms the correct reception of the synchronization message, avoiding the failure of the synchronization process caused by one-way synchronization and improving the reliability of the collaborative operation.
[0079] In summary, the present application provides a collaborative operation method based on multi-robots. This method is applied to the master robot in a multi-robot collaborative operation system, and the master robot is wirelessly connected to at least one slave robot in the multi-robot collaborative operation system. The method includes: in response to a start operation, calculating a target synchronization timestamp corresponding to the master job synchronization message according to the current master system time of the master robot; sending the master job synchronization message carrying the target synchronization timestamp to the slave robot, and monitoring the current master system time of the master robot, where the slave robot is used to determine the target synchronization timestamp in the slave job synchronization message according to the master job synchronization message, return the master job response message to the master robot, and execute the preset slave job in the slave job synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp; if the master job response message is received and the current master system time of the master robot reaches the target synchronization timestamp, then execute the preset master job corresponding to the master job synchronization message, realizing that the master and slave robots can perform collaborative operations at non-fixed positions based on the wireless network, improving the flexibility and applicability of the multi-robot collaborative operation system; in addition, by setting the master job response message between the slave robot and the master robot, two-way synchronization is realized, that is, the master robot only performs collaborative operations after the slave robot confirms the correct reception of the synchronization message, avoiding the failure of the synchronization process caused by one-way synchronization and improving the reliability of the collaborative operation.
[0080] In an alternative embodiment, the master job synchronization message includes: a plurality of sub-job process master synchronization messages, each sub-job process master synchronization message including a corresponding main action sequence and a synchronization timestamp; the slave job synchronization message includes: a plurality of sub-job process slave synchronization messages, each sub-job process slave synchronization message including a corresponding slave action sequence and a synchronization timestamp.
[0081] Among them, in some embodiments, the cooperation process of the master and slave robots can be divided into several sub-processes. Specifically, when implemented, the master job synchronization message can be divided into a plurality of sub-job process master synchronization messages, each sub-job process master synchronization message including a corresponding main action sequence and a synchronization timestamp. Of course, in some embodiments, each sub-job process master synchronization message can also include a synchronization sequence number.
[0082] Optionally, the manifestation form of the master job synchronization message P_m can be: P_m = {[s(n1,t1),a1_1,a1_2,…,a1_n],[s(n2,t2),a2_1,a2_2,…,a2_n],…,[s(nk,tk),ak_1,ak_2,…,ak_n]}. Among them, it can be seen that the master job synchronization message P_m includes k sub-job process master synchronization messages. Taking the first sub-job process master synchronization message [s(n1,t1),a1_1,a1_2,…,a1_n] as an example for illustration, where a1_1,a1_2,…,a1_n represent the first main action sequence corresponding to the first sub-job process master synchronization message, t1 represents the first synchronization timestamp corresponding to the first main action sequence, and n1 represents the synchronization sequence number corresponding to the first sub-job process master synchronization message. Of course, it should be noted that the manifestation form of the master job synchronization message is not limited to this.
[0083] In addition, for the slave job synchronization message, the slave job synchronization message can be divided into a plurality of sub-job process slave synchronization messages, each sub-job process slave synchronization message including a corresponding slave action sequence and a synchronization timestamp. Of course, in some embodiments, each sub-job process slave synchronization message can also include a synchronization sequence number.
[0084] Optionally, the manifestation form of the slave job synchronization message P_s can be: P_s = {[q(n1, t1), b1_1, b1_2, …, b1_n], [q(n2, t2), b2_1, b2_2, …, b2_n], …, [q(nk, tk), bk_1, bk_2, …, bk_n]}. It can be seen that the slave job synchronization message P_s includes k sub-job process slave synchronization messages. Taking the first sub-job process slave synchronization message [q(n1, t1), b1_1, b1_2, …, b1_n] as an example, where b1_1, b1_2, …, b1_n represent the first slave action sequence corresponding to the first sub-job process slave synchronization message, t1 represents the first synchronization timestamp corresponding to the first slave action sequence, and n1 represents the synchronization sequence number corresponding to the first sub-job process slave synchronization message. Of course, it should be noted that the manifestation form of the slave job synchronization message is not limited to this.
[0085] Figure 5 It is a schematic flowchart of another collaborative job method based on multiple robots provided by an embodiment of the present application. Optionally, as Figure 5 shown, the above-mentioned calculating the target synchronization timestamp corresponding to the master job synchronization message according to the current master system time of the master robot includes:
[0086] Step 201: Calculate the first synchronization timestamp corresponding to the first sub-job process master synchronization message according to the current master system time of the master robot.
[0087] Among them, in the case where the master job synchronization message includes multiple sub-job process master synchronization messages, they can be processed sequentially, that is, first process the first sub-job process master synchronization message (i.e., the first sub-job process master synchronization message) in the master job synchronization message. Referring to the above example, that is, first process the first sub-job process master synchronization message [s(n1, t1), a1_1, a1_2, …, a1_n].
[0088] Referring to the above-mentioned calculation process of the target synchronization timestamp, if it is set that the master job synchronization message includes: multiple sub-job process master synchronization messages, then for the first sub-job process master synchronization message, its corresponding first synchronization timestamp, that is, t1, can be calculated according to the current master system time of the master robot.
[0089] The above-mentioned sending the master job synchronization message carrying the target synchronization timestamp to the slave robot and monitoring the current master system time of the master robot includes:
[0090] Step 202: Send the first sub-job process master synchronization message carrying the first synchronization timestamp to the slave robot and monitor the current master system time of the master robot.
[0091] Among them, after receiving the first sub-job process master synchronization message, the slave robot determines the first synchronization timestamp in the first sub-job process slave synchronization message, sends a first response message back to the master robot, and when the current slave system time of the slave robot reaches the first synchronization timestamp, executes the first slave action sequence corresponding to the first sub-job process slave synchronization message.
[0092] It can be understood that at this time, for the master robot, it can send the first sub-job process master synchronization message to the slave robots for collaborative operation, wait to receive the first response returned by the slave robots, and monitor the current master system time of the master robot.
[0093] For the slave robots, after receiving the first sub-job process master synchronization message, they can determine the first synchronization timestamp in the first sub-job process slave synchronization message based on this, and send a first response message back to the master robot, so that the master robot can perform collaborative operations only after the slave robots confirm that the first sub-job process master synchronization message has been correctly received, avoiding the failure of the synchronization process caused by one-way synchronization, and improving the collaborative reliability of each sub-job of the master and slave robots.
[0094] In addition, the slave robot can also monitor its current slave system time. If its current slave system time reaches the first synchronization timestamp, it will execute the first slave action sequence corresponding to the first sub-job process slave synchronization message, so that each sub-job process corresponding to the slave robot is triggered depending on its corresponding synchronization timestamp.
[0095] The above-mentioned case of receiving the master job response message and the current master system time of the master robot reaching the target synchronization timestamp and then executing the preset master job corresponding to the master job synchronization message includes:
[0096] Step 203: If the first response message is received and the current master system time of the master robot reaches the first synchronization timestamp, execute the first active action sequence corresponding to the first sub-job process master synchronization message.
[0097] Based on the above description, for the master robot, if it receives the first response message returned by the slave robot for the first sub-job process master synchronization message and at the same time determines through real-time monitoring that the current master system time of the master robot reaches the first synchronization timestamp, then it can execute the first active action sequence corresponding to the first sub-job process master synchronization message, realizing that at the first synchronization timestamp, the master robot executes the first active action sequence, the slave robot executes the first slave action sequence, and the master robot and the slave robot perform collaborative operations based on the sub-process.
[0098] It should be noted that for the master robot, after executing the first active action sequence, for the subsequent master synchronization messages of other sub-job processes in the master synchronization message of the first sub-job process in the master job synchronization message, the collaborative job process of the above-mentioned master synchronization message of the first sub-job process can be referred to, and will not be elaborated here.
[0099] Applying the embodiments of the present application, by dividing the entire master job process into several sub-job processes and dividing the entire slave job process into several slave job processes, each sub-job process is triggered depending on its corresponding synchronization timestamp, which can reduce the cumulative action error caused by the reduction of clock synchronization accuracy; and during the collaborative process, the master robot only performs collaborative operations after the slave robot confirms that the master synchronization messages of each sub-job process are correctly received (that is, receiving the response messages sent by the slave robot according to the master synchronization messages of each sub-job process), avoiding the failure of the synchronization process caused by one-way synchronization, and improving the collaborative reliability of each sub-job of the master-slave robots.
[0100] In an alternative embodiment, each master synchronization message of the sub-job process also carries a synchronization sequence number, the master synchronization message of the first sub-job process carries a first synchronization sequence number, and the first response message carries a first synchronization sequence number.
[0101] Among them, referring to the above example, if the master synchronization message of the first sub-job process is [s(n1,t1),a1_1,a1_2,…,a1_n], it can be seen that its corresponding first synchronization sequence number is n1, then the first response message can be R(n1), so that after the master robot receives the first response message, it can know the master synchronization message of its corresponding sub-job process, realize the accurate execution of the subsequent execution process, avoid the occurrence of the phenomenon of chaotic execution of the active action sequence, and improve the reliability of the method of the present application.
[0102] In an alternative embodiment, after sending the master synchronization message of the first sub-job process carrying the first synchronization timestamp to the slave robot, the following steps are further included:
[0103] Start the first timer. If the first response message has not been received when the timing time of the first timer exceeds the first preset time threshold, then execute the step of calculating the first synchronization timestamp corresponding to the master synchronization message of the first sub-job process according to the current master system time of the master robot.
[0104] Optionally, in order to avoid the loss of synchronization messages between the master and slave robots due to unstable wireless network during the collaborative work process, the master robot can be configured with a first timer.
[0105] After the master robot sends the first sub - job process master synchronization message carrying the first synchronization timestamp to the slave robot, it can start the first timer E0. If the first response message from the slave robot has not been received when the timing time of E0 exceeds the first preset time threshold, it indicates that there may be a situation of unstable wireless network. In this scenario, it can return to execute step 201 above to recalculate the new first synchronization timestamp and send the first sub - job process master synchronization message carrying the new first synchronization timestamp to the slave robot.
[0106] Applying the embodiments of the present application, by introducing the first timer, the master robot and the slave robot can perform synchronous operations based on the first sub - job process master synchronization message and the first sub - job process slave synchronization message in the case of relatively stable wireless network, avoiding the situation of out - of - sync, and improving the reliability of the method of the present application.
[0107] Of course, it should be noted that, according to the actual application scenario, based on steps 101 to 103 of the embodiment, after sending the master job synchronization message carrying the target synchronization timestamp to the slave robot, the following may further be included:
[0108] Start the third timer. If the master job response message has not been received when the timing time of the third timer exceeds the third preset time threshold, then execute the step of calculating the target synchronization timestamp corresponding to the master job synchronization message according to the current master system time of the master robot.
[0109] Applying the embodiments of the present application, by introducing the third timer, the master robot and the slave robot can perform synchronous operations based on the master job synchronization message and the slave job synchronization message in the case of relatively stable wireless network, avoiding the situation of out - of - sync, and improving the reliability of the method of the present application.
[0110] In an optional implementation manner, the master job synchronization message further includes a termination message after a plurality of sub - job process master synchronization messages, and the slave job synchronization message further includes a termination message after a plurality of sub - job process slave synchronization messages.
[0111] Optionally, the manifestation form of the master job synchronization message P_m can also be: P_m = {[s(n1,t1),a1_1,a1_2,…,a1_n],[s(n2,t2),a2_1,a2_2,…,a2_n],…,[s(nk,tk),ak_1,ak_2,…,ak_n],e(m)}; the manifestation form of the slave job synchronization message P_s can also be: P_s = {[q(n1,t1),b1_1,b1_2,…,b1_n],[q(n2,t2),b2_1,b2_2,…,b2_n],…,[q(nk,tk),bk_1,bk_2,…,bk_n],e(m)].
[0112] Among them, the difference from the above manifestation is that the master job synchronization message P_m and the slave job synchronization message P_s respectively further include a termination message e(m), where the termination message e(m) is used to indicate the end of the current collaborative job process.
[0113] Correspondingly, after the above-mentioned first active action sequence corresponding to the master synchronization message in the process of executing the first sub-job, the following is also included:
[0114] A. Calculate the next synchronization timestamp corresponding to the master synchronization message of the next sub-job process according to the current master system time of the master robot and the master job synchronization message.
[0115] B. Send the master synchronization message of the next sub-job process carrying the next synchronization timestamp to the slave robot, and monitor the current master system time of the master robot.
[0116] Among them, the slave robot is used to determine the next synchronization timestamp corresponding to the slave synchronization message of the next sub-job process after receiving the master synchronization message of the next sub-job process, send the next response message back to the master robot, and execute the next slave action sequence corresponding to the slave synchronization message of the next sub-job process when the current slave system time of the slave robot reaches the next synchronization timestamp.
[0117] C. If the master synchronization message of the next sub-job process is received and the current master system time of the master robot reaches the next synchronization timestamp, then execute the next active action sequence corresponding to the master synchronization message of the next sub-job process.
[0118] Referring to the manifestation of the above master job synchronization message, it can include multiple master synchronization messages of sub-job processes. Therefore, after the master robot finishes executing the first active action sequence and the slave robot finishes executing the first slave action sequence, referring to the process of steps A - C, the master robot can sequentially execute the subsequent active action sequences, and the slave robot can sequentially execute the subsequent slave action sequences until the master robot obtains the termination message.
[0119] D. Repeat steps A - C until the termination message is obtained, and send the termination message to the slave robot so that the slave robot stops executing actions according to the termination message.
[0120] After the master robot obtains the termination message e(m), it can send it to the slave robot to notify the slave robot that the current collaborative job is completed. Among them, for the slave robot, after receiving the termination message, it can stop executing actions to avoid out-of-sync situations.
[0121] Of course, it should be noted that according to the actual application scenario, the slave robot can also be set to perform specified actions after receiving the termination message. For example, shutting down, switching to the standby state, etc. This is not limited here and can be flexibly set according to the actual application scenario.
[0122] Applying the embodiments of the present application, during the collaboration process, the master robot and the slave robot can perform collaborative operations according to the synchronization timestamps corresponding to each sub-job until the completion of the current job process. This can reduce the cumulative action error caused by the reduction of clock synchronization accuracy and improve the synchronization accuracy of collaborative operations. In addition, by introducing the termination message, it can ensure the synchronous stop of the master and slave robots, so as to prepare for the next job and improve the applicability of the method of the present application.
[0123] Figure 6 The flowchart of another collaborative operation method based on multiple robots provided by the embodiments of the present application. In an alternative embodiment, as Figure 6 shown, the above method further includes:
[0124] Step 301: If a termination message is obtained, send the termination message to the slave robot and start the second timer.
[0125] Step 302: If the termination response message sent by the slave robot has not been received when the timing time of the second timer exceeds the second preset time threshold, re-send the termination message to the slave robot until the termination response message sent by the slave robot is received.
[0126] Optionally, in order to avoid the loss of the termination message sent by the master robot to the slave robot due to unstable wireless network between the master and slave robots, the master robot can also be configured to be provided with a second timer.
[0127] Among them, after the master robot sends the termination message e(m) to the slave robot, it can start the second timer and wait to receive the termination response message R(m) sent by the slave robot to achieve two-way synchronization. If the termination response message R(m) has not been received when the timing time of the second timer exceeds the second preset time threshold, it indicates that there may be a situation of unstable wireless network. In this scenario, the master robot can re-send the termination message to the slave robot and wait to receive the termination response message sent by the slave robot to ensure the synchronous stop of the master and slave robots, so as to prepare for the next job. Of course, it should be noted that for the slave robot, after it sends the termination response message to the master robot according to the termination message sent by the master robot, it can stop the operation and wait for the master robot to send the next master job synchronization message.
[0128] In addition, in some embodiments, according to the actual application scenario, based on steps 101 to 103 of the embodiment, after executing the preset main job corresponding to the main job synchronization message, the following may further be included:
[0129] If a termination message is obtained, send the termination message to the slave robot and start a fourth timer; if the main job response message sent by the slave robot has not been received when the timing time of the fourth timer exceeds the fourth preset time threshold, resend the termination message to the slave robot until the termination response message sent by the slave robot is received.
[0130] Applying the embodiments of the present application can ensure the synchronous stop of the collaborative operation process of the master and slave robots, so as to prepare for the next operation and improve the applicability of the method of the present application.
[0131] In an alternative embodiment, calculating the first synchronization timestamp corresponding to the main synchronization message of the first sub-job process according to the current main system time of the master robot includes:
[0132] Calculate the first synchronization timestamp corresponding to the main synchronization message of the first sub-job process according to the current main system time of the master robot, the preset response reception time, and the preset processing time margin.
[0133] Taking the main synchronization message of the first sub-job process as [s(n1,t1),a1_1,a1_2,…,a1_n], in some embodiments, the first synchronization timestamp can be calculated with reference to the formula t1 = Tc + RD + Δ, where t1 represents the first synchronization timestamp, RD represents the preset response reception time, that is, the time when the master robot estimates that it can receive the synchronization response message from the slave robot, and Δ represents the preset processing time margin.
[0134] In some embodiments, the preset response reception time can be determined according to the time required for the master robot to receive the response, and the preset processing time margin can be determined according to the time for the slave robot to generate a response message based on the main synchronization message of the sub-job process.
[0135] Optionally, the preset response reception time can be any value between 50 and 200 ms, and the preset processing time margin can be any value between 1 and 10 ms, but it is not limited thereto, and can be flexibly set according to the actual application scenario.
[0136] Based on the above, it should also be noted that in addition to the first synchronization timestamp corresponding to the main synchronization message of the first sub-job process, the synchronization timestamps corresponding to the main synchronization messages of other sub-job processes can also refer to the calculation process of the first synchronization timestamp, which will not be elaborated here.
[0137] Figure 7Schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of this application. In an alternative implementation, as Figure 7 shown, before calculating the target synchronization timestamp corresponding to the main operation synchronization message according to the current main system time of the main robot in response to the start operation, the method further includes:
[0138] Step 401, the initial main system time of the main robot and the initial slave system times of each slave robot are obtained after clock synchronization according to a preset clock synchronization algorithm.
[0139] Optionally, in order to improve the consistency of the collaborative work of the master and slave robots, before performing collaborative operations, it is possible to set the master robot and the slave robots to perform clock synchronization according to a preset clock synchronization algorithm. After clock synchronization, the initial main system time of the main robot can be made the same as the initial slave system times of each slave robot, and subsequent collaborative operations can then be based on the same clock.
[0140] In some embodiments, the preset clock synchronization algorithm can be set according to the SIB9 (System Information Block 9) message. For example, the master robot and the slave robots respectively establish a wireless connection through the 5G network deployed at the operation site, and then the radio base stations in the 5G network can broadcast and send the SIB9 message to the master robot and the slave robots respectively, enabling the master robot and the slave robots to establish global clock synchronization with the GPS.
[0141] Alternatively, the preset clock synchronization algorithm can be set based on an NTP (Network Time Protocol) server. In specific implementation, for example, the master robot and the slave robots respectively establish a wireless connection through the 5G network deployed at the operation site; the master robot establishes an NTP clock server locally and informs the robot management server of the IP address of the NTP server; the slave robots establish an NTP client locally and send an NTP clock server IP address query request to the robot management server, and the robot management server returns the IP address of the NTP server to the slave robots according to this NTP clock server IP address query request; based on the IP address of this NTP server, the NTP client in the slave robots can periodically send a time synchronization request to the NTP server in the master robot to establish a synchronous clock with the master robot.
[0142] Of course, it should be noted that the setting of the preset clock synchronization algorithm is not limited to the above examples and can be flexibly set according to the actual application scenario.
[0143] Figure 8 Schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of this application. In an alternative implementation, asFigure 8 As shown in the figure, the method includes:
[0144] Step 801: The master robot calculates a first synchronization timestamp corresponding to the first sub-job process master synchronization message according to the current master system time of the master robot, a preset response reception time, and a preset processing time margin.
[0145] Step 802: The master robot sends a first sub-job process master synchronization message carrying the first synchronization timestamp to the slave robot, monitors the current master system time of the master robot, and starts a first timer.
[0146] Step 803: The slave robot receives the first sub-job process master synchronization message and determines the first synchronization timestamp in the first sub-job process slave synchronization message.
[0147] Step 804: Send a first response message to the master robot, and execute a first slave action sequence corresponding to the first sub-job process slave synchronization message when the current slave system time of the slave robot reaches the first synchronization timestamp.
[0148] Step 805: If the timing time of the first timer exceeds the first preset time threshold and the master robot has not received the first response message, recalculate the first synchronization timestamp corresponding to the first sub-job process master synchronization message.
[0149] Step 806: If the master robot receives the first response message and the current master system time of the master robot reaches the first synchronization timestamp, execute a first master action sequence corresponding to the first sub-job process master synchronization message.
[0150] For the specific implementation manners of the above steps, reference can be made to the foregoing related descriptions. Their implementation principles and technical effects are similar and will not be elaborated here.
[0151] Figure 9 It is a schematic flowchart of another collaborative operation method based on multiple robots provided by an embodiment of the present application. Among them, this method is applied to a slave robot in a multi-robot collaborative operation system, and the slave robot is wirelessly communicatively connected to a master robot in the multi-robot collaborative operation system. In an alternative implementation manner, as Figure 9 shown, the method includes:
[0152] Step 901: Receive a master job synchronization message carrying a target synchronization timestamp sent by the master robot.
[0153] Among them, the target synchronization timestamp is calculated by the master robot according to the current master system time in response to a start operation.
[0154] Step 902: Determine the target synchronization timestamp in the slave job synchronization message based on the target synchronization timestamp in the master job synchronization message.
[0155] Step 903: Return a master job response message to the master robot, and execute the preset slave job in the slave job synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp.
[0156] Among them, the master robot is used to monitor the current master system time of the master robot after receiving the master job response message. If it is determined that the current master system time reaches the target synchronization timestamp, the preset master job corresponding to the master job synchronization message is executed.
[0157] Applying the embodiments of the present application, by setting the master robot and the slave robot to communicate based on a wireless network, the master and slave robots can perform collaborative operations at non-fixed positions based on the wireless network, improving the flexibility and applicability of the multi-robot collaborative operation system; in addition, by setting a master job response message between the slave robot and the master robot, it is realized that the master robot only performs collaborative operations after the slave robot confirms the correct reception of the synchronization message, avoiding the failure of the synchronization process caused by one-way synchronization, and improving the reliability of the collaborative operation.
[0158] Figure 10 This is a schematic diagram of the functional modules of a collaborative operation device based on multiple robots provided by the embodiments of the present application. This method can be applied to the master robot in a multi-robot collaborative operation system, and the master robot is wirelessly connected to at least one slave robot in the multi-robot collaborative operation system. Among them, the basic principle and technical effects generated by this device are the same as those in the corresponding method embodiments. For a brief description, for the parts not mentioned in this embodiment, reference can be made to the corresponding content in the method embodiments. As Figure 10 shown, the collaborative operation device 100 includes:
[0159] A response module 110, configured to, in response to a startup operation, calculate a target synchronization timestamp corresponding to a master job synchronization message according to the current master system time of the master robot;
[0160] A sending module 120, configured to send a master job synchronization message carrying the target synchronization timestamp to the slave robot, and monitor the current master system time of the master robot, where the slave robot is configured to determine a target synchronization timestamp in a slave job synchronization message according to the master job synchronization message, return a master job response message to the master robot, and execute a preset slave job in the slave job synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp;
[0161] The execution module 130 is configured to execute a preset main job corresponding to the main job synchronization message if the main job response message is received and the current main system time of the main robot reaches the target synchronization timestamp.
[0162] In an alternative embodiment, the main job synchronization message includes: a plurality of sub-job process main synchronization messages, and each sub-job process main synchronization message includes a corresponding main action sequence and a synchronization timestamp; the slave job synchronization message includes: a plurality of sub-job process slave synchronization messages, and each sub-job process slave synchronization message includes a corresponding slave action sequence and a synchronization timestamp;
[0163] The response module 110 is specifically configured to calculate a first synchronization timestamp corresponding to the first sub-job process main synchronization message according to the current main system time of the main robot.
[0164] The sending module 120 is specifically configured to send a first sub-job process main synchronization message carrying the first synchronization timestamp to the slave robot and monitor the current main system time of the main robot. Wherein, the slave robot is configured to determine the first synchronization timestamp in the first sub-job process slave synchronization message after receiving the first sub-job process main synchronization message, send a first response message back to the main robot, and execute the first slave action sequence corresponding to the first sub-job process slave synchronization message when the current slave system time of the slave robot reaches the first synchronization timestamp;
[0165] The execution module 130 is specifically configured to execute the first main action sequence corresponding to the first sub-job process main synchronization message if the first response message is received and the current main system time of the main robot reaches the first synchronization timestamp.
[0166] In an alternative embodiment, each sub-job process main synchronization message further carries a synchronization sequence number, the first sub-job process main synchronization message carries a first synchronization sequence number, and the first response message carries the first synchronization sequence number.
[0167] In an alternative embodiment, the sending module 120 is further configured to start a first timer, and if the first response message has not been received when the timing time of the first timer exceeds a first preset time threshold, then execute the step of calculating a first synchronization timestamp corresponding to the first sub-job process main synchronization message according to the current main system time of the main robot.
[0168] In an alternative embodiment, the main job synchronization message further includes a termination message located after the plurality of sub-job process main synchronization messages, and the slave job synchronization message further includes a termination message located after the plurality of sub-job process slave synchronization messages. The execution module 130 is further configured to:
[0169] A. Calculate the next synchronization timestamp corresponding to the main synchronization message of the next sub-job process according to the current main system time of the main robot and the main job synchronization message.
[0170] B. Send the main synchronization message of the next sub-job process carrying the next synchronization timestamp to the slave robot, and monitor the current main system time of the main robot. The slave robot is used to determine the next synchronization timestamp corresponding to the slave synchronization message of the next sub-job process after receiving the main synchronization message of the next sub-job process, send a next response message to the main robot, and execute the next slave action sequence corresponding to the slave synchronization message of the next sub-job process when the current slave system time of the slave robot reaches the next synchronization timestamp.
[0171] C. If the main synchronization message of the next sub-job process is received and the current main system time of the main robot reaches the next synchronization timestamp, execute the next active action sequence corresponding to the main synchronization message of the next sub-job process.
[0172] D. Repeat steps A - C until the termination message is obtained, and send the termination message to the slave robot so that the slave robot stops executing actions according to the termination message.
[0173] In an alternative embodiment, the sending module 120 is further configured to, if a termination message is obtained, send the termination message to the slave robot and start a second timer.
[0174] If the elapsed time of the second timer exceeds the second preset time threshold and the termination response message sent by the slave robot has not been received, re-send the termination message to the slave robot until the termination response message sent by the slave robot is received.
[0175] In an alternative embodiment, the response module 110 is specifically configured to calculate the first synchronization timestamp corresponding to the main synchronization message of the first sub-job process according to the current main system time of the main robot, the preset response reception time, and the preset processing time margin.
[0176] In an alternative embodiment, the response module 110 is further configured to perform clock synchronization on the initial main system time of the main robot and the initial slave system times of the slave robots according to a preset clock synchronization algorithm.
[0177] Optionally, the present invention further provides a collaborative operation device based on multiple robots, which is applied to a slave robot in a multi-robot collaborative operation system, and the slave robot is wirelessly communicatively connected to a master robot in the multi-robot collaborative operation system. The collaborative operation device includes:
[0178] A receiving module, configured to receive a master operation synchronization message carrying a target synchronization timestamp sent by the master robot; wherein, the target synchronization timestamp is calculated by the master robot according to the current master system time of the master robot in response to a start operation;
[0179] A determining module, configured to determine the target synchronization timestamp in the slave operation synchronization message according to the target synchronization timestamp in the master operation synchronization message;
[0180] An execution module, configured to return a master operation response message to the master robot, and execute a preset slave operation in the slave operation synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp. The master robot is configured to monitor the current master system time of the master robot after receiving the master operation response message, and execute the preset master operation corresponding to the master operation synchronization message if it is determined that the current master system time reaches the target synchronization timestamp.
[0181] The above device is used to execute the method provided in the foregoing embodiment, and its implementation principle and technical effects are similar, and will not be described in detail here.
[0182] The above modules may be one or more integrated circuits configured to implement the above method, for example: one or more application specific integrated circuits (ASICs), or, one or more microprocessors, or, one or more field programmable gate arrays (FPGAs), etc. Again, when a certain above module is implemented in the form of a processing element scheduling program code, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call program code. Again, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).
[0183] Figure 11 It is a schematic structural diagram of an electronic device provided in an embodiment of the present application, and the electronic device may be integrated into the above collaborative operation device. As Figure 11As shown, the electronic device may include: a processor 210, a storage medium 220, and a bus 230. The storage medium 220 stores machine-readable instructions executable by the processor 210. When the electronic device runs, the processor 210 communicates with the storage medium 220 via the bus 230, and the processor 210 executes the machine-readable instructions to perform the steps of the above method embodiments. The specific implementation manners and technical effects are similar and will not be elaborated here.
[0184] Optionally, the present application further provides a storage medium storing a computer program, and when the computer program is run by a processor, it executes the steps of the above method embodiments. The specific implementation manners and technical effects are similar and will not be elaborated here.
[0185] In several embodiments provided by the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division, and there may be other division manners in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed couplings or direct couplings or communication connections to each other can be through some interfaces, and the indirect couplings or communication connections of devices or units can be in electrical, mechanical, or other forms.
[0186] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0187] In addition, in each embodiment of the present application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware, or in the form of a combination of hardware and software functional units.
[0188] The integrated units implemented in the form of software functional units can be stored in a computer-readable storage medium. The above-mentioned software functional units are stored in a storage medium and include several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor (English: processor) to execute some steps of the methods according to the embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (English: Read-Only Memory, abbreviated as: ROM), random access memories (English: Random Access Memory, abbreviated as: RAM), magnetic disks, or optical discs.
[0189] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. Without further limitation, an element defined by the statement "comprising an..." does not exclude the existence of additional identical elements in the process, method, article or device comprising the element.
[0190] The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application. It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. The above are only the preferred embodiments of the present application and are not used to limit the present application. For those skilled in the art, the present application can have various changes and modifications. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the protection scope of the present application.
Claims
1. A collaborative operation method based on multiple robots, characterized in that: A master robot is applied to a multi-robot collaborative operation system, and the master robot is wirelessly connected to at least one slave robot in the multi-robot collaborative operation system, and the method includes: In response to the start operation, calculating a target synchronization timestamp corresponding to the main operation synchronization message according to the current main system time of the main robot; Sending a master job synchronization message carrying the target synchronization timestamp to the slave robot, and monitoring the current master system time of the master robot, wherein the slave robot is used to determine the target synchronization timestamp in the slave job synchronization message according to the master job synchronization message, return a master job response message to the master robot, and execute the preset slave job in the slave job synchronization message when the current slave system time of the slave robot reaches the target synchronization timestamp; If the master operation response message is received and the current master system time of the master robot reaches the target synchronization timestamp, the preset master operation corresponding to the master operation synchronization message is executed.
2. The method according to claim 1, characterized in that The master job synchronization message includes: a plurality of sub-job process master synchronization messages, each of which includes a corresponding master action sequence and a synchronization timestamp; the slave job synchronization message includes: a plurality of sub-job process slave synchronization messages, each of which includes a corresponding slave action sequence and a synchronization timestamp; The calculating, according to the current main system time of the main robot, a target synchronization timestamp corresponding to the main operation synchronization message comprises: Calculate a first synchronization timestamp corresponding to a main synchronization message of a first sub-operation process according to the current main system time of the main robot; The sending of the master operation synchronization message carrying the target synchronization timestamp to the slave robot and monitoring the current master system time of the master robot includes: sending a first sub-operation process master synchronization message carrying a first synchronization timestamp to the slave robot, and monitoring the current master system time of the master robot, wherein the slave robot is used to determine the first synchronization timestamp in the first sub-operation process slave synchronization message after receiving the first sub-operation process master synchronization message, send a first response message back to the master robot, and execute a first slave action sequence corresponding to the first sub-operation process slave synchronization message when the current slave system time of the slave robot reaches the first synchronization timestamp; If the master operation response message is received and the current master system time of the master robot reaches the target synchronization timestamp, the preset master operation corresponding to the master operation synchronization message is executed, including: If the first response message is received and the current main system time of the main robot reaches the first synchronization timestamp, the first main action sequence corresponding to the main synchronization message of the first sub-operation process is executed.
3. The method according to claim 2, characterized in that Each sub-job process main synchronization message also carries a synchronization sequence number, the first sub-job process main synchronization message carries a first synchronization sequence number, and the first response message carries the first synchronization sequence number.
4. The method according to claim 3, characterized in that After sending the first sub-operation process main synchronization message carrying the first synchronization timestamp to the slave robot, the method further includes: Start the first timer. If the first response message has not been received when the timing time of the first timer exceeds the first preset time threshold, execute the step of calculating the first synchronization timestamp corresponding to the main synchronization message of the first sub-operation process according to the current main system time of the main robot.
5. The method according to claim 2, characterized in that: The master job synchronization message also includes a termination message located after the master synchronization messages of the plurality of sub-job processes, the slave job synchronization message also includes a termination message located after the slave synchronization messages of the plurality of sub-job processes, and after the execution of the first main action sequence corresponding to the master synchronization message of the first sub-job process, the method further includes: A. Calculate the next synchronization timestamp corresponding to the main synchronization message of the next sub-operation process according to the current main system time of the main robot and the main operation synchronization message; B. Sending a next sub-operation process master synchronization message carrying a next synchronization timestamp to the slave robot, and monitoring the current master system time of the master robot, wherein the slave robot is used to determine the next synchronization timestamp corresponding to the next sub-operation process slave synchronization message after receiving the next sub-operation process master synchronization message, send a next response message back to the master robot, and execute the next slave action sequence corresponding to the next sub-operation process slave synchronization message when the current slave system time of the slave robot reaches the next synchronization timestamp; C. If the next sub-operation process master synchronization message is received and the current master system time of the master robot reaches the next synchronization timestamp, the next main action sequence corresponding to the next sub-operation process master synchronization message is executed; D. Repeat steps AC until the termination message is obtained, and send the termination message to the slave robot so that the slave robot stops executing the action according to the termination message.
6. The method according to claim 5, characterized in that The method further comprises: If a termination message is obtained, the termination message is sent to the slave robot and a second timer is started; If the termination response message sent by the slave robot has not been received when the timing time of the second timer exceeds the second preset time threshold, the termination message is resent to the slave robot until the termination response message sent by the slave robot is received.
7. The method according to claim 2, characterized in that The calculating, according to the current main system time of the main robot, a first synchronization timestamp corresponding to the main synchronization message of the first sub-operation process includes: The first synchronization timestamp corresponding to the main synchronization message of the first sub-operation process is calculated according to the current main system time of the main robot, the preset response reception time and the preset processing time margin.
8. The method according to claim 1, characterized in that In response to the start operation, before calculating the target synchronization timestamp corresponding to the main operation synchronization message according to the current main system time of the main robot, the method further includes: The initial master system time of the master robot and the initial slave system time of each slave robot are obtained after clock synchronization according to a preset clock synchronization algorithm.
9. A collaborative operation method based on multiple robots, characterized in that: A slave robot is applied to a multi-robot collaborative operation system, and the slave robot is wirelessly connected to a master robot in the multi-robot collaborative operation system, and the method includes: Receiving a main operation synchronization message carrying a target synchronization timestamp sent by the main robot; wherein the target synchronization timestamp is calculated by the main robot in response to a start operation according to the current main system time of the main robot; Determine the target synchronization timestamp in the slave job synchronization message according to the target synchronization timestamp in the master job synchronization message; A master job response message is returned to the master robot, and a preset slave job in the slave job synchronization message is executed when the current slave system time of the slave robot reaches the target synchronization timestamp, wherein the master robot is used to monitor the current master system time of the master robot after receiving the master job response message, and if it is determined that the current master system time reaches the target synchronization timestamp, the preset master job corresponding to the master job synchronization message is executed.
10. An electronic device, characterized in that: include: A processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor and the storage medium communicate via the bus, and the processor executes the machine-readable instructions to perform the steps of the multi-robot collaborative operation method as described in any one of claims 1-9.