CN110929422A - Robot cluster simulation method and device - Google Patents

Robot cluster simulation method and device Download PDF

Info

Publication number
CN110929422A
CN110929422A CN201911281026.7A CN201911281026A CN110929422A CN 110929422 A CN110929422 A CN 110929422A CN 201911281026 A CN201911281026 A CN 201911281026A CN 110929422 A CN110929422 A CN 110929422A
Authority
CN
China
Prior art keywords
robot
simulation
executing
state information
task amount
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911281026.7A
Other languages
Chinese (zh)
Other versions
CN110929422B (en
Inventor
林宇斐
张帅
李豪
刘逊韵
曾蕾
李向龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
National Defense Technology Innovation Institute PLA Academy of Military Science
Original Assignee
National Defense Technology Innovation Institute PLA Academy of Military Science
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by National Defense Technology Innovation Institute PLA Academy of Military Science filed Critical National Defense Technology Innovation Institute PLA Academy of Military Science
Priority to CN201911281026.7A priority Critical patent/CN110929422B/en
Publication of CN110929422A publication Critical patent/CN110929422A/en
Application granted granted Critical
Publication of CN110929422B publication Critical patent/CN110929422B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Manipulator (AREA)

Abstract

The embodiment of the invention provides a robot cluster simulation method and a robot cluster simulation device, wherein the method comprises the following steps: synchronously and iteratively executing a target simulation task amount obtained in advance; acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met. The device performs the above method. The robot cluster simulation method and device provided by the embodiment of the invention can ensure the real-time performance of robot simulation.

Description

Robot cluster simulation method and device
Technical Field
The invention relates to the technical field of simulation, in particular to a robot cluster simulation method and device.
Background
The robot simulation refers to a technology for simulating an actual robot through a computer, and can perform simulation calculation on the kinematics, dynamics, navigation guidance and control, environment perception, intelligent algorithm and the like of the robot, and simulate the actual running process of the robot, such as automatic driving of an unmanned aerial vehicle and an unmanned vehicle. The processing and analysis of the simulation result are helpful for improving the relevant design and algorithm of the robot, so the robot simulation is an important tool and an effective means for designing and developing the robot and the relevant algorithm or technology thereof.
The robot three-dimensional dynamics simulation can place the robot in an almost real virtual world to simulate the dynamics behavior of the robot, and the robot three-dimensional dynamics simulators with wider application range at present comprise Gazebo, Webots and the like. Firstly, a robot motion simulation model is built, a robot appearance model is built through a most basic sphere, cylinder and cube or through modeling software such as CAD (computer aided design), Blender and the like, and motion simulation of the robot is realized through writing motion or control plug-ins. And secondly, constructing a simulation model of a real world scene, such as a three-dimensional outdoor scene model of a gas station, a garbage can and a road or a three-dimensional indoor scene model of a table, a chair, a wall, a cabinet and the like, and providing a virtual environment for action and interaction for the robot. And thirdly, constructing a sensor simulation model, such as a camera, a depth camera and a common sensor of a laser radar, and providing the robot with the capability of sensing the surrounding environment. And fourthly, adding physical properties of the real world to the robot model, adding simulation capabilities such as gravity, resistance and the like to the robot, providing collision detection, feedback stress and the like based on a high-precision physical engine, and enabling the robot simulation to have high-precision attributes and to be closer to the real world. And finally, visualizing the robot simulation through a rendering engine, visually displaying the simulation process, and analyzing the simulation result by assisting a necessary visual analysis tool. The three-dimensional dynamics simulation of the robot can approach the physical reality, so that the developed program can be applied to the control of the entity robot and the like through simple modification even without modification, thereby greatly reducing the research cost and shortening the research period.
The existing robot three-dimensional dynamics simulator only supports operation on a single computer, because the simulated robot is close to physical reality, a large amount of calculations such as kinematics, dynamics, control algorithms, sensor simulation and the like are needed at the bottom layer, and along with the increase of the number of robots, if the scale reaches hundreds of thousands, the whole simulation calculation amount is increased, and the real-time performance of simulation cannot be ensured.
Disclosure of Invention
Aiming at the problems in the prior art, the embodiment of the invention provides a robot cluster simulation method and device.
The embodiment of the invention provides a robot cluster simulation method, which comprises the following steps:
synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local;
acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties;
and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
Before the step of synchronously and iteratively executing the target simulation task amount obtained in advance, the robot cluster simulation method further includes:
and according to the number of all executing parties, determining simulation task quantities which are uniformly distributed to each executing party and correspond to each step flow in the robot simulation process, and respectively uniformly distributing the simulation task quantities to each executing party.
Wherein, each step flow comprises the following steps in sequence according to the execution sequence:
model preprocessing, collision detection and dynamics updating.
Wherein the model preprocessing comprises:
calculating environment image information sensed by the robot through a sensor carried by the robot; and calculating the power of the robot running in the virtual environment.
Wherein the collision detection comprises:
calculating the relative position relation between the robots and the entity models in the virtual environment according to the model preprocessing result;
and calculating the coordinates of collision points if the robots collide with each other or the entity model, calculating the interaction force after collision at the coordinates of the collision points, and simulating the running track of the robots after collision according to the interaction force.
Wherein the kinetic update comprises:
and determining the running state parameters of the robot at the current moment according to the model preprocessing result and the collision detection result, and simulating the running track of the robot in the virtual environment according to the running state parameters.
Wherein, the acquisition of the robot state information comprises:
and collecting the robot state information by using MPI _ Allgatherv.
The embodiment of the invention provides a robot cluster simulation device, which comprises:
the synchronization unit is used for synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local;
the updating unit is used for acquiring the current robot state information after each iteration cycle is finished, sending the robot state information to other executing parties participating in synchronous iterative execution of the pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executing parties; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties;
and the iteration unit is used for synchronously executing the next iteration cycle so as to continuously and synchronously iterate and execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
An embodiment of the present invention provides an electronic device, including: a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein,
the processor, when executing the program, implements the method steps of:
synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local;
acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties;
and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
An embodiment of the invention provides a non-transitory computer readable storage medium having a computer program stored thereon, which when executed by a processor implements the following method steps:
synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local;
acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties;
and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
According to the robot cluster simulation method and device provided by the embodiment of the invention, all simulation task quantities corresponding to all step flows in the robot simulation process are synchronously and iteratively executed in parallel through a plurality of terminals, and the current robot state information is updated, so that the real-time performance of robot simulation can be ensured.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
FIG. 1 is a flowchart of an embodiment of a robot cluster simulation method of the present invention;
FIG. 2 is a schematic diagram of multi-robot parallel simulation of a robot cluster according to another embodiment of the present invention;
FIG. 3 is a flow chart of a parallel extensible simulation of three-dimensional dynamics of a robot cluster according to another embodiment of the present invention;
FIG. 4 is a schematic diagram of a parallel extensible simulation of three-dimensional dynamics of a robot cluster by using MPI parallel technology according to an embodiment of the present invention;
FIG. 5 is a schematic structural diagram of an embodiment of a robot cluster simulation apparatus according to the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of an embodiment of a robot cluster simulation method of the present invention, and as shown in fig. 1, the robot cluster simulation method provided in the embodiment of the present invention includes the following steps:
s101: synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local.
Specifically, synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local. The method steps can be executed by a computer device, in particular a terminal. Each step flow may sequentially include, according to the execution sequence: model preprocessing, collision detection and dynamics updating. Prior to this step, the method may further comprise:
and according to the number of all executing parties, determining simulation task quantities which are uniformly distributed to each executing party and correspond to each step flow in the robot simulation process, and respectively uniformly distributing the simulation task quantities to each executing party. All executing parties may be understood as all terminals that together execute the simulation task volume.
In order to better distribute the amount of the simulation tasks locally, further, the amount of the simulation tasks locally can be evenly distributed. Fig. 2 is a schematic diagram of multi-machine parallel simulation of a robot cluster according to another embodiment of the present invention, as shown in fig. 2, taking three terminals as an example, from left to right, the three terminals are respectively denoted as terminal 1, terminal 2, and terminal 3, and if the simulation task amount corresponding to model preprocessing is 30, the simulation task amount corresponding to collision detection is 30, and the simulation task amount corresponding to dynamics update is 30, 1/3 (i.e., 10) corresponding to model preprocessing corresponding simulation task amount as a target simulation task amount corresponding to terminal 1, 1/3 (i.e., 10) corresponding to collision detection corresponding simulation task amount, and 1/3 (i.e., 10) corresponding to dynamics update corresponding simulation task amount (corresponding to robot group 1 represented by a solid-line frame in the left terminal of fig. 2).
The target simulation task amounts corresponding to the terminal 2 are 1/3 for the model preprocessing corresponding simulation task amount (different from the model preprocessing corresponding simulation task amount in the terminal 1), 1/3 for the collision detection corresponding simulation task amount (different from the collision detection corresponding simulation task amount in the terminal 1), and 1/3 for the dynamics update corresponding simulation task amount (different from the dynamics update corresponding simulation task amount in the terminal 1). This corresponds to the robot group 2 indicated by a solid line frame in the middle terminal of fig. 2.
The target simulation task amounts corresponding to the terminals 3 are 1/3 for the model preprocessing corresponding simulation task amount (i.e., the remaining model preprocessing corresponding simulation task amount), 1/3 for the collision detection corresponding simulation task amount (i.e., the remaining collision detection corresponding simulation task amount), and 1/3 for the dynamics update corresponding simulation task amount (i.e., the remaining dynamics update corresponding simulation task amount). This corresponds to the robot group 3 indicated by a solid line frame in the right-hand terminal of fig. 2.
The robot cluster is intuitively grouped according to the number of computers (corresponding to the terminals), and each computer is mainly responsible for calculating the robots in one robot group. As shown in fig. 2, 3 computers are taken as an example. Firstly, each computer loads the same virtual scene, and the virtual scenes in which the robot cluster activities are located are consistent; then loading the robot cluster, wherein although each computer is mainly responsible for calculating the robots in one robot group, all robot models are still loaded, so that the robots can sense not only the robots in the robot group in which the robots are located but also the robots in other robot groups in a virtual scene; robots that do not simulate computation on a local computer can be considered part of a virtual scene, represented by the dashed box in fig. 2; collision detection and dynamics updating are carried out between the insides of the robot groups which are subjected to simulation calculation on the local computer and between the robots and a virtual scene (including the robots which are not subjected to simulation calculation on the local computer); each computer is provided with other robot groups which do not carry out simulation calculation, and the state information of the robots in the group, such as the pose at each moment, is given by the simulation calculation results of other computers. In the simulation scene of each computer, the robot cluster carries out the same activities, but the original single-computer simulation task is distributed to a plurality of computers, so that multi-computer parallel simulation is realized, and the number of the multiple computers can be expanded.
Fig. 3 is a flow chart of parallel and extensible simulation of three-dimensional dynamics of a robot cluster according to another embodiment of the present invention, and as shown in fig. 3, the target simulation task amount obtained in advance by synchronous iterative execution is described as follows: executing a target simulation task amount obtained in advance in the terminal 1 in a first iteration (corresponding to the iteration step 1), namely the robot group 1; executing a target simulation task amount obtained in advance in the terminal 2 in a first iteration (corresponding to the iteration step 1), namely the robot group 2; in the terminal 3, the target simulation task amount obtained in advance, namely the robot group 3, is executed in the first iteration (corresponding to the iteration step 1). The above-mentioned terminal 1, terminal 2 and terminal 3 are all the first iterations (corresponding to the synchronous iterations).
Taking the terminal 1 as an example, performing a part of simulation task amount of model preprocessing in the robot group 1 in a first iteration manner; similarly, the terminal 2 performs a part of simulation task amount of model preprocessing in the robot group 2 for the first iteration, and the terminal 3 performs a part of simulation task amount of model preprocessing in the robot group 3 for the first iteration. After the three terminals all execute the first iteration, the terminal 1 executes another part of simulation task amount of model preprocessing in the robot group 1, and the terminal 2 and the terminal 3 in a second iteration again. And then, sequentially executing simulation task quantities respectively corresponding to collision detection and dynamics updating.
Model preprocessing, collision detection and dynamics updating are explained as follows:
model preprocessing:
calculating environment image information sensed by the robot through a sensor carried by the robot; calculating the power of the robot running in the virtual environment.
The method specifically comprises the following steps: after time step iteration is carried out, firstly, the most important step is model preprocessing, wherein simulation calculation of a sensor carried by the robot is carried out, the sensing condition of the robot to the surrounding environment at the current moment is represented, if the robot carries a camera, image information observed by the visual angle of the robot is calculated through simulation of the camera sensor, scenes seen by the visual angle of the robot are presented through visualization, and meanwhile, the image information can also provide basic data for a sensing algorithm and the like. In addition to the sensor simulation calculation, the control simulation calculation is very important, and the action capacity of the robot in the virtual environment is concerned, the control instruction received by the robot is resolved into force and moment which are borne or loaded by the movable part of the robot at the current moment through a control model in the part of simulation calculation, for example, a four-wheel trolley is controlled to move forwards at a certain speed and is resolved into moment of a shaft of each wheel, and the moment is taken as power for completing the forward movement of the trolley.
Collision detection:
calculating the relative position relation between the robots and the entity models in the virtual environment according to the model preprocessing result; and calculating the coordinates of collision points if the robots collide with each other or the entity model, calculating the interaction force after collision at the coordinates of the collision points, and simulating the running track of the robots after collision according to the interaction force.
The method specifically comprises the following steps: and calculating the relative position relation between the models, and returning the coordinates of the collision points when detecting that the collision between the entities possibly occurs. The resulting interaction force after the collision is then calculated. By collision detection and processing, the simulation phenomena of penetration, penetration and the like which violate objective physical laws can be avoided, thereby ensuring the authenticity of simulation to a certain extent. If the trolley robot acts on the ground, the wheels and the ground are required to be collided and detected, the contact point is detected, the trolley is subjected to downward gravity, and the ground is required to provide upward supporting force for the trolley, so that the trolley can act on the ground all the time, and the trolley is prevented from penetrating the ground. And the collision detection is to detect all models and scenes in a simulation pairwise manner, and the larger the number of the models is, the larger the simulation calculation amount is.
And (3) kinetic updating:
and determining the running state parameters of the robot at the current moment according to the model preprocessing result and the collision detection result, and simulating the running track of the robot in the virtual environment according to the running state parameters.
And on the basis of model preprocessing and collision detection, calculating resultant force and resultant moment of each part of the robot model, and calculating the states of the position, the speed and the like of the robot at the current moment according to the states of the position, the speed and the like of the robot at the previous moment and the simulation time step length. Therefore, continuous actions of the robot in the virtual environment, such as actions of a trolley on the ground, flight of an unmanned aerial vehicle in the air and the like, are simulated through time step iterative computation. In order to enable the dynamic simulation of the robot to be closer to the physical reality, the simulation time step is ms magnitude, and a test is brought to the real-time simulation.
S102: acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; and all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties.
Specifically, after each iteration cycle is completed, current robot state information is acquired, the robot state information is sent to other executing parties participating in synchronous iterative execution of a target simulation task amount acquired in advance, and the current robot state information is updated according to all the received robot state information sent by the other executing parties; and all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties. The robot state information may include states such as a pose, and is not particularly limited. Referring to the above example, taking terminal 1 as an example, the robot state information of the first iteration corresponding to it is robot state information a11, the robot state information of the first iteration corresponding to terminal 2 is robot state information B11, and the robot state information of the first iteration corresponding to terminal 3 is robot state information C11; transmitting A11 to terminal 2 and terminal 3, receiving B11 transmitted by terminal 2 and C11 transmitted by terminal 3, and updating A11 according to B11 and C11. The above description of the terminal 1 can be referred to for the terminal 2 and the terminal 3, and will not be described in detail.
It should be noted that the order of transmission and reception is not specifically limited, for example, if the terminal 1 acquires a11 first, the terminal 1 transmits first and receives later; if the terminal 3 acquires C11 first and the terminal 1 acquires a11 second, the terminal 3 transmits C11 first, then transmits a11 to the terminals 2 and 3, and then receives B11 transmitted by the terminal 2.
Then, the robot state information of the second iteration corresponding to the terminal 1 is robot state information a 21; the robot state information of the second iteration corresponding to the terminal 2 is robot state information B21; the robot state information of the second iteration corresponding to the terminal 3 is the robot state information C21, and referring to the above example, taking the terminal 1 as an example, the a21 is updated according to B21 and C21, and the updated a11 and the updated a21 are recorded, and so on until all the dynamics update is completed. Other terminals are not described in detail.
S103: and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
Specifically, the next iteration cycle is synchronously executed to continuously and synchronously execute the target simulation task amount obtained in advance until a preset iteration termination condition is met. The preset iteration termination condition may be iteration times or an accumulated amount of completed simulation tasks, and is not particularly limited.
As shown in fig. 3, the robot cluster three-dimensional dynamics parallel extensible simulation process steps are parallel extensible modification based on the main process steps of robot three-dimensional dynamics simulation. A computer sends a simulation starting instruction (corresponding to a simulation starting command), all computers participating in simulation start simulation processes, parameter analysis and model loading are carried out, and virtual scenes and models of a robot cluster are loaded; then respectively entering a time step iteration loop, wherein the model preprocessing module only calculates the robot group which is responsible for calculation of the local machine, including sensor simulation, control model calculation and the like, and the robot group which is not responsible for calculation of the local machine does not calculate, so that the calculation tasks of the module are divided into multiple machines to be executed in parallel; the collision detection module takes the robot which is not in charge of calculation as a part of the virtual scene, so that the robot which is not in charge of calculation and the virtual scene do not need to perform collision detection calculation, and the collision detection calculation amount of a single machine is reduced; the dynamics updating module is similar to the dynamics updating module, only carries out dynamics updating on the robot which is responsible for calculation of the machine, and calculates to obtain new state information such as pose, speed and the like; adding a communication, synchronization and state assignment module at the last of each time step, communicating at the last of each time step, transmitting the state information of the robot group calculated by the computer to other computers, and performing state assignment on the corresponding robot group on the local computer by the other computers after receiving the information, and then synchronizing to ensure that the simulation calculation on each computer is synchronously performed and the same time step is simulated; and finally, finishing the simulation after a computer judges that the iteration is finished.
According to the robot cluster simulation method provided by the embodiment of the invention, all simulation task quantities corresponding to all step flows in the robot simulation process are synchronously and iteratively executed in parallel through a plurality of terminals, and the current robot state information is updated, so that the real-time performance of robot simulation can be ensured.
On the basis of the above embodiment, before the step of executing the target simulation task amount obtained in advance in the synchronous iteration, the robot cluster simulation method further includes:
specifically, according to the number of all executing parties, the simulation task amount which is uniformly distributed to each executing party and corresponds to each step flow in the robot simulation process is determined and distributed to each executing party respectively. Reference is made to the above description and no further description is made.
According to the robot cluster simulation method provided by the embodiment of the invention, the simulation task amount corresponding to each terminal is pre-distributed averagely, so that each terminal can perform robot simulation in parallel, and the real-time performance of the robot simulation is further ensured.
On the basis of the above embodiment, each step flow sequentially includes, according to the execution sequence:
specifically, model preprocessing, collision detection and dynamics updating. Reference is made to the above description and no further description is made.
According to the robot cluster simulation method provided by the embodiment of the invention, the robot simulation process is optimized by sequentially and sequentially executing the model preprocessing, the collision detection and the dynamics updating in parallel.
On the basis of the above embodiment, the model preprocessing includes:
specifically, environmental image information sensed by the robot is calculated through a sensor carried by the robot. Reference is made to the above description and no further description is made.
Specifically, the power of the robot running in the virtual environment is calculated. Reference is made to the above description and no further description is made.
The robot cluster simulation method provided by the embodiment of the invention further optimizes the robot simulation process through model preprocessing.
On the basis of the above embodiment, the collision detection includes:
specifically, the relative position relationship between the robots and the entity models in the virtual environment is calculated according to the model preprocessing result. Reference is made to the above description and no further description is made.
Specifically, collision point coordinates are calculated if the robots collide with each other or the entity model, the interaction force after collision at the collision point coordinates is calculated, and the robot running track after collision is simulated according to the interaction force. Reference is made to the above description and no further description is made.
According to the robot cluster simulation method provided by the embodiment of the invention, the robot simulation process is further optimized through collision detection.
On the basis of the above embodiment, the kinetic updating includes:
specifically, according to the model preprocessing result and the collision detection result, the running state parameters of the robot at the current moment are determined, and the running track of the robot in the virtual environment is simulated according to the running state parameters. Reference is made to the above description and no further description is made.
The robot cluster simulation method provided by the embodiment of the invention further optimizes the robot simulation process through dynamics updating.
On the basis of the above embodiment, the acquiring of the robot state information includes:
and collecting the robot state information by using MPI _ Allgatherv.
Specifically, MPI _ Allgatherv is used for collecting the robot state information. The data blocks with different lengths are collected through MPI _ Allgatherv, which is equivalent to taking each process in Comm as a root process in turn and calling. Fig. 4 is a schematic diagram of a robot cluster three-dimensional dynamics parallel extensible simulation using an MPI parallel technique according to an embodiment of the present invention, and as shown in fig. 4, an MPI run command is used to start a simulation process on each computer to start simulation; the MPI _ Allgatherv is used for collecting the state information of the robot, and then the robot which is not in charge of calculation of the local machine is given to the robot so that the robot can act on the local machine; MPI _ Allgatherv has a synchronization function, and synchronization of simulation calculation is guaranteed. The triggering of the emulation initiation command may include:
triggering the emulation initiation command with an MPI run command. The MPI run is an MPI program rapid execution command, and before running, the mpdboot opening daemon is not needed to run, wherein the mpdboot is the cluster-starting mpd daemon, and before running the MPI program, the mpd daemon on each node can be opened.
The robot cluster simulation method provided by the embodiment of the invention can ensure timely and effective collection of the robot state information, thereby realizing real-time simulation of the robot.
The method may further include an embodiment in which the synchronous iteration performs a target simulation task amount obtained in advance, including:
specifically, if the simulation start command is detected, the target simulation task amount obtained in advance is executed in a synchronous iteration manner. Namely, the simulation start command can be understood as synchronous information, and the function is to enable each terminal to synchronously and iteratively execute the target simulation task amount obtained in advance.
The robot cluster simulation method provided by the embodiment of the invention can ensure the synchronism of the target simulation task amount obtained in advance by iterative execution.
The robot cluster simulation method provided by the embodiment of the invention can further ensure the synchronism of the target simulation task amount obtained in advance by iterative execution.
On the basis of the above embodiment, after the step of respectively sharing to each executing party and before the step of synchronously iterating and executing the target simulation task amount obtained in advance, the robot cluster simulation method further includes:
specifically, parameter analysis and model loading are performed. Referring to fig. 3, the parameter parsing and model loading are specifically described as follows:
analyzing each parameter of the simulation task, loading the virtual scene into the simulation environment, and constructing a virtual world of the robot activity; and loading each robot in the simulation task into a simulation environment, wherein the simulation environment comprises a geometrical configuration structure joint of the robot and the like, and simultaneously loading a virtual sensor, a motion control algorithm, an intelligent algorithm and the like of the robot.
According to the robot cluster simulation method provided by the embodiment of the invention, the preparation work before the parallel simulation is finished by firstly carrying out parameter analysis and model loading, so that the normal running of the parallel simulation is ensured, and the real-time performance of the robot simulation is further ensured.
The embodiment of the invention has the following beneficial effects:
1. the robot three-dimensional dynamics simulation task performed on the original single machine is reasonably distributed to a plurality of computers to be executed in parallel, and under the same-scale robot cluster simulation, the simulation execution efficiency can be accelerated by a multi-machine parallel means, so that the simulation real-time performance is ensured, and even the super real-time simulation can be realized.
2. The number of the multiple robots for simulation can be expanded, which is beneficial to improving the simulation scale of the robot cluster and provides powerful support for relevant calculation research.
Fig. 5 is a schematic structural diagram of an embodiment of a robot cluster simulation apparatus of the present invention, and as shown in fig. 5, an embodiment of the present invention provides a robot cluster simulation apparatus, including a synchronization unit 501, an update unit 502, and an iteration unit 503, where:
the synchronization unit 501 is configured to perform iteration synchronously on a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local; the updating unit 502 is configured to obtain current robot state information after each iteration cycle is completed, send the robot state information to other executors participating in synchronous iterative execution of a pre-obtained target simulation task amount, and update the current robot state information according to all received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties; the iteration unit 503 is configured to synchronously execute the next iteration cycle to continue to synchronously iterate and execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
Specifically, the synchronization unit 501 is configured to perform iteration synchronously on a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local; the updating unit 502 is configured to obtain current robot state information after each iteration cycle is completed, send the robot state information to other executors participating in synchronous iterative execution of a pre-obtained target simulation task amount, and update the current robot state information according to all received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties; the iteration unit 503 is configured to synchronously execute the next iteration cycle to continue to synchronously iterate and execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
The robot cluster simulation device provided by the embodiment of the invention can synchronously and iteratively execute all simulation task quantities corresponding to all step flows in the robot simulation process through the common parallel of a plurality of terminals, update the current robot state information and ensure the real-time performance of robot simulation.
The robot cluster simulation apparatus provided in the embodiment of the present invention may be specifically configured to execute the processing flows of the above method embodiments, and the functions of the robot cluster simulation apparatus are not described herein again, and reference may be made to the detailed description of the above method embodiments.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, and as shown in fig. 6, the electronic device includes: a processor (processor)601, a memory (memory)602, and a bus 603;
the processor 601 and the memory 602 complete mutual communication through a bus 603;
the processor 601 is configured to call program instructions in the memory 602 to perform the methods provided by the above-mentioned method embodiments, for example, including: synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local; acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties; and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
The present embodiment discloses a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, enable the computer to perform the method provided by the above-mentioned method embodiments, for example, comprising: synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local; acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties; and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
The present embodiments provide a non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the methods provided by the above method embodiments, for example, including: synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local; acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties; and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
Those of ordinary skill in the art will understand that: all or part of the steps for implementing the method embodiments may be implemented by hardware related to program instructions, and the program may be stored in a computer readable storage medium, and when executed, the program performs the steps including the method embodiments; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A robot cluster simulation method is characterized by comprising the following steps:
synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local;
acquiring current robot state information after each iteration cycle is completed, sending the robot state information to other executors participating in synchronous iterative execution of a pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executors; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties;
and synchronously executing the next iteration cycle to continuously and synchronously and iteratively execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
2. The robot cluster simulation method of claim 1, wherein prior to the step of synchronously iterating to perform a pre-obtained target simulation task volume, the robot cluster simulation method further comprises:
and according to the number of all executing parties, determining simulation task quantities which are uniformly distributed to each executing party and correspond to each step flow in the robot simulation process, and respectively uniformly distributing the simulation task quantities to each executing party.
3. The robot cluster simulation method according to claim 1 or 2, wherein each step flow sequentially comprises in order of execution:
model preprocessing, collision detection and dynamics updating.
4. The robot cluster simulation method of claim 3, wherein the model preprocessing comprises:
calculating environment image information sensed by the robot through a sensor carried by the robot; and calculating the power of the robot running in the virtual environment.
5. The robot cluster simulation method of claim 3, wherein the collision detection comprises:
calculating the relative position relation between the robots and the entity models in the virtual environment according to the model preprocessing result;
and calculating the coordinates of collision points if the robots collide with each other or the entity model, calculating the interaction force after collision at the coordinates of the collision points, and simulating the running track of the robots after collision according to the interaction force.
6. A robot cluster simulation method according to claim 3, characterized in that the dynamics update comprises:
and determining the running state parameters of the robot at the current moment according to the model preprocessing result and the collision detection result, and simulating the running track of the robot in the virtual environment according to the running state parameters.
7. The robot cluster simulation method according to claim 1 or 2, wherein the acquiring of the robot state information comprises:
and collecting the robot state information by using MPI _ Allgatherv.
8. A robot cluster simulation apparatus, comprising:
the synchronization unit is used for synchronously and iteratively executing a target simulation task amount obtained in advance; the target simulation task amount is a simulation task amount which corresponds to each step flow in the robot simulation process and is distributed to the local;
the updating unit is used for acquiring the current robot state information after each iteration cycle is finished, sending the robot state information to other executing parties participating in synchronous iterative execution of the pre-acquired target simulation task amount, and updating the current robot state information according to all the received robot state information sent by the other executing parties; all executing parties carry out parallel synchronous iterative execution on all simulation task quantities corresponding to all step flows in the robot simulation process, wherein all executing parties comprise a local executing party and other executing parties;
and the iteration unit is used for synchronously executing the next iteration cycle so as to continuously and synchronously iterate and execute the target simulation task amount obtained in advance until a preset iteration termination condition is met.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 1 to 7 are implemented when the processor executes the program.
10. A non-transitory computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201911281026.7A 2019-12-09 2019-12-09 Robot cluster simulation method and device Active CN110929422B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911281026.7A CN110929422B (en) 2019-12-09 2019-12-09 Robot cluster simulation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911281026.7A CN110929422B (en) 2019-12-09 2019-12-09 Robot cluster simulation method and device

Publications (2)

Publication Number Publication Date
CN110929422A true CN110929422A (en) 2020-03-27
CN110929422B CN110929422B (en) 2020-09-22

Family

ID=69860354

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911281026.7A Active CN110929422B (en) 2019-12-09 2019-12-09 Robot cluster simulation method and device

Country Status (1)

Country Link
CN (1) CN110929422B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632778A (en) * 2020-12-22 2021-04-09 达闼机器人有限公司 Operation method and device of digital twin model and electronic equipment
CN112906245A (en) * 2021-03-19 2021-06-04 上海高仙自动化科技发展有限公司 Multi-robot simulation method, system, simulation server and terminal
CN112948100A (en) * 2021-05-13 2021-06-11 南京宇天智云仿真技术有限公司 Multi-moving-body simulation system
CN113254149A (en) * 2021-05-13 2021-08-13 南京宇天智云仿真技术有限公司 Moving body operation simulation method based on stream type calculation

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306216A (en) * 2011-08-10 2012-01-04 上海交通大学 Multi-rule simulation test system of lunar vehicle
KR101337868B1 (en) * 2012-12-26 2013-12-04 이상협 Wafer Transfer Robot Test Simulation System for Cluster Tool for Semiconductor Manufacturing
CN105945942A (en) * 2016-04-05 2016-09-21 广东工业大学 Robot off line programming system and method
CN109617131A (en) * 2018-12-07 2019-04-12 国网经济技术研究院有限公司 Method and system for measuring and calculating production cost of power system
CN109871553A (en) * 2017-12-04 2019-06-11 北京大学 A kind of parallelization accelerated method for molecule power simulation model

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102306216A (en) * 2011-08-10 2012-01-04 上海交通大学 Multi-rule simulation test system of lunar vehicle
KR101337868B1 (en) * 2012-12-26 2013-12-04 이상협 Wafer Transfer Robot Test Simulation System for Cluster Tool for Semiconductor Manufacturing
CN105945942A (en) * 2016-04-05 2016-09-21 广东工业大学 Robot off line programming system and method
CN109871553A (en) * 2017-12-04 2019-06-11 北京大学 A kind of parallelization accelerated method for molecule power simulation model
CN109617131A (en) * 2018-12-07 2019-04-12 国网经济技术研究院有限公司 Method and system for measuring and calculating production cost of power system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112632778A (en) * 2020-12-22 2021-04-09 达闼机器人有限公司 Operation method and device of digital twin model and electronic equipment
CN112906245A (en) * 2021-03-19 2021-06-04 上海高仙自动化科技发展有限公司 Multi-robot simulation method, system, simulation server and terminal
CN112906245B (en) * 2021-03-19 2023-05-02 上海高仙自动化科技发展有限公司 Multi-robot simulation method, system, simulation server and terminal
CN112948100A (en) * 2021-05-13 2021-06-11 南京宇天智云仿真技术有限公司 Multi-moving-body simulation system
CN113254149A (en) * 2021-05-13 2021-08-13 南京宇天智云仿真技术有限公司 Moving body operation simulation method based on stream type calculation

Also Published As

Publication number Publication date
CN110929422B (en) 2020-09-22

Similar Documents

Publication Publication Date Title
CN110929422B (en) Robot cluster simulation method and device
US8014982B2 (en) Simulation system for a construction crane and the simulation method thereof
CN112131786A (en) Target detection and distribution method and device based on multi-agent reinforcement learning
CN103778301A (en) Mechanical arm simulation method based on virtual prototype technology
CN103679792B (en) The rendering intent and system of a kind of threedimensional model
US11886174B2 (en) Virtualized cable modeling for manufacturing resource simulation
CN112698632B (en) Full-automatic production line digital twinning system, method and equipment
EP3974920A1 (en) Unifying multiple simulation models
US20220019939A1 (en) Method and system for predicting motion-outcome data of a robot moving between a given pair of robotic locations
CN105093963A (en) Modular robot self-repairing simulation system and method
CN112684709B (en) Cluster tracking kinematics modeling method, device and storage medium
CN110764433A (en) V-REP platform-based cluster unmanned aerial vehicle system parallel simulation method
Du et al. Industrial robot digital twin system motion simulation and collision detection
Saunders et al. Parallel reinforcement learning simulation for visual quadrotor navigation
CN117744369A (en) Physical field simulation and virtual reality scene fusion display method
CN116415933A (en) Method and device for maintaining computing power network equipment, electronic equipment and storage medium
CN113848750A (en) Two-wheeled robot simulation system and robot system
CN109116990B (en) A kind of method, apparatus, equipment and the computer readable storage medium of mobile control
CN112560326B (en) Method and device for determining pressure field
EP4081926A1 (en) Automatic simplification of a rigid-body simulation
CN107145642B (en) Dynamic collision detection method and device
CN115890689B (en) Robot simulation motion control system, method and power module load simulation module
CN106527224A (en) Control method for equipment
Zhang et al. Virtual simulation of glue coating training for industrial robots
CN112182878A (en) Robot simulation experiment test method and device for civil aircraft maintenance

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant