Robot offset simulation method and device, electronic equipment and storage medium
By establishing a baseline path in the simulation software and automatically offsetting it, the problem of simulation engineers repeatedly establishing paths is solved, achieving efficient simulation of the robot grasping the battery cell and shortening the debugging cycle.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CONTEMPORARY AMPEREX TECHNOLOGY CO LTD
- Filing Date
- 2022-04-19
- Publication Date
- 2026-06-02
Smart Images

Figure CN115816436B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of virtual simulation technology, and in particular to a simulation method, apparatus, robot, electronic device and storage medium for robot displacement. Background Technology
[0002] Currently, technologies such as virtual simulation are typically used to verify the feasibility of robot product solutions and optimize logic in advance. Virtual simulation technology utilizes methods such as offline robot programs to meet debugging needs. Offline robot programs play a crucial role in the field of intelligent manufacturing; after importing the offline robot program into a real robot controller, the robot can perform tasks identical to those in the simulation environment by running the offline program.
[0003] However, currently, in order to enable robots to grasp battery cells at different locations, simulation engineers can only repeatedly perform the same tasks, which leads to simulation engineers doing a lot of unnecessary and repetitive work and increasing the debugging cycle. Summary of the Invention
[0004] The purpose of this invention is to provide a method, apparatus, robot, electronic device, and storage medium for simulating robot offset, thereby reducing the debugging cycle while simulating robot offset.
[0005] In a first aspect, this application provides a simulation method for robot offset, comprising: establishing a reference path for a virtual robot in simulation software; wherein the reference path is the path by which the virtual robot starts from a preset starting point, moves a reference object to a target position, and then returns to the preset starting point; receiving position information of a target object sent by a PLC; determining the offset of the virtual robot based on the position information; wherein the offset is the position offset of the target object relative to the reference object; and controlling the virtual robot to move to transfer the target object based on the reference path and the offset.
[0006] In the technical solution of this application embodiment, by establishing a reference path for the virtual robot in the simulation software, the virtual robot can automatically offset based on the position information of the target object when transferring the target object, so as to realize the transfer of the target object without having to repeat the same work, such as not having to repeatedly establish multiple transfer paths. Therefore, the debugging cycle can be reduced.
[0007] In some embodiments, the location information of the target object includes: the layer number, row number, and column number of the target object; determining the offset of the virtual robot based on the location information includes: determining the row spacing and column spacing between adjacent objects on the virtual tray, and determining the layer spacing between adjacent stacked virtual trays; determining the offset of the virtual robot based on the layer number, the row number, the column number, the row spacing, the column spacing, and the layer spacing.
[0008] In the technical solution of this application embodiment, considering that objects placed on the virtual tray usually have the same row spacing, column spacing and layer spacing, the layer number, row number and column number of the target object are used as its position information. Combined with the layer number, row number, column number, row spacing, column spacing and layer spacing of the target object, the offset can be obtained effectively and accurately.
[0009] In some embodiments, the offset includes: an offset in the x-axis direction, an offset in the y-axis direction, and an offset in the z-axis direction; determining the offset of the virtual robot based on the layer number, the row number, the column number, the row spacing, the column spacing, and the layer spacing includes: calculating the offset in the x-axis direction based on the column number of the target object, the column number of the reference object, and the column spacing; calculating the offset in the y-axis direction based on the row number of the target object, the row number of the reference object, and the row spacing; and calculating the offset in the z-axis direction based on the layer number of the target object, the layer number of the reference object, and the layer spacing.
[0010] In the technical solution of this application embodiment, the offset in different directions can be accurately calculated to accurately realize the automatic offset of the virtual robot in different directions and achieve accurate transfer of the target object.
[0011] In some embodiments, determining the row spacing and column spacing between adjacent objects on a virtual tray, and determining the layer spacing between stacked adjacent virtual trays, includes receiving the row spacing and column spacing between adjacent objects on a virtual tray, and the layer spacing between stacked adjacent virtual trays, input through a human-computer interaction interface.
[0012] In the technical solution of this application embodiment, the row spacing, column spacing, and layer spacing can be determined simply, conveniently, and directly through the human-computer interaction interface.
[0013] In some embodiments, controlling the virtual robot to move to transfer the target object based on the reference path and the offset includes: controlling the virtual robot to move to the position of the reference object based on the reference path; and controlling the virtual robot to automatically offset by the offset when the virtual robot moves to the position of the reference object to transfer the target object.
[0014] In the technical solution of this application embodiment, the virtual robot can move to the position of the reference object under the guidance of the reference path, and automatically offset at the position of the reference object to achieve accurate transfer of the target object.
[0015] In some embodiments, after controlling the virtual robot to move to transfer the target object according to the reference path and the offset, the method further includes: sending a signal to the PLC that the transfer of the target object is complete; receiving new target object position information sent by the PLC; and continuing to control the virtual robot to move to transfer the new target object.
[0016] In the technical solution of this application embodiment, a virtual robot can automatically and continuously transfer target objects at different positions.
[0017] In some embodiments, when there are still untransferred objects on the reference virtual tray carrying the reference object, the new target object is the untransferred object; when there is an empty virtual tray that does not carry any objects, the new target object is the object carried by the virtual tray located below the empty virtual tray.
[0018] In the technical solution of this application embodiment, the virtual robot can automatically and continuously transfer target objects at different positions, and transfer the target objects on each virtual tray from top to bottom according to the stacking order of the virtual trays, so as to realize the orderly transfer of target objects and shorten the time required to transfer all target objects.
[0019] In some embodiments, when there is an empty virtual tray that does not carry an object, the method further includes: receiving a tray transfer instruction sent by a PLC, and controlling the virtual robot to transfer the empty virtual tray to a target location according to the tray transfer instruction.
[0020] In the technical solution of this application embodiment, by transferring the empty virtual tray to the target location, the virtual robot can directly transfer the objects carried on the virtual tray under the empty virtual tray after the empty virtual tray is transferred.
[0021] In some embodiments, before establishing the baseline path of the virtual robot in the simulation software, the method further includes: importing an XML file into the simulation software; wherein the XML file integrates an offline program for automatic robot offset.
[0022] In the technical solution of this application embodiment, by importing an XML file that integrates an offline program for automatic robot offset into the simulation software, it is convenient to automatically and accurately simulate robot offset in the future.
[0023] In some embodiments, after controlling the virtual robot to move to transfer the target object according to the reference path and the offset, the method further includes: determining whether the virtual robot has successfully transferred N target objects, where N is a natural number greater than 1; if the virtual robot has successfully transferred N target objects, determining that the robot automatic offset offline program has passed verification, and exporting the verified robot automatic offset offline program; and importing the verified robot automatic offset offline program into a real robot.
[0024] In the technical solution of this application embodiment, by verifying the robot automatic offset offline program, the verified robot automatic offset offline program is imported into the real robot, so that the real robot can directly transfer battery cells based on the verified robot automatic offset offline program in the real field. That is, the robot automatic offset offline program exported in this application embodiment can be directly used in the field.
[0025] Secondly, this application provides a robot in which the aforementioned verified robot automatic offset offline program is imported.
[0026] Thirdly, this application provides a simulation device for robot offset, comprising: a setup module for setting up a reference path for a virtual robot in the simulation software; wherein the reference path is the path taken by the virtual robot from a preset starting point, after transferring a reference object, and then returning to the preset starting point; a receiving module for receiving position information of a target object sent by a PLC; a determining module for determining the offset of the virtual robot based on the position information; wherein the offset is the position offset of the target object relative to the reference object; and a control module for controlling the virtual robot to move to transfer the target object based on the reference path and the offset.
[0027] Fourthly, this application provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform a robot displacement simulation method as described in the first aspect.
[0028] Fifthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the simulation method for robot offset described in the first aspect.
[0029] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application. Attached Figure Description
[0030] Various other advantages and benefits will become apparent to those skilled in the art upon reading the detailed description of the preferred embodiments below. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of this application. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0031] Figure 1 This is a flowchart of a simulation method for robot offset mentioned in an embodiment of this application;
[0032] Figure 2 This is a schematic diagram of several virtual battery cells placed on a virtual tray, as mentioned in the embodiments of this application;
[0033] Figure 3 This is a schematic diagram illustrating the implementation process of step 103 mentioned in the embodiments of this application;
[0034] Figure 4 This is a flowchart of another simulation method for robot offset mentioned in the embodiments of this application;
[0035] Figure 5 This is a schematic diagram of a robot offset simulation device mentioned in the embodiments of this application;
[0036] Figure 6 This is a schematic diagram of the structure of the electronic device mentioned in the embodiments of this application. Detailed Implementation
[0037] The embodiments of the technical solution of this application will now be described in detail with reference to the accompanying drawings. These embodiments are only used to more clearly illustrate the technical solution of this application and are therefore merely examples, and should not be used to limit the scope of protection of this application.
[0038] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms “comprising” and “having”, and any variations thereof, in the specification, claims, and foregoing description of the drawings are intended to cover non-exclusive inclusion.
[0039] In the description of the embodiments of this application, technical terms such as "first" and "second" are used only to distinguish different objects and should not be construed as indicating or implying relative importance or implicitly specifying the number, specific order, or primary and secondary relationship of the indicated technical features. In the description of the embodiments of this application, "multiple" means two or more, unless otherwise explicitly defined.
[0040] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.
[0041] In the description of the embodiments in this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this document generally indicates that the preceding and following related objects have an "or" relationship.
[0042] In the description of the embodiments of this application, the term "multiple" refers to two or more (including two), similarly, "multiple sets" refers to two or more (including two sets), and "multiple pieces" refers to two or more (including two pieces).
[0043] In the description of the embodiments of this application, the technical terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are only for the convenience of describing the embodiments of this application and simplifying the description, and are not intended to indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on the embodiments of this application.
[0044] In the description of the embodiments of this application, unless otherwise expressly specified and limited, technical terms such as "installation," "connection," "joining," and "fixing" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. For those skilled in the art, the specific meaning of the above terms in the embodiments of this application can be understood according to the specific circumstances.
[0045] Currently, electric vehicles primarily use lithium batteries as their power source. Lithium batteries are characterized by high capacity, high output voltage, and good charge-discharge cycle performance. During the production process of lithium batteries, industrial robots are needed to handle products such as battery cells and modules. Typically, multiple battery cells in a cell tray require repeated handling and placement by industrial robots. These robots often achieve this by automatically shifting their coordinates to different locations.
[0046] The inventors have noted that currently, virtual simulation is used to verify the feasibility of a robot grasping battery cells and to optimize the logic. The robot's offline program is the robot's motion path planned and designed by simulation engineers in the simulation environment. After importing the offline program into the real robot controller, the robot can complete the same tasks as in the simulation environment by running the offline program. However, the robot palletizing program currently supported in Tecnomatix Process Simulate cannot achieve automatic offset positioning. To enable the robot to grasp battery cells at different locations, simulation engineers must repeatedly perform the same tasks. For example, each time the robot needs to grasp a battery cell at a certain location, the simulation engineer needs to create a grasping path to achieve the grasping of the battery cell at that location. This results in the simulation engineer having to repeatedly create multiple robot grasping paths and set signal conditions to grasp battery cells at different locations. This leads to simulation engineers performing a lot of redundant and repetitive work, increasing the debugging cycle.
[0047] To avoid simulation engineers performing many unnecessary and repetitive tasks and reduce debugging cycles, the applicant discovered through research that a baseline path can be established, allowing the virtual robot to automatically offset itself based on the position information of the target object when grasping it, thereby achieving the grasping of the target object without having to repeatedly establish multiple grasping paths, thus reducing debugging cycles.
[0048] The robot displacement simulation method disclosed in this application is applied to an electronic device that can be equipped with simulation software, such as Tecnomatix Process Simulator. For example, the electronic device can be a computer running Tecnomatix Process Simulator, which can simulate robot displacement. In a real-world scenario, the robot can be an industrial robot used to transfer a target object, which can be a physical product such as a battery cell or battery that needs to be transferred. In a simulation scenario, the robot can be a virtual robot, and the target object can be a virtual product such as a virtual battery cell or virtual battery that needs to be transferred. This application primarily implements the transfer of a target object by a virtual robot in a simulation scenario to facilitate subsequent verification of the rationality and accuracy of the virtual robot's transfer logic and its applicability to real-world scenarios. The robot transferring the target object can be understood as the process of the robot moving the target object from its current position to its destination position. Specifically, the robot can grasp the target object from its current position to its destination position to achieve the transfer. Alternatively, the robot can attract the target object using gravity to move it from its current position to its destination position. However, this embodiment does not limit the specific implementation method of the robot transferring the target object.
[0049] According to some embodiments of this application, the robot offset simulation method is applied to an electronic device equipped with simulation software, and a flowchart of the simulation method can be found in [reference needed]. Figure 1 ,include:
[0050] Step 101: Establish the baseline path of the virtual robot in the simulation software; wherein, the baseline path is the path of the virtual robot starting from the preset starting point, moving the reference object to the destination position, and then returning to the preset starting point.
[0051] Step 102: Receive the location information of the target object sent by the PLC.
[0052] Step 103: Determine the offset of the virtual robot based on the position information; where the offset is the position offset of the target object relative to the reference object.
[0053] Step 104: Based on the baseline path and offset, control the virtual robot to move and grab the target object.
[0054] In step 101, the reference object can be a virtual product that needs to be transferred by the virtual robot, such as a reference virtual battery cell or a reference virtual battery. This transfer can be achieved through the aforementioned grasping or gravitational attraction. The reference object can be one of several objects to be transferred. The following explanation uses a virtual battery cell as an example of several objects to be transferred:
[0055] Typically, several virtual battery cells to be transferred are placed on a virtual tray, and a single virtual tray can hold several virtual battery cells neatly and orderly. (See also...) Figure 2 , Figure 2 This is a schematic diagram of several virtual battery cells placed on a virtual tray. Each virtual battery cell can be labeled with a different number. Figure 2 In the example, a virtual tray holds 4 rows × 4 columns = 16 battery cells. In a practical implementation, several virtual trays containing virtual battery cells can be stacked to form a stack of virtual battery cells, i.e., a multi-layered virtual battery cell stack. The base virtual battery cell can be the one placed on the topmost virtual tray in the stack. For example, let's assume the virtual battery cell placed on the topmost virtual tray is... Figure 2 As shown, the virtual battery cell at the corner of the virtual tray can be selected as the reference virtual battery cell. For example, a virtual battery cell marked with 1, 4, 13 or 16 can be selected as the reference virtual battery cell so that the virtual robot can automatically and orderly shift to the position of other virtual battery cells at the position of the reference virtual battery cell to realize the transfer of other virtual battery cells.
[0056] The preset starting point can be the starting position where the virtual robot prepares to move, for example, to grab a virtual battery cell, and the destination position can be the final destination where the virtual battery cell needs to be grabbed. The preset starting point and destination position can be set according to actual needs, and the preset starting point and destination position can be the same position or different positions. This embodiment does not make specific limitations on this.
[0057] In some embodiments, the virtual robot and the virtual battery cell to be transferred by the virtual robot can be pre-created in the simulation interface of the simulation software. The virtual robot and the virtual battery cell on the simulation interface can be 3D models of the robot and the battery cell, respectively. The electronic device can select a reference virtual battery cell as a reference object from the virtual battery cells to be transferred by the virtual robot in the simulation interface, determine the destination position of the reference object to be transferred, use the position of the virtual robot in the simulation interface as a preset starting point, and establish a reference path for the virtual robot based on the preset starting point, the position of the reference object in the simulation interface, and the aforementioned destination position, so that the subsequent virtual robot can complete the transfer of the reference virtual battery cell along the reference path.
[0058] In step 102, the target object can be the object that the virtual robot is expected to transfer, i.e., one of several objects to be transferred. For example, the target object can be a reference object, or it can be any object other than the reference object among the several objects to be transferred. The position information of the target object can be its position on the virtual tray. After determining the target object that the virtual robot is expected to transfer, the PLC can send the position information of the target object to the electronic device. Alternatively, the PLC can send the position information of the target object to the electronic device, or it can send the position information of the target object to the virtual robot in the simulation software of the electronic device.
[0059] In step 103, the electronic device can determine the positional offset of the target object relative to the reference object based on the positional information of the target object and the reference object, and use this positional offset as the offset of the virtual robot. It can be understood that when the target object is the reference object, the determined positional offset is 0, meaning the virtual robot can directly complete the transfer of the target object according to the reference path without automatic offset based on the reference path. When the target object is an object other than the reference object, the determined positional offset may include: the lateral offset (e.g., offset in the x-axis direction), the longitudinal offset (e.g., offset in the y-axis direction), and the height offset (e.g., offset in the z-axis direction) between the target object and the reference object.
[0060] In some embodiments, see Figure 2 Assuming the reference object is a virtual battery cell labeled with number 1 (referred to as virtual battery cell 1), and the target object is a virtual battery cell labeled with number 2 (referred to as virtual battery cell 2), then the determined offsets of the virtual robot include: a lateral offset of 100, a longitudinal offset of 0, and a height offset of 0. It can be understood that when the reference object and the target object are the same object, the determined lateral, longitudinal, and height offsets are all 0.
[0061] In step 104, the virtual robot can move to the location of the target object under the guidance of the reference path and offset, so as to realize the transfer of the target object.
[0062] In some embodiments, the number of target objects that the virtual robot grasps each time can be set according to actual needs. The virtual robot can grasp one target object or multiple target objects each time, and this embodiment does not specifically limit this. For example, if the target object is a virtual battery cell, the virtual robot can grasp one or more virtual battery cells each time, but all virtual battery cells in the virtual tray generally need to be grasped multiple times to complete the task.
[0063] In this embodiment, by establishing a baseline path for the virtual robot in the simulation software, the virtual robot can automatically offset itself based on the target object's position information when transferring the target object, thereby achieving the transfer without repeatedly performing the same tasks, such as establishing multiple transfer paths. This reduces the debugging cycle. When the virtual robot transfers the target object through a grasping action, the transfer path can also be understood as a grasping path.
[0064] According to some embodiments of this application, optionally, the location information of the target object includes: the layer number, row number, and column number of the target object. The implementation process of step 103 described above can be found in [reference needed]. Figure 3 ,include:
[0065] Step 1031: Determine the row spacing and column spacing between adjacent objects on the virtual tray, and determine the layer spacing between adjacent stacked virtual trays.
[0066] Step 1032: Determine the offset of the virtual robot based on the layer number, row number, column number, row spacing, column spacing, and layer spacing.
[0067] In this embodiment, each virtual cell on the same virtual tray has a corresponding row number and column number based on its row and column position on the virtual tray, and each virtual cell on the same virtual tray has the same layer number. For example, refer to... Figure 2 , Figure 2 All virtual cells on the virtual tray can have a layer number of 1. Depending on the settings of the starting row and starting column, the layer number can be adjusted. Figure 2 The virtual cells marked with 16 are designated as virtual cells located in the starting row and starting column, and can also be... Figure 2 The virtual cells marked with 1 are designated as virtual cells located in the starting row and starting column, but this embodiment does not impose specific limitations on this.
[0068] In step 1031, the row spacing and column spacing between two adjacent objects can be the horizontal spacing and vertical spacing between the two adjacent objects, respectively. The horizontal spacing is the spacing in the x-axis direction, and the vertical spacing is the spacing in the y-axis direction. The layer spacing between each stacked adjacent virtual tray is the spacing between two vertically adjacent virtual trays in the height direction, that is, the spacing in the z-axis direction.
[0069] In some embodiments, see Figure 2 , Figure 2 This is a schematic diagram of several virtual battery cells placed on a virtual tray. Figure 2 It can be seen that the row spacing and column spacing between each adjacent virtual cell are both 100.
[0070] In some embodiments, visual recognition technology can be used to identify the row spacing and column spacing between adjacent objects on a virtual tray, as well as the layer spacing between stacked adjacent virtual trays.
[0071] In step 1032, the positional offset of the target object relative to the reference object can be calculated based on the layer number, row number, column number of the target object, and the row spacing, column spacing and layer spacing determined in step 1031, and the calculated positional offset can be used as the offset of the virtual robot.
[0072] In some embodiments, the positional offset of the target object relative to the reference object includes: a lateral offset (offset in the x-axis direction), a longitudinal offset (offset in the y-axis direction), and a height offset (offset in the z-axis direction). Based on the layer number, row number, column number, row spacing, column spacing, and layer spacing of the target object, the offsets of the target object relative to the reference object in the x-axis direction, y-axis direction, and z-axis direction can be calculated respectively.
[0073] In this embodiment, considering that objects placed on the virtual tray usually have the same row spacing, column spacing, and layer spacing, the layer number, row number, and column number of the target object are used as its position information. By combining the layer number, row number, column number, row spacing, column spacing, and layer spacing of the target object, the offset can be obtained effectively and accurately.
[0074] According to some embodiments of this application, optionally, the offset includes: an offset in the x-axis direction, an offset in the y-axis direction, and an offset in the z-axis direction; in step 1032, determining the offset of the virtual robot based on the layer number, row number, column number, row spacing, column spacing, and layer spacing includes: calculating the offset in the x-axis direction based on the column number of the target object, the column number of the reference object, and the column spacing; calculating the offset in the y-axis direction based on the row number of the target object, the row number of the reference object, and the row spacing; and calculating the offset in the z-axis direction based on the layer number of the target object, the layer number of the reference object, and the layer spacing.
[0075] The following sections describe how to calculate the offset in different directions:
[0076] The offset along the z-axis can be calculated based on the layer number of the target object, the layer number of the reference object, and the layer spacing. For example, the offset along the z-axis can be obtained by subtracting the layer number of the reference object from the layer number of the target object, and then multiplying by the layer spacing. For instance, if the layer number of the target object is the same as the layer number of the reference object, the offset along the z-axis is 0. If the layer number of the target object is 2 and the layer number of the reference object is 1, the offset along the z-axis is 1 * the layer spacing. In other words, if the layer number of the target object is n and the layer number of the reference object is 1, the offset along the z-axis is (n-1) * the layer spacing.
[0077] The offset along the x-axis can be calculated based on the column number of the target object, the column number of the reference object, and the column spacing. The offset along the x-axis is calculated as the absolute value of the difference between the column number of the target object and the column number of the reference object, multiplied by the column spacing. For example, if the row and column numbers of the target object are 1 and 4, and the row and column numbers of the reference object are 1 and 1, then the offset along the x-axis is (4-1) * column spacing.
[0078] Calculate the offset along the y-axis based on the row number of the target object, the row number of the reference object, and the row spacing. The offset along the y-axis is the absolute value of the difference between the row number of the target object and the row number of the reference object multiplied by the row spacing. For example, if the row number and column number of the target object are 3 and 1 respectively, and the row number and column number of the reference object are 1 and 1 respectively, then the offset along the y-axis is (3-1) * row spacing.
[0079] In some embodiments, calculating the offsets in the x and y directions can be divided into the following cases:
[0080] When the row number of the target object is the same as the row number of the reference object, the offset in the y-axis direction is set to 0, and the offset in the x-axis direction is set to the difference between the column number of the target object and the column number of the reference object multiplied by the column spacing. For example, if the row number and column number of the target object are 1 and 4 respectively, and the row number and column number of the reference object are 1 and 1 respectively, then the offset in the y-axis direction is set to 0, and the offset in the x-axis direction is set to (4-1) * column spacing.
[0081] When the row number of the target object is the same as the column number of the reference object, the offset in the x-axis direction is set to 0, and the offset in the y-axis direction is set to the difference between the row number of the target object and the row number of the reference object multiplied by the row spacing. For example, if the row number and column number of the target object are 3 and 1 respectively, and the row number and column number of the reference object are 1 and 1 respectively, then the offset in the x-axis direction is set to 0, and the offset in the y-axis direction is set to (3-1) * row spacing.
[0082] When the row and column numbers of the target object are different from those of the reference object, the offset in the x-axis direction is determined by multiplying the absolute value of the difference between the column numbers of the target object and the reference object by the column spacing. The offset in the y-axis direction is determined by multiplying the absolute value of the difference between the row numbers of the target object and the reference object by the row spacing.
[0083] In this embodiment, the offset in different directions can be accurately calculated to accurately realize the automatic offset of the virtual robot in different directions and achieve accurate transfer of the target object.
[0084] According to some embodiments of this application, optionally, determining the row spacing and column spacing between adjacent objects on the virtual tray and determining the layer spacing between stacked adjacent virtual trays in step 1031 includes: receiving the row spacing and column spacing between adjacent objects on the virtual tray and the layer spacing between stacked adjacent virtual trays input through a human-computer interaction interface.
[0085] The human-computer interface can be the display interface of an electronic device with simulation software installed, or it can be the display interface of other devices. Personnel can input the row and column spacing between adjacent objects on the virtual tray, as well as the layer spacing between stacked adjacent virtual trays, on this human-computer interface.
[0086] In this embodiment, the row spacing, column spacing, and layer spacing can be determined simply, conveniently, and directly through the human-computer interaction interface.
[0087] Optionally, according to some embodiments of this application, step 104, controlling the virtual robot to move to transfer the target object based on the reference path and the offset, includes: controlling the virtual robot to move to the position of the reference object based on the reference path. When the virtual robot moves to the position of the reference object, controlling the virtual robot to automatically offset by the offset to transfer the target object.
[0088] See Figure 2Assuming the baseline object is a virtual battery cell labeled 1 (row and column number are both 1), and the target object is a virtual battery cell labeled 9 (row and column number are 3 and 1 respectively), the virtual robot can be controlled to move along the baseline path to the location of the virtual battery cell labeled 1. Then, the virtual robot can be controlled to offset 0 in the x-axis direction, 0 in the z-axis direction, and (3-1)*row spacing = 2*100 in the y-axis direction to reach the location of the virtual battery cell labeled 9, thereby grabbing the virtual battery cell labeled 9 to the target location and transferring the virtual battery cell.
[0089] In this embodiment, the virtual robot can move to the location of the reference object under the guidance of the reference path, and automatically offset at the location of the reference object to achieve accurate transfer of the target object.
[0090] Optionally, according to some embodiments of this application, after controlling the virtual robot to move to transfer the target object based on the reference path and offset in step 104, the method further includes: sending a signal to the PLC indicating that the transfer of the target object is complete. The method receives new target object position information sent by the PLC and continues to control the virtual robot to move to transfer the new target object.
[0091] In other words, whenever the virtual robot completes the transfer of a target object, the electronic device sends a signal to the PLC indicating that the transfer is complete. Upon receiving this signal, the PLC sends the new target object's position information to the electronic device. This allows the electronic device to continue controlling the virtual robot's movement to transfer new target objects based on the received new target object's position information. The new target object can be one of the various objects that have not yet been transferred by the virtual robot. The new target object's position information can include the layer number, row number, and column number of the new target object.
[0092] In this embodiment, the virtual robot can automatically and continuously transfer target objects at different locations.
[0093] According to some embodiments of this application, optionally, when there are still untransferred objects on the reference virtual tray carrying the reference object, the new target object is the untransferred object. When there is an empty virtual tray without any objects, the new target object is the object carried by the virtual tray located below the empty virtual tray.
[0094] For example, see Figure 2 Assuming Figure 2The virtual tray in the system serves as the base virtual tray, and the base object is the virtual cell marked with 1. If there are still untransferred virtual cells on the base virtual tray, these untransferred virtual cells on the base virtual tray are used as new target objects to prioritize the transfer of virtual cells on the base virtual tray. If there are no untransferred virtual cells on the base virtual tray, making it an empty virtual tray, a new target object can be selected from the objects carried by the virtual trays located below the empty virtual tray.
[0095] In some embodiments, if the virtual battery cell that has just been transferred has adjacent virtual battery cells, then the adjacent virtual battery cell can be used as the new target object. For example, refer to... Figure 2 If the virtual battery cell that was just transferred is marked with a 1, then the virtual battery cell marked with a 2 can be used as the new target object. If there are no virtual battery cells in the row containing the recently transferred virtual battery cell, then a virtual battery cell in the adjacent row can be selected as the new target object. For example, refer to... Figure 2 If the virtual battery cell that was just transferred is marked with a 4, and all virtual battery cells in the row containing the virtual battery cell marked with a 4 have been transferred, then the virtual battery cell marked with a 5 in the adjacent row can be used as the new target object. In other words, Figure 2 The order in which the numbers marked on each virtual cell indicate the order in which the virtual cells were transferred.
[0096] In this embodiment, the virtual robot can automatically and continuously transfer target objects at different locations while sequentially transferring target objects on each virtual tray from top to bottom according to the stacking order of the virtual trays, thereby achieving orderly transfer of target objects and shortening the time required to transfer all target objects.
[0097] According to some embodiments of this application, optionally, when there is an empty virtual pallet that does not carry an object, the simulation method for robot offset further includes: receiving a pallet transfer instruction sent by the PLC, and controlling the virtual robot to transfer the empty virtual pallet to the target position according to the pallet transfer instruction.
[0098] In this embodiment, whenever the virtual robot completes the transfer of a target object, the electronic device sends a signal to the PLC indicating that the transfer is complete. This signal may carry the row number, column number, and layer number of the transferred target object. The PLC can record these information to determine whether all objects on a virtual tray have been transferred. Upon confirming that all objects have been transferred, the PLC sends a tray transfer command to the electronic device, which then controls the virtual robot to transfer the empty virtual tray to the target location. The target location can be set according to actual needs and is used to place the empty virtual tray.
[0099] In this embodiment, by transferring the empty virtual tray to the target location, the virtual robot can directly transfer the objects carried on the virtual tray under the empty virtual tray.
[0100] According to some embodiments of this application, optionally, before establishing the baseline path of the virtual robot in the simulation software in step 101, the method further includes: importing an XML file into the simulation software; wherein the XML file integrates an offline program for automatic robot offset.
[0101] The XML file conforms to the XML syntax structure, the syntax supported by the Tecnomatix Process Simulate software, and the syntax of the corresponding brand of robot. In this embodiment, the robot's automatic offset algorithm and the syntax structure supported by the brand of robot can be pre-integrated into the XML file according to the XML syntax structure. The developed XML file is imported into the simulation software, for example, placed in the installation directory of the industrial robot corresponding to the simulation software brand. This allows the simulation software to load the XML file and call it when needed. The virtual robot can then automatically offset the target object according to the offline program.
[0102] In this embodiment, by importing an XML file containing an offline program for automatic robot offset into the simulation software, it is easier to automatically and accurately simulate robot offset in the future.
[0103] Optionally, according to some embodiments of this application, after step 104, which controls the virtual robot to move and transfer target objects based on the reference path and offset, the method further includes: determining whether the virtual robot has successfully transferred N target objects, where N is a natural number greater than 1. If the virtual robot has successfully transferred N target objects, it is determined that the robot's automatic offset offline program has passed verification, and the verified robot automatic offset offline program is exported. The verified robot automatic offset offline program is then imported into the real robot.
[0104] Determining whether the virtual robot successfully transferred N target objects can be understood as: confirming whether the virtual robot accurately offset along the baseline path to the locations of the N target objects and accurately transferred the N target objects to their destination locations. Exporting the verified robot automatic offset offline program can be understood as: downloading the verified robot automatic offset offline program to a folder and saving it, and then importing the robot automatic offset offline program saved in that folder into the real robot. The folder can be a folder on the computer with the simulation software installed.
[0105] In some embodiments, before the real robot enters the field to transfer the real target object, the robot's automatic offset offline program can be tested on-site. Once the test is successful, it can be used normally.
[0106] By verifying the robot's automatic offset offline program, the verified robot's automatic offset offline program is imported into a real robot, enabling the real robot to directly transfer battery cells in a real-world setting based on the verified robot's automatic offset offline program. In other words, the robot's automatic offset offline program exported in this application embodiment can be directly used in the field.
[0107] The steps of the various methods described above are only for clarity. In practice, they can be combined into one step or some steps can be split into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent. Adding insignificant modifications or introducing insignificant designs to the algorithm or process, but without changing the core design of the algorithm and process, are also within the scope of protection of this patent.
[0108] According to some embodiments of this application, optionally, the simulation environment involved in the robot offset simulation method mainly involves the following four parts:
[0109] 1. An XML file is a file in an XML format that is custom-developed according to a specific syntax structure. The syntax of an XML file must conform to the XML syntax structure, the syntax supported by the Tecnomatix Process Simulate software, and the syntax of the corresponding brand of robot.
[0110] 2. The simulation software Tecnomatix Process Simulate, whose main function is to realize simulation verification and offline programming, is abbreviated as PS.
[0111] 3. Real touch screens and programmable logic controller (PLC) hardware used for field device control, or virtual touch screens and programmable logic controller software running on an industrial computer.
[0112] 4. Robots, which are hardware used for on-site processes such as picking up and placing parts, welding, and applying adhesive.
[0113] Optionally, according to some embodiments of this application, a flowchart of the simulation method for robot offset can be referred to. Figure 4 ,include:
[0114] Step 401: Load the XML file containing the robot's automatic offset offline program into the simulation software.
[0115] Step 402: Establish a baseline path in the simulation software, call the XML file, and determine the row spacing, column spacing, and layer spacing through the human-computer interaction interface. For example, after calling the XML file, a parameter input interface will pop up in the simulation interface, through which you can input the row spacing, column spacing, and layer spacing.
[0116] Step 403: Receive the row, column, and layer number of the target object sent by the PLC, and determine the offset of the virtual robot.
[0117] Step 404: Based on the virtual robot's offset, control the virtual robot to grasp the target object to verify the robot's automatic offset offline program. For example, the PLC sends the row, column, and layer numbers to the virtual robot in the PS, so that the virtual robot can grasp the target object according to the determined offset.
[0118] Step 405: Export the verified robot auto-offset offline program. For example, download the verified robot auto-offset offline program to a folder and save it. The robot auto-offset offline program will be downloaded and saved according to the syntax structure defined in the XML.
[0119] Step 406: Import the exported robot automatic offset offline program into the field robot. Once the field test is successful, the robot automatic offset offline program can be used normally.
[0120] This embodiment solves the problem that existing simulation software cannot automatically offset the position, which previously required simulation engineers to repeatedly create paths to grasp different battery cells. Although a tray contains multiple battery cells, this embodiment only requires establishing one baseline path for the robot to grasp and place the components. By receiving the row, column, and layer numbers from the PLC, the virtual robot can automatically offset to the corresponding position based on the baseline path to achieve the target object grasping function. This eliminates the need to repeatedly create multiple robot grasping paths, reducing the workload of engineers and saving debugging time. Moreover, the verified robot automatic offset offline program can be downloaded and directly imported into the field for use without modifying the corresponding logic, further saving debugging time.
[0121] According to some embodiments of this application, a robot is provided, which has the above-described verified robot automatic offset offline program imported into it.
[0122] In this embodiment, a robot equipped with a verified offline automatic offset program can accurately transfer target objects on-site. For example, it can accurately grasp individual battery cells to be picked up, enabling the robot to pick up and discharge cells according to actual needs.
[0123] According to some embodiments of this application, a simulation device for robot displacement is provided, and a schematic diagram of the simulation device can be found in [reference]. Figure 5 ,include:
[0124] Module 501 is used to establish a reference path for the virtual robot in the simulation software; wherein, the reference path is the path that the virtual robot takes from a preset starting point, moves the reference object to the destination position, and then returns to the preset starting point.
[0125] Receiver module 502 is used to receive the position information of the target object sent by the PLC;
[0126] The determination module 503 is used to determine the offset of the virtual robot based on the position information; wherein, the offset is the position offset of the target object relative to the reference object;
[0127] The control module 504 is used to control the movement of the virtual robot to transfer the target object based on the reference path and offset.
[0128] It is not difficult to see that this embodiment is a device embodiment corresponding to the above simulation method embodiment, and this embodiment can be implemented in conjunction with the above simulation method embodiment. The relevant technical details mentioned in the above simulation method embodiment are still valid in this embodiment, and will not be repeated here to reduce repetition. Accordingly, the relevant technical details mentioned in this embodiment can also be applied to the above simulation method embodiment.
[0129] It is worth mentioning that all modules involved in this embodiment are logical modules. In practical applications, a logical unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. Furthermore, to highlight the innovative aspects of this invention, this embodiment does not introduce units that are not closely related to solving the technical problem proposed by this invention; however, this does not mean that other units are absent from this embodiment.
[0130] According to some embodiments of this application, an electronic device is provided, such as... Figure 6As shown, it includes: at least one processor 601; and a memory 602 communicatively connected to the at least one processor 601; wherein the memory 602 stores instructions executable by the at least one processor 601, the instructions being executed by the at least one processor 601 to enable the at least one processor 601 to perform the above-described robot offset simulation method.
[0131] The memory 602 and processor 601 are connected via a bus, which may include any number of interconnecting buses and bridges. The bus connects various circuits of one or more processors 601 and memory 602 together. The bus can also connect various other circuits, such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore will not be described further herein. A bus interface provides an interface between the bus and the transceiver. The transceiver can be a single element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices over a transmission medium. Data processed by processor 601 is transmitted over a wireless medium via an antenna, which further receives data and transmits it to processor 601.
[0132] Processor 601 is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory 602 can be used to store data used by processor 601 during operation.
[0133] According to some embodiments of this application, a computer-readable storage medium is provided, storing a computer program. When the computer program is executed by a processor, it implements the above-described method embodiments.
[0134] That is, those skilled in the art will understand that all or part of the steps in the methods of the above embodiments can be implemented by a program instructing related hardware. This program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, a portable hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0135] Those skilled in the art will understand that the above embodiments are specific implementations of this application, and in practical applications, various changes can be made in form and detail without departing from the spirit and scope of this application.
Claims
1. A simulation method for robot offset, characterized in that, include: Import the XML file into the simulation software; wherein, the XML file integrates the robot's automatic offset offline program; A baseline path for the virtual robot is established in the simulation software; wherein, the baseline path is the path taken by the virtual robot from a preset starting point, transferring a reference object to the destination position, and then returning to the preset starting point; the reference object is one of several objects to be transferred; Receive the location information of the target object sent by the PLC; the target object is an object other than the reference object. Based on the location information, the offset of the virtual robot is determined; wherein, the offset is the positional offset of the target object relative to the reference object; Based on the reference path, control the virtual robot to move to the position of the reference object; When the virtual robot moves to the position of the reference object, the virtual robot is controlled to automatically offset by the offset amount in order to transfer the target object; The PLC is fed back a signal indicating that the transfer of the target object is complete. The system receives the location information of a new target object sent by the PLC and continues to control the virtual robot to move and transfer the new target object. When there are still untransferred objects on the reference virtual tray carrying the reference object, the new target object is the untransferred object. When there is an empty virtual tray without an object, the new target object is the object carried by the virtual tray located below the empty virtual tray. When there is an empty virtual pallet that does not carry any objects, the system receives a pallet transfer instruction from the PLC and controls the virtual robot to transfer the empty virtual pallet to the target location according to the pallet transfer instruction. Determine whether the virtual robot has successfully transferred N target objects, where N is a natural number greater than 1; If the virtual robot successfully transfers N target objects, determine that the robot's automatic offset offline program has passed verification, and export the verified robot's automatic offset offline program; Import the verified robot automatic offset offline program into the real robot.
2. The simulation method for robot offset according to claim 1, characterized in that, The location information of the target object includes: the layer number, row number, and column number of the target object; Determining the offset of the virtual robot based on the location information includes: Determine the row and column spacing between adjacent objects on a virtual tray, and determine the layer spacing between adjacent stacked virtual trays; The offset of the virtual robot is determined based on the layer number, the row number, the column number, the row spacing, the column spacing, and the layer spacing.
3. The simulation method for robot offset according to claim 2, characterized in that, The offset includes: the offset in the x-axis direction, the offset in the y-axis direction, and the offset in the z-axis direction; Determining the offset of the virtual robot based on the layer number, the row number, the column number, the row spacing, the column spacing, and the layer spacing includes: The offset in the x-axis direction is calculated based on the column number of the target object, the column number of the reference object, and the column spacing. The offset in the y-axis direction is calculated based on the row number of the target object, the row number of the reference object, and the row spacing. The offset in the z-axis direction is calculated based on the layer number of the target object, the layer number of the reference object, and the layer spacing.
4. The simulation method for robot offset according to claim 2, characterized in that, Determining the row spacing and column spacing between adjacent objects on a virtual tray, and determining the layer spacing between stacked adjacent virtual trays, includes: It receives the row spacing and column spacing between adjacent objects on the virtual tray, as well as the layer spacing between stacked adjacent virtual trays, input through the human-computer interaction interface.
5. A robot, characterized in that, Includes a verified robot automatic offset offline procedure for performing the transfer of multiple objects, wherein the verified robot automatic offset offline procedure is imported into the robot by the method described in any one of claims 1-4.
6. A simulation device for robot displacement, characterized in that, A simulation method for implementing robot offset as described in any one of claims 1-4, comprising: A module is established to create a reference path for the virtual robot in the simulation software; wherein, the reference path is the path taken by the virtual robot from a preset starting point, moving a reference object to a destination position, and then returning to the preset starting point; The receiving module is used to receive the position information of the target object sent by the PLC; The determining module is used to determine the offset of the virtual robot based on the position information; wherein the offset is the position offset of the target object relative to the reference object; The control module is used to control the virtual robot to move in order to transfer the target object based on the reference path and the offset.
7. An electronic device, characterized in that, include: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor to enable the at least one processor to perform the simulation method for robot displacement as described in any one of claims 1 to 4.
8. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the simulation method for robot displacement as described in any one of claims 1 to 4.