footstep_planning_msgs.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import rospy
4 import actionlib
5 import std_msgs.msg
6 import vigir_footstep_planning_msgs.msg
7 
8 from vigir_footstep_planning_msgs.msg import ErrorStatus, ExecuteStepPlanFeedback
9 
10 
11 # creates error status with given error and/or warning code and message
12 def create_error_status(error=0, error_msg=str(), warning=0, warning_msg=str()):
13  error_status = ErrorStatus()
14 
15  if error != 0:
16  error_status.error = error
17  error_status.error_msg = "[Error] " + error_msg
18 
19  if warning != 0:
20  warning_status.warning = warning
21  warning_status.warning_msg = "[Warning] " + warning_msg
22 
23  return error_status
24 
25 
27  if state == ExecuteStepPlanFeedback.NOT_READY:
28  return "NOT_READY"
29  elif state == ExecuteStepPlanFeedback.READY:
30  return "READY"
31  elif state == ExecuteStepPlanFeedback.ACTIVE:
32  return "ACTIVE"
33  elif state == ExecuteStepPlanFeedback.PAUSED:
34  return "PAUSED"
35  elif state == ExecuteStepPlanFeedback.FINISHED:
36  return "FINISHED"
37  elif state == ExecuteStepPlanFeedback.FAILED:
38  return "FAILED"
39 
def create_error_status(error=0, error_msg=str(), warning=0, warning_msg=str())


vigir_footstep_planning_msgs
Author(s): Alexander Stumpf
autogenerated on Mon Jun 10 2019 15:45:25