Robot testing method and robot testing system
By designing automated robot testing methods and systems, using components such as servers and robotic arms, the problems of low efficiency and poor accuracy in the existing technology are solved, and efficient and comprehensive test coverage is achieved, especially suitable for complex and changeable working environments.
Patent Information
- Application Number
- CN202411676745.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-02-25
AI Technical Summary
Existing robot testing methods rely on manual operations, are inefficient, difficult to guarantee accuracy, and cannot fully evaluate all possible failure modes, especially in complex and changing work environments.
A robot testing method and system is designed, using components such as servers, robotic arms, sensors, load switching devices, control equipment, etc. to call the test service interface through an automated test process, obtain test code from the source code management system, run test code, determine the target controlled equipment, generate test instructions, control the equipment to execute actions, and collect test results to generate test reports.
Automatic testing is realized, testing efficiency and coverage is improved, manual operation needs are reduced, and the accuracy and comprehensiveness of test results are ensured, especially in a complex and changeable working environment, which is better guaranteed for the stability and reliability of the system.
Smart Images

Figure CN119502011A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of robotics technology, and in particular to a robot testing method and a robot testing system. Background Art
[0002] With the continuous improvement of industrial automation, robots have been widely used in the manufacturing industry because of their ability to work safely with humans in the same workspace. In order to ensure safety in the human-machine coexistence environment, robots must be equipped with a series of safety protection measures, such as collision detection systems, emergency stop mechanisms, etc. The effectiveness of these functions is directly related to the safety and reliability of the production process. Therefore, strict testing of functional safety is crucial.
[0003] Existing testing methods mainly rely on manual operation, which verifies whether the robot's response meets the design requirements by simulating collisions or interference situations in actual operations. Although the above method can provide an intuitive operating experience, its limitations are becoming increasingly apparent when faced with a complex and changing working environment. Specifically, manual testing is often inefficient, and each test requires a lot of time and manpower. In addition, due to the influence of human factors, the accuracy of the test results is difficult to guarantee, and the test coverage is also limited, which makes it impossible to fully evaluate all possible failure modes. Summary of the invention
[0004] The purpose of this application is to provide a robot testing method and a robot testing system to address the deficiencies in the above-mentioned prior art, so as to solve the limitations of the prior art when facing a complex and changeable working environment.
[0005] To achieve the above purpose, the technical solution adopted in the embodiment of the present application is as follows:
[0006] In a first aspect, an embodiment of the present application provides a robot testing method, which is applied to a server in a robot testing system, wherein the robot testing system comprises: the server, a plurality of mechanical arms, at least one sensor disposed at the end of the mechanical arms, at least one load switching device disposed at the end of the mechanical arms, a first control device corresponding to each of the mechanical arms, at least one load, a collision testing device, and a second control device, wherein the method comprises:
[0007] Calling a test service interface to obtain test code of the function to be tested from a source code management system, wherein the source code management system is used to record the test code written by the user, and the source code management system is deployed on the server;
[0008] Run the test code of the function to be tested, determine at least one target controlled device related to the function to be tested, and generate a test instruction for the function to be tested;
[0009] Sending a test instruction of a target robotic arm to at least one of the first control device and / or the second control device, so as to control the at least one target controlled device to perform a corresponding action through at least one of the first control device and / or the second control device;
[0010] A test result when the at least one target controlled device performs a test action is obtained through at least one of the first control device and / or the second control device, and a test report of the function to be tested is generated according to the test result.
[0011] As a possible implementation manner, the running the test code of the function to be tested and determining at least one target controlled device related to the function to be tested includes:
[0012] Run the test code of the function to be tested to obtain test parameters corresponding to the function to be tested, wherein the test parameters include a test object and a test event, wherein the test event is used to indicate a test process for executing the function to be tested, and the test object is used to indicate a device participating in the test process of the function to be tested;
[0013] At least one of the target controlled devices related to the function to be tested is determined according to the test parameters.
[0014] As a possible implementation manner, determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes:
[0015] If the test object is a target robotic arm among the multiple robotic arms and the load switching device on the target robotic arm, the target robotic arm and the load switching device on the target robotic arm are used as target controlled devices related to the function to be tested;
[0016] A first test instruction corresponding to the target robot arm and a second test instruction corresponding to the load switching device are generated according to the test event.
[0017] As a possible implementation manner, the sending the test instruction of the target robotic arm to at least one of the first control device and / or the second control device includes:
[0018] Sending the first test instruction to the first control device corresponding to the target robotic arm;
[0019] The second test instruction is sent to the second control device.
[0020] As a possible implementation manner, determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes:
[0021] If the test object is a target mechanical arm and at least one target device among the multiple mechanical arms, the target mechanical arm and at least one target device are used as target controlled devices related to the function to be tested, and the target device includes: a sensor arranged at the end of the target mechanical arm, a gripper arranged at the end of the target mechanical arm, and the second control device;
[0022] A third test instruction corresponding to the target mechanical arm and a fourth test instruction corresponding to at least one of the target devices are generated according to the test event.
[0023] As a possible implementation manner, the sending the test instruction of the target robotic arm to at least one of the first control device and / or the second control device includes:
[0024] Sending the third test instruction to the first control device corresponding to the target robotic arm;
[0025] The fourth test instruction is sent to the second control device.
[0026] As a possible implementation manner, determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes:
[0027] If the test object is a target mechanical arm among the multiple mechanical arms and the collision test device, the target mechanical arm is used as a target controlled device related to the function to be tested;
[0028] A fifth test instruction corresponding to the target robotic arm is generated according to the test event.
[0029] As a possible implementation manner, determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes:
[0030] If the test object is the first robotic arm and the second robotic arm among the multiple robotic arms, the first robotic arm and the second robotic arm are used as target controlled devices related to the function to be tested;
[0031] A sixth test instruction corresponding to the first robotic arm and a seventh test instruction corresponding to the second robotic arm are generated according to the test event.
[0032] As a possible implementation manner, determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes:
[0033] If the test object is at least one target robotic arm among the multiple robotic arms, a first control device corresponding to each of the target robotic arms, and the second control device, at least one of the target robotic arms is used as a target controlled device related to the function to be tested;
[0034] An eighth test instruction corresponding to the first control device corresponding to each of the target robotic arms is generated according to the test event.
[0035] In a second aspect, an embodiment of the present application provides a robot testing system, the robot testing system comprising: a server and a test bench, the test bench comprising: a plurality of mechanical arms, at least one sensor disposed at the end of the mechanical arm, at least one load switching device disposed at the end of the mechanical arm, a first control device corresponding to each of the mechanical arms, at least one load, a collision test device, and a second control device;
[0036] The first control device corresponding to each of the mechanical arms is communicatively connected with the server and the second control device respectively;
[0037] The sensor, the load switching device and the load are sequentially installed at the end of the mechanical arm.
[0038] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to perform the steps of the robot testing method as described in any one of the first aspects above.
[0039] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the robot testing method as described in any one of the first aspects above are executed.
[0040] According to the robot testing method and robot testing system of the embodiment of the present application, the test service interface is called to obtain the test code of the function to be tested from the source code management system deployed on the server. When running the test code of the function to be tested, at least one target controlled device related to the function to be tested is first determined, and a test instruction of the function to be tested is generated, and then the test instruction of the target mechanical arm is sent to at least one first control device and / or second control device, so as to control the target controlled device to perform the corresponding action. In the process of the target controlled device performing the test action, the test results are collected by at least one first control device and / or second control device, and a test report of the function to be tested is generated based on these test results. According to the embodiment of the present application, by calling the test service interface to obtain the test code and automatically running the test, the automated test can cover more test scenarios according to the predetermined test cases, and reduce the need for manual operation, so that the test process can be completed in a short time, and the test coverage is expanded while the test efficiency is improved, and the problems of low efficiency, low accuracy and limited test coverage in the traditional manual test process are effectively solved. Especially in the face of complex and changeable working environments, the automated test can better ensure the stability and reliability of the system. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 A schematic diagram of the architecture of a robot testing system provided by an embodiment of the present application is shown;
[0043] Figure 2 A schematic diagram of a test bench provided in an embodiment of the present application is shown;
[0044] Figure 3 A schematic diagram of a process flow of a robot testing method provided in an embodiment of the present application is shown;
[0045] Figure 4 A schematic diagram of a continuous integration process provided by an embodiment of the present application is shown;
[0046] Figure 5 A schematic diagram of a process for determining a target controlled device provided in an embodiment of the present application is shown;
[0047] Figure 6 A schematic structural diagram of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0048] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.
[0049] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0050] In order to enable those skilled in the art to use the content of this application, the following implementation is provided in conjunction with a specific application scenario, "Automated testing of robot functional safety." For those skilled in the art, the general principles defined herein can be applied to other embodiments and application scenarios without departing from the spirit and scope of this application. Although this application is mainly described around the robot testing method, it should be understood that this is only an exemplary embodiment.
[0051] It should be noted that the term "including" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.
[0052] Since an important feature of robots is that they can work together with human workers, their test systems must ensure that they meet strict safety standards in all application scenarios. However, current technologies often find it difficult to achieve fully automated testing when it comes to testing content that requires physical interaction with humans, such as dragging, collision detection, and emergency stops. This not only limits the degree of automation of the test, but also increases labor costs and time consumption, and may introduce errors due to human factors. In addition, existing automated testing systems usually rely on specific technologies or platforms, which in turn limits the versatility and flexibility of the test system. For example, the construction method based on OTA (Over-The-Air) servers may not be suitable for robots that do not have network communication capabilities or robots that require specific adapters. Similarly, the TCP interface may not be applicable or require additional adaptation measures for robots that use other communication protocols or do not support network communication.
[0053] Furthermore, the robot needs to have a variety of safety protection measures, such as collision detection and emergency stop functions, to ensure reliable operation in a working environment coexisting with humans. When testing these functions, it is usually necessary to simulate collisions or interference situations in actual operations to verify whether the system response meets the design requirements. Although manual testing can provide valuable practical operating experience, it has obvious deficiencies in efficiency, accuracy, test coverage, feedback speed, and data analysis when dealing with complex dynamic factors and changing working environments. In response to the above problems, the present invention proposes an automated testing system specifically for robots. The robot testing system is based on two major parts: a software platform and a hardware platform. It is designed to comprehensively test the functional safety of the robot and automatically generate a test report. The entire testing process is automated, which not only significantly improves the test efficiency, but also simplifies the problem tracking and management process. At the same time, it provides testers with an intuitive and easy-to-use operating interface and simplified operating steps.
[0054] Figure 1 FIG. 1 is a schematic diagram showing the architecture of a robot testing system provided by an embodiment of the present application. Figure 1 As shown, the robot test system includes: a server and a test bench, and the test bench includes: multiple robotic arms, at least one sensor arranged at the end of the robotic arm, at least one load switching device arranged at the end of the robotic arm, a first control device corresponding to each robotic arm, at least one load, a collision test device, and a second control device. The first control device corresponding to each robotic arm is respectively connected to the server and the second control device for communication, and the sensor, the load switching device, and the load are sequentially installed at the end of the robotic arm. For example, referring to Figure 1As shown, label 1 corresponds to the sensor, label 2 and label 3 correspond to the load switching device, label 4 corresponds to the load, label 6 corresponds to the collision test equipment, and in addition, a clamp corresponding to label 5 can be set at the end of the robot arm, control cabinet A and control cabinet B are the first control devices corresponding to robot arm A and robot arm B, and PLC is the second control device.
[0055] Furthermore, since this application is aimed at the functional testing of the robot, most of the robot's software functions, such as motion algorithms, program instructions, various setting functions, etc., can be automatically tested through the robot body and the control cabinet. However, some test contents, such as the testing of load, collision, drag, industrial bus and other related functions, require additional hardware equipment support, so it is necessary to build a set of hardware test benches adapted to the test script to achieve comprehensive and fully automated testing of the control software functions.
[0056] For example, refer to Figure 2 As shown, the test bench includes the following equipment: robot body, control cabinet, PLC, quick change device (also known as load switching device, corresponding to Figure 2 The quick-change robot arm side and quick-change tool side in the robot arm), sensors, loads of different weights, collision test equipment, switches and grippers. Taking two robot arms (robot arm A and robot arm B) as an example, the end of robot arm A is equipped with sensors, quick-change robot arm side, quick-change tool side and load from the center of the end outward, and the gripper is installed at the end of robot arm B. The installation distance between the two robots should be within the arm span to ensure that robot arm B can push robot arm A to test the dragging function.
[0057] Based on this, the robot testing system provided according to the embodiment of the present application effectively solves the technical problem that the current robots are unable to automatically test functional safety and human-computer interaction functions, and improves the testing efficiency and test coverage.
[0058] The following is combined with the above Figure 1 The robot test system shown and Figure 2 The contents described in the test bench shown provide a detailed description of the robot testing method provided in the embodiment of the present application.
[0059] Figure 3 The following is a flow chart of a robot testing method provided by an embodiment of the present application. Figure 3 As shown, the execution subject of this method is the server in the robot testing system, and the specific execution process is:
[0060] S301 , calling a test service interface to obtain test code for a function to be tested from a source code management system.
[0061] Optionally, the source code management system is, for example, a Git system, which is used to record the test code written by the user. The test service interface is, for example, a communication interface (Google Remote Procedure Call, gRPC). The gRPC interface is an efficient and high-performance remote procedure call protocol used for communication between the client and the server. The test process can be started by calling the gRPC interface to obtain the test code. On this basis, the latest or specified version of the test code is pulled from the source code management system Git. The test code contains test cases for verifying whether the function to be tested is correct, and then the test code of the function to be tested is run to verify whether the robot's function to be tested works as expected.
[0062] S302: Run the test code of the function to be tested, determine at least one target controlled device related to the function to be tested, and generate a test instruction for the function to be tested.
[0063] Optionally, combined Figure 1 and Figure 2 As shown, the target controlled device includes at least: at least one mechanical arm and / or a load switching device. By executing the test code related to the function to be tested, it is determined which devices will participate in the test process of the function to be tested, so as to ensure that the real environment when the function to be tested is running can be accurately simulated during the test process, and verify whether the interaction between the function to be tested and the device is as expected.
[0064] Optionally, based on the test code of the function to be tested, specific commands or instructions are generated to drive the target controlled device to perform specific actions or responses, so that the target controlled device operates according to the test plan and observes the performance of the function to be tested under specific conditions, thereby automatically verifying whether the function to be tested works as expected, and also being able to detect possible problems or defects.
[0065] S303: Send a test instruction of the target robotic arm to at least one first control device and / or second control device, so as to control at least one target controlled device to perform a corresponding action through at least one first control device and / or second control device.
[0066] Optionally, combined Figure 1 and Figure 2As shown, the first control device is a control cabinet, the second control device is a PLC, and the first control device and / or the second control device receive the test instructions of the target robot arm and convert the test instructions into signals suitable for the target robot arm or other controlled devices. On this basis, once the first control device and / or the second control device receive the test instructions, the target robot arm or other controlled devices are controlled to perform corresponding actions based on the instruction content in the test instructions. In this way, the test instructions are transmitted through the first control device and / or the second control device as intermediate control devices, which not only enhances the flexibility and scalability of the test system, but also can adjust the test process without directly modifying the robot arm control logic, thereby simplifying the management and maintenance of the test system.
[0067] S304: Obtain, through at least one first control device and / or second control device, a test result of at least one target controlled device executing a test action, and generate a test report of the function to be tested according to the test result.
[0068] Optionally, during the test, the first control device and the second control device are not only responsible for sending test instructions to the target controlled device, but also for collecting data or feedback generated by the target controlled device when performing the test action, such as device status information, sensor readings, results of the execution of the action, etc. The first control device and the second control device collect this information and feed it back to the server to evaluate whether the function to be tested works as expected.
[0069] Optionally, the server will analyze the collected information to determine whether the test results meet the expected goals. If the test results are consistent with expectations, it indicates that the function is normal. If not, it indicates that there is a problem. Based on the analysis results, a test report is automatically generated. The test report can include detailed test results, any problems found, and possible improvement suggestions.
[0070] For example, when testing the grasping function of a robotic arm, the first control device sends instructions to the corresponding controlled robotic arm to let the robotic arm grasp an object, and at the same time monitors the position, strength and other parameters of the robotic arm through sensors. When the robotic arm completes the action, the first control device collects the sensor data and transmits the sensor data back to the server. The server determines whether the robotic arm has successfully completed the grasping action based on the sensor data, and generates a test report accordingly.
[0071] It should be noted that the entire testing process is usually automatically triggered in a continuous integration (CI) environment. That is, whenever new code is submitted to Git, the CI system will automatically pull the test code of the function to be tested and execute the test by calling the gRPC interface to ensure the correctness of the function to be tested.
[0072] Based on this, according to the robot testing method provided in the embodiment of the present application, by calling the test service to obtain the test code and running the test automatically, the automated test can cover more test scenarios according to the predetermined test cases and reduce the need for manual operation, so that the test process can be completed in a short time, while expanding the test coverage and improving the test efficiency, effectively solving the problems of low efficiency, low accuracy and limited test coverage in the traditional manual testing process, especially when facing a complex and changeable working environment, automated testing can better ensure the stability and reliability of the system.
[0073] Figure 4 A schematic diagram of a continuous integration process provided by an embodiment of the present application is shown. Figure 4 As shown, before calling the test service interface to obtain the test code of the function to be tested from the source code management system, it is necessary to first build a software testing environment to realize the integration of automated testing and continuous integration / continuous delivery (CI / CD) systems. Specifically, the test service interface can be an SDK, gRPC, TCP or other interfaces. Here, the test service interface is taken as a gRPC interface as an example. In order to ensure the stability and reliability of the gRPC interface, obtain the proto file that defines the gRPC service and message type, and select a suitable automated testing framework, such as pytest or google test, to write test cases. On this basis, create a gRPC client for communicating with the server, call the gRPC method through the client object to pass appropriate parameters, and determine whether the return value of the gRPC method meets expectations based on the expected results.
[0074] Furthermore, the gRPC interface test is integrated into the continuous integration / continuous delivery (CI / CD) process to ensure that automated testing is triggered every time a different version of the test code is released. To do this, it is necessary to write a Dockerfile and build a Docker image containing test dependencies on the Jenkins server, and the operation of building the Docker image only needs to be performed once. Subsequently, the user submits the test code to the source code management system Git. The Jenkins server will regularly check for changes in the source code management system Git. Once a new test code submission is detected in the source code management system Git, the Jenkins server will pull the new test code and prepare a new build. If the build fails, a notification is sent to the user. If the build is successful, the new test code will be deployed in the Jenkins server.
[0075] Specifically, the Jenkins server will pull the test code through the test service interface gRPC, create and enter the Docker container, run the test code inside the container, and after the test is completed, generate a test report in HTML and Excel format inside the container. Since there is a directory mount between the Docker container and the Jenkins server, the Jenkins server can directly export the test report as a product, then stop and delete the Docker container, and clean up all files under the workspace. After the test is completed, the Jenkins server will generate feedback and notify the user about the results of the build and test, and continuously monitor the source code management system Git for updates, and repeat the above process.
[0076] Based on this, the automation level of gRPC interface testing is effectively improved, which reduces labor costs while speeding up feedback and ensuring the quality and stability of robot function testing.
[0077] Figure 5 The following is a flow chart of a method for determining a target controlled device provided by an embodiment of the present application. Figure 5 As shown, the above step S302 runs the test code of the function to be tested and determines at least one target controlled device related to the function to be tested, which specifically includes the following steps:
[0078] S501: Run the test code of the function to be tested to obtain the test parameters corresponding to the function to be tested.
[0079] Optionally, the test parameters include a test object and a test event, the test event is used to indicate a test process for executing the function to be tested, and the test object is used to indicate a device participating in the test process of the function to be tested.
[0080] For example, the test code usually includes various test cases, each of which has specific input data and expected output, so as to verify the correctness of the function to be tested. In the process of executing the test code, test parameters related to the function to be tested are extracted. Test parameters are important information used to guide and control the test process, such as test objects and test events. Test objects refer to devices involved in the test of the function to be tested, such as Figure 2 The robot arms, sensors, grippers, and other entities in the test bench shown are the entities that actually perform test actions or corresponding test instructions. Test events are used to indicate how to execute the test process of the function to be tested, which can be understood as a series of operating steps or condition settings used to guide the test process, ensuring that the test covers all important aspects of the function.
[0081] Exemplarily, the process of extracting test parameters from test code involves parsing the test code, identifying key information, and converting the key information into parameters that can be used for automated testing. Specifically, when writing the test code, follow certain structure and naming rules, or use clear naming and annotations to clearly distinguish test objects and test events, so as to quickly identify which information in the test code belongs to the test object and which information belongs to the test event. In addition, a configuration file can also be created, in which test parameters are defined, and the information of the test object and test event is read from the configuration file when the test code is run. Or use the reflection mechanism provided by the programming language to dynamically obtain the attributes (representing the test object) and methods (representing the test event) in the class.
[0082] S502: Determine at least one target controlled device related to the function to be tested according to the test parameters.
[0083] Optionally, the test parameters are parsed to determine the test objects and test events, and the test objects are mapped to the actual execution devices. Specifically, an actual device list is created according to the test objects in the test parameters, and based on the actual device list, it is determined which devices are at least one target controlled device related to the function to be tested, and the abstract device name in the test parameters is mapped to the device actually used to control the target controlled device to perform the corresponding test action.
[0084] Based on this, at least one target controlled device related to the function to be tested is effectively determined from the test parameters, and the corresponding test action is executed by controlling the device, which not only improves the automation level of the test, but also ensures the accuracy and completeness of the test process.
[0085] As a possible implementation, the function to be tested includes a load function, and the above step S302 runs the test code of the function to be tested, determines at least one target controlled device related to the function to be tested, and generates a test instruction for the function to be tested, including:
[0086] If the test object is a target robotic arm among multiple robotic arms and a load switching device on the target robotic arm, the target robotic arm and the load switching device on the target robotic arm are used as target controlled devices related to the function to be tested; a first test instruction corresponding to the target robotic arm and a second test instruction corresponding to the load switching device are generated according to the test event.
[0087] Optionally, when the function to be tested is a load function, if the test object is a target robotic arm among multiple robotic arms and a load switching device on the target robotic arm, then it can be understood that a load test needs to be performed on a specific target robotic arm and its load switching device, which means that the target robotic arm and the load switching device on the target robotic arm are regarded as target controlled devices related to the load function.
[0088] Exemplarily, according to different test events, two types of test instructions need to be generated, including a first test instruction for the target robot arm and a second test instruction for the load switching device. The first test instruction is used to control the target robot arm to perform a specific action, such as moving from the initial position to the tool rack, fitting and locking with the tool tray, returning to the initial position, etc., and the second test instruction is used to control the load switching device to switch the load.
[0089] Specifically, the robot body is powered on and enabled, the PLC signal controls the compressed air to continuously supply air to the quick-change robot arm side, unlocks the tool side, the robot moves from the initial point joint to the tool rack, and aligns with the quick-change tool side, the tool tray fits with the robot arm side and is locked, the robot moves from the tool rack to the initial point, and performs related load-carrying movements. On this basis, by switching loads of different weights, the above test process is repeated to verify the functional stability and performance of the robot arm under different load conditions.
[0090] Correspondingly, sending a test instruction of a target robotic arm to at least one first control device and / or a second control device includes: sending a first test instruction to the first control device corresponding to the target robotic arm; and sending a second test instruction to the second control device.
[0091] Exemplarily, the first test instruction is an operation instruction for the target robot arm, which is used to control the target robot arm to perform a specific action, and the second test instruction is an operation instruction for the load switching device, which is used to control the load switching device to switch the load. On this basis, the first test instruction is sent to the first control device corresponding to the target robot arm to control the target robot arm to perform the action, and the second test instruction is sent to the second control device to control the load switching device to switch the load.
[0092] Based on this, the load function test mainly focuses on how to verify the performance of the robot under different load conditions by controlling the target robot and its load switching device. The series of load function test processes are completed efficiently and accurately through the automated testing process, ensuring the reliability of the test results.
[0093] As a possible implementation, the function to be tested includes a terminal input and output interface function. The above step S302 runs the test code of the function to be tested, determines at least one target controlled device related to the function to be tested, and generates a test instruction for the function to be tested, including:
[0094] If the test object is a target robotic arm among multiple robotic arms and at least one target device, the target robotic arm and the at least one target device are used as target controlled devices related to the function to be tested, and the target device includes: a sensor arranged at the end of the target robotic arm, a gripper arranged at the end of the target robotic arm, and a second control device; a third test instruction corresponding to the target robotic arm and a fourth test instruction corresponding to at least one target device are generated according to the test event.
[0095] Optionally, when the function to be tested is an end input and output interface function, if the test object is a target robotic arm among multiple robotic arms and at least one target device, then it can be understood that an interface test needs to be performed on a specific target robotic arm and its end device, which means that the target robotic arm and at least one target device are used as target controlled devices related to the end input and output interface function, wherein the target device may include sensors, grippers and other related control devices arranged at the end of the target robotic arm.
[0096] Exemplarily, according to different test events, two types of test instructions need to be generated, including a third test instruction for the target manipulator and a fourth test instruction for at least one target device. The third test instruction is used to control the manipulator to perform a specific action or state to cooperate with the test of the sensor or gripper, and the fourth test instruction is used to control the sensor, gripper or other device to perform a corresponding action or state change.
[0097] Specifically, the sensors, grippers and other devices are fixedly installed at the end of the robot arm, and the IO interface (TIO) at the end of the robot arm is ready to communicate with the sensors, grippers and other devices, and ensure that the communication lines are connected correctly. On this basis, the target robot arm is controlled to perform specific actions or change states, such as moving to a specified position, activating specific functions, etc., and the sensors, grippers or other devices are controlled to perform corresponding actions or state changes, such as sending data requests, triggering sensor reading, etc. Then, the TIO and sensor-related interfaces are called through the test script to perform functional tests to verify whether the results returned by the interface meet expectations.
[0098] Correspondingly, sending a test instruction of the target robotic arm to at least one first control device and / or second control device includes: sending a third test instruction to the first control device corresponding to the target robotic arm; and sending a fourth test instruction to the second control device.
[0099] Exemplarily, the third test instruction is an operation instruction for the target manipulator, which is used to control the manipulator to perform a specific action or state to cooperate with the test of the sensor or gripper, and the fourth test instruction is an operation instruction for at least one target device, which is used to control the sensor, gripper or other device to perform a corresponding action or state change. On this basis, the target manipulator is controlled to perform a specific action or change state by sending the third test instruction to the first control device corresponding to the target manipulator, and the fourth test instruction is sent to the second control device to control the target device such as the sensor and gripper to perform a corresponding action or state change.
[0100] Based on this, the testing of the terminal input and output interface functions mainly focuses on how to verify the correctness and reliability of the interface functions by controlling the target robotic arm and its terminal equipment. Through the automated testing process, this series of tests can be completed efficiently and accurately, and the reliability of the test results can be ensured.
[0101] As a possible implementation, the function to be tested includes a collision function, and the above step S302 runs the test code of the function to be tested, determines at least one target controlled device related to the function to be tested, and generates a test instruction for the function to be tested, including:
[0102] If the test object is a target robotic arm among multiple robotic arms and a collision test device, the target robotic arm is used as a target controlled device related to the function to be tested; and a fifth test instruction corresponding to the target robotic arm is generated according to the test event.
[0103] Optionally, when the function to be tested is a collision function, if the test object is a target robotic arm among multiple robotic arms and a collision test device, it can be understood that it is necessary to use a collision detection device to perform a collision test on the specific target robotic arm, which means that the target robotic arm is used as a target controlled device related to the collision function, and a test instruction corresponding to the target robotic arm is generated according to the test event.
[0104] Exemplarily, the collision test equipment is a device used to detect the reaction and force limit of a robotic arm during a collision. The collision detection equipment is fixed to a test bench, and different collision levels and force limits are set. The target robotic arm is controlled to move to a predetermined collision point, and related actions are performed to trigger collision detection. It is observed and recorded whether the robotic arm rebounds during a collision, and whether the collision force meets the preset value.
[0105] Correspondingly, sending a test instruction of the target robotic arm to at least one first control device and / or second control device includes: sending a fifth test instruction to the first control device corresponding to the target robotic arm.
[0106] Exemplarily, the fifth test instruction is an operation instruction for the target robotic arm, which is used to control the robotic arm to perform a specific action or state to verify its function in collision detection. By sending the fifth test instruction to the first control device corresponding to the target robotic arm, the target robotic arm is controlled to move to the collision point and perform collision detection, and observe whether the target robotic arm rebounds after collision, and determine whether the collision force meets the preset value.
[0107] Based on this, the collision function test process is ensured to be automated and each action can be precisely controlled, thereby verifying the correctness and reliability of the robot arm in terms of collision detection function.
[0108] As a possible implementation, the function to be tested includes a drag function, and the above step S302 runs the test code of the function to be tested, determines at least one target controlled device related to the function to be tested, and generates a test instruction for the function to be tested, including:
[0109] If the test object is the first and second robotic arms among multiple robotic arms, the first and second robotic arms are used as target controlled devices related to the function to be tested; and the sixth test instruction corresponding to the first robotic arm and the seventh test instruction corresponding to the second robotic arm are generated according to the test event.
[0110] Optionally, when the function to be tested is a drag function, if the test object is the first robotic arm and the second robotic arm among multiple robotic arms, then these two robotic arms need to be used as target controlled devices related to the function to be tested, and corresponding test instructions are generated according to the test event.
[0111] For example, in combination Figure 2 As shown, the first robotic arm is robotic arm A, and the second robotic arm is robotic arm B. Robotic arm A is the main body of the dragging function and is responsible for performing the dragging action. Robotic arm B is used to assist in performing the dragging test and push robotic arm A through low-speed joint movement. Specifically, the sixth test instruction is an operation instruction for the first robotic arm (robotic arm A), which is used to control it to enter the dragging mode, move from the dragging starting point to the dragging end point, and exit the dragging mode after the test. The seventh test instruction is an operation instruction for the second robotic arm (robotic arm B), which is used to control it to move from the initial position to the dragging point at a low speed and push the first robotic arm (robotic arm A) to complete the dragging action.
[0112] Exemplarily, move robot arm A and robot arm B to the vicinity of the dragging point but without contact, turn on the dragging enable of robot arm A, control robot arm B to perform low-speed joint movement, push robot arm A from the dragging starting point to the dragging end point, turn off the dragging function of robot arm A, and record the test results.
[0113] Correspondingly, a test instruction of the target robotic arm is sent to at least one first control device and / or second control device, including: sending a sixth test instruction to the first control device corresponding to the first robotic arm, and sending a seventh test instruction to the first control device corresponding to the second robotic arm.
[0114] Exemplarily, by sending the sixth test instruction to the first control device (control cabinet A) corresponding to the first robotic arm (robotic arm A), and sending the seventh test instruction to the second control device (control cabinet B) corresponding to the second robotic arm (robotic arm B), robotic arm A and robotic arm B perform actions according to a predetermined test process and record the test results.
[0115] Based on this, the drag test process is automated and each action can be precisely controlled to verify the correctness and reliability of the drag function.
[0116] As a possible implementation, the function to be tested includes an industrial bus function and a functional safety input / output interface function. The above step S302 runs the test code of the function to be tested, determines at least one target controlled device related to the function to be tested, and generates a test instruction for the function to be tested, including:
[0117] If the test object is at least one target robotic arm among multiple robotic arms, a first control device corresponding to each target robotic arm, and a second control device, then at least one target robotic arm is used as a target controlled device related to the function to be tested; and an eighth test instruction corresponding to the first control device corresponding to each target robotic arm is generated according to the test event.
[0118] Optionally, when the function to be tested is an industrial bus function, the second control device PLC communicates with the first control device corresponding to the target robotic arm through an industrial bus protocol (such as Modbus TCP, Modbus RTU, Profinet, Ethernet / IP), and the eighth test instruction is an operation instruction for the first control device corresponding to the target robotic arm, which is used to ensure that the first control device (control cabinet) can correctly respond to instructions from the PLC.
[0119] Exemplarily, the program in the PLC is configured to enable it to communicate with the robotic arm control cabinet through the industrial bus protocol, the PLC is controlled to send data or instructions to the robotic arm control cabinet through the industrial bus protocol (such as Modbus TCP, Modbus RTU, Profinet, Ethernet / IP), the robotic arm control cabinet is controlled to respond to the data or instructions from the PLC and perform corresponding actions, and observe whether the robotic arm control cabinet responds correctly and record the test results.
[0120] Optionally, when the function to be tested is a functional safety input / output interface function, configure the program in the PLC so that it can communicate with the physical IO (such as emergency stop button, protective stop button) on the robot control cabinet through hardware wiring, thereby controlling the PLC to send emergency stop input and protective stop input signals, and verify whether the robot control cabinet can correctly respond to these signals and trigger the preset safety behavior. Specifically, observe whether the robot control cabinet responds correctly and record the test results.
[0121] Correspondingly, sending a test instruction of a target robotic arm to at least one first control device and / or a second control device includes: sending an eighth test instruction to the first control device corresponding to each target robotic arm.
[0122] Exemplarily, when the function to be tested is an industrial bus function, an eighth test instruction is sent to the first control device corresponding to the target robot arm, so that the PLC communicates with the robot arm control cabinet and verifies the accuracy of data exchange and control. When the function to be tested is a functional safety input and output interface function, a test instruction is sent to the first control device corresponding to the target robot arm, so that the PLC sends safety signals and verifies whether the robot arm control cabinet responds to these signals correctly.
[0123] In summary, this application replaces manual testing by designing a dual-robot test bench that supports load, collision, dragging, and functional safety testing, simulating a real working environment, and providing a comprehensive automated testing solution. In addition, continuous integration enables automated testing to be automatically triggered after each code change, increasing the frequency and coverage of testing, and enabling potential problems to be discovered and fixed in a timely manner. Combined with real-time build and test feedback mechanisms, this proposal also achieves efficient feedback and improvement, accelerates problem response and development iterations, and significantly improves development efficiency.
[0124] Based on this, the embodiment of the present application significantly improves the test efficiency, coverage and comprehensiveness by integrating the automated test scripts of the gRPC interface, the continuous integration (CI) system and the dual-manipulator test bench. Specifically, the automated test scripts ensure the full coverage of functional safety and human-computer interaction functions, the CI system improves the frequency and timeliness of testing, and the robotic arm test bench supports complex hardware testing and real environment simulation, and combined with the real-time feedback mechanism of the Jenkins server, it promotes the modernization and intelligence of the robot testing process and improves the overall efficiency of development and testing.
[0125] The present application embodiment also provides an electronic device 600, such as Figure 6As shown, it is a schematic diagram of the structure of an electronic device 600 provided in an embodiment of the present application, including: a processor 601, a memory 602, and optionally, a bus 603. The memory 602 stores machine-readable instructions executable by the processor 601. When the electronic device 600 is running, the processor 601 communicates with the memory 602 through the bus 603. When the machine-readable instructions are executed by the processor 601, the method steps in the robot testing method described in any one of the above items are executed.
[0126] An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method steps in any of the above robot testing methods are executed.
[0127] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0128] In addition, each functional unit in each embodiment of the present application can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or part of the technical solution that contributes to the prior art or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Mem ory), disk or optical disk and other media that can store program code.
[0129] The above are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A robot testing method, characterized in that: A server applied to a robot test system, the robot test system comprising: the server, a plurality of mechanical arms, at least one sensor arranged at the end of the mechanical arms, at least one load switching device arranged at the end of the mechanical arms, a first control device corresponding to each of the mechanical arms, at least one load, a collision test device and a second control device, the method comprising: Calling a test service interface to obtain test code of the function to be tested from a source code management system, wherein the source code management system is used to record the test code written by the user, and the source code management system is deployed on the server; Run the test code of the function to be tested, determine at least one target controlled device related to the function to be tested, and generate a test instruction for the function to be tested; Sending a test instruction of a target robotic arm to at least one of the first control device and / or the second control device, so as to control the at least one target controlled device to perform a corresponding action through at least one of the first control device and / or the second control device; A test result when the at least one target controlled device performs a test action is obtained through at least one of the first control device and / or the second control device, and a test report of the function to be tested is generated according to the test result.
2. The method according to claim 1, characterized in that The step of running the test code of the function to be tested and determining at least one target controlled device related to the function to be tested includes: Run the test code of the function to be tested to obtain test parameters corresponding to the function to be tested, wherein the test parameters include a test object and a test event, wherein the test event is used to indicate a test process for executing the function to be tested, and the test object is used to indicate a device participating in the test process of the function to be tested; At least one of the target controlled devices related to the function to be tested is determined according to the test parameters.
3. The method according to claim 2, characterized in that The step of determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes: If the test object is a target robotic arm among the multiple robotic arms and the load switching device on the target robotic arm, the target robotic arm and the load switching device on the target robotic arm are used as target controlled devices related to the function to be tested; A first test instruction corresponding to the target robot arm and a second test instruction corresponding to the load switching device are generated according to the test event.
4. The method according to claim 3, characterized in that The sending a test instruction of the target mechanical arm to at least one of the first control device and / or the second control device comprises: Sending the first test instruction to the first control device corresponding to the target robotic arm; The second test instruction is sent to the second control device.
5. The method according to claim 2, characterized in that: The step of determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes: If the test object is a target mechanical arm and at least one target device among the multiple mechanical arms, the target mechanical arm and at least one target device are used as target controlled devices related to the function to be tested, and the target device includes: a sensor arranged at the end of the target mechanical arm, a gripper arranged at the end of the target mechanical arm, and the second control device; A third test instruction corresponding to the target mechanical arm and a fourth test instruction corresponding to at least one of the target devices are generated according to the test event.
6. The method according to claim 5, characterized in that The sending a test instruction of the target mechanical arm to at least one of the first control device and / or the second control device comprises: Sending the third test instruction to the first control device corresponding to the target robotic arm; The fourth test instruction is sent to the second control device.
7. The method according to claim 2, characterized in that The step of determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes: If the test object is a target mechanical arm among the multiple mechanical arms and the collision test device, the target mechanical arm is used as a target controlled device related to the function to be tested; A fifth test instruction corresponding to the target robotic arm is generated according to the test event.
8. The method according to claim 2, characterized in that: The step of determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes: If the test object is the first robotic arm and the second robotic arm among the multiple robotic arms, the first robotic arm and the second robotic arm are used as target controlled devices related to the function to be tested; A sixth test instruction corresponding to the first robotic arm and a seventh test instruction corresponding to the second robotic arm are generated according to the test event.
9. The method according to claim 2, characterized in that: The step of determining at least one target controlled device related to the function to be tested according to the test parameters, and generating a test instruction for the function to be tested includes: If the test object is at least one target robotic arm among the multiple robotic arms, a first control device corresponding to each of the target robotic arms, and the second control device, at least one of the target robotic arms is used as a target controlled device related to the function to be tested; An eighth test instruction corresponding to the first control device corresponding to each of the target robotic arms is generated according to the test event.
10. A robot testing system, characterized in that: The robot testing system comprises: a server and a test bench, wherein the test bench comprises: a plurality of mechanical arms, at least one sensor disposed at the end of the mechanical arms, at least one load switching device disposed at the end of the mechanical arms, a first control device corresponding to each of the mechanical arms, at least one load, a collision test device and a second control device; The first control device corresponding to each of the mechanical arms is communicatively connected with the server and the second control device respectively; The sensor, the load switching device and the load are sequentially installed at the end of the mechanical arm.
Citation Information
Patent Citations
Automatic testing method and device of industrial robot, demonstrator and storage medium
CN115687137A
Collaborative robot test system, control method, control device and storage medium
CN117921737A
Collaborative robot safety collision automatic flexible detection system
CN214538445U
Universal automated testing of embedded systems
US20180113774A1
Automatic testing system and method for robot, and build server and storage medium
WO2021227690A1