File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
controller_manager/controller_manager Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,7 @@ def main(args=None):
160
160
switch_timeout = args .switch_timeout
161
161
strictness = SwitchController .Request .STRICT
162
162
unload_controllers_upon_exit = False
163
+ node = None
163
164
164
165
if param_files :
165
166
for param_file in param_files :
@@ -190,7 +191,7 @@ def main(args=None):
190
191
time .sleep (retry_delay )
191
192
else :
192
193
logger .error (
193
- bcolors .ERROR + "Failed to acquire lock after multiple attempts." + bcolors .ENDC
194
+ bcolors .FAIL + "Failed to acquire lock after multiple attempts." + bcolors .ENDC
194
195
)
195
196
return 1
196
197
@@ -378,7 +379,8 @@ def main(args=None):
378
379
logger .fatal (str (err ))
379
380
return 1
380
381
finally :
381
- node .destroy_node ()
382
+ if node :
383
+ node .destroy_node ()
382
384
lock .release ()
383
385
rclpy .shutdown ()
384
386
You can’t perform that action at this time.
0 commit comments