Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed bug torque_controller #45

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jorgediosdado
Copy link

Torque controller was using the function set_speed, instead of set_goal_torque.

@dbolkensteyn dbolkensteyn mentioned this pull request Jan 13, 2017
@@ -116,12 +116,16 @@ def spd_rad_to_raw(self, spd_rad):

def set_torque_enable(self, torque_enable):
mcv = (self.motor_id, torque_enable)
self.dxl_io.set_multi_torque_enabled([mcv])
self.dxl_io.set_multi_torque_enabled([mcv])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useless change

@@ -166,5 +170,5 @@ def process_motor_states(self, state_list):
self.joint_state_pub.publish(self.joint_state)

def process_command(self, msg):
self.set_speed(msg.data)
self.set_goal_torque(msg.data)
Copy link
Contributor

@dbolkensteyn dbolkensteyn Jan 13, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this is a feature, not a bug.
Step 4 of the torque mode tutorial clearly states To actually move the motor we need to publish a desired velocity to /pan_controller/command (the keyword being velocity).

Moreover this change breaks compatibility for existing users: it is probably safer to change the name of this controller from torque to velocity and add a new one that really controls the torque.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants