robot_movement¶
Source code: robot_movement.py
Control a robot to move a device for testing specific sensors.
Description¶
This test controls a robot (arm) to move a device along a predefined trajectory, to verify the functionalities of the sensors on the device.
Test Procedure¶
Robot is moved to the unloaded position.
Ask the operator to mount the device.
Robot is moved to the loaded position.
Robot is moved by the given trajectory.
Robot is moved to the unloaded position.
Verify the data from sensors on the device.
Ask the operator to unmount the device.
Dependency¶
Depend on the class specified by the arguments robot_fixture and algorithm to move the robot, get result from the device, and verify the result.
Examples¶
To use robot.foo to control the robot fixture, and use algo.bar to calculate and verify the sensor data, add this in test list:
{
"pytest_name": "robot_movement",
"args": {
"positions": [0, 1, 2, 3, 4, 5],
"robot_fixture": "robot.foo",
"algorithm": "algo.bar"
}
}
One can also pass parameters to the classes specified in robot_fixture and algorithm:
{
"pytest_name": "robot_movement",
"args": {
"positions": [0, 1, 2, 3, 4, 5],
"robot_fixture": "robot.foo",
"robot_fixture_args": {
"speed": 30
},
"algorithm_args": {
"trajectory_id": "bar1"
},
"algorithm": "algo.bar"
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
robot_fixture |
str |
The class name of the robot fixture under |
robot_fixture_args |
dict |
(optional; default: |
algorithm |
str |
The class name of the computing method under |
algorithm_args |
dict |
(optional; default: |
period_between_movement |
float, int |
(optional; default: |
period_after_movement |
float, int |
(optional; default: |
positions |
list |
A list of position index for the robot to move. |
upload_to_server |
bool |
(optional; default: |