Exemple #1
0
 def execute(self, userdata):
     rospy.loginfo('Executing state StopSimulation')
     if not executed_test_node_check:
         check_node(userdata.initialization_time, userdata.logging)
     if self.savelog:
         save_task()
     stop_task()
     time.sleep(3)
     rospy.loginfo('Finished state StopSimulation')
     return 'success'
Exemple #2
0
 def execute(self, userdata):
     rospy.loginfo('Executing state StopSimulation')
     if not executed_test_node_check:
         check_node(userdata.initialization_time, userdata.logging)
     if self.savelog:
         save_task()
     stop_task()
     time.sleep(3)
     rospy.loginfo('Finished state StopSimulation')
     return 'success'
Exemple #3
0
 def stop_simulation(self, req):
     resp = TaskDataServiceResponse()
     resp.taskdata = req.taskdata
     rospy.loginfo('Executing state StopSimulation')
     if not executed_test_node_check:
         check_node(resp.taskdata.initialization_time, resp.taskdata.logging)
     if self.savelog:
         save_task()
     stop_task()
     time.sleep(3)
     rospy.loginfo('Finished state StopSimulation')
     resp.result = 'success'
     return resp
Exemple #4
0
 def stop_simulation(self, req):
     resp = TaskDataServiceResponse()
     resp.taskdata = req.taskdata
     rospy.loginfo('Executing state StopSimulation')
     if not executed_test_node_check:
         check_node(resp.taskdata.initialization_time,
                    resp.taskdata.logging)
     if self.savelog:
         save_task()
     stop_task()
     time.sleep(3)
     rospy.loginfo('Finished state StopSimulation')
     resp.result = 'success'
     return resp
Exemple #5
0
def rospy_exit_handler():
    print('start_task: rospy_exit_handler')
    global _save_log
    if not start_nodes.executed_test_node_check:
        start_nodes.check_node(initialization_time, logging)
    print 'save_log = ' + str(_save_log) + ', rospy.is_shutdown() = ' + str(rospy.is_shutdown())
    print('Checking save task.')
    if _save_log and not task_selector.task_saved:
        rospy.loginfo('Going to save log')
        save_task()
    print('Checking stop task.')
    if not task_selector.task_stopped:
        rospy.loginfo('Going to stop task.')
        stop_task()
    print('Going to sleep a sec.')
    time.sleep(2)
    print('start_task: Exiting rospy_exit_handler.')
Exemple #6
0
def rospy_exit_handler():
    print('start_task: rospy_exit_handler')
    global _save_log
    if not start_nodes.executed_test_node_check:
        start_nodes.check_node(initialization_time, logging)
    print 'save_log = ' + str(_save_log) + ', rospy.is_shutdown() = ' + str(
        rospy.is_shutdown())
    print('Checking save task.')
    if _save_log and not task_selector.task_saved:
        rospy.loginfo('Going to save log')
        save_task()
    print('Checking stop task.')
    if not task_selector.task_stopped:
        rospy.loginfo('Going to stop task.')
        stop_task()
    print('Going to sleep a sec.')
    time.sleep(2)
    print('start_task: Exiting rospy_exit_handler.')