mission_analyze_node.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 import rospy
4 from phm_task_plan.srv import *
5 
6 
7 def mission_analyze(module):
8  rospy.wait_for_service('task_service')
9 
10  try:
11  # create a handle to the task_plan service
12  task_plan = rospy.ServiceProxy('task_service', TaskService)
13 
14  # Ekrana Yazdiriyo
15  print "Requesting %s" % (module)
16 
17  # simplified style
18  resp1 = task_plan(module)
19 
20  # formal style
21  resp2 = task_plan.call(TaskServiceRequest(module))
22 
23  return resp2.task
24  except rospy.ServiceException, e:
25  print "Service call failed: %s" % e
26 
27 
29  module = 'Power'
30  task = mission_analyze(module)
31 
32  print "Task = %d" % (task)
33 
34 if __name__ == "__main__":


phm_mission_analyze
Author(s):
autogenerated on Mon Jun 10 2019 14:13:32