Skip to content

Commit

Permalink
[CM] Make error message after trying to active controller more inform…
Browse files Browse the repository at this point in the history
…ative. (#1066)
  • Loading branch information
destogl authored Jul 5, 2023
1 parent d39ddcd commit ca33bcc
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions controller_manager/src/controller_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1399,8 +1399,11 @@ void ControllerManager::activate_controllers(
if (new_state.id() != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
{
RCLCPP_ERROR(
get_logger(), "After activating, controller '%s' is in state '%s', expected Active",
controller->get_node()->get_name(), new_state.label().c_str());
get_logger(),
"After activation, controller '%s' is in state '%s' (%d), expected '%s' (%d).",
controller->get_node()->get_name(), new_state.label().c_str(), new_state.id(),
hardware_interface::lifecycle_state_names::ACTIVE,
lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE);
}

if (controller->is_async())
Expand Down

0 comments on commit ca33bcc

Please sign in to comment.