Skip to content

Commit

Permalink
Merge pull request #21 from helix-robotics-ag/seb/pccfk_for_vis
Browse files Browse the repository at this point in the history
Seb/pccfk for vis
  • Loading branch information
sebtiburzio authored Jun 4, 2024
2 parents feb70ea + 9074433 commit 7e85739
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "dynamixel_hardware"]
path = dynamixel_hardware
url = git@github.com:helix-robotics-ag/dynamixel_hardware.git
url = https://github.com/helix-robotics-ag/ros-helix.git
3 changes: 2 additions & 1 deletion helix_transmission/helix_transmission/tendon_transmission.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,13 @@ def tendon_to_motor_command_cb(self, msg):
self.tendon_to_motor_command_pub.publish(motor_command)

def motor_state_cb(self, msg):
tendon_state = JointState()
motor_names = sorted(msg.name)
motor_angs = [msg.position[msg.name.index(motor_name)] for motor_name in motor_names]
self.last_motor_joint_positions = np.array(motor_angs, dtype=np.float64)
motor_angvels = [msg.velocity[msg.name.index(motor_name)] for motor_name in motor_names]
motor_currents = [msg.effort[msg.name.index(motor_name)] for motor_name in motor_names]
tendon_state = JointState()
tendon_state.header.stamp = msg.header.stamp
tendon_state.name = motor_names
tendon_state.position = ((np.array(motor_angs, dtype=np.float64) - self.MOTOR_OFFSETS) \
* self.PULLEY_RADIUS * self.MOTOR_ORIENTS).tolist()
Expand Down

0 comments on commit 7e85739

Please sign in to comment.