From f7054d6e082233e4bcb8df018e378cb327aae62a Mon Sep 17 00:00:00 2001 From: Naoya Yamaguchi <708yamaguchi@gmail.com> Date: Tue, 5 Nov 2024 00:04:38 +0900 Subject: [PATCH] Publish error in [rad] --- ros/kxr_controller/node_scripts/rcb4_ros_bridge.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ros/kxr_controller/node_scripts/rcb4_ros_bridge.py b/ros/kxr_controller/node_scripts/rcb4_ros_bridge.py index 395b8799..2d54f91f 100644 --- a/ros/kxr_controller/node_scripts/rcb4_ros_bridge.py +++ b/ros/kxr_controller/node_scripts/rcb4_ros_bridge.py @@ -978,7 +978,7 @@ def publish_joint_states(self): if idx is None: continue position = np.deg2rad(av[idx]) - effort = torque_vector[idx] + effort = np.deg2rad(torque_vector[idx]) msg.position.append(position) msg.effort.append(effort) msg.name.append(name) @@ -986,8 +986,7 @@ def publish_joint_states(self): header=msg.header, name=name, position=position, - error=effort, - temperature=temperatures) + error=effort) if temperatures is not None and len(temperatures) > idx: servo_state_msg.temperature = temperatures[idx] if currents is not None and len(currents) > idx: