Skip to content

Commit ca33bcc

Browse files
authored
[CM] Make error message after trying to active controller more informative. (#1066)
1 parent d39ddcd commit ca33bcc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

controller_manager/src/controller_manager.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1399,8 +1399,11 @@ void ControllerManager::activate_controllers(
13991399
if (new_state.id() != lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE)
14001400
{
14011401
RCLCPP_ERROR(
1402-
get_logger(), "After activating, controller '%s' is in state '%s', expected Active",
1403-
controller->get_node()->get_name(), new_state.label().c_str());
1402+
get_logger(),
1403+
"After activation, controller '%s' is in state '%s' (%d), expected '%s' (%d).",
1404+
controller->get_node()->get_name(), new_state.label().c_str(), new_state.id(),
1405+
hardware_interface::lifecycle_state_names::ACTIVE,
1406+
lifecycle_msgs::msg::State::PRIMARY_STATE_ACTIVE);
14041407
}
14051408

14061409
if (controller->is_async())

0 commit comments

Comments
 (0)