Robot testing method and robot testing system
By using an automated testing system, the testing process is executed automatically through servers and control equipment, which solves the problem of low efficiency in existing robot testing methods, achieves efficient and accurate test coverage, and ensures the stability and reliability of the robot system.
Patent Information
- Application Number
- CN202411676745.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2044-11-21
AI Technical Summary
Existing robot testing methods are inefficient, lack accuracy, and have limited coverage, making it difficult to comprehensively assess failure modes, especially in complex and ever-changing working environments.
An automated testing system is adopted, which obtains test code by calling the test service interface through the server, identifies the target controlled device and generates test instructions, uses the control device to execute actions and collect test results, and automatically generates test reports.
It improves testing efficiency and coverage, reduces the need for manual operation, and ensures system stability and reliability in complex environments.
Smart Images

Figure CN119502011B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of robotics technology, and more specifically, to a robot testing method and a robot testing system. Background Technology
[0002] With the continuous improvement of industrial automation, robots have been widely used in manufacturing due to their ability to work safely alongside humans in the same workspace. To ensure safety in human-robot coexistence environments, robots must be equipped with a series of safety protection measures, such as collision detection systems and emergency stop mechanisms. The effectiveness of these functions directly affects the safety and reliability of the production process; therefore, rigorous testing of functional safety is crucial.
[0003] Existing testing methods primarily rely on manual operation, simulating collisions or disturbances in real-world scenarios to verify whether the robot's response meets design requirements. While this approach provides an intuitive operational experience, its limitations become increasingly apparent when facing complex and ever-changing working environments. Specifically, manual testing is often inefficient, requiring significant time and manpower for each test. Furthermore, due to human factors, the accuracy of test results is difficult to guarantee, and the test coverage is limited, ultimately failing to comprehensively assess all possible failure modes. Summary of the Invention
[0004] The purpose of this application is to provide a robot testing method and robot testing system to address the shortcomings of the prior art and solve the limitations of the prior art when facing complex and ever-changing working environments.
[0005] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows:
[0006] In a first aspect, embodiments of this application provide a robot testing method applied to a server in a robot testing system. The robot testing system includes: the server, multiple robotic arms, at least one sensor disposed at the end of each robotic arm, at least one load switching device disposed at the end of each robotic arm, a first control device corresponding to each robotic arm, at least one load and collision testing device, and a second control device. The method includes:
[0007] The test service interface is called to obtain the test code of the function to be tested from the source code management system, wherein the source code management system is used to record the test code written by the user and is deployed on the server;
[0008] Run the test code of the function under test, identify at least one target controlled device related to the function under test, and generate test instructions for the function under test;
[0009] Send test instructions for the target robotic arm to at least one of the first control devices and / or the second control devices, so as to control the at least one target controlled device to perform corresponding actions through at least one of the first control devices and / or the second control devices;
[0010] The test results of the at least one target controlled device performing test actions are obtained by acquiring the test results through at least one of the first control devices and / or the second control devices, and a test report of the function under test is generated based on the test results.
[0011] As one possible implementation, the test code that runs the function under test determines at least one target controlled device related to the function under test, including:
[0012] Run the test code of the function under test to obtain the test parameters corresponding to the function under test. The test parameters include test objects and test events. The test events are used to indicate the test process of the function under test, and the test objects are used to indicate the devices participating in the test process of the function under test.
[0013] Based on the test parameters, at least one of the target controlled devices related to the function under test is determined.
[0014] As one possible implementation, determining at least one target controlled device related to the function under test based on the test parameters, and generating test instructions for the function under test, includes:
[0015] If the test object is one of the multiple robotic arms, specifically a target robotic arm and the load switching device on the target robotic arm, then the target robotic arm and the load switching device on the target robotic arm are considered as the target controlled device related to the function under test.
[0016] Based on the test event, a first test command corresponding to the target robotic arm and a second test command corresponding to the load switching device are generated.
[0017] As one possible implementation, sending the test command for the target robotic arm to at least one of the first control devices and / or the second control devices includes:
[0018] Send the first test command to the first control device corresponding to the target robotic arm;
[0019] Send the second test command to the second control device.
[0020] As one possible implementation, determining at least one target controlled device related to the function under test based on the test parameters, and generating test instructions for the function under test, includes:
[0021] If the test object is one of the multiple robotic arms, a target robotic arm, and at least one target device, then the target robotic arm and at least one target device are regarded as the target controlled device related to the function under test. The target device includes: a sensor disposed at the end of the target robotic arm, a gripper disposed at the end of the target robotic arm, and the second control device.
[0022] Based on the test event, a third test instruction corresponding to the target robotic arm and at least one fourth test instruction corresponding to the target device are generated.
[0023] As one possible implementation, sending the test command for the target robotic arm to at least one of the first control devices and / or the second control devices includes:
[0024] Send the third test command to the first control device corresponding to the target robotic arm;
[0025] The fourth test command is sent to the second control device.
[0026] As one possible implementation, determining at least one target controlled device related to the function under test based on the test parameters, and generating test instructions for the function under test, includes:
[0027] If the test object is one of the multiple robotic arms and the collision test device, then the target robotic arm is regarded as the target controlled device related to the function under test;
[0028] The fifth test instruction corresponding to the target robotic arm is generated based on the test event.
[0029] As one possible implementation, determining at least one target controlled device related to the function under test based on the test parameters, and generating test instructions for the function under test, includes:
[0030] If the test object is the first robotic arm and the second robotic arm among the plurality of robotic arms, then the first robotic arm and the second robotic arm are regarded as the target controlled device related to the function under test;
[0031] Based on the test event, a sixth test instruction corresponding to the first robotic arm and a seventh test instruction corresponding to the second robotic arm are generated.
[0032] As one possible implementation, determining at least one target controlled device related to the function under test based on the test parameters, and generating test instructions for the function under test, includes:
[0033] If the test object is at least one target robotic arm among the plurality of robotic arms, the first control device corresponding to each target robotic arm, and the second control device, then at least one target robotic arm is regarded as the target controlled device related to the function under test;
[0034] Based on the test events, an eighth test command is generated corresponding to the first control device of each target robotic arm.
[0035] Secondly, this application provides a robot testing system, which includes a server and a test bench. The test bench includes multiple robotic arms, at least one sensor disposed at the end of the robotic arm, at least one load switching device disposed at the end of the robotic arm, a first control device corresponding to each robotic arm, at least one load and collision testing device, and a second control device.
[0036] Each robotic arm has a first control device that is communicatively connected to 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 robotic arm.
[0038] Thirdly, embodiments of this application provide an electronic device, including: a processor, a storage medium, and a bus. The storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the storage medium via the bus, and the processor executes the machine-readable instructions to perform the steps of the robot testing method as described in any of the first aspects above.
[0039] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the robot testing method as described in any of the first aspects above.
[0040] According to the robot testing method and system of this application, a test service interface is invoked to obtain test code for the function under test from a source code management system deployed on a server. When running the test code for the function under test, at least one target controlled device related to the function under test is first identified, and test instructions for the function under test are generated. Subsequently, test instructions for the target robotic arm are sent to at least one first control device and / or a second control device to control the target controlled device to perform corresponding actions. During the execution of test actions by the target controlled device, test results are collected through at least one first control device and / or a second control device, and a test report for the function under test is generated based on these test results. According to the embodiments of this application, by invoking the test service interface to obtain test code and automatically running the test, automated testing can cover more test scenarios according to predetermined test cases and reduce the need for manual operation, enabling the testing process to be completed in a short time. This expands the test coverage while improving test efficiency, effectively solving the problems of low efficiency, low accuracy, and limited test coverage in traditional manual testing. Especially when facing complex and changing working environments, automated testing can better ensure the stability and reliability of the system. Attached Figure Description
[0041] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 This paper shows a schematic diagram of the architecture of a robot testing system provided in an embodiment of this application;
[0043] Figure 2 A schematic diagram of a test bench provided in an embodiment of this application is shown;
[0044] Figure 3 A flowchart illustrating a robot testing method provided in an embodiment of this application is shown;
[0045] Figure 4 This illustration shows a flowchart of a continuous integration process provided in an embodiment of this application.
[0046] Figure 5 A flowchart illustrating a method for determining a target controlled device according to an embodiment of this application is shown.
[0047] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. It should be understood that the accompanying drawings in this application are for illustrative and descriptive purposes only and are not intended to limit the scope of protection of this application. Furthermore, it should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of this application. It should be understood that the operations in the flowcharts may not be implemented in sequence, and steps without logical contextual relationships may be reversed or implemented simultaneously. In addition, those skilled in the art, guided by the content of this application, may add one or more other operations to the flowcharts, or remove one or more operations from the flowcharts.
[0049] Furthermore, the described embodiments are merely some, not all, of the embodiments of this application. The components of the embodiments of this application described and illustrated herein can typically be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0050] To enable those skilled in the art to utilize the content of this application, and in conjunction with the specific application scenario of "automated testing for robot functional safety," the following implementation is provided. 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 primarily describes robot testing methods, it should be understood that this is merely an exemplary embodiment.
[0051] It should be noted that the term "comprising," will be used in the embodiments of this application to indicate the presence of the features declared thereafter, but does not exclude the addition of other features.
[0052] Because a key characteristic of robots is their ability to work alongside human workers, their testing systems must ensure compliance with stringent safety standards across all application scenarios. However, current technologies often struggle to achieve full automation in testing tasks requiring physical interaction with humans (such as dragging, collision detection, and emergency stops). This not only limits the degree of automation but also increases labor costs and time consumption, and can introduce errors due to human factors. Furthermore, existing automated testing systems typically rely on specific technologies or platforms, thus limiting their versatility and flexibility. For example, OTA (Over-The-Air) server-based systems may not be suitable for robots lacking network communication capabilities or requiring specific adapters. Similarly, TCP interfaces may be unsuitable or require additional adaptation for robots using other communication protocols or those that do not support network communication.
[0053] Furthermore, robots need to possess various safety protection measures, such as collision detection and emergency stop functions, to ensure reliable operation in working environments coexisting with humans. Testing these functions typically requires simulating collisions or interference in actual operation to verify whether the system response meets design requirements. While manual testing provides valuable practical experience, it suffers from significant shortcomings in efficiency, accuracy, test coverage, feedback speed, and data analysis when dealing with complex dynamic factors and changing working environments. To address these issues, this invention proposes an automated testing system specifically for robots. This robot testing system consists of two main parts: a software platform and a hardware platform. It aims to comprehensively test the functional safety of robots and automatically generate test reports. The entire testing process is automated, significantly improving testing efficiency, simplifying problem tracking and management processes, and providing testers with an intuitive and user-friendly interface and simplified operating procedures.
[0054] Figure 1 A schematic diagram of the architecture of a robot testing system provided in an embodiment of this application is shown. (Refer to...) Figure 1 As shown, the robot testing system includes a server and a test bench. The test bench includes multiple robotic arms, at least one sensor mounted at the end of each robotic arm, at least one load switching device mounted at the end of each robotic arm, a first control device corresponding to each robotic arm, at least one load, a collision testing device, and a second control device. The first control device corresponding to each robotic arm is communicatively connected to the server and the second control device, respectively. The sensor, load switching device, and load are sequentially mounted at the end of the robotic arm. For example, refer to... Figure 1As shown, label 1 corresponds to the sensor, labels 2 and 3 correspond to the load switching device, label 4 corresponds to the load, label 6 corresponds to the collision test equipment, and the end of the robotic arm can also be equipped with a gripper corresponding to label 5. Control cabinet A and control cabinet B are the first control devices corresponding to robotic arm A and robotic arm B, and PLC is the second control device.
[0055] Furthermore, since this application focuses on the functional testing of robots, most of the robot's software functions, such as motion algorithms, program instructions, and various settings, can be automated through the robotic arm and control cabinet. However, some test content, such as load, collision, dragging, and industrial bus-related functions, requires additional hardware support. Therefore, it is necessary to build a hardware test bench adapted to the test scripts 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: robotic arm body, control cabinet, PLC, quick-change device (i.e., load switching device, corresponding to...) Figure 2 The components include the quick-change robotic arm side and quick-change tool side, sensors, loads of different weights, collision testing equipment, switches, and grippers. Taking two robotic arms (robotic arm A and robotic arm B) as an example, the sensors, quick-change robotic arm side, quick-change tool side, and load are installed sequentially from the center of the end of robotic arm A outwards. The grippers are installed at the end of robotic arm B. The installation distance between the two robotic arms must be within the arm span to ensure that robotic arm B can push robotic arm A to test the dragging function.
[0057] Based on this, the robot testing system provided in the embodiments of this application effectively solves the technical problem that robots cannot automatically test functional safety and human-computer interaction functions, and improves testing efficiency and testing coverage.
[0058] The following is in conjunction with the above. Figure 1 The robot testing system shown and Figure 2 The contents described in the test bench shown provide a detailed explanation of the robot testing method provided in the embodiments of this application.
[0059] Figure 3 A flowchart illustrating a robot testing method provided in an embodiment of this application is shown. (Refer to...) Figure 3 As shown, the execution entity of this method is the server in the robot testing system, and the specific execution process is as follows:
[0060] S301. Call the test service interface to obtain the test code of the function to be tested from the source code management system.
[0061] Optionally, the source code management system, such as Git, is used to record user-written test code. The test service interface, such as a communication interface (Google Remote Procedure Call, gRPC), is a high-efficiency, high-performance remote procedure call protocol used for communication between the client and server. By calling the gRPC interface to obtain the test code, the test process can be started. Based on this, the latest or specified version of the test code is pulled from the Git source code management system. This test code contains test cases to verify whether the function under test is correct. Then, by running the test code for the function under test, the robot's function under test is verified to work as expected.
[0062] S302. Run the test code for the function under test, identify at least one target controlled device related to the function under test, and generate test instructions for the function under test.
[0063] Optionally, combined Figure 1 and Figure 2 As shown, the target controlled device includes at least one robotic arm and / or load switching device. By executing test code related to the function under test, it is determined which devices will participate in the testing process of the function under test, to ensure that the real environment in which the function under test operates can be accurately simulated during the test, and to verify whether the interaction between the function under test and the devices meets expectations.
[0064] Optionally, based on the test code of the function under test, specific commands or instructions are generated to drive the target controlled device to perform specific actions or responses, so that the target controlled device can operate according to the test plan and observe the performance of the function under test under specific conditions, thereby automatically verifying whether the function under test works as expected, and also detecting possible problems or defects.
[0065] S303, Send test instructions for the target robotic arm to at least one first control device and / or a second control device, so as to control at least one target controlled device to perform corresponding actions through at least one first control device and / or a second control device.
[0066] Optionally, combined Figure 1 and Figure 2As shown, the first control device is a control cabinet, and the second control device is a PLC. The first and / or second control devices receive test commands from the target robotic arm and convert them into signals suitable for the target robotic arm or other controlled devices. Based on this, once the first and / or second control devices receive the test commands, they control the target robotic arm or other controlled devices to perform corresponding actions based on the command content. By using the first and / or second control devices as intermediate control devices to transmit test commands, the flexibility and scalability of the testing system are enhanced, and the testing process can be adjusted without directly modifying the robotic arm control logic, thereby simplifying the management and maintenance of the testing system.
[0067] S304. Obtain the test results when at least one target controlled device performs a test action through at least one first control device and / or a second control device, and generate a test report of the function under test based on the test results.
[0068] Optionally, during the test, the first and second control devices are not only responsible for sending test commands to the target controlled device, but also for collecting data or feedback generated by the target controlled device when performing test actions, such as device status information, sensor readings, and the results of the actions. The first and second control devices collect this information and feed it back to the server to evaluate whether the function under test 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 meet the expectations, it indicates that the function is normal. If they do not meet the expectations, it indicates that there is a problem. Then, a test report will be automatically generated based on the analysis results. The test report may 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 a command to the corresponding robotic arm to grasp an object. At the same time, the device monitors the position, force, and other parameters of the robotic arm through sensors. After 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 committed to Git, the CI system will automatically pull the test code of the function under test and execute the test by calling the gRPC interface to ensure the correctness of the function under test.
[0072] Based on this, the robot testing method provided in the embodiments of this application obtains test code by calling the test service and runs the test automatically. Automated testing 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. At the same time, it expands the test coverage and improves 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 complex and ever-changing working environments, automated testing can better ensure the stability and reliability of the system.
[0073] Figure 4 A schematic diagram illustrating a continuous integration workflow provided in an embodiment of this application is shown. (Refer to...) Figure 4 As shown, before calling the test service interface to obtain the test code for the function under test from the source code management system, a software testing environment must first be set up to integrate automated testing with the continuous integration / continuous delivery (CI / CD) system. Specifically, the test service interface can be an SDK, gRPC, TCP, etc. Here, we take the gRPC interface as an example. To ensure the stability and reliability of the gRPC interface, obtain the proto file defining the gRPC service and message types, and select a suitable automated testing framework, such as pytest or Google Test, to write test cases. Based on this, create a gRPC client to communicate with the server, and call gRPC methods through the client object to pass appropriate parameters. Then, determine whether the return value of the gRPC method meets expectations based on the expected results.
[0074] Furthermore, gRPC interface testing is integrated into the Continuous Integration / Continuous Delivery (CI / CD) process to ensure that automated tests are triggered every time a different version of the test code is released. This requires writing a Dockerfile and building a Docker image containing the test dependencies on the Jenkins server; this Docker image build operation only needs to be performed once. Subsequently, users commit their test code to the source code management system Git. The Jenkins server periodically checks for changes in Git. Once a new test code commit is detected in Git, the Jenkins server pulls the new test code and prepares a new build. If the build fails, a notification is sent to the user; if the build succeeds, the new test code is deployed on the Jenkins server.
[0075] Specifically, the Jenkins server pulls test code via the gRPC test service interface, creates and loads it into a Docker container, runs the test code inside the container, and generates test reports in HTML and Excel formats within the container after the test is complete. Because the Docker container and the Jenkins server are mounted to a directory, the Jenkins server can directly export the test reports as artifacts, then stop and delete the Docker container, and clean up all files in the workspace. After the test is complete, the Jenkins server generates feedback and notifies the user of the build and test results, continuously monitors Git updates, and repeats the above process.
[0076] Based on this, the automation level of gRPC interface testing is effectively improved, reducing labor costs while accelerating feedback speed, and ensuring the quality and stability of robot functional testing.
[0077] Figure 5 A schematic flowchart of a method for determining a target controlled device according to an embodiment of this application is shown. (Refer to...) Figure 5 As shown, step S302 above runs the test code for the function under test and identifies at least one target controlled device related to the function under test. Specifically, it includes the following steps:
[0078] S501. Run the test code of the function under test to obtain the test parameters corresponding to the function under test.
[0079] Optionally, the test parameters include test objects and test events. Test events are used to indicate the test process for executing the function under test, and test objects are used to indicate the devices participating in the test process for the function under test.
[0080] For example, test code typically contains various test cases, each with specific input data and expected output, to verify the correctness of the function under test. During the execution of the test code, test parameters related to the function under test are extracted. These test parameters are crucial information for guiding and controlling the testing process, and may include, for example, the test object and test events. The test object refers to the device participating in the testing of the function under test, such as... Figure 2 The test bench shown contains entities such as robotic arms, sensors, and grippers that actually perform test actions or corresponding test commands. Test events are used to indicate how to execute the test process for the function under test. They can be understood as a series of operational steps or condition settings used to guide the test process, ensuring that the test covers all important aspects of the function.
[0081] For example, the process of extracting test parameters from test code involves parsing the test code, identifying key information, and converting that key information into parameters that can be used for automated testing. Specifically, test code should be written following certain structures and naming conventions, or clearly distinguished between test objects and test events using clear naming and comments to quickly identify which information in the test code belongs to the test object and which belongs to the test event. Alternatively, a configuration file can be created to define test parameters, and the information about the test object and test event can be read from the configuration file when the test code is run. Or, the reflection mechanism provided by the programming language can be used to dynamically obtain the properties (representing the test object) and methods (representing the test event) in the class.
[0082] S502. Based on the test parameters, determine at least one target controlled device related to the function under test.
[0083] Optionally, by parsing the test parameters, the test objects and test events are determined, and the test objects are mapped to the actual execution devices. Specifically, based on the test objects in the test parameters, a list of actual devices is created, and based on the list of actual devices, it is determined which devices are at least one target controlled device related to the function under test. The abstract device names in the test parameters are mapped to the actual devices used to control the target controlled devices to perform corresponding test actions.
[0084] Based on this, at least one target controlled device related to the function under test can be effectively identified from the test parameters, and the corresponding test actions can be executed by controlling the device. This not only improves the automation level of the test, but also ensures the accuracy and integrity of the test process.
[0085] As one possible implementation, the function under test includes a load function. Step S302 above executes the test code for the function under test, identifies at least one target controlled device related to the function under test, and generates test instructions for the function under test, including:
[0086] If the test object is a target robotic arm and a load switching device on the target robotic arm among multiple robotic arms, then the target robotic arm and the load switching device on the target robotic arm are regarded as the target controlled device related to the function under test; the first test instruction corresponding to the target robotic arm and the second test instruction corresponding to the load switching device are generated according to the test event.
[0087] Optionally, when the function under test is a load function, if the test object is a target robotic arm among multiple robotic arms and the load switching device on the target robotic arm, it can be understood that a load test needs to be performed on the 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 the target controlled device related to the load function.
[0088] For example, depending on the test event, two types of test instructions need to be generated, including a first test instruction for the target robotic arm and a second test instruction for the load switching device. The first test instruction is used to control the target robotic arm to perform specific actions, such as moving from the initial position to the tool rack, engaging and locking with the tool disk, and returning to the initial position. The second test instruction is used to control the load switching device to switch the load.
[0089] Specifically, the robotic arm is powered on and enabled. A PLC signal controls a continuous supply of compressed air to the quick-change robotic arm side. The tool side is unlocked, and the robot moves from its initial joint position to the tool holder, aligning with the quick-change tool side. The tool tray engages and locks with the robotic arm side. The robot then moves from the tool holder back to its initial position to perform the relevant load-bearing movements. Based on this, the above test process is repeated by switching loads of different weights to verify the functional stability and performance of the robotic arm under different load conditions.
[0090] Accordingly, sending test instructions for the 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] For example, the first test command is an operation command for the target robotic arm, used to control the target robotic arm to perform a specific action, and the second test command is an operation command for the load switching device, used to control the load switching device to switch loads. Based on this, the target robotic arm is controlled to perform actions by sending the first test command to the first control device corresponding to the target robotic arm, and the load switching device is controlled to switch loads by sending the second test command to the second control device.
[0092] Based on this, the load function test mainly focuses on how to verify the performance of the robotic arm under different load conditions by controlling the target robotic arm and its load switching device. The automated test process efficiently and accurately completes this series of load function tests, ensuring the reliability of the test results.
[0093] As one possible implementation, the function under test includes terminal input / output interface functions. Step S302 above executes the test code for the function under test, identifies at least one target controlled device related to the function under test, and generates test instructions for the function under test, including:
[0094] If the test object is one of multiple robotic arms, including a target robotic arm and at least one target device, then the target robotic arm and at least one target device are regarded as target controlled devices related to the function under test. The target device includes: a sensor set at the end of the target robotic arm, a gripper set 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-effector input / output interface function, if the test object is one of multiple robotic arms, a target robotic arm, and at least one target device, it can be understood that an interface test needs to be performed on a specific target robotic arm and its end-effector device. That is, the target robotic arm and at least one target device are regarded as the target controlled device related to the end-effector input / output interface function. The target device may include sensors, grippers, and other related control devices installed at the end of the target robotic arm.
[0096] For example, depending on the test event, two types of test instructions need to be generated: a third test instruction for the target robotic arm and a fourth test instruction for at least one target device. The third test instruction is used to control the robotic arm to perform specific actions or states in conjunction with the testing of sensors or grippers, while the fourth test instruction is used to control the sensors, grippers, or other devices to perform corresponding actions or state changes.
[0097] Specifically, sensors, grippers, and other devices are fixedly mounted on the end effector of the robotic arm. The Telematics Interface (TIO) at the end effector is prepared to communicate with the sensors, grippers, and other devices, and the communication lines are ensured to be correctly connected. Based on this, the target robotic arm is controlled to perform specific actions or change states, such as moving to a designated location or activating specific functions. The sensors, grippers, or other devices are also controlled to perform corresponding actions or state changes, such as sending data requests or triggering sensor reads. Then, a test script is used to call the TIO and sensor-related interfaces to perform functional tests, verifying whether the results returned by the interfaces meet expectations.
[0098] Accordingly, sending test instructions for the target robotic arm to at least one first control device and / or a 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] For example, the third test instruction is an operation instruction for the target robotic arm, used to control the robotic arm to perform specific actions or states to cooperate with the testing of sensors or grippers. The fourth test instruction is an operation instruction for at least one target device, used to control sensors, grippers, or other devices to perform corresponding actions or state changes. Based on this, the target robotic arm is controlled to perform specific actions or change states by sending the third test instruction to the first control device corresponding to the target robotic arm, and the target robotic arm is controlled to perform corresponding actions or change states by sending the fourth test instruction to the second control device.
[0100] Therefore, the testing of end-effector input / 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 end-effector devices. Through automated testing processes, this series of tests can be completed efficiently and accurately, and the reliability of the test results can be ensured.
[0101] As one possible implementation, the function under test includes a collision function. Step S302 above executes the test code for the function under test, identifies at least one target controlled device related to the function under test, and generates test instructions for the function under test, including:
[0102] If the test object is one of multiple robotic arms, including a target robotic arm and a collision test device, then the target robotic arm is regarded as the target controlled device related to the function under test; and the 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 a collision test needs to be performed on a specific target robotic arm using a collision detection device. This means that the target robotic arm is regarded as the target controlled device related to the collision function, and test instructions corresponding to the target robotic arm are generated according to the test event.
[0104] For example, a collision testing device is a device used to detect the reaction and force limit of a robotic arm during a collision. The collision testing device 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 perform related actions to trigger collision detection. The device observes and records whether the robotic arm bounces back during a collision and whether the collision force meets the preset value.
[0105] Accordingly, sending test instructions for the target robotic arm to at least one first control device and / or a second control device includes sending a fifth test instruction to the first control device corresponding to the target robotic arm.
[0106] For example, the fifth test command is an operation command for the target robotic arm, used to control the robotic arm to perform specific actions or states to verify its collision detection function. By sending the fifth test command 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 it is observed whether the target robotic arm bounces back after the collision, and whether the collision force meets the preset value.
[0107] Based on this, the collision function testing process is automated, and each action can be precisely controlled, thereby verifying the correctness and reliability of the robotic arm in collision detection.
[0108] As one possible implementation, the function under test includes a drag-and-drop function. Step S302 above executes the test code for the function under test, identifies at least one target controlled device related to the function under test, and generates test instructions for the function under test, including:
[0109] If the test object is the first and second robotic arms among multiple robotic arms, then the first and second robotic arms are regarded as the target controlled devices related to the function under test; 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 under test is a drag-and-drop function, if the test object is the first and second robotic arms among multiple robotic arms, then these two robotic arms need to be regarded as target controlled devices related to the function under test, and corresponding test instructions need to be generated according to the test events.
[0111] For example, combined Figure 2 As shown, the first robotic arm is robotic arm A, and the second robotic arm is robotic arm B. Robotic arm A, as the main component for the dragging function, is responsible for performing the dragging action. Robotic arm B assists in performing the dragging test by pushing robotic arm A through low-speed joint movements. Specifically, the sixth test command is an operation command for the first robotic arm (robotic arm A), used to control it to enter dragging mode, move from the dragging start point to the dragging end point, and exit dragging mode after the test. The seventh test command is an operation command for the second robotic arm (robotic arm B), used to control it to move from its initial position to the dragging point at low speed and push the first robotic arm (robotic arm A) to complete the dragging action.
[0112] For example, move robotic arms A and B to the vicinity of the dragging point but without making contact, enable dragging on robotic arm A, control robotic arm B to perform low-speed joint movement, push robotic arm A from the dragging start point to the dragging end point, disable the dragging function of robotic arm A, and record the test results.
[0113] Accordingly, sending test instructions for the target robotic arm to at least one first control device and / or a second control device includes: 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] For example, by sending a sixth test command to the first control device (control cabinet A) corresponding to the first robotic arm (robotic arm A) and a seventh test command to the second control device (control cabinet B) corresponding to the second robotic arm (robotic arm B), robotic arms A and B are made to perform actions according to a predetermined test procedure and the test results are recorded.
[0115] Based on this, the drag-and-drop testing process is automated, and each action can be precisely controlled, thereby verifying the correctness and reliability of the drag-and-drop function.
[0116] As one possible implementation, the function under test includes industrial bus functions and functional safety input / output interface functions. Step S302 above executes the test code for the function under test, identifies at least one target controlled device related to the function under test, and generates test instructions for the function under test, including:
[0117] If the test object is at least one target robotic arm among multiple robotic arms, the first control device and the second control device corresponding to each target robotic arm, then at least one target robotic arm is regarded as the target controlled device related to the function under test; the 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 under test 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). The eighth test instruction is an operation instruction for the first control device corresponding to the target robotic arm, used to ensure that the first control device (control cabinet) can correctly respond to the instructions from the PLC.
[0119] For example, the program in the PLC is configured to communicate with the robotic arm control cabinet via an industrial bus protocol. The PLC is controlled to send data or instructions to the robotic arm control cabinet via an 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. The correctness of the robotic arm control cabinet's response is observed, and the test results are recorded.
[0120] Optionally, when the function under test is a functional safety input / output interface function, the program in the PLC is configured to communicate with the physical I / O (such as emergency stop button and protective stop button) on the robotic arm control cabinet via hardware connections. This allows the PLC to send emergency stop input and protective stop input signals, and verifies whether the robotic arm control cabinet can correctly respond to these signals and trigger preset safety behaviors. Specifically, the correct response of the robotic arm control cabinet is observed, and the test results are recorded.
[0121] Accordingly, sending test instructions for the 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] For example, when the function under test is an industrial bus function, an eighth test command is sent to the first control device corresponding to the target robotic arm, enabling communication between the PLC and the robotic arm control cabinet, and verifying the accuracy of data exchange and control. When the function under test is a functional safety input / output interface function, a test command is sent to the first control device corresponding to the target robotic arm, causing the PLC to issue safety signals, and verifying whether the robotic arm control cabinet responds correctly to these signals.
[0123] In summary, this application provides a comprehensive automated testing solution by designing a dual-robotic arm test bench that supports load, collision, drag-and-drop functionality, and functional safety testing, replacing manual testing and simulating a real-world working environment. Furthermore, continuous integration enables automated tests to be triggered automatically after each code change, increasing test frequency and coverage, and allowing for the timely identification and remediation of potential issues. Combined with real-time build and test feedback mechanisms, this proposal also achieves efficient feedback and improvement, accelerating issue response and development iteration, and significantly improving development efficiency.
[0124] Based on this, the embodiments of this application significantly improve testing efficiency, coverage, and comprehensiveness by integrating gRPC interface-based automated test scripts, a continuous integration (CI) system, and a dual-robotic arm test bench. Specifically, the automated test scripts ensure comprehensive coverage of functional safety and human-computer interaction functions, the CI system increases test frequency and timeliness, and the robotic arm test bench supports complex hardware testing and real-world environment simulation. Furthermore, combined with the real-time feedback mechanism of the Jenkins server, it promotes the modernization and intelligence of the robotic testing process, improving the overall efficiency of development and testing.
[0125] This application also provides an electronic device 600, such as... Figure 6The diagram shown is a schematic representation of the structure of an electronic device 600 provided in an embodiment of this application. It includes a processor 601 and 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 and the memory 602 communicate via the bus 603. When the machine-readable instructions are executed by the processor 601, they perform the method steps in the robot testing method described in any of the preceding claims.
[0126] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, performs the method steps of the robot testing method described in any of the preceding claims.
[0127] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and devices described above can be referred to the corresponding processes in the method embodiments, and will not be repeated here. In the several embodiments provided in this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, 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 displayed or discussed mutual coupling or direct coupling or communication connection can be through some communication interfaces; the indirect coupling or communication connection of devices or modules can be electrical, mechanical, or other forms.
[0128] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. If the functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, in essence, or the part that contributes to the prior art, or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes: USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, optical disks, and other media capable of storing program code.
[0129] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application.
Claims
1. A robot testing method, characterized in that, A server applied in a robot testing system, the robot testing system comprising: the server, multiple robotic arms, at least one sensor disposed at the end of each robotic arm, at least one load switching device disposed at the end of each robotic arm, a first control device corresponding to each robotic arm, at least one load and collision testing device, and a second control device, the method comprising: The test service interface is called to obtain the test code of the function to be tested from the source code management system, wherein the source code management system is used to record the test code written by the user and is deployed on the server; Run the test code of the function under test, identify at least one target controlled device related to the function under test, and generate test instructions for the function under test; Send test instructions for the target robotic arm to at least one of the first control devices and / or the second control devices, so as to control the at least one target controlled device to perform corresponding actions through at least one of the first control devices and / or the second control devices; The test results of the at least one target controlled device performing test actions are obtained by acquiring the test results through at least one of the first control devices and / or the second control devices, and a test report of the function under test is generated based on the test results.
2. The method according to claim 1, characterized in that, The test code that runs the function under test determines at least one target controlled device related to the function under test, including: Run the test code of the function under test to obtain the test parameters corresponding to the function under test. The test parameters include test objects and test events. The test events are used to indicate the test process of the function under test, and the test objects are used to indicate the devices participating in the test process of the function under test. Based on the test parameters, at least one of the target controlled devices related to the function under test is determined.
3. The method according to claim 2, characterized in that, The step of determining at least one target controlled device related to the function under test based on the test parameters, and generating test instructions for the function under test, includes: If the test object is one of the multiple robotic arms, specifically a target robotic arm and the load switching device on the target robotic arm, then the target robotic arm and the load switching device on the target robotic arm are considered as the target controlled device related to the function under test. Based on the test event, a first test command corresponding to the target robotic arm and a second test command corresponding to the load switching device are generated.
4. The method according to claim 3, characterized in that, Sending the test command for the target robotic arm to at least one of the first control devices and / or the second control devices includes: Send the first test command to the first control device corresponding to the target robotic arm; Send the second test command 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 under test based on the test parameters, and generating test instructions for the function under test, includes: If the test object is one of the multiple robotic arms and at least one target device, then the target robotic arm and at least one target device are regarded as the target controlled device related to the function under test. The target device includes: a sensor disposed at the end of the target robotic arm, a gripper disposed at the end of the target robotic arm, and the second control device. Based on the test event, a third test instruction corresponding to the target robotic arm and at least one fourth test instruction corresponding to the target device are generated.
6. The method according to claim 5, characterized in that, Sending the test command for the target robotic arm to at least one of the first control devices and / or the second control devices includes: Send the third test command to the first control device corresponding to the target robotic arm; The fourth test command 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 under test based on the test parameters, and generating test instructions for the function under test, includes: If the test object is one of the multiple robotic arms and the collision test device, then the target robotic arm is regarded as the target controlled device related to the function under test; The fifth test instruction corresponding to the target robotic arm is generated based on 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 under test based on the test parameters, and generating test instructions for the function under test, includes: If the test object is the first robotic arm and the second robotic arm among the plurality of robotic arms, then the first robotic arm and the second robotic arm are regarded as the target controlled device related to the function under test; Based on the test event, a sixth test instruction corresponding to the first robotic arm and a seventh test instruction corresponding to the second robotic arm are generated.
9. The method according to claim 2, characterized in that, The step of determining at least one target controlled device related to the function under test based on the test parameters, and generating test instructions for the function under test, includes: If the test object is at least one target robotic arm among the plurality of robotic arms, the first control device corresponding to each target robotic arm, and the second control device, then at least one target robotic arm is regarded as the target controlled device related to the function under test; Based on the test events, an eighth test command is generated corresponding to the first control device of each target robotic arm.
10. A robot testing system, characterized in that, The robot testing system includes a server and a test bench. The test bench includes multiple robotic arms, at least one sensor disposed at the end of the robotic arm, at least one load switching device disposed at the end of the robotic arm, a first control device corresponding to each robotic arm, at least one load and collision testing device, and a second control device. Each robotic arm has a first control device that is communicatively connected to 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 robotic arm; The server is used to perform the steps of the robot testing method according to any one of claims 1-9.
Citation Information
Patent Citations
Collaborative robot test system, control method, control device and storage medium
CN117921737A
