$search
00001 """autogenerated by genmsg_py from GetPredefinedPosesRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetPredefinedPosesRequest(roslib.message.Message): 00007 _md5sum = "aa8aee7f6c8d5b8306117b46af679744" 00008 _type = "srs_knowledge/GetPredefinedPosesRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """string map 00011 00012 00013 00014 """ 00015 __slots__ = ['map'] 00016 _slot_types = ['string'] 00017 00018 def __init__(self, *args, **kwds): 00019 """ 00020 Constructor. Any message fields that are implicitly/explicitly 00021 set to None will be assigned a default value. The recommend 00022 use is keyword arguments as this is more robust to future message 00023 changes. You cannot mix in-order arguments and keyword arguments. 00024 00025 The available fields are: 00026 map 00027 00028 @param args: complete set of field values, in .msg order 00029 @param kwds: use keyword arguments corresponding to message field names 00030 to set specific fields. 00031 """ 00032 if args or kwds: 00033 super(GetPredefinedPosesRequest, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.map is None: 00036 self.map = '' 00037 else: 00038 self.map = '' 00039 00040 def _get_types(self): 00041 """ 00042 internal API method 00043 """ 00044 return self._slot_types 00045 00046 def serialize(self, buff): 00047 """ 00048 serialize message into buffer 00049 @param buff: buffer 00050 @type buff: StringIO 00051 """ 00052 try: 00053 _x = self.map 00054 length = len(_x) 00055 buff.write(struct.pack('<I%ss'%length, length, _x)) 00056 except struct.error as se: self._check_types(se) 00057 except TypeError as te: self._check_types(te) 00058 00059 def deserialize(self, str): 00060 """ 00061 unpack serialized message in str into this message instance 00062 @param str: byte array of serialized message 00063 @type str: str 00064 """ 00065 try: 00066 end = 0 00067 start = end 00068 end += 4 00069 (length,) = _struct_I.unpack(str[start:end]) 00070 start = end 00071 end += length 00072 self.map = str[start:end] 00073 return self 00074 except struct.error as e: 00075 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00076 00077 00078 def serialize_numpy(self, buff, numpy): 00079 """ 00080 serialize message with numpy array types into buffer 00081 @param buff: buffer 00082 @type buff: StringIO 00083 @param numpy: numpy python module 00084 @type numpy module 00085 """ 00086 try: 00087 _x = self.map 00088 length = len(_x) 00089 buff.write(struct.pack('<I%ss'%length, length, _x)) 00090 except struct.error as se: self._check_types(se) 00091 except TypeError as te: self._check_types(te) 00092 00093 def deserialize_numpy(self, str, numpy): 00094 """ 00095 unpack serialized message in str into this message instance using numpy for array types 00096 @param str: byte array of serialized message 00097 @type str: str 00098 @param numpy: numpy python module 00099 @type numpy: module 00100 """ 00101 try: 00102 end = 0 00103 start = end 00104 end += 4 00105 (length,) = _struct_I.unpack(str[start:end]) 00106 start = end 00107 end += length 00108 self.map = str[start:end] 00109 return self 00110 except struct.error as e: 00111 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00112 00113 _struct_I = roslib.message.struct_I 00114 """autogenerated by genmsg_py from GetPredefinedPosesResponse.msg. Do not edit.""" 00115 import roslib.message 00116 import struct 00117 00118 import geometry_msgs.msg 00119 00120 class GetPredefinedPosesResponse(roslib.message.Message): 00121 _md5sum = "fe5f3887ad646ed4d1ed0e21834b460b" 00122 _type = "srs_knowledge/GetPredefinedPosesResponse" 00123 _has_header = False #flag to mark the presence of a Header object 00124 _full_text = """ 00125 00126 string[] locations 00127 geometry_msgs/Pose2D[] poses 00128 string[] readableNames 00129 00130 string[] json_properties 00131 00132 ================================================================================ 00133 MSG: geometry_msgs/Pose2D 00134 # This expresses a position and orientation on a 2D manifold. 00135 00136 float64 x 00137 float64 y 00138 float64 theta 00139 """ 00140 __slots__ = ['locations','poses','readableNames','json_properties'] 00141 _slot_types = ['string[]','geometry_msgs/Pose2D[]','string[]','string[]'] 00142 00143 def __init__(self, *args, **kwds): 00144 """ 00145 Constructor. Any message fields that are implicitly/explicitly 00146 set to None will be assigned a default value. The recommend 00147 use is keyword arguments as this is more robust to future message 00148 changes. You cannot mix in-order arguments and keyword arguments. 00149 00150 The available fields are: 00151 locations,poses,readableNames,json_properties 00152 00153 @param args: complete set of field values, in .msg order 00154 @param kwds: use keyword arguments corresponding to message field names 00155 to set specific fields. 00156 """ 00157 if args or kwds: 00158 super(GetPredefinedPosesResponse, self).__init__(*args, **kwds) 00159 #message fields cannot be None, assign default values for those that are 00160 if self.locations is None: 00161 self.locations = [] 00162 if self.poses is None: 00163 self.poses = [] 00164 if self.readableNames is None: 00165 self.readableNames = [] 00166 if self.json_properties is None: 00167 self.json_properties = [] 00168 else: 00169 self.locations = [] 00170 self.poses = [] 00171 self.readableNames = [] 00172 self.json_properties = [] 00173 00174 def _get_types(self): 00175 """ 00176 internal API method 00177 """ 00178 return self._slot_types 00179 00180 def serialize(self, buff): 00181 """ 00182 serialize message into buffer 00183 @param buff: buffer 00184 @type buff: StringIO 00185 """ 00186 try: 00187 length = len(self.locations) 00188 buff.write(_struct_I.pack(length)) 00189 for val1 in self.locations: 00190 length = len(val1) 00191 buff.write(struct.pack('<I%ss'%length, length, val1)) 00192 length = len(self.poses) 00193 buff.write(_struct_I.pack(length)) 00194 for val1 in self.poses: 00195 _x = val1 00196 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00197 length = len(self.readableNames) 00198 buff.write(_struct_I.pack(length)) 00199 for val1 in self.readableNames: 00200 length = len(val1) 00201 buff.write(struct.pack('<I%ss'%length, length, val1)) 00202 length = len(self.json_properties) 00203 buff.write(_struct_I.pack(length)) 00204 for val1 in self.json_properties: 00205 length = len(val1) 00206 buff.write(struct.pack('<I%ss'%length, length, val1)) 00207 except struct.error as se: self._check_types(se) 00208 except TypeError as te: self._check_types(te) 00209 00210 def deserialize(self, str): 00211 """ 00212 unpack serialized message in str into this message instance 00213 @param str: byte array of serialized message 00214 @type str: str 00215 """ 00216 try: 00217 end = 0 00218 start = end 00219 end += 4 00220 (length,) = _struct_I.unpack(str[start:end]) 00221 self.locations = [] 00222 for i in range(0, length): 00223 start = end 00224 end += 4 00225 (length,) = _struct_I.unpack(str[start:end]) 00226 start = end 00227 end += length 00228 val1 = str[start:end] 00229 self.locations.append(val1) 00230 start = end 00231 end += 4 00232 (length,) = _struct_I.unpack(str[start:end]) 00233 self.poses = [] 00234 for i in range(0, length): 00235 val1 = geometry_msgs.msg.Pose2D() 00236 _x = val1 00237 start = end 00238 end += 24 00239 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00240 self.poses.append(val1) 00241 start = end 00242 end += 4 00243 (length,) = _struct_I.unpack(str[start:end]) 00244 self.readableNames = [] 00245 for i in range(0, length): 00246 start = end 00247 end += 4 00248 (length,) = _struct_I.unpack(str[start:end]) 00249 start = end 00250 end += length 00251 val1 = str[start:end] 00252 self.readableNames.append(val1) 00253 start = end 00254 end += 4 00255 (length,) = _struct_I.unpack(str[start:end]) 00256 self.json_properties = [] 00257 for i in range(0, length): 00258 start = end 00259 end += 4 00260 (length,) = _struct_I.unpack(str[start:end]) 00261 start = end 00262 end += length 00263 val1 = str[start:end] 00264 self.json_properties.append(val1) 00265 return self 00266 except struct.error as e: 00267 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00268 00269 00270 def serialize_numpy(self, buff, numpy): 00271 """ 00272 serialize message with numpy array types into buffer 00273 @param buff: buffer 00274 @type buff: StringIO 00275 @param numpy: numpy python module 00276 @type numpy module 00277 """ 00278 try: 00279 length = len(self.locations) 00280 buff.write(_struct_I.pack(length)) 00281 for val1 in self.locations: 00282 length = len(val1) 00283 buff.write(struct.pack('<I%ss'%length, length, val1)) 00284 length = len(self.poses) 00285 buff.write(_struct_I.pack(length)) 00286 for val1 in self.poses: 00287 _x = val1 00288 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00289 length = len(self.readableNames) 00290 buff.write(_struct_I.pack(length)) 00291 for val1 in self.readableNames: 00292 length = len(val1) 00293 buff.write(struct.pack('<I%ss'%length, length, val1)) 00294 length = len(self.json_properties) 00295 buff.write(_struct_I.pack(length)) 00296 for val1 in self.json_properties: 00297 length = len(val1) 00298 buff.write(struct.pack('<I%ss'%length, length, val1)) 00299 except struct.error as se: self._check_types(se) 00300 except TypeError as te: self._check_types(te) 00301 00302 def deserialize_numpy(self, str, numpy): 00303 """ 00304 unpack serialized message in str into this message instance using numpy for array types 00305 @param str: byte array of serialized message 00306 @type str: str 00307 @param numpy: numpy python module 00308 @type numpy: module 00309 """ 00310 try: 00311 end = 0 00312 start = end 00313 end += 4 00314 (length,) = _struct_I.unpack(str[start:end]) 00315 self.locations = [] 00316 for i in range(0, length): 00317 start = end 00318 end += 4 00319 (length,) = _struct_I.unpack(str[start:end]) 00320 start = end 00321 end += length 00322 val1 = str[start:end] 00323 self.locations.append(val1) 00324 start = end 00325 end += 4 00326 (length,) = _struct_I.unpack(str[start:end]) 00327 self.poses = [] 00328 for i in range(0, length): 00329 val1 = geometry_msgs.msg.Pose2D() 00330 _x = val1 00331 start = end 00332 end += 24 00333 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00334 self.poses.append(val1) 00335 start = end 00336 end += 4 00337 (length,) = _struct_I.unpack(str[start:end]) 00338 self.readableNames = [] 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.readableNames.append(val1) 00347 start = end 00348 end += 4 00349 (length,) = _struct_I.unpack(str[start:end]) 00350 self.json_properties = [] 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.json_properties.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_3d = struct.Struct("<3d") 00365 class GetPredefinedPoses(roslib.message.ServiceDefinition): 00366 _type = 'srs_knowledge/GetPredefinedPoses' 00367 _md5sum = '3191b85c3a25ca96f7c14907417f01f1' 00368 _request_class = GetPredefinedPosesRequest 00369 _response_class = GetPredefinedPosesResponse