$search
00001 """autogenerated by genmsg_py from srs_actionActionFeedback.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import srs_decision_making_interface.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class srs_actionActionFeedback(roslib.message.Message): 00011 _md5sum = "a1da930ab945d692acbd8cacb109983a" 00012 _type = "srs_decision_making_interface/srs_actionActionFeedback" 00013 _has_header = True #flag to mark the presence of a Header object 00014 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00015 00016 Header header 00017 actionlib_msgs/GoalStatus status 00018 srs_actionFeedback feedback 00019 00020 ================================================================================ 00021 MSG: std_msgs/Header 00022 # Standard metadata for higher-level stamped data types. 00023 # This is generally used to communicate timestamped data 00024 # in a particular coordinate frame. 00025 # 00026 # sequence ID: consecutively increasing ID 00027 uint32 seq 00028 #Two-integer timestamp that is expressed as: 00029 # * stamp.secs: seconds (stamp_secs) since epoch 00030 # * stamp.nsecs: nanoseconds since stamp_secs 00031 # time-handling sugar is provided by the client library 00032 time stamp 00033 #Frame this data is associated with 00034 # 0: no frame 00035 # 1: global frame 00036 string frame_id 00037 00038 ================================================================================ 00039 MSG: actionlib_msgs/GoalStatus 00040 GoalID goal_id 00041 uint8 status 00042 uint8 PENDING = 0 # The goal has yet to be processed by the action server 00043 uint8 ACTIVE = 1 # The goal is currently being processed by the action server 00044 uint8 PREEMPTED = 2 # The goal received a cancel request after it started executing 00045 # and has since completed its execution (Terminal State) 00046 uint8 SUCCEEDED = 3 # The goal was achieved successfully by the action server (Terminal State) 00047 uint8 ABORTED = 4 # The goal was aborted during execution by the action server due 00048 # to some failure (Terminal State) 00049 uint8 REJECTED = 5 # The goal was rejected by the action server without being processed, 00050 # because the goal was unattainable or invalid (Terminal State) 00051 uint8 PREEMPTING = 6 # The goal received a cancel request after it started executing 00052 # and has not yet completed execution 00053 uint8 RECALLING = 7 # The goal received a cancel request before it started executing, 00054 # but the action server has not yet confirmed that the goal is canceled 00055 uint8 RECALLED = 8 # The goal received a cancel request before it started executing 00056 # and was successfully cancelled (Terminal State) 00057 uint8 LOST = 9 # An action client can determine that a goal is LOST. This should not be 00058 # sent over the wire by an action server 00059 00060 #Allow for the user to associate a string with GoalStatus for debugging 00061 string text 00062 00063 00064 ================================================================================ 00065 MSG: actionlib_msgs/GoalID 00066 # The stamp should store the time at which this goal was requested. 00067 # It is used by an action server when it tries to preempt all 00068 # goals that were requested before a certain time 00069 time stamp 00070 00071 # The id provides a way to associate feedback and 00072 # result message with specific goal requests. The id 00073 # specified must be unique. 00074 string id 00075 00076 00077 ================================================================================ 00078 MSG: srs_decision_making_interface/srs_actionFeedback 00079 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00080 #define a feedback message 00081 string current_state # to deprecate 00082 bool solution_required # to deprecate 00083 uint32 exceptional_case_id # to deprecate 00084 string json_feedback # new added feedback in json (test by ze) 00085 00086 00087 """ 00088 __slots__ = ['header','status','feedback'] 00089 _slot_types = ['Header','actionlib_msgs/GoalStatus','srs_decision_making_interface/srs_actionFeedback'] 00090 00091 def __init__(self, *args, **kwds): 00092 """ 00093 Constructor. Any message fields that are implicitly/explicitly 00094 set to None will be assigned a default value. The recommend 00095 use is keyword arguments as this is more robust to future message 00096 changes. You cannot mix in-order arguments and keyword arguments. 00097 00098 The available fields are: 00099 header,status,feedback 00100 00101 @param args: complete set of field values, in .msg order 00102 @param kwds: use keyword arguments corresponding to message field names 00103 to set specific fields. 00104 """ 00105 if args or kwds: 00106 super(srs_actionActionFeedback, self).__init__(*args, **kwds) 00107 #message fields cannot be None, assign default values for those that are 00108 if self.header is None: 00109 self.header = std_msgs.msg._Header.Header() 00110 if self.status is None: 00111 self.status = actionlib_msgs.msg.GoalStatus() 00112 if self.feedback is None: 00113 self.feedback = srs_decision_making_interface.msg.srs_actionFeedback() 00114 else: 00115 self.header = std_msgs.msg._Header.Header() 00116 self.status = actionlib_msgs.msg.GoalStatus() 00117 self.feedback = srs_decision_making_interface.msg.srs_actionFeedback() 00118 00119 def _get_types(self): 00120 """ 00121 internal API method 00122 """ 00123 return self._slot_types 00124 00125 def serialize(self, buff): 00126 """ 00127 serialize message into buffer 00128 @param buff: buffer 00129 @type buff: StringIO 00130 """ 00131 try: 00132 _x = self 00133 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00134 _x = self.header.frame_id 00135 length = len(_x) 00136 buff.write(struct.pack('<I%ss'%length, length, _x)) 00137 _x = self 00138 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00139 _x = self.status.goal_id.id 00140 length = len(_x) 00141 buff.write(struct.pack('<I%ss'%length, length, _x)) 00142 buff.write(_struct_B.pack(self.status.status)) 00143 _x = self.status.text 00144 length = len(_x) 00145 buff.write(struct.pack('<I%ss'%length, length, _x)) 00146 _x = self.feedback.current_state 00147 length = len(_x) 00148 buff.write(struct.pack('<I%ss'%length, length, _x)) 00149 _x = self 00150 buff.write(_struct_BI.pack(_x.feedback.solution_required, _x.feedback.exceptional_case_id)) 00151 _x = self.feedback.json_feedback 00152 length = len(_x) 00153 buff.write(struct.pack('<I%ss'%length, length, _x)) 00154 except struct.error as se: self._check_types(se) 00155 except TypeError as te: self._check_types(te) 00156 00157 def deserialize(self, str): 00158 """ 00159 unpack serialized message in str into this message instance 00160 @param str: byte array of serialized message 00161 @type str: str 00162 """ 00163 try: 00164 if self.header is None: 00165 self.header = std_msgs.msg._Header.Header() 00166 if self.status is None: 00167 self.status = actionlib_msgs.msg.GoalStatus() 00168 if self.feedback is None: 00169 self.feedback = srs_decision_making_interface.msg.srs_actionFeedback() 00170 end = 0 00171 _x = self 00172 start = end 00173 end += 12 00174 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00175 start = end 00176 end += 4 00177 (length,) = _struct_I.unpack(str[start:end]) 00178 start = end 00179 end += length 00180 self.header.frame_id = str[start:end] 00181 _x = self 00182 start = end 00183 end += 8 00184 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00185 start = end 00186 end += 4 00187 (length,) = _struct_I.unpack(str[start:end]) 00188 start = end 00189 end += length 00190 self.status.goal_id.id = str[start:end] 00191 start = end 00192 end += 1 00193 (self.status.status,) = _struct_B.unpack(str[start:end]) 00194 start = end 00195 end += 4 00196 (length,) = _struct_I.unpack(str[start:end]) 00197 start = end 00198 end += length 00199 self.status.text = str[start:end] 00200 start = end 00201 end += 4 00202 (length,) = _struct_I.unpack(str[start:end]) 00203 start = end 00204 end += length 00205 self.feedback.current_state = str[start:end] 00206 _x = self 00207 start = end 00208 end += 5 00209 (_x.feedback.solution_required, _x.feedback.exceptional_case_id,) = _struct_BI.unpack(str[start:end]) 00210 self.feedback.solution_required = bool(self.feedback.solution_required) 00211 start = end 00212 end += 4 00213 (length,) = _struct_I.unpack(str[start:end]) 00214 start = end 00215 end += length 00216 self.feedback.json_feedback = str[start:end] 00217 return self 00218 except struct.error as e: 00219 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00220 00221 00222 def serialize_numpy(self, buff, numpy): 00223 """ 00224 serialize message with numpy array types into buffer 00225 @param buff: buffer 00226 @type buff: StringIO 00227 @param numpy: numpy python module 00228 @type numpy module 00229 """ 00230 try: 00231 _x = self 00232 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00233 _x = self.header.frame_id 00234 length = len(_x) 00235 buff.write(struct.pack('<I%ss'%length, length, _x)) 00236 _x = self 00237 buff.write(_struct_2I.pack(_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs)) 00238 _x = self.status.goal_id.id 00239 length = len(_x) 00240 buff.write(struct.pack('<I%ss'%length, length, _x)) 00241 buff.write(_struct_B.pack(self.status.status)) 00242 _x = self.status.text 00243 length = len(_x) 00244 buff.write(struct.pack('<I%ss'%length, length, _x)) 00245 _x = self.feedback.current_state 00246 length = len(_x) 00247 buff.write(struct.pack('<I%ss'%length, length, _x)) 00248 _x = self 00249 buff.write(_struct_BI.pack(_x.feedback.solution_required, _x.feedback.exceptional_case_id)) 00250 _x = self.feedback.json_feedback 00251 length = len(_x) 00252 buff.write(struct.pack('<I%ss'%length, length, _x)) 00253 except struct.error as se: self._check_types(se) 00254 except TypeError as te: self._check_types(te) 00255 00256 def deserialize_numpy(self, str, numpy): 00257 """ 00258 unpack serialized message in str into this message instance using numpy for array types 00259 @param str: byte array of serialized message 00260 @type str: str 00261 @param numpy: numpy python module 00262 @type numpy: module 00263 """ 00264 try: 00265 if self.header is None: 00266 self.header = std_msgs.msg._Header.Header() 00267 if self.status is None: 00268 self.status = actionlib_msgs.msg.GoalStatus() 00269 if self.feedback is None: 00270 self.feedback = srs_decision_making_interface.msg.srs_actionFeedback() 00271 end = 0 00272 _x = self 00273 start = end 00274 end += 12 00275 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00276 start = end 00277 end += 4 00278 (length,) = _struct_I.unpack(str[start:end]) 00279 start = end 00280 end += length 00281 self.header.frame_id = str[start:end] 00282 _x = self 00283 start = end 00284 end += 8 00285 (_x.status.goal_id.stamp.secs, _x.status.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00286 start = end 00287 end += 4 00288 (length,) = _struct_I.unpack(str[start:end]) 00289 start = end 00290 end += length 00291 self.status.goal_id.id = str[start:end] 00292 start = end 00293 end += 1 00294 (self.status.status,) = _struct_B.unpack(str[start:end]) 00295 start = end 00296 end += 4 00297 (length,) = _struct_I.unpack(str[start:end]) 00298 start = end 00299 end += length 00300 self.status.text = str[start:end] 00301 start = end 00302 end += 4 00303 (length,) = _struct_I.unpack(str[start:end]) 00304 start = end 00305 end += length 00306 self.feedback.current_state = str[start:end] 00307 _x = self 00308 start = end 00309 end += 5 00310 (_x.feedback.solution_required, _x.feedback.exceptional_case_id,) = _struct_BI.unpack(str[start:end]) 00311 self.feedback.solution_required = bool(self.feedback.solution_required) 00312 start = end 00313 end += 4 00314 (length,) = _struct_I.unpack(str[start:end]) 00315 start = end 00316 end += length 00317 self.feedback.json_feedback = str[start:end] 00318 return self 00319 except struct.error as e: 00320 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00321 00322 _struct_I = roslib.message.struct_I 00323 _struct_3I = struct.Struct("<3I") 00324 _struct_B = struct.Struct("<B") 00325 _struct_2I = struct.Struct("<2I") 00326 _struct_BI = struct.Struct("<BI")