From 1044e677eb70ac63c2768c2aae5db3a451e91e35 Mon Sep 17 00:00:00 2001 From: Sanjeev Kumar Date: Mon, 23 Dec 2024 13:36:09 +0100 Subject: [PATCH] Update set_value() usuage to fix warning in velocity_controllers --- .../src/joint_group_velocity_controller.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/velocity_controllers/src/joint_group_velocity_controller.cpp b/velocity_controllers/src/joint_group_velocity_controller.cpp index 97f6713d72..40c3870ba2 100644 --- a/velocity_controllers/src/joint_group_velocity_controller.cpp +++ b/velocity_controllers/src/joint_group_velocity_controller.cpp @@ -59,7 +59,11 @@ controller_interface::CallbackReturn JointGroupVelocityController::on_deactivate // stop all joints for (auto & command_interface : command_interfaces_) { - command_interface.set_value(0.0); + if (!command_interface.set_value(0.0)) + { + RCLCPP_WARN(get_node()->get_logger(), "Error while setting command_interface value to 0.0"); + return CallbackReturn::FAILURE; + } } return ret;