Skip to content

Commit

Permalink
More formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
urmahp committed Aug 28, 2023
1 parent 7d63ba5 commit 0b28567
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion ur_robot_driver/test/dashboard_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ def generate_test_description():
robot_ip = LaunchConfiguration("robot_ip")
launch_ursim = LaunchConfiguration("launch_ursim")


dashboard_client = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
Expand Down
7 changes: 4 additions & 3 deletions ur_robot_driver/test/robot_driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def generate_test_description(tf_prefix):
driver_starter = RegisterEventHandler(
OnProcessExit(target_action=wait_dashboard_server, on_exit=robot_driver),
condition=IfCondition(launch_ursim),
)
)

robot_driver_no_wait = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
Expand All @@ -192,6 +192,7 @@ def generate_test_description(tf_prefix):
+ [ReadyToTest(), wait_dashboard_server, ursim, driver_starter, robot_driver_no_wait]
)


class RobotDriverTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
Expand Down Expand Up @@ -499,7 +500,6 @@ def get_result(self, action_name, goal_response, timeout):
else:
raise Exception(f"Exception while calling action: {future_res.exception()}")


def waitForController(
self, controller_name, controller_status="active", timeout=TIMEOUT_WAIT_SERVICE
):
Expand All @@ -519,6 +519,7 @@ def waitForController(
f"Controller {controller_name} did not reach controller state {controller_status} within timeout of {timeout}"
)


def waitForService(node, srv_name, srv_type, timeout=TIMEOUT_WAIT_SERVICE):
client = node.create_client(srv_type, srv_name)
if client.wait_for_service(timeout) is False:
Expand Down
7 changes: 4 additions & 3 deletions ur_robot_driver/test/urscript_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def generate_test_description():
OnProcessExit(target_action=wait_dashboard_server, on_exit=robot_driver),
condition=IfCondition(launch_ursim),
)

robot_driver_no_wait = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
PathJoinSubstitution(
Expand All @@ -170,14 +170,15 @@ def generate_test_description():
"launch_dashboard_client": "false",
"start_joint_controller": "false",
}.items(),
condition=UnlessCondition(launch_ursim)
condition=UnlessCondition(launch_ursim),
)

return LaunchDescription(
declared_arguments
declared_arguments
+ [ReadyToTest(), wait_dashboard_server, ursim, driver_starter, robot_driver_no_wait]
)


class URScriptInterfaceTest(unittest.TestCase):
@classmethod
def setUpClass(cls):
Expand Down

0 comments on commit 0b28567

Please sign in to comment.