Skip to content

Commit

Permalink
duplicate controller name in start and stop list will throw error (#506)
Browse files Browse the repository at this point in the history
  • Loading branch information
captain-yoshi authored Jan 31, 2023
1 parent 7f3a406 commit a37f6be
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,13 @@ bool ControllerManager::switchController(const std::vector<std::string>& start_c
}
}

if(in_stop_list && in_start_list){ // duplicate start/stop
ROS_ERROR_STREAM("Could no start or stop controller '" << info.name << "' because of conflicting switching command");
stop_request_.clear();
start_request_.clear();
return false;
}

if(is_running && in_stop_list && !in_start_list){ // running and real stop
switch_stop_list_.push_back(info);
}
Expand Down

0 comments on commit a37f6be

Please sign in to comment.