$search
00001 """autogenerated by genmsg_py from GoalStatus.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import roslib.rostime 00006 import actionlib_msgs.msg 00007 00008 class GoalStatus(roslib.message.Message): 00009 _md5sum = "d388f9b87b3c471f784434d671988d4a" 00010 _type = "actionlib_msgs/GoalStatus" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """GoalID goal_id 00013 uint8 status 00014 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00015 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00016 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00017 # and has since completed its execution (Terminal State) 00018 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00019 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00020 # to some failure (Terminal State) 00021 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00022 # because the goal was unattainable or invalid (Terminal State) 00023 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00024 # and has not yet completed execution 00025 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00026 # but the action server has not yet confirmed that the goal is canceled 00027 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00028 # and was successfully cancelled (Terminal State) 00029 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00030 # sent over the wire by an action server 00031 00032 #Allow for the user to associate a string with GoalStatus for debugging 00033 string text 00034 00035 00036 ================================================================================ 00037 MSG: actionlib_msgs/GoalID 00038 # The stamp should store the time at which this goal was requested. 00039 # It is used by an action server when it tries to preempt all 00040 # goals that were requested before a certain time 00041 time stamp 00042 00043 # The id provides a way to associate feedback and 00044 # result message with specific goal requests. The id 00045 # specified must be unique. 00046 string id 00047 00048 00049 """ 00050 # Pseudo-constants 00051 PENDING = 0 00052 ACTIVE = 1 00053 PREEMPTED = 2 00054 SUCCEEDED = 3 00055 ABORTED = 4 00056 REJECTED = 5 00057 PREEMPTING = 6 00058 RECALLING = 7 00059 RECALLED = 8 00060 LOST = 9 00061 00062 __slots__ = ['goal_id','status','text'] 00063 _slot_types = ['actionlib_msgs/GoalID','uint8','string'] 00064 00065 def __init__(self, *args, **kwds): 00066 """ 00067 Constructor. Any message fields that are implicitly/explicitly 00068 set to None will be assigned a default value. The recommend 00069 use is keyword arguments as this is more robust to future message 00070 changes. You cannot mix in-order arguments and keyword arguments. 00071 00072 The available fields are: 00073 goal_id,status,text 00074 00075 @param args: complete set of field values, in .msg order 00076 @param kwds: use keyword arguments corresponding to message field names 00077 to set specific fields. 00078 """ 00079 if args or kwds: 00080 super(GoalStatus, self).__init__(*args, **kwds) 00081 #message fields cannot be None, assign default values for those that are 00082 if self.goal_id is None: 00083 self.goal_id = actionlib_msgs.msg.GoalID() 00084 if self.status is None: 00085 self.status = 0 00086 if self.text is None: 00087 self.text = '' 00088 else: 00089 self.goal_id = actionlib_msgs.msg.GoalID() 00090 self.status = 0 00091 self.text = '' 00092 00093 def _get_types(self): 00094 """ 00095 internal API method 00096 """ 00097 return self._slot_types 00098 00099 def serialize(self, buff): 00100 """ 00101 serialize message into buffer 00102 @param buff: buffer 00103 @type buff: StringIO 00104 """ 00105 try: 00106 _x = self 00107 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00108 _x = self.goal_id.id 00109 length = len(_x) 00110 buff.write(struct.pack('<I%ss'%length, length, _x)) 00111 buff.write(_struct_B.pack(self.status)) 00112 _x = self.text 00113 length = len(_x) 00114 buff.write(struct.pack('<I%ss'%length, length, _x)) 00115 except struct.error as se: self._check_types(se) 00116 except TypeError as te: self._check_types(te) 00117 00118 def deserialize(self, str): 00119 """ 00120 unpack serialized message in str into this message instance 00121 @param str: byte array of serialized message 00122 @type str: str 00123 """ 00124 try: 00125 if self.goal_id is None: 00126 self.goal_id = actionlib_msgs.msg.GoalID() 00127 end = 0 00128 _x = self 00129 start = end 00130 end += 8 00131 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00132 start = end 00133 end += 4 00134 (length,) = _struct_I.unpack(str[start:end]) 00135 start = end 00136 end += length 00137 self.goal_id.id = str[start:end] 00138 start = end 00139 end += 1 00140 (self.status,) = _struct_B.unpack(str[start:end]) 00141 start = end 00142 end += 4 00143 (length,) = _struct_I.unpack(str[start:end]) 00144 start = end 00145 end += length 00146 self.text = str[start:end] 00147 return self 00148 except struct.error as e: 00149 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00150 00151 00152 def serialize_numpy(self, buff, numpy): 00153 """ 00154 serialize message with numpy array types into buffer 00155 @param buff: buffer 00156 @type buff: StringIO 00157 @param numpy: numpy python module 00158 @type numpy module 00159 """ 00160 try: 00161 _x = self 00162 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00163 _x = self.goal_id.id 00164 length = len(_x) 00165 buff.write(struct.pack('<I%ss'%length, length, _x)) 00166 buff.write(_struct_B.pack(self.status)) 00167 _x = self.text 00168 length = len(_x) 00169 buff.write(struct.pack('<I%ss'%length, length, _x)) 00170 except struct.error as se: self._check_types(se) 00171 except TypeError as te: self._check_types(te) 00172 00173 def deserialize_numpy(self, str, numpy): 00174 """ 00175 unpack serialized message in str into this message instance using numpy for array types 00176 @param str: byte array of serialized message 00177 @type str: str 00178 @param numpy: numpy python module 00179 @type numpy: module 00180 """ 00181 try: 00182 if self.goal_id is None: 00183 self.goal_id = actionlib_msgs.msg.GoalID() 00184 end = 0 00185 _x = self 00186 start = end 00187 end += 8 00188 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00189 start = end 00190 end += 4 00191 (length,) = _struct_I.unpack(str[start:end]) 00192 start = end 00193 end += length 00194 self.goal_id.id = str[start:end] 00195 start = end 00196 end += 1 00197 (self.status,) = _struct_B.unpack(str[start:end]) 00198 start = end 00199 end += 4 00200 (length,) = _struct_I.unpack(str[start:end]) 00201 start = end 00202 end += length 00203 self.text = str[start:end] 00204 return self 00205 except struct.error as e: 00206 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00207 00208 _struct_I = roslib.message.struct_I 00209 _struct_B = struct.Struct("<B") 00210 _struct_2I = struct.Struct("<2I")