Skip to content

Commit a18aabc

Browse files
authored
Avoid deadlocks for failed command switching
1 parent efa1dec commit a18aabc

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

controller_manager/src/controller_manager.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2964,6 +2964,8 @@ void ControllerManager::manage_switch()
29642964
{
29652965
RCLCPP_ERROR(get_logger(), "Error while performing mode switch.");
29662966
// If the hardware switching fails, there is no point in continuing to switch controllers
2967+
switch_params_.do_switch = false;
2968+
switch_params_.cv.notify_all();
29672969
return;
29682970
}
29692971
execution_time_.switch_perform_mode_time =

0 commit comments

Comments
 (0)