From ce80ce0843cd08c4bec0320e3b4f0ccd2efff836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Noel=20Jim=C3=A9nez=20Garc=C3=ADa?= Date: Wed, 1 Nov 2023 13:35:16 +0100 Subject: [PATCH] Fix deprecated topics on JTC (#86) * fix deprecated topic * Update message field to get positions --- joy_teleop/joy_teleop/incrementer_server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/joy_teleop/joy_teleop/incrementer_server.py b/joy_teleop/joy_teleop/incrementer_server.py index 7e3de5c..c8ed0b8 100644 --- a/joy_teleop/joy_teleop/incrementer_server.py +++ b/joy_teleop/joy_teleop/incrementer_server.py @@ -69,7 +69,7 @@ def __init__(self): JointTrajectory, 'joint_trajectory', 1) self._state_sub = self.create_subscription( - JTCS, 'state', self._state_cb, 1, callback_group=cb_group) + JTCS, 'controller_state', self._state_cb, 1, callback_group=cb_group) self._goal = JointTrajectory() self.get_logger().info('Connected to {}'.format(self.get_namespace())) @@ -95,7 +95,7 @@ def _wait_for_new_message(self): def increment_by(self, increment): state = self._wait_for_new_message() self._goal.joint_names = state.joint_names - self._value = state.actual.positions + self._value = state.feedback.positions self._value = [x + y for x, y in zip(self._value, increment)] self.get_logger().info('Sent goal of {}'.format(self._value)) point = JointTrajectoryPoint()