Simulation device and program
Patent Information
- Application Number
- JP2024534797
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2026-09-01
- Estimated Expiration
- 2042-07-19
AI Technical Summary
【0008】 本発明は、人間が分岐の判断をしなくてもロボットの動作をシミュレーション可能である。
Smart Images

Figure 0007914212000001 
Figure 0007914212000002 
Figure 0007914212000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to a simulation apparatus and a program. [Background Art]
[0002] There is a technique called offline simulation that simulates the operation of a robot using a virtual robot on a computer. Offline simulation can generate a virtual robot based on backup data of an actual robot and perform simulation. Offline simulation is performed for purposes such as, for example, fault investigation or correction of operation programs. [Prior Art Literature] [Patent Literature]
[0003] [Patent Literature 1] Japanese Unexamined Patent Application Publication No. 2014-144524 [Summary of the Invention] [Problem to be Solved by the Invention]
[0004] However, an actual robot is connected to a programmable logic controller (PLC) or peripheral devices via I / O (input / output) connection. Therefore, there are many I / O input waits, conditional branches, and the like in a robot operation program. Accordingly, it is not possible to easily simulate the operation of the robot.
[0005] As a conventional technique, there is a method of creating a signal state setting file and performing simulation while changing I / O states based on the settings (Patent Literature 1). In the conventional technique, for conditional branches of an operation program based on I / O, a human needs to judge how to cause branching and make settings accordingly. This also results in a large number of man-hours for an operation program with a complicated configuration.
[0006] The problem that the embodiments of the present invention aim to solve is to provide a simulation device and program that can simulate the operation of a robot without requiring a human to make branching decisions. [Means for solving the problem]
[0007] The simulation device of the embodiment includes a simulation unit that performs simulations of the robot's actions when it proceeds to different branch destinations by changing the state of the variables in an action program that includes branches that proceed to different branch destinations depending on the state of the variables, so as to proceed to different branch destinations. [Effects of the Invention]
[0008] This invention makes it possible to simulate the actions of a robot without requiring a human to make branching decisions. [Brief explanation of the drawing]
[0009] [Figure 1] A block diagram showing an example of the main components of a simulation system and its constituent elements according to an embodiment. [Figure 2] A flowchart showing an example of processing performed by the processor in Figure 1. [Figure 3] A flowchart showing an example of processing performed by the processor in Figure 1. [Figure 4] Figure 1 shows an example of the results screen displayed on the display device. [Modes for carrying out the invention]
[0010] The simulation system according to the embodiment will be described below with reference to the drawings. Note that the scale of each part in the drawings used in the description of the embodiment below may have been changed as appropriate. Also, for illustrative purposes, some components may be omitted in the drawings used in the description of the embodiment below. Furthermore, in the drawings and this specification, the same reference numerals indicate the same elements. Figure 1 is a block diagram showing an example of the main components of a simulation system 1 and its constituent elements according to an embodiment. The simulation system 1 includes, for example, a simulation device 100 and a robot 200.
[0011] The simulation device 100 and the robot 200 are connected to a network NW, for example. The network NW is typically a communication network including a private network such as an intranet. The network NW is typically a communication network including a LAN (local area network). The network NW may also be a communication network including the Internet. The network NW may also be a communication network including a WAN (wide area network). Furthermore, the network NW may be a wireless line, a wired line, or a mixture of wireless and wired lines. In addition, the network NW may be a communication network including a dedicated line or a public mobile phone network.
[0012] The simulation device 100 is a device that performs offline simulations of the robot 200. The simulation device 100 includes, as an example, a processor 101, a ROM (read-only memory) 102, a RAM (random-access memory) 103, an auxiliary storage device 104, an input device 105, a display device 106, and a communication interface 107. A bus 108 and the like connect these components.
[0013] The processor 101 is the central part of the computer that performs calculations and control necessary for the operation of the simulation device 100, and performs various calculations and processes. The processor 101 is, for example, a CPU (central processing unit), MPU (micro processing unit), SoC (system on a chip), DSP (digital signal processor), GPU (graphics processing unit), ASIC (application specific integrated circuit), PLD (programmable logic device), or FPGA (field-programmable gate array). Alternatively, the processor 101 is a combination of several of these. Furthermore, the processor 101 may also be a combination of these with hardware accelerators. Based on programs such as firmware, system software, and application software stored in ROM 102 or auxiliary storage device 104, the processor 101 controls each part to realize various functions of the simulation device 100. The processor 101 also executes the processes described later based on the said program. Note that some or all of the said program may be incorporated into the circuit of the processor 101.
[0014] ROM102 and RAM103 are the main memory of the computer, which is centered around processor 101. ROM102 is a non-volatile memory used exclusively for reading data. ROM102 stores, for example, firmware from the aforementioned programs. ROM102 also stores data used by the processor 101 for various processing tasks. RAM103 is memory used for reading and writing data. RAM103 is used as a work area to store data that the processor 101 temporarily uses when performing various processes. RAM103 is typically volatile memory.
[0015] The auxiliary storage device 104 is an auxiliary storage device for a computer centered on the processor 101. The auxiliary storage device 104 is, for example, an EEPROM (electric erasable programmable read-only memory), an HDD (hard disk drive), a flash memory, or the like. Among the programs described above, the auxiliary storage device 104 stores, for example, system software and application software. Additionally, the auxiliary storage device 104 stores data used by the processor 101 when executing various processes, data generated by processing in the processor 101, various setting values, and the like.
[0016] Additionally, the auxiliary storage device 104 also stores an operation program for the robot 200 and the like.
[0017] The input device 105 receives operations performed by an operator of the simulation apparatus 100 (hereinafter simply referred to as the "operator"). The input device 105 is, for example, a keyboard, a keypad, a touch pad, a mouse, a controller, or the like. Additionally, the input device 105 may be a device for voice input.
[0018] The display device 106 displays a screen for notifying the operator and the like of various types of information. The display device 106 is, for example, a display such as a liquid crystal display or an organic EL (electro-luminescence) display. Furthermore, a touch panel can also be used as the input device 105 and the display device 106. That is, the display panel included in the touch panel can be used as the display device 106, and the pointing device for touch input included in the touch panel can be used as the input device 105.
[0019] The communication interface 107 is an interface for the simulation apparatus 100 to perform communication via a network NW or the like.
[0020] The bus 108 includes a control bus, an address bus, a data bus, and the like, and transmits signals transmitted and received between respective parts of the simulation apparatus 100.
[0021] The robot 200 is, for example, a manipulator, a robot arm, or a robot including these components. The robot 200 is, for example, an articulated robot. As an example, the robot 200 includes one or more driving units 201.
[0022] The driving unit 201 is a part driven by a motor such as a servo motor. The driving unit 201 is rotationally driven about a drive shaft, for example.
[0023] Hereinafter, the operation of the simulation system 1 according to the embodiment will be described based on FIG. 2, FIG. 3, and the like. Note that the processing content in the following operation description is an example, and various processes capable of obtaining the same result can be appropriately used. FIG. 2 and FIG. 3 are flowcharts showing an example of processing performed by the processor 101 of the simulation apparatus 100. The processor 101 executes the processing of FIG. 2 and FIG. 3 based on a program stored in, for example, the ROM 102 or the auxiliary storage device 104.
[0024] In step ST11 of Figure 2, the processor 101 of the simulation device 100 determines whether or not to execute a simulation of the robot 200's operation program. For example, the processor 101 determines to execute a simulation of an operation program if there is an operation program that has not yet been simulated. For example, the processor 101 determines to execute a simulation of an operation program if there is an operation program that has not yet been simulated at a predetermined time. For example, the processor 101 determines to execute a simulation of an operation program if there is an input instructing it to execute a simulation of an operation program. Such an instruction input is based, for example, on an operation input to the input device 105 by an operator. Alternatively, information indicating such an instruction is input to the simulation device 100 from another device via the communication interface 107. If the processor 101 does not determine to execute a simulation of an operation program, it determines No in step ST11 and repeats the process of step ST11. If the processor 101 determines to execute a simulation of an operation program, it determines Yes in step ST11 and proceeds to step ST12.
[0025] In step ST12, the processor 101 determines the operation program to be executed in the simulation. Then, the processor 110 obtains the operation program from the auxiliary storage device 104 or another device. The operation program obtained last in the processing of step ST12 will be referred to below as the "obtained program".
[0026] The processor 101, for example, selects one of the operating programs that has not yet been simulated and determines it to be the operating program to be simulated. The processor 101 determines which operating program to simulate based on an input that specifies the target of the simulation. The input specifying the target is based on, for example, an operation input to the input device 105 by an operator. Alternatively, information specifying the target is input to the simulation device 100 from another device via the communication interface 107.
[0027] In step ST13, the processor 101 analyzes the acquired program. By analyzing the acquired program, the processor 101 determines how many execution patterns there are in the acquired program. For example, when the processor 101 reads the acquired program and finds a branch, it increases the pattern count by (number of branches - 1) for each branch. The number of branches is the number of branches in a single branch. Examples of branches include IF statements and CASE statements. For an IF statement, the number of branches is usually 2. For a CASE statement, the number of branches is 2 or more. If the acquired program contains a loop that may result in an infinite loop, the processor 101 does not count the branch destinations that enter the loop in the branch count. The branch destinations that enter the loop are those that will definitely be executed before the acquisition program ends.
[0028] The following program consisting of the function named "LOOP" is an example of a program that includes a loop that may result in an infinite loop. In the code of the program shown in this specification and in the drawings, the number to the left of ":" indicates which line of the function it is. Line 4 of the function "LOOP" is an IF statement. This IF statement branches into two cases: when DI[1]=ON is true and when it is false. Of these, the branch when DI[1]=ON is true includes an instruction to jump to LABEL[1] on line 2. When the processor executing the function "LOOP" jumps to line 2, it will execute line 4 again. In other words, if DI[1]=ON, it will result in an infinite loop. Therefore, for the IF statement on line 4, the branch when DI[1]=ON is true is the branch that enters a loop that may result in an infinite loop.
[0029] LOOP 1:POSITION[1] 100% 2:LABEL[1] 3:POSITION[2] 100% 4:IF(DI[1]=ON)THEN JUMP LABEL[1] 5:END
[0030] Furthermore, the processor 101 stores the execution pattern of the acquisition program in RAM 103 or auxiliary storage device 104, for example, in a tree structure. In this tree structure, each branch in the acquisition program represents an internal node, and the end of the acquisition program represents a leaf node. An internal node is a node that has child nodes, while a leaf node is a node that does not have child nodes.
[0031] Furthermore, processor 101 generates a tree structure that does not include branch destinations that could lead to infinite loops.
[0032] Furthermore, the processor 101 analyzes the acquired program to determine whether or not it is an operation program without operation instructions. An operation instruction is an instruction that causes the drive unit 201 of the robot 200 to move.
[0033] The following operation program, consisting of the function named "RESET SIGNAL," is an example of an operation program without operation commands. The following operation program does not contain any operation commands. Therefore, even if the following operation program is executed, the drive unit 201 of the robot 200 will not move.
[0034] RESET SIGNAL 1:DO[1]=OFF 2:DO[2]=OFF 3:DO[3]=OFF 4:DO[4]=OFF 5:DO[5]=OFF
[0035] In step ST14, the processor 101 selects one execution pattern from those examined in step ST13. The processor 101 selects an execution pattern, for example, by selecting a leaf node in a tree structure. This execution pattern is obtained by traversing the branches from the root node to the selected leaf node without backtracking. The processor 101 also indicates which execution pattern is currently selected, for example, by setting each node included in the execution pattern to a selected state.
[0036] However, if there is an execution pattern that is currently selected, it is preferable for the processor 101 to select an execution pattern that is close to that selected pattern. If there is an execution pattern that is currently selected, it is preferable that the selection of the execution pattern selected in the previous step ST14 has not been deselected. Furthermore, when the processor 101 selects an execution pattern that is close to the currently selected pattern, it is preferable to select the execution pattern by changing the deepest possible node from the unselected state to the selected state.
[0037] The processor 101 selects an execution pattern that is similar to the currently selected execution pattern by executing the processes shown in (A1) to (A3) below, for example. (A1) Processor 101 changes the deepest node among the selected nodes from the selected state to the selected state. Then, processor 101 proceeds to (A2). (A2) If the deepest node among the selected nodes has unselected child nodes, the processor 101 selects one of the unselected child nodes and proceeds to (A3). If the deepest node among the selected nodes does not have any unselected child nodes, the processor 101 returns to (A1). Note that "no unselected child nodes" for a node includes cases where the node has no child nodes, i.e., the node is a leaf node. (A3) If the node that was last selected in (A2) or (A3) has child nodes, the processor 101 selects those child nodes and repeats (A3). Conversely, if the node that was last selected in (A2) or (A3) has no child nodes, the processor 101 completes the selection of the execution pattern.
[0038] In step ST15, the processor 101 determines the state of variables in order to perform a simulation of the robot 200's operation when the acquired program is executed with the selected execution pattern.
[0039] The method for determining variable values will be explained using the following program consisting of the function named "MAIN" and the function named "SUBPROG". The function "MAIN" is the first function called when the program is executed. The function "SUBPROG" is called by the function "MAIN". Furthermore, lines 3 through 9 of the function "SUBPROG" are omitted by replacing them with "...". It is assumed that there are no branches in lines 3 through 9.
[0040] MAIN 1:POSITION[1] 100% 2:POSITION[2] 100% 3:IF(DI[1]=ON)THEN CALL SUBPROG 4:POSITION[1] 100% 5:END
[0041] SUBPROG 1:POSITION[1] 100% 2:IF(DI[2]=ON)THEN JUMP LABEL[1] ... 10:END 11:LABEL[1] 12:POSITION[2] 100% 13:END
[0042] This program contains two branches. These two branches are the IF statement on the third line of the function "MAIN" and the IF statement on the second line of the function "SUBPROG".
[0043] The IF statement on the third line of the function "MAIN" branches depending on whether DI[1]=ON is true or false. The IF statement on the second line of the function "SUBPROG" branches depending on whether DI[2]=ON is true or false.
[0044] The function "SUBPROG" is called only if the IF statement on the third line of the function "MAIN" is true. Therefore, this program has three execution patterns as shown below (B1) to (B3). (B1) If the IF statement on the 3rd row of the function "MAIN" is true. (B2) If the IF statement in the third row of the function "MAIN" is false, and the IF statement in the second row of the function "SUBPROG" is true. (B3) If the IF statement in the third row of the function "MAIN" is false, and the IF statement in the second row of the function "SUBPROG" is false.
[0045] For this program to execute in the (B1) pattern, the value of variable DI[1] must be ON. If the value of variable DI[1] is ON, the execution pattern will be (B1) regardless of the value of variable DI[2].
[0046] For this program to execute in the (B2) pattern, the value of variable DI[1] must not be ON, and the value of variable DI[2] must be ON. For this program to execute in the (B3) pattern, the value of variable DI[1] must not be ON, and the value of variable DI[2] must not be ON.
[0047] Furthermore, the statement that a variable V1 is not a value X1 may include not only cases where the value of variable V1 is a value other than X1, but also cases where variable V1 has no value, or where variable V1 is null, and various other states other than the value being X1.
[0048] In other words, when the processor 101 simulates this operation program using the execution pattern (B2), it sets the variable DI[1] to an ON state and the variable DI[2] to an ON state. Similarly, the processor 101 determines the state of each variable according to the acquisition program and execution pattern to be executed.
[0049] Furthermore, in the case of an operational program where the state of a variable changes during execution, the processor 101 determines the initial state of that variable. For example, suppose the operational program includes an IF statement, and that IF statement is true if the value of variable X2 is 1. Suppose that the operational program includes a statement before the IF statement, X2 = X2 + 1, which increases the value of variable X2 by 1, and does not include any other statements that change the value of variable X2. In this case, if the initial value of variable X2 is 0, the IF statement will be true. Therefore, in this case, if the processor 101 wants the IF statement to be true, it sets the state of variable X2 to a value of 0. If the processor 101 wants the IF statement to be true, it sets the state of variable X2 to a value other than 0.
[0050] However, regardless of the state of each variable, there are cases where the program cannot be executed with the selected execution pattern. For example, the IF statement on the second line of the function "SUBPROG" 2:IF(DI[1]=ON)THEN JUMP LABEL[1] Let's consider the case where it is rewritten as follows.
[0051] In this case, no matter what value you set the variable DI[1] to, you cannot execute the program using the execution pattern in (B2). This is because if the IF statement on the third line of the function "MAIN" is false, then the IF statement on the second line of the function "SUBPROG" will always be false.
[0052] If the processor 101 cannot execute the acquired program with the selected execution pattern regardless of the state of each variable, it will, for example, not determine the state of the variables.
[0053] In step ST16, the processor 101 determines whether or not the state of the variable was determined in step ST15. If the state of the variable was determined, the processor 101 determines Yes in step ST16 and proceeds to step ST17.
[0054] In step ST17, the processor 101 executes the acquisition program with the variables determined in step ST15, thereby simulating the movement of the robot 200. This allows the processor 101 to simulate the movement of the robot 200 when the acquisition program is executed using the selected execution pattern.
[0055] The processor 101 performs the simulation, for example, by calculating the movement of a virtual robot 200 in a virtual space. The processor 101 calculates the movement of the virtual robot 200, for example, by calculating the movement of the drive unit 201 of the virtual robot 200 based on an acquisition program.
[0056] Furthermore, the processor 101 also calculates the trajectory of the robot 200 during the simulation. For example, the processor 101 defines the trajectory of the robot 200 as the path taken by any point on the robot 200, such as the tip of the robot's arm.
[0057] Furthermore, the processor 101 also calculates the operation time and execution time for the robot 200's movements during the simulation. The processor 101 calculates the operation time for each instruction included in the operation program. The execution time is the time from the start to the end of the operation according to the operation program. In other words, the execution time is the sum of the operation times of each instruction.
[0058] Furthermore, the processor 101 checks whether the acquired program is a short-running program during the simulation. For example, if the execution time of the acquired program is less than or equal to a predetermined threshold TH1, the processor 101 determines that the acquired program is a short-running program. The length of the threshold TH1 is predetermined, for example, by the administrator or designer of the simulation system 1. If the operation program includes multiple execution patterns, the processor 101 determines that it is a short-running program if, for example, the execution time of all execution patterns of the operation program is less than or equal to the threshold TH1.
[0059] The processor 101 may calculate the execution time per line rather than per instruction. Alternatively, the processor 101 may calculate the execution time per other unit. The operation time and execution time are examples of the time it takes for a robot to operate.
[0060] In step ST18, the processor 101 stores the simulation results from step ST17 in RAM 103 or auxiliary storage device 104, etc., in a manner that indicates which execution pattern was used. The simulation results include the movement, trajectory, and operating time of the virtual robot 200.
[0061] In contrast, if the state of the variables has not been determined in step ST15, the processor 101 determines "No" in step ST16 and proceeds to step ST19. In other words, if the processor 101 cannot execute the acquisition program using the selected execution pattern regardless of the state of each variable, it does not execute the simulation using the selected execution pattern.
[0062] In step ST19, the processor 101 stores in RAM 103 or auxiliary storage device 104 that the selected execution pattern is not executable.
[0063] After processing in step ST18 or step ST19, the processor 101 proceeds to step ST20. In step ST20, the processor 101 determines whether or not to terminate the simulation. For example, the processor 101 determines to terminate the simulation when it has finished selecting all execution patterns. For example, the processor 101 considers that all execution patterns have been selected when not all nodes are unselected. For example, the processor 101 considers that all execution patterns have been selected when not all leaf nodes are unselected. If the processor 101 does not decide to terminate the simulation, it determines No in step ST20 and returns to step ST14. Conversely, if the processor 101 decides to terminate the simulation, it determines Yes in step ST20 and proceeds to step ST21 in Figure 3.
[0064] In this way, the processor 101 repeats the processing of steps ST14 to ST20 to simulate all execution patterns of the acquired program, excluding those that are not executable.
[0065] Based on the above, the processor 101 functions as an example of the simulation unit by performing the processing in steps ST14 to ST20. The simulation unit is a program for operating the robot, and for an operation program that includes branches that proceed to different branching destinations depending on the state of the variables, it performs a simulation of the robot's operation in each of the multiple different branching destinations by changing the state of the variables so that it proceeds to different branching destinations.
[0066] In step ST21, the processor 101 selects one execution pattern from among the execution patterns of the acquired program. However, the processor 101 selects an execution pattern from among those that are not executable. The execution pattern selected in the process of step ST21 will be referred to as the "selected pattern" below.
[0067] The processor 101 may, for example, randomly select one execution pattern. Alternatively, the processor 101 may select one execution pattern whose simulation result satisfies predetermined conditions. If there are multiple execution patterns that satisfy the conditions, the processor 101 may randomly select one of them. Alternatively, if there are multiple execution patterns that satisfy the conditions, the processor 101 may, for example, select the execution pattern that best meets the conditions. If there are no execution patterns that satisfy the conditions, the processor 101 may, for example, select the execution pattern that is closest to the conditions.
[0068] The predetermined conditions for selecting the execution pattern are set, for example, by the designer, administrator, or operator of the simulation device 1. Examples of conditions (C1) to (C9) are shown below. Note that the conditions may also be composite conditions that combine the conditions shown below. (C1) The execution time must be equal to or greater than the specified threshold TH2. (C2) The execution time must be less than or equal to the specified threshold TH3. (C3) The trajectory passes through a predetermined location. (C4) The trajectory does not pass through the designated location. (C5) The length of the trajectory is less than or equal to the predetermined threshold TH4. (C6) The length of the trajectory must be equal to or greater than the predetermined threshold TH5. (C7) The drive range of the drive unit 201 of the virtual robot 200 during operation is within a predetermined range. (C8) The operating posture of the virtual robot 200 is within a specified range. (C9) The virtual robot 200 performs a predetermined action.
[0069] Furthermore, if there are multiple execution patterns that satisfy the conditions, the processor 101 may select one of them if the trajectories of the actions are similar. The processor 101 considers two trajectories to be similar if the distance between them is less than or equal to a predetermined value. For example, the processor 101 calculates the Euclidean distance between each position per unit time and takes the average value as the distance between the two trajectories. Alternatively, the processor 101 takes the time integral of the Euclidean distance between the two trajectories from 0 seconds to the execution time and divides the result by the execution time as the distance between the two trajectories. Note that the trajectories used for the time integral are a function of time. Alternatively, the processor 101 considers two trajectories to be similar if the Euclidean distance between them is always within a predetermined distance.
[0070] In step ST22, the processor 101 generates an image corresponding to the result screen SC1 as shown in Figure 4. The processor 101 then instructs the display device 106 to display this generated image. Upon receiving the display instruction, the display device 106 displays the result screen SC1.
[0071] Figure 4 shows an example of the results screen SC1 displayed on the display device 106. The results screen SC1 is a screen for displaying information about the selected pattern. This information includes, for example, the simulation results of the selected pattern. As an example, the results screen SC1 includes areas AR1 to AR5, an exit button B1, and a play button B2.
[0072] Area AR1 is an area that displays names indicating the program being retrieved, such as function names or program names.
[0073] Area AR2 is the area that displays the contents of the acquired program and the execution time of each instruction. Area AR2 includes areas AR21 and AR22.
[0074] Area AR21 is the area that displays the contents of the acquired program. Area AR21 can display the acquired program, for example, by instruction or line by line. Area AR21 may display only the portion of the acquired program that is executed in the selected pattern. Alternatively, Area AR21 may display the entire acquired program.
[0075] Area AR22 is the area that displays the execution time for the acquired program. Area AR22 displays, for example, the execution time for each instruction or each line.
[0076] Area AR3 is the area that displays the execution time of the acquisition program.
[0077] Area AR4 is the area that displays which branch to take in the acquisition program shown in Area AR21. Area AR4 is also a button that the operator can use to instruct the simulation device 100 to display the results of taking a different branch at that branch. In other words, Area AR4 is a button that the operator can use to instruct the simulation device 100 to change the selection pattern. The result screen SC1 contains as many Area AR4s as there are branches. In Figure 4, there is one Area AR4.
[0078] Region AR5 is a region for displaying the simulation results of the selected pattern. Region AR5 displays, for example, the virtual robot OB1 and its trajectory OB2 in the virtual space. Virtual robot OB1 is a virtual robot 200. Virtual robot OB1 is an image or a 3D (three-dimensional) object, etc.
[0079] Trajectory OB2 is an image or 3D object that shows a simulation of the trajectory in the selected pattern. Processor 101 generates trajectory OB2 based on the simulation results of the selected pattern.
[0080] The exit button B1 is a button used by the operator to instruct the simulation device 100 to end the display of the results screen SC1.
[0081] The play button B2 is a button used by the operator to instruct the simulation device 100 to play a video showing the simulation results (hereinafter referred to as "simulation video").
[0082] In step ST23, the processor 101 determines whether or not an operation to terminate the display of the results screen SC1 has been performed. That is, the processor 101 determines whether or not a predetermined operation, such as pressing the terminate button B1, has been performed. If no operation to terminate the display of the results screen SC1 has been performed, the processor 101 determines No in step ST23 and proceeds to step ST24.
[0083] In step ST24, the processor 101 determines whether or not an operation to play the simulation video has been performed. That is, the processor 101 determines whether or not a predetermined operation, such as pressing the play button B2, has been performed. If the operation to play the simulation video has not been performed, the processor 101 determines No in step ST24 and proceeds to step ST25.
[0084] In step ST25, the processor 101 determines whether an operation to change the selected pattern has been performed. That is, the processor 101 determines whether a predetermined operation, such as operating area AR4, has been performed. If no operation to change the selected pattern has been performed, the processor 101 determines No in step ST25 and returns to step ST23. Thus, the processor 101 enters a waiting state, repeating steps ST23 to ST25 until an operation to instruct the end of displaying the result screen SC1, an operation to instruct the playback of the simulation video, or an operation to instruct the change of the selected pattern is performed.
[0085] Based on the above, the processor 101, in cooperation with the input device 105, performs the processing in step ST25 and functions as an example of an input unit that receives input indicating the state of the variable.
[0086] If the processor 101 is in the waiting state of steps ST23 to ST25 when an operation is performed to instruct it to terminate the display of the result screen SC1, it determines "Yes" in step ST23 and proceeds to step ST11.
[0087] If the processor 101 is in the waiting state of steps ST23 to ST25 when an operation is performed to instruct it to play the simulation video, it determines "Yes" in step ST24 and proceeds to step ST26.
[0088] In step ST26, processor 101 plays a simulation video in region AR5 showing the simulation results of the selected pattern. The simulation video may be a 2D (two-dimensional) video or a 3D video. If the simulation video is a 3D video, the viewpoint may be changeable. The simulation video shows the virtual robot OB1 operating according to the simulation results.
[0089] Processor 101 may generate the simulation video before the play button B2 is pressed, or it may generate it after the play button B2 is pressed.
[0090] If an operation is performed instructing the processor 101 to change the selection pattern while it is in the waiting state of steps ST23 to ST25, the processor 101 determines "Yes" in step ST25 and proceeds to step ST27.
[0091] In step ST27, the processor 101 changes the selection pattern to the one instructed by the operation on area AR4. Then, the processor 101 displays the result screen SC1 corresponding to the new selection pattern in the same manner as the process in ST23. After the process in step ST27, the processor 101 returns to step ST23.
[0092] Based on the above, the processor 101, in cooperation with the display device 106, performs the processing in step ST27 and functions as an example of a display unit that displays the results of a simulation using the state of variables corresponding to the instructions input to the input unit.
[0093] According to the simulation system 1 of the embodiment, the simulation device 100 automatically performs simulations of the operation program for multiple execution patterns. Therefore, the simulation device 100 of the embodiment can simulate the operation of a robot without requiring a human to make branching decisions. This reduces the effort and man-hours required from humans.
[0094] Furthermore, according to the simulation system 1 of the embodiment, the simulation device 100 calculates the trajectory of the robot 200's movement for each execution pattern. This allows operators and others to verify the trajectory of each execution pattern.
[0095] Furthermore, according to the simulation system 1 of the embodiment, the simulation device 100 calculates the operating time and execution time for each execution pattern. This allows operators and others to verify the operating time and execution time for each execution pattern.
[0096] Furthermore, according to the simulation system 1 of the embodiment, the simulation device 100 displays the simulation results of the execution pattern corresponding to the operator's input on the display device 106. This allows the operator to confirm the simulation results of the desired execution pattern.
[0097] Furthermore, according to the simulation system 1 of the embodiment, the simulation device 100 displays a video showing the simulation results. This allows the simulation device 100 to communicate the simulation results to the operator or others in an easy-to-understand manner.
[0098] Furthermore, according to the simulation system 1 of the embodiment, the simulation device 100 automatically selects an execution pattern based on predetermined conditions. As a result, the simulation device 100 can display the simulation results of the execution pattern corresponding to the predetermined conditions.
[0099] The above embodiment can also be modified as follows: The processor 101 may include branch destinations in the tree structure that could lead to infinite loops. In this case, the processor 101 will not select such branch destinations, for example, in step ST14.
[0100] Processor 101 does not need to count branches that lead to a "backward" instruction, even if the loop does not have the potential to become an infinite loop. This eliminates the need to analyze whether a "backward" instruction has the potential to become an infinite loop. A branch that leads to a "backward" instruction refers to a branch that will definitely execute that instruction before the program terminates.
[0101] The processor 101 may also simulate execution patterns that include branch destinations that could result in an infinite loop. In this case, the processor 101 will, for example, continue the simulation until the number of times the loop has been executed exceeds a predetermined number.
[0102] In step ST12, the processor 101 may determine that multiple operation programs are the operation programs to execute the simulation. In this case, all of these operation programs are acquisition programs. If there are multiple acquisition programs, the processor 101 executes the processes in steps ST14 to ST20 for each acquisition program.
[0103] If there are multiple acquisition programs, the processor 101 selects one acquisition program in step ST21. Then, the processor 101 selects one execution pattern from among the selected acquisition programs. For example, the processor 101 may randomly select one acquisition program. Alternatively, the processor 101 may select one acquisition program that satisfies predetermined conditions. If there are multiple acquisition programs that satisfy the conditions, the processor 101 randomly selects one of the acquisition programs that satisfy the conditions. Alternatively, for example, if there are multiple acquisition programs that satisfy the conditions, the processor 101 selects the acquisition program that best satisfies the conditions. If there are no acquisition programs that satisfy the conditions, the processor 101 selects, for example, the acquisition program that is closest to the conditions.
[0104] The predetermined conditions for selecting the acquisition program are set, for example, by the designer, administrator, or operator of simulation device 1. Examples of conditions (D1) to (D3) are shown below. Note that the conditions may also be composite conditions that combine the conditions shown below. (D1) This is not an operation program without operation instructions. (D2) This is not a program with a short execution time. (D3) This is an operational program with a short execution time.
[0105] Based on the above, the processor 101 functions as an example of a selection unit that, by performing the processing in step ST21, automatically selects at least one of the states of a program and a variable selected from a plurality of programs based on predetermined conditions.
[0106] According to the simulation system 1 of the embodiment, the simulation device 100 automatically selects an acquisition program based on predetermined conditions. As a result, the simulation device 100 can display the simulation results of the acquisition program according to the predetermined conditions.
[0107] The processor 101 may generate a tree structure in program analysis that does not include any non-executable behavioral patterns.
[0108] The processor 101 may also perform simulations of execution patterns that are not feasible by changing the state of variables midway through the process.
[0109] Processor 101 may automatically play the simulation video when the results screen SC1 is displayed.
[0110] The processor 101 may implement some or all of the processing implemented by the program in the above embodiment through the hardware configuration of the circuit.
[0111] The program that implements the processing of the embodiment is transferred, for example, while stored on a non-temporary recording medium within the device. However, the device may be transferred without the program stored on it. Alternatively, the program may be transferred separately and written to the device. This transfer of the program can be achieved, for example, by recording it on a removable non-temporary storage medium or by downloading it via a network such as the Internet or a LAN.
[0112] The embodiments of the present invention have been described above, but these are merely examples and do not limit the scope of the invention. Embodiments of the present invention can be implemented in various ways without departing from the spirit of the invention. [Explanation of Symbols]
[0113] 1. Simulation System 100 Simulation devices 101 Processors 102 ROM 103 RAM 104 Auxiliary storage 105 Input Devices 106 Display Devices 107 Communication Interface 108 Bus 200 robots 201 Drive Unit OB1 Virtual Robot OB2 trajectory
Claims
1. A simulation unit that performs simulations of the robot's actions when it proceeds to different branching paths, by changing the state of the program variable values to cause the robot to proceed to different branching paths, and which is a program for operating a robot that includes branching paths that proceed to different branching paths, A selection unit that automatically selects the state of the program variable's value based on predetermined conditions, Equipped with, The aforementioned predetermined conditions are: (C1) The execution time is equal to or greater than a predetermined threshold. (C2) The execution time is below a predetermined threshold. (C3) The trajectory passes through a predetermined position. (C4) The trajectory does not pass through the designated position. (C5) The length of the trajectory is less than or equal to a predetermined threshold. (C6) The length of the trajectory is greater than or equal to a predetermined threshold. (C7) The drive range of the robot's drive unit is within a predetermined range. (C8) The robot's posture is within a specified range. (C9) The robot performs a predetermined action. A simulation device that is one of the following.
2. A program for operating a robot, which includes an operation program that includes branches that proceed to different branch destinations depending on the state of the value of a program variable, and a simulation unit that performs a simulation of the robot's operation in each of the cases where it proceeds to a different branch destination by changing the state of the value of the program variable so that it proceeds to a different branch destination, A selection unit that automatically selects the program from a plurality of programs based on predetermined conditions, Equipped with, The aforementioned predetermined conditions are: (D1) It is not an operation program without operation instructions. (D2) It is not a program that runs for a short duration. (D3) It must be an operational program with a short execution time. A simulation device that is one of the following.
3. The simulation device according to claim 1 or 2, wherein the simulation unit calculates the trajectory of the robot's movement in the simulation.
4. The simulation device according to claim 1 or 2, wherein the simulation unit calculates the time required for the robot's operation in the simulation.
5. An input unit that receives input indicating the state of the value of the program variable, The simulation apparatus according to claim 1 or 2, further comprising: a display unit that displays the results of the simulation using the state of the values of the program variables corresponding to the instructions input to the input unit.
6. The simulation apparatus according to claim 1 or 2, further comprising a display unit for displaying a video showing the results of the simulation.
7. The processor in the simulation device A simulation unit that performs simulations of the robot's actions when it proceeds to different branching paths, by changing the state of the program variable values to cause the robot to proceed to different branching paths, and which is a program for operating a robot that includes branching paths that proceed to different branching paths, It functions as a selection unit that automatically selects the state of the program variable's value based on predetermined conditions. The aforementioned predetermined conditions are: (C1) The execution time is equal to or greater than a predetermined threshold. (C2) The execution time is below a predetermined threshold. (C3) The trajectory passes through a predetermined position. (C4) The trajectory does not pass through the designated position. (C5) The length of the trajectory is less than or equal to a predetermined threshold. (C6) The length of the trajectory is greater than or equal to a predetermined threshold. (C7) The drive range of the robot's drive unit is within a predetermined range. (C8) The robot's posture is within a specified range. (C9) The robot performs a predetermined action. A program that is one of the following.
8. The processor of the simulation device A simulation unit that performs simulations of the robot's actions when it proceeds to different branching paths, by changing the state of the program variable values to cause the robot to proceed to different branching paths, and which is a program for operating a robot that includes branching paths that proceed to different branching paths, It functions as a selection unit that automatically selects the program to be selected from a plurality of programs based on predetermined conditions. The aforementioned predetermined conditions are: (D1) It is not an operation program without operation instructions. (D2) It is not a program that runs for a short duration. (D3) It must be an operational program with a short execution time. A program that is one of the following.
Citation Information
Patent Citations
Simulation method for offline teaching of robot
JP1992137110A
Simulation system that performs simulation according to robot program
JP2014144524A
Display system for robot
JP2018051653A
Robot setting device and robot setting method
JP2021020285A
Teaching control method for robot, robot system, and computer program
JP2022021461A