Skip to content

Commit

Permalink
Only log set scaling factor if it is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
fmauch committed Dec 4, 2024
1 parent 9d5c981 commit a2d319b
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1693,7 +1693,12 @@ bool JointTrajectoryController::set_scaling_factor(const double scaling_factor)
return false;
}

RCLCPP_INFO(get_node()->get_logger(), "New scaling factor will be %f", scaling_factor);
if (scaling_factor_ != scaling_factor_)
{
RCLCPP_INFO(
get_node()->get_logger().get_child("speed_scaling"), "New scaling factor will be %f",
scaling_factor);
}
if (params_.speed_scaling_command_interface_name.empty())
{
if (!params_.speed_scaling_state_interface_name.empty())
Expand Down

0 comments on commit a2d319b

Please sign in to comment.