Skip to content

Commit

Permalink
Improve error message about unknown controllers
Browse files Browse the repository at this point in the history
  • Loading branch information
henningkayser committed Mar 22, 2024
1 parent cf404ed commit ed29aba
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,12 @@ bool TrajectoryExecutionManager::configure(TrajectoryExecutionContext& context,
{
if (known_controllers_.find(controller) == known_controllers_.end())
{
RCLCPP_ERROR(logger_, "Controller '%s' is not known", controller.c_str());
std::stringstream stream;
for (const auto& controller : known_controllers_)
{
stream << " `" << controller.first << '`';
}
RCLCPP_ERROR_STREAM(logger_, "Controller " << controller << " is not known. Known controllers: " << stream.str());
return false;
}
}
Expand Down

0 comments on commit ed29aba

Please sign in to comment.