Browse Source

Fix mode switching out of runstop deadlock

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.
pull/116/head
Binit Shah 8 months ago
parent
commit
77a5a57c92
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      stretch_core/nodes/stretch_driver

+ 1
- 0
stretch_core/nodes/stretch_driver View File

@ -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

Loading…
Cancel
Save