From 2cc7ae8929979f75af2a5d0a1558cae53422149d Mon Sep 17 00:00:00 2001 From: Matteo Dalle Vedove Date: Wed, 4 Dec 2024 09:19:37 +0100 Subject: [PATCH 1/2] Update TorqueCommandInterface - #232 --- lbr_fri_ros2/src/interfaces/torque_command.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lbr_fri_ros2/src/interfaces/torque_command.cpp b/lbr_fri_ros2/src/interfaces/torque_command.cpp index 54f53a2b..cad5e2b2 100644 --- a/lbr_fri_ros2/src/interfaces/torque_command.cpp +++ b/lbr_fri_ros2/src/interfaces/torque_command.cpp @@ -36,6 +36,9 @@ void TorqueCommandInterface::buffered_command_to_fri(fri_command_t_ref command, } joint_position_filter_.compute(command_target_.joint_position, command_.joint_position); + command_.torque = command_target_.torque; + command_.joint_position = command_target_.joint_position; + // validate if (!command_guard_->is_valid_command(command_, state)) { std::string err = "Invalid command."; From be0f0a3bf677608ca36ff17634802236d52ee004 Mon Sep 17 00:00:00 2001 From: mhubii Date: Wed, 4 Dec 2024 17:49:27 +0000 Subject: [PATCH 2/2] adds wrench comand (https://github.com/lbr-stack/lbr_fri_ros2_stack/pull/233#discussion_r1869192458) --- lbr_fri_ros2/src/interfaces/torque_command.cpp | 2 -- lbr_fri_ros2/src/interfaces/wrench_command.cpp | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lbr_fri_ros2/src/interfaces/torque_command.cpp b/lbr_fri_ros2/src/interfaces/torque_command.cpp index cad5e2b2..31dcb558 100644 --- a/lbr_fri_ros2/src/interfaces/torque_command.cpp +++ b/lbr_fri_ros2/src/interfaces/torque_command.cpp @@ -35,9 +35,7 @@ void TorqueCommandInterface::buffered_command_to_fri(fri_command_t_ref command, joint_position_filter_.initialize(state.sample_time); } joint_position_filter_.compute(command_target_.joint_position, command_.joint_position); - command_.torque = command_target_.torque; - command_.joint_position = command_target_.joint_position; // validate if (!command_guard_->is_valid_command(command_, state)) { diff --git a/lbr_fri_ros2/src/interfaces/wrench_command.cpp b/lbr_fri_ros2/src/interfaces/wrench_command.cpp index 1a1c0ab7..9bdc3254 100644 --- a/lbr_fri_ros2/src/interfaces/wrench_command.cpp +++ b/lbr_fri_ros2/src/interfaces/wrench_command.cpp @@ -33,6 +33,7 @@ void WrenchCommandInterface::buffered_command_to_fri(fri_command_t_ref command, joint_position_filter_.initialize(state.sample_time); } joint_position_filter_.compute(command_target_.joint_position, command_.joint_position); + command_.wrench = command_target_.wrench; // validate if (!command_guard_->is_valid_command(command_, state)) {