@@ -104,7 +104,7 @@ def generate_test_description(tf_prefix):
104
104
DeclareLaunchArgument (
105
105
"launch_ursim" ,
106
106
default_value = "true" ,
107
- description = "Launches the ursim when running the test if True"
107
+ description = "Launches the ursim when running the test if True" ,
108
108
)
109
109
)
110
110
@@ -129,7 +129,7 @@ def generate_test_description(tf_prefix):
129
129
"start_joint_controller" : "false" ,
130
130
"tf_prefix" : tf_prefix ,
131
131
}.items (),
132
- condition = IfCondition (launch_ursim )
132
+ condition = IfCondition (launch_ursim ),
133
133
)
134
134
135
135
ursim = ExecuteProcess (
@@ -148,7 +148,7 @@ def generate_test_description(tf_prefix):
148
148
],
149
149
name = "start_ursim" ,
150
150
output = "screen" ,
151
- condition = IfCondition (launch_ursim )
151
+ condition = IfCondition (launch_ursim ),
152
152
)
153
153
154
154
wait_dashboard_server = ExecuteProcess (
@@ -159,12 +159,12 @@ def generate_test_description(tf_prefix):
159
159
],
160
160
name = "wait_dashboard_server" ,
161
161
output = "screen" ,
162
- condition = IfCondition (launch_ursim )
162
+ condition = IfCondition (launch_ursim ),
163
163
)
164
164
165
165
driver_starter = RegisterEventHandler (
166
166
OnProcessExit (target_action = wait_dashboard_server , on_exit = robot_driver ),
167
- condition = IfCondition (launch_ursim )
167
+ condition = IfCondition (launch_ursim ),
168
168
)
169
169
170
170
robot_driver_no_wait = IncludeLaunchDescription (
@@ -184,11 +184,12 @@ def generate_test_description(tf_prefix):
184
184
"start_joint_controller" : "false" ,
185
185
"tf_prefix" : tf_prefix ,
186
186
}.items (),
187
- condition = UnlessCondition (launch_ursim )
187
+ condition = UnlessCondition (launch_ursim ),
188
188
)
189
189
190
190
return LaunchDescription (
191
- declared_arguments + [ReadyToTest (), wait_dashboard_server , ursim , driver_starter , robot_driver_no_wait ]
191
+ declared_arguments
192
+ + [ReadyToTest (), wait_dashboard_server , ursim , driver_starter , robot_driver_no_wait ]
192
193
)
193
194
194
195
class RobotDriverTest (unittest .TestCase ):
@@ -499,7 +500,9 @@ def get_result(self, action_name, goal_response, timeout):
499
500
raise Exception (f"Exception while calling action: { future_res .exception ()} " )
500
501
501
502
502
- def waitForController (self , controller_name , controller_status = "active" , timeout = TIMEOUT_WAIT_SERVICE ):
503
+ def waitForController (
504
+ self , controller_name , controller_status = "active" , timeout = TIMEOUT_WAIT_SERVICE
505
+ ):
503
506
controller_running = False
504
507
end_time = time .time () + timeout
505
508
while controller_running == False and time .time () < end_time :
@@ -513,7 +516,8 @@ def waitForController(self, controller_name, controller_status="active", timeout
513
516
514
517
if controller_running == False :
515
518
raise Exception (
516
- f"Controller { controller_name } did not reach controller state { controller_status } within timeout of { timeout } " )
519
+ f"Controller { controller_name } did not reach controller state { controller_status } within timeout of { timeout } "
520
+ )
517
521
518
522
def waitForService (node , srv_name , srv_type , timeout = TIMEOUT_WAIT_SERVICE ):
519
523
client = node .create_client (srv_type , srv_name )
0 commit comments