Skip to content

Commit 54657ef

Browse files
Only log limiting error if something is limited. (#2176)
--------- Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
1 parent ffbcd16 commit 54657ef

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

hardware_interface/src/resource_manager.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -976,10 +976,12 @@ class ResourceStorage
976976
}
977977
data.limited = data.command;
978978
is_limited = limiters[joint_name]->enforce(data.actual, data.limited, desired_period);
979-
RCLCPP_ERROR_THROTTLE(
980-
get_logger(), *rm_clock_, 1000,
981-
"Command '%s' for joint '%s' is out of limits. Command limited to %f - %d",
982-
interface_name.c_str(), joint_name.c_str(), value, is_limited);
979+
if (is_limited)
980+
{
981+
RCLCPP_ERROR_THROTTLE(
982+
get_logger(), *rm_clock_, 1000,
983+
"Command of at least one joint is out of limits (throttled log).");
984+
}
983985
if (
984986
interface_name == hardware_interface::HW_IF_POSITION &&
985987
data.limited.position.has_value())

0 commit comments

Comments
 (0)