Skip to content

Commit

Permalink
Merge pull request #890 from tue-robotics/timeoutfix
Browse files Browse the repository at this point in the history
Remove GoalNotSucceededException from codebase (only TimeoutException)
  • Loading branch information
MatthijsBurgh committed Sep 10, 2019
2 parents 9edf962 + 06e35fd commit 0e3acff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions challenge_gpsr/src/gpsr.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def _on_request_missing_information(self, description, grammar, target):
# Pass the heard sentence to the conv.engine. This parses it again, but fuck efficiency for now
self.user_to_robot_text(sentence)
break
except (hmi.TimeoutException, hmi.GoalNotSucceededException) as e:
except hmi.TimeoutException as e:
rospy.logwarn("HMI failed when getting command: {}" .format(e))
self.robot.speech.speak(random.sample(self.knowledge.not_understood_sentences, 1)[0])
if self.timeout_count >= 3:
Expand Down Expand Up @@ -166,7 +166,7 @@ def _start_wait_for_command(self, grammar, target):
self.user_to_robot_text(sentence)
rospy.sleep(self._tc_fuckup_time)
break
except (hmi.TimeoutException , hmi.GoalNotSucceededException) as e:
except hmi.TimeoutException as e:
rospy.logwarn("HMI failed when getting command: {}" .format(e))
self.robot.speech.speak(random.sample(self.knowledge.not_understood_sentences, 1)[0])
if self.timeout_count >= 3:
Expand All @@ -183,7 +183,7 @@ def wait_to_be_called(self):
self.robot.hmi.query(description="", grammar="T -> %s" % self.robot.robot_name, target="T")
self.timeout_count = 0
break
except (hmi.TimeoutException , hmi.GoalNotSucceededException) as e:
except hmi.TimeoutException as e:
rospy.logwarn("HMI failed when waiting for name: {}" .format(e))
if self.timeout_count >= 3:
self.robot.hmi.restart_dragonfly()
Expand All @@ -202,7 +202,7 @@ def heard_correct(self, sentence):
else:
rospy.loginfo("'{}' was correct".format(sentence))
return True
except (hmi.TimeoutException , hmi.GoalNotSucceededException) as e:
except hmi.TimeoutException as e:
rospy.logwarn("HMI failed when getting confirmation: {}" .format(e))
return True

Expand Down

0 comments on commit 0e3acff

Please sign in to comment.