A robot automation testing method combining appium and ROS
Patent Information
- Application Number
- CN202211626978.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-16
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2042-12-16
AI Technical Summary
这些场景在机器人的开发、测试和验证阶段都难以考虑周全,使得机器人厂商对客户环境要求过高而失去潜在客户
[0021] 1. This invention tests the robot's operating conditions in the corresponding environment by continuously replaying rosbag data; thus improving the robot's stability; and avoiding multiple trips to the test site for robot testing;
Smart Images

Figure CN115905007B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of robotics technology, and in particular to a robot automation testing method combining Appium and ROS. Background Art
[0002] As robots gain market share, they are increasingly operating in complex and changing environments, such as corridors under intense sunlight, hotel lobbies with rockery, and restaurants with frequently changing tables and chairs. These scenarios are difficult to fully consider during the robot development, testing, and verification phases, leading robot manufacturers to overly demanding customer environments and lose potential customers.
[0003] Although there is traditional simulation software that can perform various simulated environment tests, the simulation software is always separated from the physical robot and ignores various hardware parameters and structural characteristics, making the test results of little reference value. Summary of the Invention
[0004] In view of the shortcomings of the existing technology, the present invention provides a robot automation testing method combining Appium and ROS.
[0005] The technical solution of the present invention is: a robot automation testing method combining Appium and ROS, comprising the following steps:
[0006] S1) Draw a map according to the test requirements and scenarios, plan the robot's walking path according to the map, and mark the target points on the map according to the robot's walking path;
[0007] S2) Construct rosbag data package according to time sequence;
[0008] S3) Import the map drawn in step S1), the planned walking path, the target point, and the rosbag data packet in step S2) into the robot's storage;
[0009] S4) Build several appium test scripts;
[0010] S5) connecting multiple robots to a PC via a network cable, wherein the PC has Appium software installed; and starting the Appium software on the PC and the Android app of the robot so that the Appium software on the PC controls the Android app;
[0011] S6) Run the appium test script to control the Android app on the robot side;
[0012] S7) The Android app on the robot sends a command to ROS to stop sending radar data, positioning data, and odometer data, in preparation for replaying the rosbag;
[0013] S8) The Android app on the robot sends instructions to ROS, and ROS controls the robot to perform motion control based on the data played back by rosbag to test the operation status of the robot in the corresponding environment;
[0014] S9) Repeat steps S3-S5) until the robot completes the test.
[0015] Preferably, in step S2), the rosbag data packet includes a number of radar data, positioning data and odometer data.
[0016] Preferably, the radar data includes information about obstacles ahead and distances between the obstacles and the robot collected by the robot radar.
[0017] Preferably, the positioning data includes a tag number and position information of the robot relative to the map.
[0018] Preferably, the odometer data includes time, robot posture, and robot speed.
[0019] Preferably, in step S4), the appium test script includes a normal navigation test script, a pause return test script, and an obstacle avoidance test script.
[0020] The beneficial effects of the present invention are:
[0021] 1. This invention tests the robot's operating conditions in the corresponding environment by continuously replaying rosbag data; thus improving the robot's stability; and avoiding multiple trips to the test site for robot testing;
[0022] 2. The testing method of the present invention has little dependence on the actual environment. By constructing rosbag data in various scenarios, the robot can run in various scenarios. On the one hand, it can overcome the disadvantage of relying on field data, and on the other hand, it can overcome the disadvantage of poor simulation effect of simulation software. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a flow chart of the method of the present invention;
[0024] Figure 2 This is a framework diagram of the robot and PC of the present invention; DETAILED DESCRIPTION
[0025] The specific embodiments of the present invention will be further described below with reference to the accompanying drawings:
[0026] like Figure 1-2 As shown, this embodiment provides a robot automation testing method combining Appium and ROS, including the following steps:
[0027] S1) Draw a map according to the test requirements and scenarios, plan the robot's walking path according to the map, and mark the target points on the map according to the robot's walking path;
[0028] S2) Construct a rosbag data packet according to the time sequence; in this embodiment, the rosbag data packet includes a number of radar data, positioning data and odometer data.
[0029] S3) Import the map drawn in step S1), the planned walking path, the target point, and the rosbag data packet in step S2) into the robot's storage;
[0030] S4), construct several appium test scripts; in this embodiment, the appium test scripts include normal navigation test scripts, pause return test scripts, and obstacle avoidance test scripts;
[0031] S5) connecting multiple robots to a PC via a network cable, wherein the PC has Appium software installed; and starting the Appium software on the PC and the Android app of the robot so that the Appium software on the PC controls the Android app;
[0032] S6) Run the appium test script to control the Android app on the robot side;
[0033] S7) The Android app on the robot sends a command to ROS to stop sending radar data, positioning data, and odometer data, in preparation for replaying the rosbag;
[0034] S8) The Android app on the robot sends instructions to ROS, and ROS controls the robot to perform motion control based on the data played back by rosbag to test the operation status of the robot in the corresponding environment;
[0035] S9) Repeat steps S3-S5) until the robot completes the test.
[0036] As a preferred embodiment of the present invention, in step S2), the radar data includes information about obstacles ahead and distance information between the obstacles and the robot collected by the robot radar.
[0037] As a preferred embodiment of the present invention, in step S2), the positioning data includes a tag number and position information of the robot relative to the map.
[0038] As a preferred embodiment of this invention, in step S2), the odometer data includes time, robot posture, and robot speed.
[0039] The above embodiments and descriptions are only for explaining the principles and best embodiments of the present invention. Without departing from the spirit and scope of the present invention, the present invention may be subject to various changes and improvements, which shall fall within the scope of the invention to be protected.
Claims
1. A robot automation testing method combining Appium and ROS, characterized in that: The following steps are involved: S1) Draw a map according to the test requirements and scenarios, plan the robot's walking path according to the map, and mark the target points on the map according to the robot's walking path; S2) Construct rosbag data package according to time sequence; S3) Import the map drawn in step S1), the planned walking path, the target point, and the rosbag data packet in step S2) into the robot's storage; S4) Build several appium test scripts; S5) Connecting multiple robots to a PC via a network cable, wherein the PC has Appium software installed; and starting the Appium software on the PC and the Android app of the robot so that the Appium software on the PC controls the Android app; S6) Run the appium test script to control the Android app on the robot side; S7) The Android app on the robot sends a command to ROS to stop sending radar data, positioning data, and odometer data, in preparation for replaying the rosbag; S8) The Android app on the robot sends instructions to ROS, and ROS controls the robot to perform motion control based on the data played back by rosbag to test the operation status of the robot in the corresponding environment; S9) Repeat steps S3-S5) until the robot completes the test.
2. The robot automation testing method combining Appium and ROS according to claim 1, characterized in that: In step S2), the rosbag data packet includes a number of radar data, positioning data and odometer data.
3. The robot automation testing method combining Appium and ROS according to claim 2, characterized in that: In step S2), the radar data includes the obstacle information ahead and the distance information between the obstacle and the robot collected by the robot radar.
4. The robot automation testing method combining Appium and ROS according to claim 2, characterized in that: In step S2), the positioning data includes the tag number and the position information of the robot relative to the map.
5. The robot automation testing method combining Appium and ROS according to claim 2, characterized in that: In step S2), the odometer data includes time, robot posture, and robot speed.
6. The robot automation testing method combining Appium and ROS according to claim 1, characterized in that: In step S4), the appium test script includes a normal navigation test script, a pause return test script, and an obstacle avoidance test script.