def on_broken_cb(self): print "Bond has broken" if p is not None: nxr.terminate_process_and_children(self.p) self.termination_publisher() else: print "There is something wrong with p!!!" return
def execute(self, userdata): global p c_goal = userdata.goal_from_ui c_result = userdata.result_for_ui robot = Baxter() if c_goal.ui_command.command == bdm.GetUserCommand.CANCEL_DEMO: if p is not None: nxr.terminate_process_and_children(p) p = None robot.set_neutral() c_result.sys_result.result = bdm.GetResult.DEMO_TERMINATED return 'demo_terminated' else: return 'different_request'
def on_broken_cb(): print "Bond has been broken" if p is not None: nxr.terminate_process_and_children(p)