footstep_planning_msgs.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 import actionlib
00005 import std_msgs.msg
00006 import vigir_footstep_planning_msgs.msg
00007 
00008 from vigir_footstep_planning_msgs.msg import ErrorStatus, ExecuteStepPlanFeedback
00009 
00010 
00011 # creates error status with given error and/or warning code and message
00012 def create_error_status(error=0, error_msg=str(), warning=0, warning_msg=str()):
00013     error_status = ErrorStatus()
00014 
00015     if error != 0:
00016         error_status.error = error
00017         error_status.error_msg = "[Error] " + error_msg
00018 
00019     if warning != 0:
00020         warning_status.warning = warning
00021         warning_status.warning_msg = "[Warning] " + warning_msg
00022 
00023     return error_status
00024 
00025 
00026 def walk_controller_state_to_string(state):
00027     if state == ExecuteStepPlanFeedback.NOT_READY:
00028         return "NOT_READY"
00029     elif state == ExecuteStepPlanFeedback.READY:
00030         return "READY"
00031     elif state == ExecuteStepPlanFeedback.ACTIVE:
00032         return "ACTIVE"
00033     elif state == ExecuteStepPlanFeedback.PAUSED:
00034         return "PAUSED"
00035     elif state == ExecuteStepPlanFeedback.FINISHED:
00036         return "FINISHED"
00037     elif state == ExecuteStepPlanFeedback.FAILED:
00038         return "FAILED"
00039 


vigir_footstep_planning_msgs
Author(s): Alexander Stumpf
autogenerated on Sat Jul 8 2017 02:21:30