Simulation device and program
By designing a simulation device that can automatically advance to different branch points according to the change of variable state, the problem of complex movements and high labor time consumption of simulation robots in the prior art is solved, and automated simulation is realized, reducing manual intervention.
Patent Information
- Application Number
- CN202280096901.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-19
- Publication Date
- 2025-02-07
AI Technical Summary
The prior art cannot simply simulate the movements of a robot, especially when it involves I/O input and conditional branches, which requires manual judgment and setting of branches, resulting in complex operational procedures and high labor time consumption.
A simulation device is designed, which includes a simulation unit that can automatically advance to different branch points according to the change of variable state, simulating the action of the robot at different branch points.
It realizes that the robot's movements can be simulated without manual judgment of branches, reduces manual labor and improves the simulation efficiency of the action program.
Smart Images

Figure CN119403658A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a simulation device and a program. Background Art
[0002] There is a technology called offline simulation, which uses a virtual robot on a computer to simulate the robot's movements. Offline simulation can generate a virtual robot based on the backup data of the real robot and perform simulation. Offline simulation is performed for the purpose of, for example, obstacle investigation or correction of the action program.
[0003] Prior art literature
[0004] Patent Literature
[0005] Patent Document 1: Japanese Patent Application Publication No. 2014-144524 Summary of the invention
[0006] Problem that the invention aims to solve
[0007] However, real robots are connected to PLC (programmable logic controller) or peripheral devices through I / O (input / output). Therefore, there are many I / O input waiting and conditional branches in the robot's motion program. Therefore, it is impossible to simply simulate the robot's motion.
[0008] As a prior art, there is the following method (Patent Document 1): a signal state setting file is created, and a simulation is performed while changing the state of the I / O based on the setting. In the prior art, regarding the conditional branching of the action program using the I / O, a person needs to judge and set how to branch. In addition, this takes a lot of man-hours when the configuration of the action program is complex.
[0009] An object of the embodiments of the present invention is to provide a simulation device and a program that can simulate the actions of a robot without human judgment of branching.
[0010] Solutions for solving problems
[0011] The simulation device of the embodiment includes a simulation unit, which is an action program for making a robot move and includes branches that proceed to different branch points according to the state of a variable. The simulation unit changes the state of the variable to proceed to different branch points, thereby performing simulation of the action of the robot in each case of proceeding to multiple different branch points.
[0012] Effects of the Invention
[0013] The present invention can simulate the actions of a robot even without human branch judgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 This is a block diagram showing an example of a main configuration of a simulation system according to an embodiment and components included in the simulation system.
[0015] Figure 2 It means by Figure 1 A flowchart of an example of processing performed by a processor in .
[0016] Figure 3 It means by Figure 1 A flowchart of an example of processing performed by a processor in .
[0017] Figure 4 Is displayed in Figure 1 Figure 2 is a diagram of an example of a result screen of a display device in FIG. DETAILED DESCRIPTION
[0018] The following drawings are used to illustrate the simulation system involved in the embodiment. In addition, the scales of the various parts of the drawings used in the following description of the embodiment may be appropriately changed. In addition, the various drawings used in the following description of the embodiment may sometimes omit the structure for the purpose of explanation. In addition, in the drawings and this specification, the same reference numerals represent the same elements.
[0019] Figure 1 1 is a block diagram showing an example of a main configuration of a simulation system 1 according to the embodiment and components included in the simulation system 1. As an example, the simulation system 1 includes a simulation device 100 and a robot 200.
[0020] The simulation device 100 and the robot 200 are connected to, for example, a network NW. 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). In addition, the network NW may be a wireless line or a wired line, or a mixture of wireless lines and wired lines. In addition, the network NW may also be a communication network including a dedicated line or a public mobile phone network.
[0021] The simulation device 100 is a device for performing an off-line simulation of the robot 200. As an example, the simulation device 100 includes 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. In addition, a bus 108 or the like connects these components.
[0022] The processor 101 is the core part of the computer that performs the operations and control required for the operation of the simulation device 100, and performs various operations and processes. The processor 101 is, for example, a CPU (central processing unit), an MPU (micro processing unit), an SoC (system on a chip), a DSP (digital signal processor), a GPU (graphics processing unit), an ASIC (application specific integrated circuit), a PLD (programmable logic device), or an FPGA (field-programmable gate array). Alternatively, the processor 101 is a combination of multiple of these. In addition, the processor 101 can also be a combination of these and a hardware accelerator. The processor 101 controls each part based on the firmware, system software, and application software programs stored in the ROM 102 or the auxiliary storage device 104, etc., to realize the various functions of the simulation device 100. In addition, the processor 101 performs the processing described later based on the program. Furthermore, part or all of the program may be incorporated into the circuit of the processor 101 .
[0023] The ROM 102 and the RAM 103 are main storage devices of a computer with the processor 101 as a core.
[0024] The ROM 102 is a nonvolatile memory dedicated to reading data. The ROM 102 stores, for example, firmware and the like among the above-mentioned programs. In addition, the ROM 102 also stores data and the like used by the processor 101 in performing various processes.
[0025] The RAM 103 is a memory for reading and writing data. The RAM 103 is used as a work area or the like for storing data temporarily used by the processor 101 for performing various processes. The RAM 103 is typically a volatile memory.
[0026] The auxiliary storage device 104 is an auxiliary storage device of a computer with the processor 101 as the core. The auxiliary storage device 104 is, for example, an EEPROM (electric erasable programmable read-only memory), an HDD (hard disk drive), or a flash memory. The auxiliary storage device 104 stores the above-mentioned programs, such as system software and application software. In addition, the auxiliary storage device 104 stores data used by the processor 101 for various processing, data generated by the processing of the processor 101, and various setting values.
[0027] In addition, the auxiliary storage device 104 also stores operation programs of the robot 200 and the like.
[0028] The input device 105 receives an operation performed by an operator (hereinafter simply referred to as "operator") of the simulation apparatus 100. The input device 105 is, for example, a keyboard, a keypad, a touch panel, a mouse, or a controller. Alternatively, the input device 105 may be a device for voice input.
[0029] The display device 106 displays a screen for notifying the operator of various information. The display device 106 is, for example, a display such as a liquid crystal display or an organic EL (electro-luminescence) display. In addition, a touch panel may be used as the input device 105 and the display device 106. That is, the display panel of the touch panel can be used as the display device 106, and the pointing device (pointing device) based on touch input of the touch panel can be used as the input device 105.
[0030] The communication interface 107 is an interface used by the simulation device 100 to communicate via the network NW or the like.
[0031] The bus 108 includes a control bus, an address bus, a data bus, and the like, and transmits signals sent and received by various components of the simulation device 100 .
[0032] The robot 200 is, for example, a manipulator, a robot arm, or a robot equipped with these. The robot 200 is, for example, a multi-joint robot. As an example, the robot 200 includes one or more driving units 201 .
[0033] The driving unit 201 is driven by a motor such as a servo motor, etc. The driving unit 201 is driven to rotate around a driving shaft, for example.
[0034] Below, based on Figure 2 and Figure 3 The operation of the simulation system 1 according to the embodiment will be described below. The contents of the processing in the following operation description are just examples, and various processing that can obtain the same result can be used as appropriate. Figure 2 and Figure 3 1 is a flowchart showing an example of processing performed by the processor 101 of the simulation device 100. The processor 101 executes, for example, based on a program stored in the ROM 102 or the auxiliary storage device 104. Figure 2 and Figure 3 processing.
[0035] exist Figure 2 In step ST11, the processor 101 of the simulation device 100 determines whether to execute the simulation of the action program of the robot 200. For example, when there is an action program that has not been simulated, the processor 101 determines to execute the simulation of the action program. For example, when it becomes a predetermined moment, when there is an action program that has not been simulated, the processor 101 determines to execute the simulation of the action program. For example, when there is an input for instructing the execution of the simulation of the action program, the processor 101 determines to execute the simulation of the action program. The input of the instruction is based on, for example, the operation input of the input device 105 by the operator. Alternatively, information indicating the instruction is input to the simulation device 100 from another device via the communication interface 107. If it is not determined to execute the simulation of the action program, the processor 101 determines no in step ST11 and repeats the processing of step ST11. Then, if the processor 101 determines to execute the simulation of the action program, it determines yes in step ST11 and proceeds to step ST12.
[0036] In step ST12, the processor 101 determines the action program to be simulated. Then, the processor 110 acquires the action program from the auxiliary storage device 104 or other devices. Hereinafter, the action program finally acquired in the process of step ST12 is referred to as an "acquired program".
[0037] The processor 101 selects an action program from the action programs that have not yet been simulated, and determines it as the action program to be simulated. The processor 101 determines which action program is to be simulated, for example, based on an input for indicating an object to be simulated. The input for indicating the object is based on, for example, an operation input to the input device 105 by an operator. Alternatively, information for indicating the object is input to the simulation device 100 from another device via the communication interface 107.
[0038] In step ST13, the processor 101 parses the acquisition program. The processor 101 investigates how many execution modes the acquisition program has by parsing the acquisition program. For example, the processor 101 reads the acquisition program, and when there are branches, each branch increases the count of the number of modes by (number of branches - 1). In addition, the number of branches refers to the number of branches at a branch. Branches include, for example, IF statements and CASE statements. If it is an IF statement, the number of branches is generally 2. If it is a CASE statement, the number of branches is greater than 2. In addition, in the case where the acquisition program contains a loop that may become an infinite loop, the processor 101 will not count the branch point that will enter the loop into the number of branches. In addition, the branch point that will enter the loop refers to the branch point that will definitely execute the loop until the acquisition program ends.
[0039] The action program consisting of the function named "LOOP" shown below is an example of an action program that includes a loop that may become an infinite loop. In the code of the action program shown in this specification and the drawings, the number to the left of ":" indicates the line number of the function. The 4th line of the function "LOOP" is a branch of the IF statement. The IF statement branches into the case where DI[1]=ON is true and the case where DI[1]=ON is false. Among them, the branch point when DI[1]=ON is true includes a command to jump to LABEL[1] on the 2nd line. When the processor executing the function "LOOP" jumps to the 2nd line, it will execute the 4th line again. In other words, when DI[1]=ON, it becomes an infinite loop. Therefore, with respect to the IF statement on the 4th line, the branch point when DI[1]=ON is true is a branch point that will enter a loop that may become an infinite loop.
[0040] LOOP
[0041] 1:POSITION[1]100%
[0042] 2:LABEL[1]
[0043] 3:POSITION[2]100%
[0044] 4:IF(DI[1]=ON)THEN JUMP LABEL[1]
[0045] 5:END
[0046] In addition, the processor 101 stores the execution mode of the acquisition program in the RAM 103 or the auxiliary storage device 104, etc., for example, in a tree structure. The tree structure is that each branch in the acquisition program represents an internal node. In addition, the end of the acquisition program represents a leaf node. In addition, an internal node is a node with child nodes. A leaf node is a node without child nodes.
[0047] Furthermore, the processor 101 generates the tree structure in such a manner that no branch point that would lead to a loop that could become an infinite loop is included.
[0048] Furthermore, the processor 101 analyzes the acquired program to check whether the acquired program is an operating program without an operating command. The operating command is a command for operating the driving unit 201 of the robot 200 .
[0049] The motion program consisting of the function named "RESET SIGNAL" shown below is an example of a motion program without motion commands. The motion program shown below does not include motion commands. Therefore, even if the motion program shown below is executed, the driving unit 201 of the robot 200 does not operate.
[0050] RESET SIGNAL
[0051] 1:DO[1]=OFF
[0052] 2:DO[2]=OFF
[0053] 3:DO[3]=OFF
[0054] 4:DO[4]=OFF
[0055] 5:DO[5]=OFF
[0056] In step ST14, the processor 101 selects an execution mode from the execution modes investigated in step ST13. The processor 101 selects the execution mode by, for example, selecting a leaf node in the tree structure. The execution mode is a mode that advances along the branch from the root node to the leaf node without going back. In addition, the processor 101 indicates which execution mode is being selected, for example, by setting each node included in the execution mode to a selected state.
[0057] Among them, it is preferred that, when there is an execution mode being selected, the processor 101 selects an execution mode close to the execution mode. The case where there is an execution mode being selected refers to the case where the execution mode selected in the previous processing of step ST14 has not been deselected. In addition, when the processor 101 selects an execution mode close to the selected execution mode, it is preferred that the execution mode is selected by changing the deepest possible node from the unselected state to the selected state.
[0058] The processor 101 selects an execution mode similar to the currently selected execution mode by executing, for example, the following processes (A1) to (A3).
[0059] (A1) The processor 101 changes the deepest node among the nodes in the selection state from the selection state to the selection completed state. Then, the processor 101 proceeds to (A2).
[0060] (A2) When the deepest node among the nodes in the selection state has a child node in the unselected state, the processor 101 sets one of the child nodes in the unselected state to the selection state and proceeds to (A3). When the deepest node among the nodes in the selection state does not have a child node in the unselected state, the processor 101 returns to (A1). In addition, the node having no child node in the unselected state also includes the case where the node has no child node, that is, the node is a leaf node.
[0061] (A3) If the node that was last set to the selected state in (A2) or (A3) has a child node, the processor 101 sets the child node to the selected state and repeats (A3). Conversely, if the node that was last set to the selected state in (A2) or (A3) has no child node, the processor 101 completes the selection of the execution mode.
[0062] In step ST15 , the processor 101 determines the state of the variable in order to perform a simulation of the operation of the robot 200 when the acquisition program is executed in the selected execution mode.
[0063] The method of determining the value of a variable is described using an action program consisting of a function named "MAIN" and a function named "SUBPROG" shown below. In addition, the function "MAIN" is the function that is first called when the action program is executed. The function "SUBPROG" is a function called by the function "MAIN". In addition, regarding the function "SUBPROG", lines 3 to 9 are omitted by replacing them with "...". In addition, it is assumed that there is no branch in lines 3 to 9.
[0064] MAIN
[0065] 1:POSITION[1]100%
[0066] 2:POSITION[2]100%
[0067] 3:IF(DI[1]=ON)THEN CALL SUBPROG
[0068] 4:POSITION[1]100%
[0069] 5:END
[0070] SUBPROG
[0071] 1:POSITION[1]100%
[0072] 2:IF(DI[2]=ON)THEN JUMP LABEL[1]
[0073] …
[0074] 10:END
[0075] 11:LABEL[1]
[0076] 12:POSITION[2]100%
[0077] 13:END
[0078] This action program includes two branches, which are the IF statement in the third line of the function "MAIN" and the IF statement in the second line of the function "SUBPROG".
[0079] The IF statement in line 3 of the function "MAIN" branches into the case where DI[1]=ON is true and the case where DI[1]=ON is false. The IF statement in line 2 of the function "SUBPROG" branches into the case where DI[2]=ON is true and the case where DI[2]=ON is false.
[0080] The function "SUBPROG" is called only when the IF statement in the third line of the function "MAIN" is true. Therefore, this action program has the following three execution modes (B1) to (B3).
[0081] (B1) The IF statement in line 3 of the "MAIN" function is true.
[0082] (B2) The case where the IF statement in line 3 of the function "MAIN" is false, and the IF statement in line 2 of the function "SUBPROG" is true.
[0083] (B3) The case where the IF statement in the third line of the function "MAIN" is false, and the IF statement in the second line of the function "SUBPROG" is false.
[0084] In order for the action program to be in the execution mode (B1), the value of variable DI[1] must be ON. If the value of variable DI[1] is ON, the execution mode will be (B1) regardless of the value of variable DI[2].
[0085] In order for the action program to be in the execution mode (B2), the value of the variable DI[1] must not be ON and the value of the variable DI[2] must be ON.
[0086] In order for the action program to be in the execution mode (B3), the value of the variable DI[1] must not be ON and the value of the variable DI[2] must not be ON.
[0087] In addition, the so-called case where the value of a variable V1 is not a certain value X1, in addition to the case where the value of the variable V1 is a value other than X1, may also include the case where the variable V1 is not filled with a value, the case where the variable V1 is null (empty value), and other various states other than the value X1.
[0088] That is, when simulating the action program in the execution mode (B2), the processor 101 sets the variable DI[1] to a non-ON state and sets the variable DI[2] to an ON state. Similarly, the processor 101 determines the state of each variable according to the acquisition program to be executed and the execution mode.
[0089] In addition, for example, in the case of an action program in which the state of a variable changes in the middle, the processor 101 determines the initial state of the variable. For example, the action program includes an IF statement, and it is assumed that the IF statement is true when the value of the variable X2 is 1. Moreover, it is assumed that the action program includes a statement X2=X2+1 before the IF statement, which increases the value of the variable X2 by 1, and does not include any other statement that changes the value of the variable X2. In this case, if the initial value of the variable X2 is 0, the IF statement becomes true. Therefore, in this case, the processor 101 sets the state of the variable X2 to a state of 0 when it wants to make the IF statement true. Then, the processor 101 sets the state of the variable X2 to a state of a value other than 0 when it wants to make the IF statement true.
[0090] However, no matter what state you set each variable to, there may be cases where the acquired program cannot be executed in the selected execution mode. For example, consider rewriting the IF statement in line 2 of the function "SUBPROG" to
[0091] 2:IF(DI[1]=ON)THEN JUMP LABEL[1]
[0092] situation.
[0093] In this case, no matter what value is set to the variable DI[1], the action program cannot be executed in the execution mode (B2) because if the IF statement in the third line of the function "MAIN" is false, then the IF statement in the second line of the function "SUBPROG" must be false.
[0094] When the acquisition program cannot be executed in the selected execution mode regardless of the state of each variable, the processor 101 does not determine the state of the variable, for example.
[0095] In step ST16, the processor 101 determines whether the state of the variable is determined in the process of step ST15. If the state of the variable is determined, the processor 101 determines YES in step ST16 and proceeds to step ST17.
[0096] In step ST17, the processor 101 sets the variables to the states determined in step ST15 and executes the acquisition program to simulate the operation of the robot 200. Thus, the processor 101 simulates the operation of the robot 200 when the acquisition program is executed in the selected execution mode.
[0097] The processor 101 performs simulation by calculating the motion of the virtual robot 200 in a virtual space, for example. The processor 101 calculates the motion of the driving unit 201 of the virtual robot 200 based on an acquisition program, for example, to thereby calculate the motion of the virtual robot 200.
[0098] In addition, the processor 101 also calculates the trajectory of the robot 200 during the simulation. The processor 101 regards the trajectory of the robot 200 as the point where, for example, an arbitrary point of the robot 200 such as the tip of the arm of the robot 200 passes.
[0099] In addition, the processor 101 also calculates the action time and execution time of the action of the robot 200 in the simulation. The processor 101 calculates the action time for each command included in the action program. In addition, the execution time is the action time from the start to the end of the action of the action program. That is, the execution time is the total of the action time of each command.
[0100] In addition, the processor 101 investigates whether the acquired program is an action program with a short execution time during the simulation. For example, when the execution time of the acquired program is less than a predetermined threshold value TH1, the processor 101 determines that the acquired program is an action program with a short execution time. The length of the threshold value TH1 is predetermined by, for example, an administrator or designer of the simulation system 1. In addition, when the action program includes a plurality of execution modes, the processor 101 determines that the action program is an action program with a short execution time, for example, when the execution time of all execution modes of the action program is less than the threshold value TH1.
[0101] In addition, the processor 101 may calculate the operation time for each line instead of each command. Alternatively, the processor 101 may calculate the operation time for each other unit.
[0102] The motion time and the execution time are examples of the time taken for the robot to move.
[0103] In step ST18 , the processor 101 stores the simulation result of step ST17 in the RAM 103 or the auxiliary storage device 104 , etc., so that the execution mode used can be known. The simulation result includes the movement, trajectory, and operation time of the virtual robot 200 .
[0104] If the state of the variable is not determined in step ST15, the processor 101 determines NO in step ST16 and proceeds to step ST19. That is, the processor 101 does not perform simulation using the selected execution mode when the acquisition program cannot be executed in the selected execution mode regardless of the state of each variable.
[0105] In step ST19 , the processor 101 stores in the RAM 103 or the auxiliary storage device 104 or the like that the selected execution mode is not executable.
[0106] After processing step ST18 or step ST19, the processor 101 proceeds to step ST20.
[0107] In step ST20, the processor 101 determines whether to end the simulation. For example, the processor 101 determines that the simulation is to be ended when all execution modes have been selected. For example, the processor 101 considers that all execution modes have been selected when all nodes are not in an unselected state. For example, the processor 101 considers that all execution modes have been selected when all leaf nodes are not in an unselected state. If the processor 101 does not determine that the simulation is to be ended, it determines in step ST20 as no, and returns to step ST14. Conversely, if the processor 101 determines that the simulation is to be ended, it determines in step ST20 as yes, and proceeds to step ST14. Figure 3 Step ST21.
[0108] In this manner, the processor 101 repeats the processing of step ST14 to step ST20 , thereby executing simulations of all execution modes except for the execution mode that cannot be executed for the acquired program.
[0109] According to the above, the processor 101 functions as an example of a simulation unit by performing the processing of steps ST14 to ST20. The simulation unit changes the state of the variable in the action program for causing the robot to move and including branches that move to different branch points according to the state of the variable so as to move to different branch points, thereby simulating the action of the robot in each case of moving to a plurality of different branch points.
[0110] In step ST21, the processor 101 selects an execution mode from the execution modes of the acquired program. The processor 101 selects the execution mode from the execution modes other than the execution mode that cannot be executed. The execution mode selected in the process of step ST21 is hereinafter referred to as a "selected mode".
[0111] The processor 101 selects an execution mode at random, for example. Alternatively, the processor 101 may select an execution mode whose simulation result satisfies a predetermined condition. When there are multiple execution modes that satisfy the condition, the processor 101 randomly selects from the execution modes that satisfy the condition. Alternatively, when there are multiple execution modes that satisfy the condition, the processor 101 selects, for example, an execution mode with the best condition. When there is no execution mode that satisfies the condition, the processor 101 selects, for example, an execution mode that is closest to the condition.
[0112] The predetermined condition for selecting the execution mode is set by, for example, a designer, manager, or operator of the simulation device 1. Examples of the condition are shown below: (C1) to (C9). In addition, the condition may be a composite condition obtained by combining the following conditions.
[0113] (C1) The execution time is equal to or longer than a predetermined threshold value TH2.
[0114] (C2) The execution time is equal to or less than a predetermined threshold value TH3.
[0115] (C3) The trajectory passes through the specified position.
[0116] (C4) The trajectory does not pass through the specified position.
[0117] (C5) The length of the trajectory is less than or equal to a predetermined threshold value TH4.
[0118] (C6) The length of the trajectory is equal to or greater than a predetermined threshold value TH5.
[0119] (C7) The driving range of the driving unit 201 during the operation of the virtual robot 200 is within a predetermined range.
[0120] (C8) The posture of the virtual robot 200 during operation is within a predetermined range.
[0121] (C9) The virtual robot 200 performs a predetermined action.
[0122] In addition, when there are multiple execution modes that meet the conditions, the processor 101 may also select any one of the multiple execution modes when the trajectories of the actions are similar. The processor 101 considers the two trajectories to be similar when the distance between them is less than a specified value. For example, the processor 101 calculates the Euclidean distance between each position per unit time, and regards the average value as the distance between the two trajectories. Alternatively, the processor 101 performs a time integration of the Euclidean distance of the two trajectories in the range of 0 seconds to the execution time and divides it by the execution time to obtain a value that is regarded as the distance between the two trajectories. In addition, the trajectory used for time integration is a function of time. Alternatively, the processor 101 considers the two trajectories to be similar when the Euclidean distance between the two trajectories is always within a specified distance.
[0123] In step ST22, processor 101 generates Figure 4 The image corresponding to the result screen SC1 is shown. Then, the processor 101 instructs the display device 106 to display the generated image. The display device 106 receives the display instruction and displays the result screen SC1.
[0124] Figure 4 1 is a diagram showing an example of a result screen SC1 displayed on the display device 106 .
[0125] The result screen SC1 is a screen for displaying information about the selected mode. The information includes, for example, simulation results of the selected mode, etc. As an example, the result screen SC1 includes areas AR1 to AR5, an end button B1, and a regeneration button B2.
[0126] The area AR1 is an area for displaying a name indicating an acquisition program such as a function name or a program name.
[0127] Area AR2 is an area for displaying the contents of the acquisition program and the operation time of each command. Area AR2 includes area AR21 and area AR22.
[0128] Area AR21 is an area for displaying the contents of the acquisition program. Area AR21 displays the acquisition program by each command or line, for example. In addition, area AR21 displays only the portion of the acquisition program that is executed in the selection mode. Alternatively, area AR21 may display the entire acquisition program.
[0129] The area AR22 is an area for displaying the operation time related to the acquisition program. The area AR22 displays the operation time for each command or each line, for example.
[0130] Area AR3 is an area for displaying the execution time of the acquisition program.
[0131] Area AR4 is an area for displaying which branch point the selection mode advances to at the branch included in the acquisition program displayed in area AR1. In addition, area AR4 is a button for the operator to operate when instructing the simulation device 100 to display the result of advancing to another branch at the branch. In other words, area AR4 is a button for the operator to operate when instructing the simulation device 100 to change the selection mode. The result screen SC1 includes areas AR4 corresponding to the number of branches. Figure 4 , the number of areas AR4 is one.
[0132] The area AR5 is an area for displaying the simulation result of the selected mode. The area AR5 displays, for example, the virtual robot OB1 and the trajectory OB2 in the virtual space.
[0133] The virtual robot OB1 is a virtual robot 200. The virtual robot OB1 is an image or a 3D (three-dimensional) object or the like.
[0134] The trajectory OB2 is an image or a 3D object, etc., which represents a simulation of the trajectory in the selection mode. The processor 101 generates the trajectory OB2 based on the simulation result of the selection mode.
[0135] The end button B1 is a button for the operator to operate when instructing the simulation device 100 to end the display of the result screen SC1 .
[0136] The playback button B2 is a button that is operated by the operator to instruct the simulation device 100 to play back a moving image or the like (hereinafter referred to as a “simulation moving image”) showing a simulation result.
[0137] In step ST23, the processor 101 determines whether an operation for ending the display of the result screen SC1 has been performed. That is, the processor 101 determines whether a predetermined operation such as operating the end button B1 has been performed. If an operation for ending the display of the result screen SC1 has not been performed, the processor 101 determines no in step ST23 and proceeds to step ST24.
[0138] In step ST24, the processor 101 determines whether an operation for reproducing the simulated moving image has been performed. That is, the processor 101 determines whether a predetermined operation such as operating the reproducing button B2 has been performed. If an operation for reproducing the simulated moving image has not been performed, the processor 101 determines no in step ST24 and proceeds to step ST25.
[0139] In step ST25, the processor 101 determines whether an operation for changing the selection mode has been performed. That is, the processor 101 determines whether a predetermined operation such as an operation on the area AR4 has been performed. If an operation for changing the selection mode has not been performed, the processor 101 determines no in step ST25 and returns to step ST23. In this way, the processor 101 enters a standby state of repeating steps ST23 to ST25 until an operation for instructing to end the display of the result screen SC1, an operation for instructing to reproduce the simulated moving image, or an operation for instructing to change the selection mode is performed.
[0140] As described above, the processor 101 performs the process of step ST25 in cooperation with the input device 105 , thereby functioning as an example of an input unit that receives an input for indicating the state of the variable.
[0141] If an operation for instructing to end the display of the result screen SC1 is performed in the standby state of steps ST23 to ST25, the processor 101 determines YES in step ST23 and proceeds to step ST11.
[0142] If an operation for instructing reproduction of a pseudo-moving image is performed in the standby state of steps ST23 to ST25 , processor 101 determines YES in step ST24 and proceeds to step ST26 .
[0143] In step ST26, the processor 101 reproduces a simulated moving image showing the simulation result of the selected mode in the area AR5. The simulated moving image may be a 2D (two-dimensional) moving image or a 3D moving image. In the case of a 3D moving image, the simulated moving image may be capable of changing the viewpoint. The simulated moving image is a moving image in which the virtual robot OB1 moves according to the simulation result.
[0144] The processor 101 may generate the simulated moving image in advance before the playback button B2 is operated, or may generate the simulated moving image after the playback button B2 is operated.
[0145] If an operation for instructing to change the selection mode is performed in the standby state of steps ST23 to ST25 , the processor 101 makes a YES determination in step ST25 and proceeds to step ST27 .
[0146] In step ST27, processor 101 changes the selection mode to the mode instructed by the operation on area AR4. Then, processor 101 displays result screen SC1 corresponding to the new selection mode in the same manner as in step ST23. After step ST27, processor 101 returns to step ST23.
[0147] As described above, the processor 101 performs the process of step ST27 in cooperation with the display device 106 , thereby functioning as an example of a display unit that displays a result of a simulation using a state of a variable according to an instruction input to the input unit.
[0148] According to the simulation system 1 of the embodiment, the simulation device 100 automatically simulates the operation program in a plurality of execution modes. Therefore, the simulation device 100 of the embodiment can simulate the operation of the robot without human judgment of branching, thereby reducing human man-hours and labor.
[0149] Furthermore, according to the simulation system 1 of the embodiment, the simulation device 100 calculates the trajectory of the operation of the robot 200 for each execution mode. This allows an operator or the like to check the trajectory of each execution mode.
[0150] According to the simulation system 1 of the embodiment, the simulation device 100 calculates the operation time and the execution time for each execution mode. This allows an operator or the like to check the operation time and the execution time for each execution mode.
[0151] Furthermore, according to the simulation system 1 of the embodiment, the simulation apparatus 100 displays the simulation result of the execution mode according to the input by the operator on the display device 106. Thus, the operator can confirm the simulation result of the desired execution mode.
[0152] In addition, according to the simulation system 1 of the embodiment, the simulation device 100 displays a moving image showing a simulation result. Thus, the simulation device 100 can convey the simulation result to an operator or the like in an easily understandable manner.
[0153] In addition, according to the simulation system 1 of the embodiment, the simulation device 100 automatically selects the execution mode based on the predetermined conditions. Thus, the simulation device 100 can display the simulation results of the execution mode corresponding to the predetermined conditions.
[0154] The above-mentioned embodiment can also be modified as follows.
[0155] The processor 101 may include a branch point in the tree structure that may lead to a loop that may become an infinite loop. In this case, the processor 101 does not select such a branch point in step ST14, for example.
[0156] The processor 101 may not count the branch point that will enter the last returned command, even though it is a loop that is unlikely to become an infinite loop, into the number of branches. In this way, it is not necessary to analyze whether the last returned command is likely to become an infinite loop. In addition, the branch point that enters the last returned command refers to the branch point that will definitely execute the command until the action program ends.
[0157] The processor 101 may also simulate an execution pattern including a branch point that may lead to a loop that may become an infinite loop. In this case, the processor 101 performs the simulation until the number of executions of the loop reaches a predetermined number or more, for example.
[0158] The processor 101 may determine a plurality of operating programs as operating programs to be simulated in step ST12. In this case, the plurality of operating programs are all acquisition programs. When there are a plurality of acquisition programs, the processor 101 executes the processing of steps ST14 to ST20 for each acquisition program.
[0159] In the case where there are multiple acquisition programs, the processor 101 selects an acquisition program in step ST21. Then, the processor 101 selects an execution mode from the execution modes of the selected acquisition programs. The processor 101 selects an acquisition program at random, for example. Alternatively, the processor 101 may also select an acquisition program that satisfies a predetermined condition. In the case where there are multiple acquisition programs that satisfy the condition, the processor 101 randomly selects an acquisition program from the acquisition programs that satisfy the condition. Alternatively, for example, in the case where there are multiple acquisition programs that satisfy the condition, the processor 101 selects the acquisition program with the best condition. In the case where there is no acquisition program that satisfies the condition, the processor 101 selects, for example, an acquisition program that is closest to the condition.
[0160] The predetermined conditions for selecting the acquisition program are set by, for example, the designer, manager, or operator of the simulation device 1. Examples of the conditions are shown below: (D1) to (D3). In addition, the conditions may be a composite condition obtained by combining the following conditions.
[0161] (D1) It is not an action program without an action command.
[0162] (D2) It is not an action program with a short execution time.
[0163] (D3) is an action program with a short execution time.
[0164] As described above, by performing the process of step ST21 , the processor 101 functions as an example of a selection unit that automatically selects at least one of a program selected from a plurality of programs and a state of a variable based on a predetermined condition.
[0165] According to the simulation system 1 of the embodiment, the simulation device 100 automatically selects an acquisition program based on a predetermined condition. Thus, the simulation device 100 can display a simulation result of the acquisition program corresponding to the predetermined condition.
[0166] The processor 101 may generate a tree structure in such a manner as not to include an unexecutable operation pattern during program analysis.
[0167] The processor 101 may also simulate an execution mode that cannot be executed by changing the state of a variable during the process.
[0168] The processor 101 may automatically reproduce the simulated moving image along with the display of the result screen SC1 .
[0169] The processor 101 may implement part or all of the processing implemented by the program in the above-mentioned embodiments by a hardware configuration of a circuit.
[0170] The program for implementing the processing of the embodiment is transferred in a state of, for example, a non-transitory recording medium stored in the device. However, the device may be transferred in a state where the program is not stored. Moreover, the program may be transferred separately and written into the device. The transfer of the program in this case can be achieved, for example, by recording it in a removable and non-transitory storage medium, or by downloading it via a network such as the Internet or a LAN.
[0171] Although the embodiments of the present invention have been described above, they are shown as examples and do not limit the scope of the present invention. The embodiments of the present invention can be implemented in various forms within the scope not departing from the gist of the present invention.
[0172] Description of Reference Numerals
[0173] 1: simulation system; 100: simulation device; 101: processor; 102: ROM; 103: RAM; 104: auxiliary storage device; 105: input device; 106: display device; 107: communication interface; 108: bus; 200: robot; 201: drive unit; OB1: virtual robot; OB2: trajectory.
Claims
1. A simulation device comprising a simulation unit, wherein the simulation unit changes the state of a variable in an action program for causing a robot to move and includes branches that move to different branch points according to the state of a variable so as to move to different branch points, thereby simulating the movement of the robot in each case where the robot moves to a plurality of different branch points.
2. The simulation device according to claim 1, wherein: The simulation unit calculates a trajectory of the movement of the robot in the simulation.
3. The simulation device according to claim 1, wherein: The simulation unit calculates a time taken for the operation of the robot in the simulation.
4. The simulation device according to claim 1, wherein: Also available: an input portion that receives an input indicating a state of the variable; and A display unit displays a result of the simulation using the state of the variable according to the instruction input to the input unit.
5. The simulation device according to claim 1, wherein: A display unit is further provided for displaying a moving image showing a result of the simulation.
6. The simulation device according to claim 1, wherein: The method further includes a selection unit configured to automatically select at least one of the program selected from the plurality of programs and the state of the variable based on a predetermined condition.
7. A program for causing a processor included in a simulation device to function as a simulation unit. The simulation unit changes the state of a variable in an action program for causing a robot to move and includes branches that proceed to different branch points according to the state of a variable, thereby simulating the action of the robot in each case of proceeding to multiple different branch points.
Citation Information
Patent Citations
Simulation system that performs simulation according to robot program
JP2014144524A