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

Fix calibration of prismatic joint #2566

Merged
merged 3 commits into from
Aug 12, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ def __calib(self):
# Change to wheel mode
self.__set_angle_limits(0, 0)
self.set_torque_limit(self.calib_torque_limit)
self.__set_speed_wheel(0.0)
# release torque by disabling it
self.set_torque_enable(False)
rospy.sleep(0.2)
self.set_torque_enable(True) # re-enable it
rospy.sleep(0.2)
if self.flipped:
self.__set_speed_wheel(self.calib_speed)
else:
Expand All @@ -74,13 +80,13 @@ def __calib(self):
pass
rate.sleep()
self.__set_speed_wheel(0.0)
self.set_torque_enable(False)
if self.is_multiturn:
# Change to multiturn mode
self.__set_angle_limits(4095, 4095)
else:
# Change to previous mode
self.__set_angle_limits(prev_limits['min'], prev_limits['max'])
self.set_torque_enable(False)
self.set_speed(self.joint_speed)
if self.torque_limit is not None:
self.set_torque_limit(self.torque_limit)
Expand Down