Skip to content

Commit

Permalink
Fix mode switching out of runstop deadlock
Browse files Browse the repository at this point in the history
After Stretch has been runstopped, any Twist commands will
be rejected. However, the Twist callback forgets to release
the mode lock before rejecting the command. This leads to a
deadlock when the driver attempts to switch out of runstop.
  • Loading branch information
hello-binit committed Sep 30, 2023
1 parent 3fc9f9b commit 77a5a57
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions stretch_core/nodes/stretch_driver
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class StretchDriverNode:
if self.robot_mode != 'navigation':
error_string = '{0} action server must be in navigation mode to receive a twist on cmd_vel. Current mode = {1}.'.format(self.node_name, self.robot_mode)
rospy.logerr(error_string)
self.robot_mode_rwlock.release_read()
return
self.linear_velocity_mps = twist.linear.x
self.angular_velocity_radps = twist.angular.z
Expand Down

0 comments on commit 77a5a57

Please sign in to comment.