$search
00001 """autogenerated by genmsg_py from ActionMsgMapperActionGoal.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import turtlebot_actions.msg 00006 import roslib.rostime 00007 import actionlib_msgs.msg 00008 import std_msgs.msg 00009 00010 class ActionMsgMapperActionGoal(roslib.message.Message): 00011 _md5sum = "10050ee576c29a2c373416dcd9499fb9" 00012 _type = "turtlebot_actions/ActionMsgMapperActionGoal" 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/GoalID goal_id 00018 ActionMsgMapperGoal goal 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/GoalID 00040 # The stamp should store the time at which this goal was requested. 00041 # It is used by an action server when it tries to preempt all 00042 # goals that were requested before a certain time 00043 time stamp 00044 00045 # The id provides a way to associate feedback and 00046 # result message with specific goal requests. The id 00047 # specified must be unique. 00048 string id 00049 00050 00051 ================================================================================ 00052 MSG: turtlebot_actions/ActionMsgMapperGoal 00053 # ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ====== 00054 #goal definition 00055 string input_topic 00056 string output_topic 00057 string input_type 00058 string output_type 00059 string[] input_list 00060 string[] output_list 00061 00062 00063 00064 """ 00065 __slots__ = ['header','goal_id','goal'] 00066 _slot_types = ['Header','actionlib_msgs/GoalID','turtlebot_actions/ActionMsgMapperGoal'] 00067 00068 def __init__(self, *args, **kwds): 00069 """ 00070 Constructor. Any message fields that are implicitly/explicitly 00071 set to None will be assigned a default value. The recommend 00072 use is keyword arguments as this is more robust to future message 00073 changes. You cannot mix in-order arguments and keyword arguments. 00074 00075 The available fields are: 00076 header,goal_id,goal 00077 00078 @param args: complete set of field values, in .msg order 00079 @param kwds: use keyword arguments corresponding to message field names 00080 to set specific fields. 00081 """ 00082 if args or kwds: 00083 super(ActionMsgMapperActionGoal, self).__init__(*args, **kwds) 00084 #message fields cannot be None, assign default values for those that are 00085 if self.header is None: 00086 self.header = std_msgs.msg._Header.Header() 00087 if self.goal_id is None: 00088 self.goal_id = actionlib_msgs.msg.GoalID() 00089 if self.goal is None: 00090 self.goal = turtlebot_actions.msg.ActionMsgMapperGoal() 00091 else: 00092 self.header = std_msgs.msg._Header.Header() 00093 self.goal_id = actionlib_msgs.msg.GoalID() 00094 self.goal = turtlebot_actions.msg.ActionMsgMapperGoal() 00095 00096 def _get_types(self): 00097 """ 00098 internal API method 00099 """ 00100 return self._slot_types 00101 00102 def serialize(self, buff): 00103 """ 00104 serialize message into buffer 00105 @param buff: buffer 00106 @type buff: StringIO 00107 """ 00108 try: 00109 _x = self 00110 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00111 _x = self.header.frame_id 00112 length = len(_x) 00113 buff.write(struct.pack('<I%ss'%length, length, _x)) 00114 _x = self 00115 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00116 _x = self.goal_id.id 00117 length = len(_x) 00118 buff.write(struct.pack('<I%ss'%length, length, _x)) 00119 _x = self.goal.input_topic 00120 length = len(_x) 00121 buff.write(struct.pack('<I%ss'%length, length, _x)) 00122 _x = self.goal.output_topic 00123 length = len(_x) 00124 buff.write(struct.pack('<I%ss'%length, length, _x)) 00125 _x = self.goal.input_type 00126 length = len(_x) 00127 buff.write(struct.pack('<I%ss'%length, length, _x)) 00128 _x = self.goal.output_type 00129 length = len(_x) 00130 buff.write(struct.pack('<I%ss'%length, length, _x)) 00131 length = len(self.goal.input_list) 00132 buff.write(_struct_I.pack(length)) 00133 for val1 in self.goal.input_list: 00134 length = len(val1) 00135 buff.write(struct.pack('<I%ss'%length, length, val1)) 00136 length = len(self.goal.output_list) 00137 buff.write(_struct_I.pack(length)) 00138 for val1 in self.goal.output_list: 00139 length = len(val1) 00140 buff.write(struct.pack('<I%ss'%length, length, val1)) 00141 except struct.error as se: self._check_types(se) 00142 except TypeError as te: self._check_types(te) 00143 00144 def deserialize(self, str): 00145 """ 00146 unpack serialized message in str into this message instance 00147 @param str: byte array of serialized message 00148 @type str: str 00149 """ 00150 try: 00151 if self.header is None: 00152 self.header = std_msgs.msg._Header.Header() 00153 if self.goal_id is None: 00154 self.goal_id = actionlib_msgs.msg.GoalID() 00155 if self.goal is None: 00156 self.goal = turtlebot_actions.msg.ActionMsgMapperGoal() 00157 end = 0 00158 _x = self 00159 start = end 00160 end += 12 00161 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end]) 00162 start = end 00163 end += 4 00164 (length,) = _struct_I.unpack(str[start:end]) 00165 start = end 00166 end += length 00167 self.header.frame_id = str[start:end] 00168 _x = self 00169 start = end 00170 end += 8 00171 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00172 start = end 00173 end += 4 00174 (length,) = _struct_I.unpack(str[start:end]) 00175 start = end 00176 end += length 00177 self.goal_id.id = str[start:end] 00178 start = end 00179 end += 4 00180 (length,) = _struct_I.unpack(str[start:end]) 00181 start = end 00182 end += length 00183 self.goal.input_topic = str[start:end] 00184 start = end 00185 end += 4 00186 (length,) = _struct_I.unpack(str[start:end]) 00187 start = end 00188 end += length 00189 self.goal.output_topic = str[start:end] 00190 start = end 00191 end += 4 00192 (length,) = _struct_I.unpack(str[start:end]) 00193 start = end 00194 end += length 00195 self.goal.input_type = str[start:end] 00196 start = end 00197 end += 4 00198 (length,) = _struct_I.unpack(str[start:end]) 00199 start = end 00200 end += length 00201 self.goal.output_type = str[start:end] 00202 start = end 00203 end += 4 00204 (length,) = _struct_I.unpack(str[start:end]) 00205 self.goal.input_list = [] 00206 for i in range(0, length): 00207 start = end 00208 end += 4 00209 (length,) = _struct_I.unpack(str[start:end]) 00210 start = end 00211 end += length 00212 val1 = str[start:end] 00213 self.goal.input_list.append(val1) 00214 start = end 00215 end += 4 00216 (length,) = _struct_I.unpack(str[start:end]) 00217 self.goal.output_list = [] 00218 for i in range(0, length): 00219 start = end 00220 end += 4 00221 (length,) = _struct_I.unpack(str[start:end]) 00222 start = end 00223 end += length 00224 val1 = str[start:end] 00225 self.goal.output_list.append(val1) 00226 return self 00227 except struct.error as e: 00228 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00229 00230 00231 def serialize_numpy(self, buff, numpy): 00232 """ 00233 serialize message with numpy array types into buffer 00234 @param buff: buffer 00235 @type buff: StringIO 00236 @param numpy: numpy python module 00237 @type numpy module 00238 """ 00239 try: 00240 _x = self 00241 buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs)) 00242 _x = self.header.frame_id 00243 length = len(_x) 00244 buff.write(struct.pack('<I%ss'%length, length, _x)) 00245 _x = self 00246 buff.write(_struct_2I.pack(_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs)) 00247 _x = self.goal_id.id 00248 length = len(_x) 00249 buff.write(struct.pack('<I%ss'%length, length, _x)) 00250 _x = self.goal.input_topic 00251 length = len(_x) 00252 buff.write(struct.pack('<I%ss'%length, length, _x)) 00253 _x = self.goal.output_topic 00254 length = len(_x) 00255 buff.write(struct.pack('<I%ss'%length, length, _x)) 00256 _x = self.goal.input_type 00257 length = len(_x) 00258 buff.write(struct.pack('<I%ss'%length, length, _x)) 00259 _x = self.goal.output_type 00260 length = len(_x) 00261 buff.write(struct.pack('<I%ss'%length, length, _x)) 00262 length = len(self.goal.input_list) 00263 buff.write(_struct_I.pack(length)) 00264 for val1 in self.goal.input_list: 00265 length = len(val1) 00266 buff.write(struct.pack('<I%ss'%length, length, val1)) 00267 length = len(self.goal.output_list) 00268 buff.write(_struct_I.pack(length)) 00269 for val1 in self.goal.output_list: 00270 length = len(val1) 00271 buff.write(struct.pack('<I%ss'%length, length, val1)) 00272 except struct.error as se: self._check_types(se) 00273 except TypeError as te: self._check_types(te) 00274 00275 def deserialize_numpy(self, str, numpy): 00276 """ 00277 unpack serialized message in str into this message instance using numpy for array types 00278 @param str: byte array of serialized message 00279 @type str: str 00280 @param numpy: numpy python module 00281 @type numpy: module 00282 """ 00283 try: 00284 if self.header is None: 00285 self.header = std_msgs.msg._Header.Header() 00286 if self.goal_id is None: 00287 self.goal_id = actionlib_msgs.msg.GoalID() 00288 if self.goal is None: 00289 self.goal = turtlebot_actions.msg.ActionMsgMapperGoal() 00290 end = 0 00291 _x = self 00292 start = end 00293 end += 12 00294 (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.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.header.frame_id = str[start:end] 00301 _x = self 00302 start = end 00303 end += 8 00304 (_x.goal_id.stamp.secs, _x.goal_id.stamp.nsecs,) = _struct_2I.unpack(str[start:end]) 00305 start = end 00306 end += 4 00307 (length,) = _struct_I.unpack(str[start:end]) 00308 start = end 00309 end += length 00310 self.goal_id.id = str[start:end] 00311 start = end 00312 end += 4 00313 (length,) = _struct_I.unpack(str[start:end]) 00314 start = end 00315 end += length 00316 self.goal.input_topic = str[start:end] 00317 start = end 00318 end += 4 00319 (length,) = _struct_I.unpack(str[start:end]) 00320 start = end 00321 end += length 00322 self.goal.output_topic = str[start:end] 00323 start = end 00324 end += 4 00325 (length,) = _struct_I.unpack(str[start:end]) 00326 start = end 00327 end += length 00328 self.goal.input_type = str[start:end] 00329 start = end 00330 end += 4 00331 (length,) = _struct_I.unpack(str[start:end]) 00332 start = end 00333 end += length 00334 self.goal.output_type = str[start:end] 00335 start = end 00336 end += 4 00337 (length,) = _struct_I.unpack(str[start:end]) 00338 self.goal.input_list = [] 00339 for i in range(0, length): 00340 start = end 00341 end += 4 00342 (length,) = _struct_I.unpack(str[start:end]) 00343 start = end 00344 end += length 00345 val1 = str[start:end] 00346 self.goal.input_list.append(val1) 00347 start = end 00348 end += 4 00349 (length,) = _struct_I.unpack(str[start:end]) 00350 self.goal.output_list = [] 00351 for i in range(0, length): 00352 start = end 00353 end += 4 00354 (length,) = _struct_I.unpack(str[start:end]) 00355 start = end 00356 end += length 00357 val1 = str[start:end] 00358 self.goal.output_list.append(val1) 00359 return self 00360 except struct.error as e: 00361 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00362 00363 _struct_I = roslib.message.struct_I 00364 _struct_3I = struct.Struct("<3I") 00365 _struct_2I = struct.Struct("<2I")