Skip to content

Commit

Permalink
[flexbe_core] [flexbe_widget] Add simple breakpoint feature (see #93)
Browse files Browse the repository at this point in the history
  • Loading branch information
pschillinger committed Dec 27, 2019
1 parent 8948ad1 commit f1e63a8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion flexbe_core/src/flexbe_core/core/operatable_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def _operatable_execute(self, *args, **kwargs):
log_requested_outcome = outcome

# request outcome because autonomy level is too low
if not self._force_transition and (self.autonomy.has_key(outcome) and self.autonomy[outcome] >= OperatableStateMachine.autonomy_level):
if not self._force_transition and (self.autonomy.has_key(outcome) and self.autonomy[outcome] >= OperatableStateMachine.autonomy_level or
outcome != OperatableState._loopback_name and
self._get_path() in rospy.get_param('/flexbe/breakpoints', [])):
if self._sent_outcome_requests.count(outcome) == 0:
self._pub.publish(self._request_topic, OutcomeRequest(outcome=self._outcome_list.index(outcome), target=self._parent._get_path() + "/" + self.name))
rospy.loginfo("<-- Want result: %s > %s", self.name, outcome)
Expand Down
7 changes: 7 additions & 0 deletions flexbe_widget/bin/breakpoint
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python
import rospy
import sys


if __name__ == '__main__':
rospy.set_param('/flexbe/breakpoints', sys.argv[1:])

0 comments on commit f1e63a8

Please sign in to comment.