CN114578763A - Robot simulation method, device, electronic device and storage medium - Google Patents
Robot simulation method, device, electronic device and storage medium Download PDFInfo
- Publication number
- CN114578763A CN114578763A CN202210060865.1A CN202210060865A CN114578763A CN 114578763 A CN114578763 A CN 114578763A CN 202210060865 A CN202210060865 A CN 202210060865A CN 114578763 A CN114578763 A CN 114578763A
- Authority
- CN
- China
- Prior art keywords
- time
- sleep
- virtual
- virtual thread
- actual total
- 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
Links
- 238000004088 simulation Methods 0.000 title claims abstract description 82
- 238000000034 method Methods 0.000 title claims abstract description 70
- 230000004622 sleep time Effects 0.000 claims abstract description 62
- 230000008569 process Effects 0.000 claims abstract description 43
- 230000007958 sleep Effects 0.000 claims abstract description 15
- 230000005059 dormancy Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 7
- 238000004422 calculation algorithm Methods 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 238000013461 design Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 2
- 238000007726 management method Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000019371 dormancy process Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000737 periodic effect Effects 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000036578 sleeping time Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
- G05B19/41—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by interpolation, e.g. the computation of intermediate points between programmed end points to define the path to be followed and the rate of travel along that path
- G05B19/4103—Digital interpolation
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B2219/00—Program-control systems
- G05B2219/30—Nc systems
- G05B2219/34—Director, elements to supervisory
- G05B2219/34083—Interpolation general
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Manipulator (AREA)
Abstract
The embodiment of the application relates to the field of robot simulation, and discloses a robot simulation method and device, electronic equipment and a storage medium. The robot simulation method comprises the following steps: acquiring the actual total time of the virtual thread; determining sleep time according to the execution times of the virtual threads, an interpolation period and the actual total time, wherein the sleep time is a time interval for executing the virtual threads in the robot simulation process, and the interpolation period is an expected time for running the virtual threads once; and performing sleep according to the determined sleep time. According to the embodiment of the application, the accuracy of the beat simulation in the robot simulation system can be improved.
Description
Technical Field
The embodiment of the application relates to the field of robot simulation, in particular to a robot simulation method, a robot simulation device, electronic equipment and a storage medium.
Background
With the wide application of the robot technology, the requirements on the intelligence and the flexibility of the robot system are higher and higher. As a tool for robot technology research, a robot simulation system plays an increasingly important role in verifying the performance of a robot system. In a robot simulation system, beat simulation is a very important function, and the beat simulation accuracy sometimes directly determines whether the design of a scheme is reasonable or not and whether the selection of a model is correct or not. The more accurate the beat simulation is, the more consistent the time for realizing the virtual simulation process is with the time for realizing the real machine operation process.
The virtual simulation is different from the operation of a real machine in program operation environments, the virtual simulation needs to be performed by a virtual controller, the virtual controller needs to be operated on a general PC software platform, a controller track interpolation program operated by the real machine generally operates on a real-time operating system, the fluctuation of an interpolation period is very small, and the operation time is stable; however, a general PC software platform usually runs general operating systems such as Windows and Linux, and the general operating system is generally a high throughput system, but the real-time performance is not good, which may cause the execution time of virtual simulation and the execution time of a real machine running the same robot application to be inconsistent, thereby affecting the accuracy of the simulation beat.
Disclosure of Invention
An object of the embodiments of the present application is to provide a robot simulation method, apparatus, electronic device, and storage medium, so as to improve accuracy of beat simulation in a robot simulation system.
In order to solve the above technical problem, an embodiment of the present application provides a robot simulation method, including the following steps: acquiring the actual total time of the virtual thread; determining sleep time according to the execution times of the virtual threads, an interpolation period and the actual total time, wherein the sleep time is a time interval for executing the virtual threads in the robot simulation process, and the interpolation period is an expected time for running the virtual threads once; and performing sleep according to the determined sleep time.
An embodiment of the present application further provides a robot simulation apparatus, including: the acquisition module is used for acquiring the actual total time of the virtual thread; a determining module, configured to determine sleep time according to the number of times of executing the virtual thread, an interpolation period, and the actual total time, where the sleep time is a time interval for executing the virtual thread in the robot simulation process, and the interpolation period is an expected time for the virtual thread to run once; and the dormancy module is used for executing dormancy according to the determined dormancy time.
An embodiment of the present application also provides an electronic device, including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the robot simulation method described above.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program, which when executed by a processor implements the above-described robot simulation method.
In the embodiment of the application, a sleep mechanism is added to the virtual thread in the robot simulation, dynamic adjustment is carried out on sleep time, the sleep time after the dynamic adjustment can be adjusted, the time in the virtual simulation process of the robot is enabled not to be influenced by factors such as an operating system and the like on the actual running time, and the accuracy of the simulation beat of the robot is improved.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings, which correspond to the figures in which like reference numerals refer to similar elements and which are not to scale unless otherwise specified.
FIG. 1 is a flow diagram of a robot simulation method provided in accordance with one embodiment of the present application;
FIG. 2 is a first schematic diagram of a robot simulation method according to an embodiment of the present application;
FIG. 3 is a second schematic diagram of a robot simulation method according to an embodiment of the present application;
FIG. 4 is a schematic diagram of a robot simulation apparatus provided in accordance with one embodiment of the present application;
FIG. 5 is a schematic diagram of an electronic device provided in accordance with an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present application clearer, the following describes each embodiment of the present application in detail with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in various embodiments of the present application in order to provide a better understanding of the present application. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments. The following embodiments are divided for convenience of description, and should not constitute any limitation to the specific implementation manner of the present application, and the embodiments may be mutually incorporated and referred to without contradiction.
The terms "first" and "second" in the embodiments of the present application are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, the terms "comprise" and "have", as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a system, product or apparatus that comprises a list of elements or components is not limited to only those elements or components but may alternatively include other elements or components not expressly listed or inherent to such product or apparatus. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless explicitly specifically limited otherwise.
One embodiment of the present application relates to a robot simulation method. The specific flow is shown in figure 1.
102, determining sleep time according to the execution times of the virtual threads, an interpolation period and actual total time, wherein the sleep time is a time interval for executing the virtual threads in the robot simulation process, and the interpolation period is an expected time for running the virtual threads once;
and 103, executing the sleep according to the determined sleep time.
In the embodiment, a sleep mechanism is added to the virtual thread in the robot simulation, the sleep time is dynamically adjusted, and the dynamically adjusted sleep time can adjust the time in the robot virtual simulation process, so that the robot virtual simulation process is not affected by factors such as an operating system and the like on the actual running time, and the accuracy of the robot simulation beat is improved.
The following describes the implementation details of the robot simulation method according to the present embodiment in detail, and the following is only provided for easy understanding and is not necessary to implement the present embodiment.
In step 101, the actual total time that the virtual thread has run is obtained. The process of robot simulation is to simulate and implement the flow of real machine operation through a virtual thread, and in the step, the actual total time of the virtual thread which has been operated is firstly obtained; the virtual thread can be run for multiple times, and the actual total time of the multiple running is obtained in the step.
In one example, obtaining the actual total time that the virtual thread has been running includes: recording a first time node when the first virtual thread starts to run; recording a second time node after the virtual thread operation is finished; the time difference between the first time node and the second time node is the actual total time that has been run. That is, all the time of running the virtual thread is obtained, for example, the virtual thread runs n times, the total time from the beginning to the n times of running of the virtual thread is obtained, and the actual total time may further include a time interval of each execution of the n times of virtual thread, that is, a sleep time of n-1 times. The actual total time is used for judging the difference value between the actual used time of the process of the robot simulation and the actual machine running time.
In one example, recording a second time node after the virtual thread runs, includes: and updating the second time node after the virtual thread is run each time. That is, since the virtual thread is not limited to be run once, the total running time of the virtual thread can be updated according to the actual running time after each running, so as to correspondingly adjust the sleep time after the virtual thread runs.
In step 102, a sleep time is determined according to the number of virtual thread execution times, an interpolation period and an actual total time, the sleep time is a time interval for executing the virtual thread in the robot simulation process, and the interpolation period is an expected time for running the virtual thread once. The expected time of the interpolation period may also be the time of executing the virtual thread once in the running process of the real machine, that is, the sleep time after the virtual thread is executed is adjusted according to the time of running the real machine once, the execution times and the actual total execution time of the virtual thread.
In one example, determining the sleep time according to the number of virtual thread executions, the interpolation period and the actual total time includes: determining the expected time of virtual thread execution according to the execution times and the interpolation period of the virtual thread; in the case where the expected time is less than the actual total time, the sleep time is 0; in the case where the expected time is not less than the actual total time, the sleep time is an absolute value of a difference between the actual total time and the expected time. That is, if the actual total time of the virtual thread running is less than the expected time, the sleep time is increased to make the time when the virtual thread starts to execute next time consistent with the expected time calculated according to the execution times and the interpolation period, that is, consistent with the start time of the next execution in the running process of the real machine; if the actual total running time of the virtual thread is longer than the expected time, the simulation process is proved to have the overtime phenomenon, the sleep is not carried out, namely the sleep time is set to be 0, and the next virtual thread is directly started to execute, so that the time difference between the simulation process and the real machine running process is reduced.
In one example, determining the sleep time according to the number of virtual thread executions, the interpolation period and the actual total time further includes: when the sleep time is longer than the interpolation period, the sleep time is updated to the interpolation period. That is, a threshold exists for the sleep time, and the value of the threshold may be an interpolation period, that is, the sleep time does not exceed the time of an interpolation period, so that the sleep time has an upper limit, and the situations that the simulation process is stopped or suspended for a long time, the simulation efficiency is affected, and the accuracy of the simulation beat is reduced are avoided.
In one example, the number of executions is increased by 1 each time a virtual thread is run. That is, the execution times are used for embodying the execution process of the virtual thread, and after the virtual thread is executed, the execution times are updated, that is, the expected time for executing the virtual thread is changed; the expected time of the virtual thread execution is obtained by the number of times of execution and the interpolation period, namely, the number of times of execution is multiplied by the time of the interpolation period, and the obtained time is the expected time of the virtual thread execution.
In step 103, sleep is performed according to the determined sleep time. Namely, executing sleep according to the dynamically determined sleep time, and adjusting the execution time of the next virtual thread; the sum of the actual total time of the virtual thread running and the determined dormancy in the simulation process can be the same as the expected time, so that the time of starting to execute the virtual thread at the next time is equivalent to the time of starting to execute the virtual thread at the next time in the real machine running process, and the accuracy of the simulation beat is improved.
Specifically, as shown in fig. 2, a simple block diagram of an operation logic flow of a controller program in real machine operation of a robot is shown, an operating system of a real machine controller is generally a real-time operating system, a robot control program generally runs in a "task", the task can set a period and a priority, a robot trajectory plan generally runs in an "interpolation task", and the interpolation task is generally characterized by high priority and small period jitter, and the jitter of the task period directly affects the accuracy and jitter of the robot trajectory. The whole program flow is similar to the program flow of a Programmable Logic Controller (PLC), and is firstly a robot input (refresh) process, and the process updates external input information into a robot system, where the external input information includes: actual servo joint position, status, IO, register information, etc.; then, a robot state machine is operated, and the robot state machine part executes a command input by a user according to the robot input skip state, calls a track planning algorithm and the like; and finally, the robot outputs (refreshes) process, and the process is to update the output information of the state machine to the external equipment.
Fig. 3 is a simplified block diagram of a logic flow of a robot simulation process and a running of a robot virtual controller program in an example, an operating system of a virtual controller for simulation is generally a general non-real-time operating system, a robot program generally runs in a "thread", and the "thread" is different from the "task" in that the task is scheduled periodically, and the thread is executed once, so that to implement program loop execution, a loop program needs to be written in the control program by itself, and the program running period is controlled by sleeping in the present embodiment, and the sleeping in the present embodiment supports dynamic adjustment, and the sleeping time required for each loop allocation can be dynamically calculated, so as to ensure the beat accuracy of virtual simulation. In fig. 3, "interpolation time" is the time of the interpolation period, and the robot input, the robot state machine, and the robot output together constitute the virtual thread to be executed.
The simulation process in this embodiment is, for example: in the process of program initialization, a periodic cycle task is executed at the beginning, an initial time t0 is recorded, and the cycle times cyclepointer is set to 0; adding 1 to the cycle times cyclenber after each robot output; updating and recording the current time t 1; the updated program has run time t2, and the formula is t2 ═ t1-t 0; the expected program running time t3 is updated, and the formula is t3 cyclenber cycleTime. The cycleTime is an interpolation cycle time; judging the sizes of t3 and t2, if t3 is less than t2, setting the sleep time t4 to be 0, executing sleep, and ending a cycle process; otherwise, the sleep time is set to t 4-t 3-t2, the sleep time t4 and the interpolation period cycleTime are judged, if t4 is larger than the cycleTime, the sleep time t4 is set to cycleTime, otherwise, the sleep time is not changed; then executing a dormancy process, and finishing a cycle process; the sleep execution ends and enters the next cycle.
For the implementation of one embodiment, for example: a C + + project is built on a general windows system, a compiler is mingw, a target machine is x86 architecture, a program data initialization process and a program circular operation process are sequentially realized in a main program function according to the figure 3; and in the circulating operation process, the steps of robot input (refresh call), robot state machine call, robot output (refresh call), robot program circulating dormancy calculation, program dormancy execution and the like are respectively realized.
In addition, the following two ways can be adopted for the algorithm effect verification: the difference data changes between t2 and t3 are monitored at regular time in the process, and whether the data will diverge or not and whether the maximum value of the data difference can be maintained within a stable data range or not is observed, and if the value is stable and small (for example, no more than 10 interpolation cycles), the algorithm can be verified to be effective. Or writing a plurality of running robot application programs with different running times, then running the programs in the virtual controller and the real machine controller respectively, recording and analyzing the difference of the running times, and verifying that the algorithm is effective if the value is small (such as not more than 10 interpolation cycles).
By the implementation mode, the simulation beat of the virtual controller is basically consistent with the running beat of the real machine, and the beat simulation accuracy of the robot simulation system is improved. Beat simulation in the robot simulation process is basically not influenced by the real-time performance of an operating system and task scheduling characteristics; and the beat simulation has no accumulated error, and the longer the program running time in the simulation process is, the higher the accuracy of the beat simulation is reflected because the adjustment of the sleep time uses the running total time. Meanwhile, the beat simulation can not be blocked, and the longest sleep time is set as the interpolation period, so that the long-time sleep condition of the robot can not occur.
The steps of the above methods are divided for clarity, and the implementation may be combined into one step or split some steps, and the steps are divided into multiple steps, so long as the same logical relationship is included, which are all within the protection scope of the present patent; it is within the scope of the patent to add insignificant modifications to the algorithms or processes or to introduce insignificant design changes to the core design without changing the algorithms or processes.
One embodiment of the present application relates to a robot simulation apparatus, as shown in fig. 4, including:
an obtaining module 201, configured to obtain an actual total time that a virtual thread has run;
a determining module 202, configured to determine sleep time according to the number of virtual threads executed, an interpolation period, and the actual total time, where the sleep time is a time interval for executing the virtual threads in the robot simulation process, and the interpolation period is an expected time for the virtual threads to run once;
a sleep module 203, configured to perform sleep according to the determined sleep time.
For the obtaining module 201, in an example, the obtaining the actual total time that the virtual thread has been run includes: recording a first time node when the virtual thread starts to run for the first time; recording a second time node after the virtual thread runs; the time difference between the first time node and the second time node is the actual total time that has been run.
In one example, recording a second time node after the virtual thread runs, includes: and updating the second time node after the virtual thread is run each time.
For the determining module 202, in an example, the determining a sleep time according to the number of virtual threads executed, an interpolation cycle, and the actual total time includes: determining the expected time of the virtual thread execution according to the execution times of the virtual thread and the interpolation period; in the case that the expected time is less than the actual total time, the sleep time is 0; in the case where the expected time is not less than the actual total time, the sleep time is an absolute value of a difference between the actual total time and the expected time.
In one example, the determining a sleep time according to the number of virtual thread executions, the interpolation period, and the actual total time further includes: and updating the sleep time to the interpolation period when the sleep time is greater than the interpolation period.
In one example, the number of executions is increased by 1 each time the virtual thread is run.
By the implementation mode, the simulation beat of the virtual controller is basically consistent with the running beat of the real machine, and the beat simulation accuracy of the robot simulation system is improved. Beat simulation in the robot simulation process is basically not influenced by the real-time performance of an operating system and task scheduling characteristics; and the beat simulation has no accumulated error, and the longer the program running time in the simulation process is, the higher the accuracy of the beat simulation is reflected because the adjustment of the sleep time uses the running total time. Meanwhile, the beat simulation can not be blocked, and the longest sleep time is set as the interpolation period, so that the long-time sleep condition of the robot can not occur.
It should be understood that this embodiment is a system example corresponding to the above embodiment, and that this embodiment can be implemented in cooperation with the above embodiment. The related technical details mentioned in the above embodiments are still valid in this embodiment, and are not described herein again in order to reduce repetition. Accordingly, the related-art details mentioned in the present embodiment can also be applied to the above-described embodiments.
It should be noted that each module referred to in this embodiment is a logical module, and in practical applications, one logical unit may be one physical unit, may be a part of one physical unit, and may be implemented by a combination of multiple physical units. In addition, in order to highlight the innovative part of the present application, a unit that is not so closely related to solving the technical problem proposed by the present application is not introduced in the present embodiment, but this does not indicate that no other unit is present in the present embodiment.
One embodiment of the present application relates to an electronic device, as shown in fig. 5, comprising at least one processor 301; and a memory 302 communicatively coupled to the at least one processor 301; wherein the memory 302 stores instructions executable by the at least one processor 301, the instructions being executable by the at least one processor 301 to enable the at least one processor 301 to perform the robot simulation method described above.
Where the memory and processor are connected by a bus, the bus may comprise any number of interconnected buses and bridges, the buses connecting together one or more of the various circuits of the processor and the memory. The bus may also connect various other circuits such as peripherals, voltage regulators, power management circuits, and the like, which are well known in the art, and therefore, will not be described any further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver may be one element or a plurality of elements, such as a plurality of receivers and transmitters, providing a means for communicating with various other apparatus over a transmission medium. The data processed by the processor is transmitted over a wireless medium via an antenna, which further receives the data and transmits the data to the processor.
The processor is responsible for managing the bus and general processing and may also provide various functions including timing, peripheral interfaces, voltage regulation, power management, and other control functions. And the memory may be used to store data used by the processor in performing operations.
One embodiment of the present application relates to a computer-readable storage medium storing a computer program. The computer program realizes the above-described method embodiments when executed by a processor.
That is, as can be understood by those skilled in the art, all or part of the steps in the method for implementing the embodiments described above may be implemented by a program instructing related hardware, where the program is stored in a storage medium and includes several instructions to enable a device (which may be a single chip, a chip, or the like) or a processor (processor) to execute all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the present application, and that various changes in form and details may be made therein without departing from the spirit and scope of the present application in practice.
Claims (9)
1. A robot simulation method, comprising:
acquiring the actual total time of the virtual thread;
determining sleep time according to the execution times of the virtual threads, an interpolation period and the actual total time, wherein the sleep time is a time interval for executing the virtual threads in the robot simulation process, and the interpolation period is an expected time for running the virtual threads once;
and performing sleep according to the determined sleep time.
2. The robot simulation method according to claim 1, wherein the determining a sleep time based on the number of virtual thread executions, an interpolation period, and the actual total time includes:
determining the expected time of the virtual thread execution according to the execution times of the virtual thread and the interpolation period;
in the case that the expected time is less than the actual total time, the sleep time is 0;
in a case where the expected time is not less than the actual total time, the sleep time is an absolute value of a difference between the actual total time and the expected time.
3. The robot simulation method according to claim 2, wherein the determining a sleep time based on the number of times of execution of the virtual thread, an interpolation cycle, and the actual total time further comprises: and updating the sleep time to the interpolation period when the sleep time is greater than the interpolation period.
4. The robot simulation method of claim 1, wherein the obtaining the actual total time that the virtual thread has been running comprises:
recording a first time node when the virtual thread starts to run for the first time;
recording a second time node after the virtual thread runs;
the time difference between the first time node and the second time node is the actual total time that has been run.
5. The robot simulation method of claim 4, wherein the recording a second time node after the virtual thread runs, comprises:
and updating the second time node after the virtual thread is run each time.
6. A robot simulation method according to any of claims 1 to 5, characterized in that the number of executions is increased by 1 each time the virtual thread is run.
7. A robot simulation apparatus, comprising:
the acquiring module is used for acquiring the actual total time of the running of the virtual thread;
a determining module, configured to determine sleep time according to the number of times of executing the virtual thread, an interpolation period, and the actual total time, where the sleep time is a time interval for executing the virtual thread in the robot simulation process, and the interpolation period is an expected time for the virtual thread to run once;
and the dormancy module is used for executing dormancy according to the determined dormancy time.
8. An electronic device, comprising:
at least one processor; and the number of the first and second groups,
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a robot simulation method according to any one of claims 1 to 6.
9. A computer-readable storage medium, storing a computer program, characterized in that the computer program, when being executed by a processor, implements the robot simulation method of any of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210060865.1A CN114578763B (en) | 2022-01-19 | 2022-01-19 | Robot simulation method and device, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210060865.1A CN114578763B (en) | 2022-01-19 | 2022-01-19 | Robot simulation method and device, electronic equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114578763A true CN114578763A (en) | 2022-06-03 |
CN114578763B CN114578763B (en) | 2024-05-14 |
Family
ID=81769563
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210060865.1A Active CN114578763B (en) | 2022-01-19 | 2022-01-19 | Robot simulation method and device, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114578763B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2360846Y (en) * | 1999-03-10 | 2000-01-26 | 浙江省机电设计研究院 | Angle polisher performance automatic detecting table |
DE102008031105A1 (en) * | 2008-07-01 | 2010-01-07 | Schaeffler Kg | Automatic balancing device i.e. balancing element, for rotating machine part i.e. grinding disk, of angular grinder, has imbalance compensating disk comprising two semi shells made of fiber-reinforced plastic |
CN209131595U (en) * | 2018-12-29 | 2019-07-19 | 浙江皇冠电动工具制造有限公司 | A kind of angle grinder all-round property testing machine |
CN111061232A (en) * | 2019-12-09 | 2020-04-24 | 中国科学院沈阳自动化研究所 | Production line design and optimization method based on digital twinning |
CN111993419A (en) * | 2020-08-10 | 2020-11-27 | 广州瑞松北斗汽车装备有限公司 | PDPS-based robot offline manufacturing method and device and computer terminal equipment |
CN112684717A (en) * | 2020-12-08 | 2021-04-20 | 南京理工大学 | Construction method of virtual-real combined digital twin simulation experiment platform |
-
2022
- 2022-01-19 CN CN202210060865.1A patent/CN114578763B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN2360846Y (en) * | 1999-03-10 | 2000-01-26 | 浙江省机电设计研究院 | Angle polisher performance automatic detecting table |
DE102008031105A1 (en) * | 2008-07-01 | 2010-01-07 | Schaeffler Kg | Automatic balancing device i.e. balancing element, for rotating machine part i.e. grinding disk, of angular grinder, has imbalance compensating disk comprising two semi shells made of fiber-reinforced plastic |
CN209131595U (en) * | 2018-12-29 | 2019-07-19 | 浙江皇冠电动工具制造有限公司 | A kind of angle grinder all-round property testing machine |
CN111061232A (en) * | 2019-12-09 | 2020-04-24 | 中国科学院沈阳自动化研究所 | Production line design and optimization method based on digital twinning |
CN111993419A (en) * | 2020-08-10 | 2020-11-27 | 广州瑞松北斗汽车装备有限公司 | PDPS-based robot offline manufacturing method and device and computer terminal equipment |
CN112684717A (en) * | 2020-12-08 | 2021-04-20 | 南京理工大学 | Construction method of virtual-real combined digital twin simulation experiment platform |
Non-Patent Citations (1)
Title |
---|
盛羽;王建新;谢朝辉;: "模型机虚拟实验平台的设计与实现", 中南大学学报(自然科学版), no. 06, 26 December 2009 (2009-12-26), pages 1609 - 1615 * |
Also Published As
Publication number | Publication date |
---|---|
CN114578763B (en) | 2024-05-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10082777B2 (en) | CPU unit for PLC, PLC-use system program, recording medium in which PLC-use system program is stored, PLC system, PLC support device, PLC support program, and recording medium in which PLC support program is stored | |
Cervin | Integrated control and real-time scheduling | |
US7730340B2 (en) | Method and apparatus for dynamic voltage and frequency scaling | |
US20050223379A1 (en) | On-line scheduling of constrained dynamic applications for parallel targets | |
CN110402430B (en) | Control device, control method, and recording medium | |
CN105190556B (en) | Real-time Multi-task System and its execution method | |
CN110161984B (en) | Control device, control system, control method, and storage medium | |
WO2018186358A1 (en) | Control device, control method, and control program | |
US11115232B2 (en) | Method and device for operating a control unit | |
JP6874706B2 (en) | How to generate application programs, devices, programs | |
CN114578763A (en) | Robot simulation method, device, electronic device and storage medium | |
Heiner et al. | Worst Case Analysis of Concurrent Systems with Duration Interval Petri Nets | |
US7296270B2 (en) | Method and control unit for controlling technical procedures in a motor vehicle | |
US7086054B2 (en) | Method and device for reconstructing the process sequence of a control program | |
US12117788B2 (en) | Control device with second processing unit that accesses variable via first processing unit | |
Cervin et al. | Analysis and simulation of controller timing | |
US11941396B2 (en) | Current variation slope control method for multi-core processor, control device and medium | |
WO2023007618A1 (en) | Information processing appratatus | |
KR20190132097A (en) | Method and apparatus of real-time scheduling for industrial robot system | |
CN111176835B (en) | Software self-adaption method based on hierarchical control | |
CN117632206A (en) | Basic algorithm and control logic program online updating method and system of industrial controller | |
CN114860418A (en) | Method and device for using clock source of operating system, electronic equipment and storage medium | |
CN111625280B (en) | Instruction control method and device and readable storage medium | |
JPH06259115A (en) | Programmable controller | |
CN118277033A (en) | Simulation scheduling method, device, equipment and medium |
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 |