Skip to content

Commit 44cbd9c

Browse files
Add a log entry if enforce_command_limits is false (#2998)
1 parent 7f9d20e commit 44cbd9c

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

controller_manager/src/controller_manager.cpp

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,13 @@ void ControllerManager::init_controller_manager()
643643
if (params_->enforce_command_limits)
644644
{
645645
resource_manager_->import_joint_limiters(robot_description_);
646+
RCLCPP_INFO(get_logger(), "Enforcing command limits is enabled...");
647+
}
648+
else
649+
{
650+
RCLCPP_INFO(
651+
get_logger(),
652+
"Enforcing command limits is disabled. Command limits from URDF will be ignored.");
646653
}
647654
init_services();
648655
}
@@ -708,9 +715,6 @@ void ControllerManager::init_controller_manager()
708715
}
709716
RCLCPP_INFO(get_logger(), "Shutting down the controller manager.");
710717
}));
711-
712-
RCLCPP_INFO_EXPRESSION(
713-
get_logger(), params_->enforce_command_limits, "Enforcing command limits is enabled...");
714718
}
715719

716720
void ControllerManager::initialize_parameters()
@@ -779,6 +783,13 @@ void ControllerManager::init_resource_manager(const std::string & robot_descript
779783
if (params_->enforce_command_limits)
780784
{
781785
resource_manager_->import_joint_limiters(robot_description_);
786+
RCLCPP_INFO(get_logger(), "Enforcing command limits is enabled...");
787+
}
788+
else
789+
{
790+
RCLCPP_INFO(
791+
get_logger(),
792+
"Enforcing command limits is disabled. Command limits from URDF will be ignored.");
782793
}
783794
hardware_interface::ResourceManagerParams params;
784795
params.robot_description = robot_description;

0 commit comments

Comments
 (0)