Skip to content

Commit

Permalink
Fix deprecated topics on JTC (#86)
Browse files Browse the repository at this point in the history
* fix deprecated topic

* Update message field to get positions
  • Loading branch information
Noel215 authored Nov 1, 2023
1 parent 50c8068 commit ce80ce0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions joy_teleop/joy_teleop/incrementer_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()))
Expand All @@ -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()
Expand Down

0 comments on commit ce80ce0

Please sign in to comment.