Robot Cluster Simulation Method and Device

By creating abstract classes and derived classes virtual inheritance, the control state of the robot cluster is simulated, and the problem of high cost and low accuracy of verification of the robot cluster algorithm is solved, and fast and accurate simulation and cost reduction are achieved.

CN116038696BActive Publication Date: 2025-07-29AOBO (JIANGSU) ROBOT CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211710040.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-29
Publication Date
2025-07-29
Estimated Expiration
2042-12-29

AI Technical Summary

Technical Problem

When verifying task allocation and path planning control algorithms for robot clusters, the existing technology requires experiments in actual robot clusters, resulting in high cost and low accuracy.

Method used

Create robot abstract classes and target abstract classes, and define robot and target parameters through derived class virtual inheritance, use robot cluster simulation programs to call instantiated objects, simulate the control state of the robot cluster.

Benefits of technology

Quickly and accurately simulate the control status of the robot cluster, reduce development costs and shorten development cycles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116038696B_ABST
    Figure CN116038696B_ABST
Patent Text Reader

Abstract

The present invention provides a method and apparatus for simulating a robot cluster. The method includes the following steps: creating a robot abstract class and a target abstract class, where the robot abstract class includes robot basic parameters and the target abstract class includes target basic parameters; using the robots in the robot cluster to be simulated as robot derived classes, virtually inheriting the robot abstract class, defining the robot basic parameters in the robot derived classes, and defining robot special parameters in the robot derived classes; using the targets served in the working environment of the robot cluster to be simulated as target derived classes, virtually inheriting the target abstract class, defining the target basic parameters in the target derived classes, and defining target special parameters in the target derived classes; creating instantiated robot object pointers and instantiated target object pointers; and calling the instantiated robot objects and instantiated target objects through a robot cluster simulation program to implement the simulation of the robot cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of robot swarm simulation, and particularly relates to a robot swarm simulation method and a robot swarm simulation device. Background Art

[0002] With the development of technologies such as machine vision, automatic control, and artificial intelligence, great progress has been made in robot application technologies. Currently, robots have been applied in various scenarios to achieve the purposes of saving labor, improving work efficiency, and avoiding the risks of manual operations. In particular, robot swarm technology further improves work efficiency through the simultaneous or collaborative work of multiple robots.

[0003] The control of robot swarms involves issues such as task allocation and path planning. Currently, to verify the effectiveness and rationality of control algorithms such as task allocation and path planning for robot swarms, it is generally necessary to implant the control algorithms into actual robot swarm application scenarios for experiments, which undoubtedly requires a large amount of manpower, material resources, and time, and may also lead to inaccurate verification results due to errors in manual observation and statistics. Therefore, it will increase the development cost of the algorithm, extend the development cycle of the algorithm, and reduce the accuracy of algorithm verification. Summary of the Invention

[0004] To solve the above technical problems, the present invention provides a robot swarm simulation method and device, which can quickly and accurately simulate the control state of a robot swarm, reduce the development cost of robot swarm control algorithms, and shorten the development cycle of robot swarm control algorithms.

[0005] The technical solution adopted by the present invention is as follows:

[0006] A robot swarm simulation method includes the following steps: creating a robot abstract class and a target abstract class, where the robot abstract class includes robot basic parameters, and the target abstract class includes target basic parameters; using the robots in the robot swarm to be simulated as robot derived classes, virtually inheriting the robot abstract class, defining the robot basic parameters in the robot derived classes, and defining robot special parameters in the robot derived classes; using the targets served in the working environment of the robot swarm to be simulated as target derived classes, virtually inheriting the target abstract class, defining the target basic parameters in the target derived classes, and defining target special parameters in the target derived classes; creating instantiated robot object pointers and instantiated target object pointers; and calling the instantiated robot objects and instantiated target objects through a robot swarm simulation program to implement the simulation of the robot swarm.

[0007] The basic parameters of the robot include at least one of the robot name, robot ID, robot coordinates, robot attitude, robot movement speed, robot movement acceleration, robot battery power, and robot size. The target basic parameters include at least one of the target name, target ID, and target coordinates.

[0008] The robots in the robot cluster to be simulated are AGVs (Automated Guided Vehicles), and the special parameters of the robots include the lidar brand. The targets served in the working environment of the robot cluster to be simulated are CNCs (Computer Numerical Controls), and the special parameters of the targets include the PLC (Programmable Logic Controller) brand.

[0009] The simulation of the robot cluster is to simulate the process of the robot cluster composed of m AGVs moving to the corresponding n CNCs, where both m and n are positive integers. Create instantiated robot object pointers and instantiated target object pointers, specifically including: creating m instantiated AGV object pointers by using the new object pointer and assigning values to the initial coordinates and names of the AGVs when creating; creating n instantiated CNC object pointers by using the new object pointer and assigning values to the initial coordinates and names of the CNCs when creating.

[0010] Call the instantiated robot objects and instantiated target objects through the robot cluster simulation program to realize the simulation of the robot cluster, specifically including: adding m instantiated AGV objects and n instantiated CNC objects to the task unit, and storing the task list in the form of AGV object - CNC object pairing in the task unit; calling the decision module, running the task allocation algorithm through the decision module to modify the task list in the task unit, and running the path planning algorithm through the decision module to obtain the driving paths of each AGV object; simulating the movement of each AGV object according to the planned driving path.

[0011] A robot cluster simulation device, comprising: a first creation unit configured to create a robot abstract class and a target abstract class, wherein the robot abstract class includes robot basic parameters, and the target abstract class includes target basic parameters; a first inheritance unit configured to use the robots in the robot cluster to be simulated as robot derived classes, virtually inherit the robot abstract class, define the robot basic parameters in the robot derived classes, and define robot special parameters in the robot derived classes; a second inheritance unit configured to use the targets served in the working environment of the robot cluster to be simulated as target derived classes, virtually inherit the target abstract class, define the target basic parameters in the target derived classes, and define target special parameters in the target derived classes; a second creation unit configured to create instantiated robot object pointers and instantiated target object pointers; and a simulation unit configured to call the instantiated robot objects and instantiated target objects through a robot cluster simulation program to implement the simulation of the robot cluster.

[0012] The robot basic parameters include at least one of a robot name, a robot ID, a robot coordinate, a robot attitude, a robot movement speed, a robot movement acceleration, a robot battery power, and a robot size, and the target basic parameters include at least one of a target name, a target ID, and a target coordinate.

[0013] The robots in the robot cluster to be simulated are AGVs, the robot special parameters include a lidar brand, the targets served in the working environment of the robot cluster to be simulated are CNCs, and the target special parameters include a PLC brand.

[0014] The simulation unit simulates the process of a robot cluster composed of m AGVs moving to corresponding n CNCs, where both m and n are positive integers. The second creation unit is specifically configured to: create m instantiated AGV object pointers by using new object pointers and assigning values to the initial coordinates and names of the AGVs when creating; create n instantiated CNC object pointers by using new object pointers and assigning values to the initial coordinates and names of the CNCs when creating.

[0015] The simulation unit is specifically configured to: add m instantiated AGV objects and n instantiated CNC objects to a task unit, store a task list in the task unit in the form of an AGV object - CNC object pairing; call a decision module, run a task allocation algorithm through the decision module to modify the task list in the task unit, and run a path planning algorithm through the decision module to obtain the driving paths of each AGV object; and simulate the movement of each AGV object according to the planned driving paths.

[0016] Advantages of the present invention:

[0017] By creating an abstract class and adopting virtual inheritance of derived classes, the present invention only needs to call the constructor of the abstract class once when instantiating a derived class each time, avoiding the waste of storage space caused by copying multiple copies of the common base class and the waste of running time caused by repeatedly calling the constructor of the virtual base class. Moreover, the robot cluster simulation program can use limited resources to create a large number of different types of robot objects and different types of target objects or implement the combination of multiple basic units, and facilitate the calling and modification of various functions or algorithms in the simulation program. Therefore, it can quickly and accurately simulate the control state of the robot cluster, reduce the development cost of the robot cluster control algorithm, and shorten the development cycle of the robot cluster control algorithm. Description of the drawings

[0018] Figure 1 is a flowchart of the robot cluster simulation method according to an embodiment of the present invention;

[0019] Figure 2 is a block diagram of the robot cluster simulation device according to an embodiment of the present invention. Detailed implementation manners

[0020] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

[0021] As Figure 1 shown, the robot cluster simulation method according to an embodiment of the present invention includes the following steps:

[0022] S1. Create a robot abstract class and a target abstract class, where the robot abstract class includes robot basic parameters and the target abstract class includes target basic parameters.

[0023] The basic parameters of a robot refer to the information parameters that a robot must possess, such as the name, ID, coordinates, attitude, movement speed, acceleration, battery level, external dimensions, etc. of the robot. In an embodiment of the present invention, the basic parameters of the robot in the robot abstract class include at least one of the robot name (robotName), robot ID (robotID), robot coordinates (robotLocation), robot attitude (robotOrientation), robot movement speed (robotVelocity), robot movement acceleration (robotAcceleration), robot battery level (robotBatteryLevel), and robot size (robotSize). In addition, a virtual function for displaying all parameters is defined in the robot abstract class as an essential function of the robot.

[0024] The target abstract class refers to the information parameters that the targets served by the robot must possess, such as the name, ID, coordinates, etc. of the target. In an embodiment of the present invention, the basic parameters of the target in the target abstract class include at least one of the target name (targetName), target ID (targetID), and target coordinates (targetLocation). In addition, a virtual function for displaying all parameters is defined in the target abstract class as an essential function of the target.

[0025] S2. Use the robots in the robot cluster to be simulated as robot derived classes, virtually inherit the robot abstract class, define the basic parameters of the robot in the robot derived classes, and define the special parameters of the robot in the robot derived classes.

[0026] The robot derived class refers to a specific type of robot. In an embodiment of the present invention, the robots in the robot cluster to be simulated can be AGVs. As a robot derived class (hereinafter simply referred to as the AGV class), the AGV virtually inherits the robot abstract class. After the AGV class inherits the robot abstract class, all the basic parameters of the robot are defined, and the virtual function for displaying all parameters is implemented. In addition, special parameters of the robot are defined in the AGV class. The special parameters of the robot can include the unique information of a specific type of robot, such as the lidar brand (laserBrandName) used in the AGV.

[0027] S3. Use the targets served in the working environment of the robot cluster to be simulated as target derived classes, virtually inherit the target abstract class, define the basic parameters of the target in the target derived classes, and define the special parameters of the target in the target derived classes.

[0028] The target derived class refers to a target of a specific type. In an embodiment of the present invention, the target to be simulated in the working environment of the robot cluster can be a CNC. As a target derived class (hereinafter referred to as the CNC class), the CNC virtually inherits the target abstract class. After the CNC class inherits the target abstract class, all target basic parameters are defined, and the virtual function for displaying all parameters is implemented. In addition, the target special parameters of this class are also defined in the CNC class. The target special parameters can include the unique information of a target of a specific type, such as the PLC brand (PLCBrandName) used in the CNC.

[0029] In an embodiment of the present invention, a more complex robot or target can also be created by creating a multiple inheritance derived class for subsequent invocation by the robot cluster simulation program. Taking a composite robot composed of a robotic arm and an AGV as an example, the composite robot is created by the robotic arm derived class and the AGV derived class virtually inheriting the robot abstract class. Thus, not only can a more complex robot or target be created, but also by utilizing the characteristics of virtual inheritance, during the instantiation of the multiple inheritance derived class (i.e., the combination of multiple basic objects), the problem of member redundancy caused by the ordinary multiple inheritance method can be avoided.

[0030] S4, create a pointer to the instantiated robot object and a pointer to the instantiated target object.

[0031] In an embodiment of the present invention, the simulation of the robot cluster is to simulate the process of a robot cluster composed of m AGVs moving to the corresponding n CNCs. Among them, both m and n are positive integers. m and n can be the same or different; the corresponding relationship between the AGV and the CNC can be one-to-one or one-to-many; when the AGV and the CNC are in one-to-one correspondence, there may be an AGV without a service target or a CNC without a robot for service. Specifically, it can be set according to the actual production and processing requirements.

[0032] The m AGVs correspond to m instantiated objects of the AGV class. m instantiated AGV object pointers can be created by using a new object pointer and assigning values to the initial coordinates and names of the AGVs when creating.

[0033] The n CNCs correspond to n instantiated objects of the CNC class. n instantiated CNC object pointers can be created by using a new object pointer and assigning values to the initial coordinates and names of the CNCs when creating.

[0034] S5, call the instantiated robot object and the instantiated target object through the robot cluster simulation program to implement the simulation of the robot cluster.

[0035] The robot cluster simulation program can be developed based on the C++ language. The robot cluster simulation program can set all AGVs to have tasks, or set a certain AGV or some AGVs to have no tasks. At the same time, through the task allocation algorithm, a corresponding CNC is allocated to each AGV with a task, and then through the path planning algorithm, the path for each AGV with a task to travel to the corresponding CNC is planned. Finally, it realizes simulating all AGVs with tasks traveling along the planned path to the corresponding CNCs.

[0036] To achieve the above purpose of the robot cluster simulation program, after the object creation is completed, m instantiated AGV objects and n instantiated CNC objects can be added to the task unit, and the task list is stored in the task unit in the form of AGV object - CNC object pairing. Then, the decision-making module can be called to modify the task list in the task unit by running the task allocation algorithm through the decision-making module, and obtain the travel path of each AGV object by running the path planning algorithm through the decision-making module. Finally, simulate each AGV object moving according to the planned travel path.

[0037] It should be noted that the robot cluster simulation program can be driven by a physical engine class. In each round of loop of the physical engine, the decision-making module can perform task allocation and path planning based on the existing information and the information at several future moments (such as: the coordinates that the AGV object will reach), and send the task information to the task unit and the path information to the AGV object. The AGV object can move in each round of loop of the physical engine according to the path planning result.

[0038] According to the robot cluster simulation method of the embodiment of the present invention, by creating an abstract class and adopting the virtual inheritance method of the derived class, only one call to the constructor of the abstract class is required when instantiating the derived class each time, avoiding the waste of storage space caused by copying multiple copies of the common base class and the waste of running time caused by repeatedly calling the constructor of the virtual base class. Moreover, the robot cluster simulation program can use limited resources to create a large number of different types of robot objects and different types of target objects or realize the combination of multiple basic units, and is convenient for the call and modification of each function or algorithm in the simulation program. Thus, it can quickly and accurately simulate the control state of the robot cluster, reduce the development cost of the robot cluster control algorithm, and shorten the development cycle of the robot cluster control algorithm.

[0039] Corresponding to the robot cluster simulation method of the above embodiment, the present invention also proposes a robot cluster simulation device.

[0040] As Figure 2As shown in the figure, the robot cluster simulation device according to the embodiment of the present invention includes a first creation unit 10, a first inheritance unit 20, a second inheritance unit 30, a second creation unit 40, and a simulation unit 50. Among them, the first creation unit 10 is used to create a robot abstract class and a target abstract class. Among them, the robot abstract class includes robot basic parameters, and the target abstract class includes target basic parameters; the first inheritance unit 20 is used to use the robots in the robot cluster to be simulated as robot derived classes, virtually inherit the robot abstract class, define the robot basic parameters in the robot derived class, and define robot special parameters in the robot derived class; the second inheritance unit 30 is used to use the targets served in the working environment of the robot cluster to be simulated as target derived classes, virtually inherit the target abstract class, define the target basic parameters in the target derived class, and define target special parameters in the target derived class; the second creation unit 40 is used to create instantiated robot object pointers and instantiated target object pointers; the simulation unit 50 is used to call the instantiated robot objects and instantiated target objects through a robot cluster simulation program to implement the simulation of the robot cluster.

[0041] The robot basic parameters refer to the information parameters that a robot must have, such as the name, ID, coordinates, attitude, movement speed, acceleration, battery level, external dimensions, etc. of the robot. In an embodiment of the present invention, the robot basic parameters in the robot abstract class include at least one of robot name (robotName), robot ID (robotID), robot coordinates (robotLocation), robot attitude (robotOrientation), robot movement speed (robotVelocity), robot movement acceleration (robotAcceleration), robot battery level (robotBatteryLevel), and robot size (robotSize). In addition, the robot abstract class also stipulates a virtual function for displaying all parameters as an essential function of the robot.

[0042] The target abstract class refers to the information parameters that the target served by the robot must have, such as the name, ID, coordinates, etc. of the target. In an embodiment of the present invention, the target basic parameters in the target abstract class include at least one of target name (targetName), target ID (targetID), and target coordinates (targetLocation). In addition, the target abstract class also stipulates a virtual function for displaying all parameters as an essential function of the target.

[0043] The robot derived class refers to a specific type of robot. In an embodiment of the present invention, the robots in the robot cluster to be simulated can be AGVs. As a robot derived class (hereinafter simply referred to as the AGV class), the AGV virtually inherits the robot abstract class. After the AGV class inherits the robot abstract class, all the basic parameters of the robot are defined, and the virtual function for displaying all the parameters is implemented. In addition, special parameters of the robot are defined in the AGV class, and the special parameters of the robot can include the specific information of a certain type of robot, such as the lidar brand (laserBrandName) used in the AGV.

[0044] The target derived class refers to a specific type of target. In an embodiment of the present invention, the targets served in the working environment of the robot cluster to be simulated can be CNCs. As a target derived class (hereinafter simply referred to as the CNC class), the CNC virtually inherits the target abstract class. After the CNC class inherits the target abstract class, all the basic parameters of the target are defined, and the virtual function for displaying all the parameters is implemented. In addition, special parameters of this type of target are defined in the CNC class, and the special parameters of the target can include the specific information of a certain type of target, such as the PLC brand (PLCBrandName) used in the CNC.

[0045] In an embodiment of the present invention, the first inheritance unit 20 and the second inheritance unit 30 can also create more complex robots or targets by creating multiple inheritance derived classes for subsequent calls by the robot cluster simulation program. Taking a composite robot composed of a robotic arm and an AGV as an example, the composite robot is created by the robotic arm derived class and the AGV derived class virtually inheriting the robot abstract class. Thus, not only can more complex robots or targets be created, but also by utilizing the characteristics of virtual inheritance, during the instantiation of the multiple inheritance derived class (i.e., the combination of multiple basic objects), the problem of member redundancy caused by the ordinary multiple inheritance method can be avoided.

[0046] In an embodiment of the present invention, the simulation unit 50 can simulate the process of a robot cluster composed of m AGVs moving to the corresponding n CNCs. Among them, both m and n are positive integers. m and n can be the same or different; the corresponding relationship between the AGV and the CNC can be one-to-one or one-to-many; when the AGV and the CNC are in one-to-one correspondence, there may be an AGV without a service target or a CNC without a robot for service. It can be specifically set according to the actual production and processing requirements.

[0047] The m AGVs correspond to m instantiated objects of the AGV class. The second creation unit 40 can create m instantiated AGV object pointers by using a new object pointer and assigning values to the initial coordinates and names of the AGVs when creating.

[0048] There are n CNCs corresponding to n instantiated objects of the CNC class. The second creation unit 40 can use the newly created object pointer and create n instantiated CNC object pointers by assigning values to the initial coordinates and names of the CNCs during creation.

[0049] The robot cluster simulation program can be developed based on the C++ language. The robot cluster simulation program can set that all AGVs have tasks, or set that one or some AGVs have no tasks. At the same time, the task assignment algorithm is used to assign corresponding CNCs to each AGV with tasks, and then the path planning algorithm is used to plan the path for each AGV with tasks to drive to the corresponding CNC. Finally, it realizes simulating all AGVs with tasks driving along the planned path to the corresponding CNCs.

[0050] To achieve the above purposes of the robot cluster simulation program, after completing the object creation, the simulation unit 50 can add m instantiated AGV objects and n instantiated CNC objects to the task unit, and store the task list in the task unit in the form of AGV object - CNC object pairing. Then, the decision-making module can be called to modify the task list in the task unit by running the task assignment algorithm through the decision-making module, and obtain the driving path of each AGV object by running the path planning algorithm through the decision-making module. Finally, simulate each AGV object moving according to the planned driving path.

[0051] It should be noted that the robot cluster simulation program can be driven by a physical engine class. In each round of loop of the physical engine, the decision-making module can perform task assignment and path planning based on the existing information and the information of several future moments (such as the coordinates that the AGV object will reach), and send the task information to the task unit and the path information to the AGV object. The AGV object can move in each round of loop of the physical engine according to the path planning result.

[0052] According to the robot cluster simulation device of the embodiment of the present invention, by creating an abstract class and adopting the virtual inheritance of the derived class, only one call to the constructor of the abstract class is required when instantiating the derived class each time, avoiding the waste of storage space caused by copying multiple public base classes and the waste of running time caused by repeatedly calling the constructor of the virtual base class. Moreover, the robot cluster simulation program can use limited resources to create a large number of different types of robot objects and different types of target objects or realize the combination of multiple basic units, and is convenient for the call and modification of each function or algorithm in the simulation program. Thus, it can quickly and accurately simulate the control state of the robot cluster, reduce the development cost of the robot cluster control algorithm, and shorten the development cycle of the robot cluster control algorithm.

[0053] In the description of the present invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more of such features. The meaning of "a plurality" is two or more, unless specifically defined otherwise.

[0054] In the present invention, unless otherwise clearly defined and limited, terms such as "installed", "connected", "coupled", "fixed", etc. shall be construed broadly. For example, it may be a fixed connection, a detachable connection, or integrated; it may be a mechanical connection or an electrical connection; it may be directly connected or indirectly connected through an intermediate medium, and it may be the internal communication of two elements or the interaction relationship between two elements. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0055] In the present invention, unless otherwise clearly defined and limited, the first feature being "on" or "under" the second feature may be that the first and second features are in direct contact, or the first and second features are indirectly in contact through an intermediate medium. Moreover, the first feature being "above", "over" and "on top of" the second feature may be that the first feature is directly above or obliquely above the second feature, or merely indicates that the first feature has a higher horizontal height than the second feature. The first feature being "under", "beneath" and "underneath" the second feature may be that the first feature is directly below or obliquely below the second feature, or merely indicates that the first feature has a lower horizontal height than the second feature.

[0056] In the description of this specification, the descriptions with reference to terms such as "an embodiment", "some embodiments", "examples", "specific examples", or "some examples", etc. mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic descriptions of the above terms do not have to be directed to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, without contradiction, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of different embodiments or examples.

[0057] Any process or method description represented in a flowchart or otherwise described herein can be understood to represent a module, segment, or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations where functions may be executed not in the order shown or discussed, including in a substantially simultaneous manner according to the functions involved or in a reverse order, which should be understood by those skilled in the art to which the embodiments of the present invention pertain.

[0058] The logic and / or steps represented in a flowchart or otherwise described herein, for example, can be considered a sequenced list of executable instructions for implementing a logical function and can be embodied specifically in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, a system including a processor, or other systems that can fetch and execute instructions from the instruction execution system, apparatus, or device. As used in this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of the computer-readable medium include the following: an electrical connection having one or more wires (electronic device), a portable computer diskette (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber device, and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium on which the program can be printed, as the program can be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, interpretation, or otherwise appropriate processing if necessary, and then storing it in a computer memory.

[0059] It should be understood that various parts of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one of the following techniques known in the art or a combination thereof can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.

[0060] Those of ordinary skill in the art can understand that all or part of the steps carried out in implementing the above-mentioned embodiment methods can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiment.

[0061] In addition, in each embodiment of the present invention, each functional unit can be integrated into a processing module, or each unit can exist physically alone, or two or more units can be integrated into one module. The above-mentioned integrated module can be implemented in the form of hardware or in the form of a software functional module. When the above-mentioned integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium.

[0062] Although the embodiments of the present invention have been shown and described above, it can be understood that the above-mentioned embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above-mentioned embodiments within the scope of the present invention.

Claims

1. A method for simulating a robot swarm, characterized in that, Including the following steps: Create a robot abstract class and a target abstract class. Among them, the robot abstract class includes robot basic parameters, and the target abstract class includes target basic parameters; Use the robots in the robot cluster to be simulated as robot derived classes, virtually inherit the robot abstract class, define the robot basic parameters in the robot derived class, and define robot special parameters in the robot derived class; Use the targets served in the working environment of the robot cluster to be simulated as target derived classes, virtually inherit the target abstract class, define the target basic parameters in the target derived class, and define target special parameters in the target derived class; Create instantiated robot object pointers and instantiated target object pointers; Call the instantiated robot objects and instantiated target objects through the robot cluster simulation program to implement the simulation of the robot cluster, The robot basic parameters include at least one of robot name, robot ID, robot coordinates, robot attitude, robot movement speed, robot movement acceleration, robot battery power, and robot size. The target basic parameters include at least one of target name, target ID, and target coordinates, The robots in the robot cluster to be simulated are AGVs. The robot special parameters include the lidar brand. The targets served in the working environment of the robot cluster to be simulated are CNCs. The target special parameters include the PLC brand, The simulation of the robot cluster is to simulate the process of a robot cluster composed of m AGVs moving to the corresponding n CNCs. Among them, both m and n are positive integers. Creating instantiated robot object pointers and instantiated target object pointers specifically includes: creating m instantiated AGV object pointers by using the newly created object pointers and assigning values to the initial coordinates and names of the AGVs when creating; creating n instantiated CNC object pointers by using the newly created object pointers and assigning values to the initial coordinates and names of the CNCs when creating, Call the instantiated robot objects and instantiated target objects through the robot cluster simulation program to implement the simulation of the robot cluster, specifically including: adding m instantiated AGV objects and n instantiated CNC objects to the task unit, storing the task list in the task unit in the form of AGV object - CNC object pairing; calling the decision module, running the task allocation algorithm through the decision module to modify the task list in the task unit, and running the path planning algorithm through the decision module to obtain the driving paths of each AGV object; simulating the movement of each AGV object according to the planned driving paths.

2. A robot cluster simulation device, characterized in that, Including: The first creation unit is used to create a robot abstract class and a target abstract class. Among them, the robot abstract class includes robot basic parameters, and the target abstract class includes target basic parameters; The first inheritance unit is used to take the robots in the robot cluster to be simulated as robot derived classes, virtually inherit the robot abstract class, define the robot basic parameters in the robot derived class, and define the robot special parameters in the robot derived class; The second inheritance unit is used to take the targets served in the working environment of the robot cluster to be simulated as target derived classes, virtually inherit the target abstract class, define the target basic parameters in the target derived class, and define the target special parameters in the target derived class; The second creation unit is used to create pointers to instantiated robot objects and pointers to instantiated target objects; The simulation unit is used to call the instantiated robot objects and instantiated target objects through the robot cluster simulation program to implement the simulation of the robot cluster, The robot basic parameters include at least one of the robot name, robot ID, robot coordinates, robot posture, robot movement speed, robot movement acceleration, robot battery power, and robot size. The target basic parameters include at least one of the target name, target ID, and target coordinates. The robots in the robot cluster to be simulated are AGVs. The robot special parameters include the lidar brand. The targets served in the working environment of the robot cluster to be simulated are CNCs. The target special parameters include the PLC brand. The simulation unit simulates the process of a robot cluster composed of m AGVs moving to the corresponding n CNCs, where both m and n are positive integers. The second creation unit is specifically used to: create m pointers to instantiated AGV objects by using a new object pointer and assigning values to the initial coordinates and name of the AGV when creating; create n pointers to instantiated CNC objects by using a new object pointer and assigning values to the initial coordinates and name of the CNC when creating. The simulation unit is specifically used to: add m instantiated AGV objects and n instantiated CNC objects to the task unit, store the task list in the form of AGV object - CNC object pairing in the task unit; call the decision module, run the task allocation algorithm through the decision module to modify the task list in the task unit, and run the path planning algorithm through the decision module to obtain the driving path of each AGV object; simulate the movement of each AGV object according to the planned driving path.

Citation Information

Patent Citations

  • Robotics application simulation management

    US20200156243A1