Browse Source

Fix calibrate_the_robot service threading bug

pull/83/head
Binit Shah 2 years ago
parent
commit
66d88ceba3
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      stretch_core/nodes/stretch_driver

+ 6
- 1
stretch_core/nodes/stretch_driver View File

@ -288,9 +288,14 @@ class StretchDriverNode:
self.change_mode('position', code_to_run)
def calibrate(self):
self.robot_mode_rwlock.acquire_read()
last_robot_mode = copy.copy(self.robot_mode)
self.robot_mode_rwlock.release_read()
def code_to_run():
self.robot.home()
pass
self.change_mode('calibration', code_to_run)
self.robot.home()
self.change_mode(last_robot_mode, code_to_run)
def stow_the_robot(self):
self.robot_mode_rwlock.acquire_read()

Loading…
Cancel
Save