$search
00001 """autogenerated by genmsg_py from GetModelPropertiesRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetModelPropertiesRequest(roslib.message.Message): 00007 _md5sum = "ea31c8eab6fc401383cf528a7c0984ba" 00008 _type = "gazebo_msgs/GetModelPropertiesRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """string model_name 00011 00012 """ 00013 __slots__ = ['model_name'] 00014 _slot_types = ['string'] 00015 00016 def __init__(self, *args, **kwds): 00017 """ 00018 Constructor. Any message fields that are implicitly/explicitly 00019 set to None will be assigned a default value. The recommend 00020 use is keyword arguments as this is more robust to future message 00021 changes. You cannot mix in-order arguments and keyword arguments. 00022 00023 The available fields are: 00024 model_name 00025 00026 @param args: complete set of field values, in .msg order 00027 @param kwds: use keyword arguments corresponding to message field names 00028 to set specific fields. 00029 """ 00030 if args or kwds: 00031 super(GetModelPropertiesRequest, self).__init__(*args, **kwds) 00032 #message fields cannot be None, assign default values for those that are 00033 if self.model_name is None: 00034 self.model_name = '' 00035 else: 00036 self.model_name = '' 00037 00038 def _get_types(self): 00039 """ 00040 internal API method 00041 """ 00042 return self._slot_types 00043 00044 def serialize(self, buff): 00045 """ 00046 serialize message into buffer 00047 @param buff: buffer 00048 @type buff: StringIO 00049 """ 00050 try: 00051 _x = self.model_name 00052 length = len(_x) 00053 buff.write(struct.pack('<I%ss'%length, length, _x)) 00054 except struct.error as se: self._check_types(se) 00055 except TypeError as te: self._check_types(te) 00056 00057 def deserialize(self, str): 00058 """ 00059 unpack serialized message in str into this message instance 00060 @param str: byte array of serialized message 00061 @type str: str 00062 """ 00063 try: 00064 end = 0 00065 start = end 00066 end += 4 00067 (length,) = _struct_I.unpack(str[start:end]) 00068 start = end 00069 end += length 00070 self.model_name = str[start:end] 00071 return self 00072 except struct.error as e: 00073 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00074 00075 00076 def serialize_numpy(self, buff, numpy): 00077 """ 00078 serialize message with numpy array types into buffer 00079 @param buff: buffer 00080 @type buff: StringIO 00081 @param numpy: numpy python module 00082 @type numpy module 00083 """ 00084 try: 00085 _x = self.model_name 00086 length = len(_x) 00087 buff.write(struct.pack('<I%ss'%length, length, _x)) 00088 except struct.error as se: self._check_types(se) 00089 except TypeError as te: self._check_types(te) 00090 00091 def deserialize_numpy(self, str, numpy): 00092 """ 00093 unpack serialized message in str into this message instance using numpy for array types 00094 @param str: byte array of serialized message 00095 @type str: str 00096 @param numpy: numpy python module 00097 @type numpy: module 00098 """ 00099 try: 00100 end = 0 00101 start = end 00102 end += 4 00103 (length,) = _struct_I.unpack(str[start:end]) 00104 start = end 00105 end += length 00106 self.model_name = str[start:end] 00107 return self 00108 except struct.error as e: 00109 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00110 00111 _struct_I = roslib.message.struct_I 00112 """autogenerated by genmsg_py from GetModelPropertiesResponse.msg. Do not edit.""" 00113 import roslib.message 00114 import struct 00115 00116 00117 class GetModelPropertiesResponse(roslib.message.Message): 00118 _md5sum = "b7f370938ef77b464b95f1bab3ec5028" 00119 _type = "gazebo_msgs/GetModelPropertiesResponse" 00120 _has_header = False #flag to mark the presence of a Header object 00121 _full_text = """string parent_model_name 00122 string canonical_body_name 00123 string[] body_names 00124 string[] geom_names 00125 string[] joint_names 00126 string[] child_model_names 00127 bool is_static 00128 bool success 00129 string status_message 00130 00131 00132 """ 00133 __slots__ = ['parent_model_name','canonical_body_name','body_names','geom_names','joint_names','child_model_names','is_static','success','status_message'] 00134 _slot_types = ['string','string','string[]','string[]','string[]','string[]','bool','bool','string'] 00135 00136 def __init__(self, *args, **kwds): 00137 """ 00138 Constructor. Any message fields that are implicitly/explicitly 00139 set to None will be assigned a default value. The recommend 00140 use is keyword arguments as this is more robust to future message 00141 changes. You cannot mix in-order arguments and keyword arguments. 00142 00143 The available fields are: 00144 parent_model_name,canonical_body_name,body_names,geom_names,joint_names,child_model_names,is_static,success,status_message 00145 00146 @param args: complete set of field values, in .msg order 00147 @param kwds: use keyword arguments corresponding to message field names 00148 to set specific fields. 00149 """ 00150 if args or kwds: 00151 super(GetModelPropertiesResponse, self).__init__(*args, **kwds) 00152 #message fields cannot be None, assign default values for those that are 00153 if self.parent_model_name is None: 00154 self.parent_model_name = '' 00155 if self.canonical_body_name is None: 00156 self.canonical_body_name = '' 00157 if self.body_names is None: 00158 self.body_names = [] 00159 if self.geom_names is None: 00160 self.geom_names = [] 00161 if self.joint_names is None: 00162 self.joint_names = [] 00163 if self.child_model_names is None: 00164 self.child_model_names = [] 00165 if self.is_static is None: 00166 self.is_static = False 00167 if self.success is None: 00168 self.success = False 00169 if self.status_message is None: 00170 self.status_message = '' 00171 else: 00172 self.parent_model_name = '' 00173 self.canonical_body_name = '' 00174 self.body_names = [] 00175 self.geom_names = [] 00176 self.joint_names = [] 00177 self.child_model_names = [] 00178 self.is_static = False 00179 self.success = False 00180 self.status_message = '' 00181 00182 def _get_types(self): 00183 """ 00184 internal API method 00185 """ 00186 return self._slot_types 00187 00188 def serialize(self, buff): 00189 """ 00190 serialize message into buffer 00191 @param buff: buffer 00192 @type buff: StringIO 00193 """ 00194 try: 00195 _x = self.parent_model_name 00196 length = len(_x) 00197 buff.write(struct.pack('<I%ss'%length, length, _x)) 00198 _x = self.canonical_body_name 00199 length = len(_x) 00200 buff.write(struct.pack('<I%ss'%length, length, _x)) 00201 length = len(self.body_names) 00202 buff.write(_struct_I.pack(length)) 00203 for val1 in self.body_names: 00204 length = len(val1) 00205 buff.write(struct.pack('<I%ss'%length, length, val1)) 00206 length = len(self.geom_names) 00207 buff.write(_struct_I.pack(length)) 00208 for val1 in self.geom_names: 00209 length = len(val1) 00210 buff.write(struct.pack('<I%ss'%length, length, val1)) 00211 length = len(self.joint_names) 00212 buff.write(_struct_I.pack(length)) 00213 for val1 in self.joint_names: 00214 length = len(val1) 00215 buff.write(struct.pack('<I%ss'%length, length, val1)) 00216 length = len(self.child_model_names) 00217 buff.write(_struct_I.pack(length)) 00218 for val1 in self.child_model_names: 00219 length = len(val1) 00220 buff.write(struct.pack('<I%ss'%length, length, val1)) 00221 _x = self 00222 buff.write(_struct_2B.pack(_x.is_static, _x.success)) 00223 _x = self.status_message 00224 length = len(_x) 00225 buff.write(struct.pack('<I%ss'%length, length, _x)) 00226 except struct.error as se: self._check_types(se) 00227 except TypeError as te: self._check_types(te) 00228 00229 def deserialize(self, str): 00230 """ 00231 unpack serialized message in str into this message instance 00232 @param str: byte array of serialized message 00233 @type str: str 00234 """ 00235 try: 00236 end = 0 00237 start = end 00238 end += 4 00239 (length,) = _struct_I.unpack(str[start:end]) 00240 start = end 00241 end += length 00242 self.parent_model_name = str[start:end] 00243 start = end 00244 end += 4 00245 (length,) = _struct_I.unpack(str[start:end]) 00246 start = end 00247 end += length 00248 self.canonical_body_name = str[start:end] 00249 start = end 00250 end += 4 00251 (length,) = _struct_I.unpack(str[start:end]) 00252 self.body_names = [] 00253 for i in range(0, length): 00254 start = end 00255 end += 4 00256 (length,) = _struct_I.unpack(str[start:end]) 00257 start = end 00258 end += length 00259 val1 = str[start:end] 00260 self.body_names.append(val1) 00261 start = end 00262 end += 4 00263 (length,) = _struct_I.unpack(str[start:end]) 00264 self.geom_names = [] 00265 for i in range(0, length): 00266 start = end 00267 end += 4 00268 (length,) = _struct_I.unpack(str[start:end]) 00269 start = end 00270 end += length 00271 val1 = str[start:end] 00272 self.geom_names.append(val1) 00273 start = end 00274 end += 4 00275 (length,) = _struct_I.unpack(str[start:end]) 00276 self.joint_names = [] 00277 for i in range(0, length): 00278 start = end 00279 end += 4 00280 (length,) = _struct_I.unpack(str[start:end]) 00281 start = end 00282 end += length 00283 val1 = str[start:end] 00284 self.joint_names.append(val1) 00285 start = end 00286 end += 4 00287 (length,) = _struct_I.unpack(str[start:end]) 00288 self.child_model_names = [] 00289 for i in range(0, length): 00290 start = end 00291 end += 4 00292 (length,) = _struct_I.unpack(str[start:end]) 00293 start = end 00294 end += length 00295 val1 = str[start:end] 00296 self.child_model_names.append(val1) 00297 _x = self 00298 start = end 00299 end += 2 00300 (_x.is_static, _x.success,) = _struct_2B.unpack(str[start:end]) 00301 self.is_static = bool(self.is_static) 00302 self.success = bool(self.success) 00303 start = end 00304 end += 4 00305 (length,) = _struct_I.unpack(str[start:end]) 00306 start = end 00307 end += length 00308 self.status_message = str[start:end] 00309 return self 00310 except struct.error as e: 00311 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00312 00313 00314 def serialize_numpy(self, buff, numpy): 00315 """ 00316 serialize message with numpy array types into buffer 00317 @param buff: buffer 00318 @type buff: StringIO 00319 @param numpy: numpy python module 00320 @type numpy module 00321 """ 00322 try: 00323 _x = self.parent_model_name 00324 length = len(_x) 00325 buff.write(struct.pack('<I%ss'%length, length, _x)) 00326 _x = self.canonical_body_name 00327 length = len(_x) 00328 buff.write(struct.pack('<I%ss'%length, length, _x)) 00329 length = len(self.body_names) 00330 buff.write(_struct_I.pack(length)) 00331 for val1 in self.body_names: 00332 length = len(val1) 00333 buff.write(struct.pack('<I%ss'%length, length, val1)) 00334 length = len(self.geom_names) 00335 buff.write(_struct_I.pack(length)) 00336 for val1 in self.geom_names: 00337 length = len(val1) 00338 buff.write(struct.pack('<I%ss'%length, length, val1)) 00339 length = len(self.joint_names) 00340 buff.write(_struct_I.pack(length)) 00341 for val1 in self.joint_names: 00342 length = len(val1) 00343 buff.write(struct.pack('<I%ss'%length, length, val1)) 00344 length = len(self.child_model_names) 00345 buff.write(_struct_I.pack(length)) 00346 for val1 in self.child_model_names: 00347 length = len(val1) 00348 buff.write(struct.pack('<I%ss'%length, length, val1)) 00349 _x = self 00350 buff.write(_struct_2B.pack(_x.is_static, _x.success)) 00351 _x = self.status_message 00352 length = len(_x) 00353 buff.write(struct.pack('<I%ss'%length, length, _x)) 00354 except struct.error as se: self._check_types(se) 00355 except TypeError as te: self._check_types(te) 00356 00357 def deserialize_numpy(self, str, numpy): 00358 """ 00359 unpack serialized message in str into this message instance using numpy for array types 00360 @param str: byte array of serialized message 00361 @type str: str 00362 @param numpy: numpy python module 00363 @type numpy: module 00364 """ 00365 try: 00366 end = 0 00367 start = end 00368 end += 4 00369 (length,) = _struct_I.unpack(str[start:end]) 00370 start = end 00371 end += length 00372 self.parent_model_name = str[start:end] 00373 start = end 00374 end += 4 00375 (length,) = _struct_I.unpack(str[start:end]) 00376 start = end 00377 end += length 00378 self.canonical_body_name = str[start:end] 00379 start = end 00380 end += 4 00381 (length,) = _struct_I.unpack(str[start:end]) 00382 self.body_names = [] 00383 for i in range(0, length): 00384 start = end 00385 end += 4 00386 (length,) = _struct_I.unpack(str[start:end]) 00387 start = end 00388 end += length 00389 val1 = str[start:end] 00390 self.body_names.append(val1) 00391 start = end 00392 end += 4 00393 (length,) = _struct_I.unpack(str[start:end]) 00394 self.geom_names = [] 00395 for i in range(0, length): 00396 start = end 00397 end += 4 00398 (length,) = _struct_I.unpack(str[start:end]) 00399 start = end 00400 end += length 00401 val1 = str[start:end] 00402 self.geom_names.append(val1) 00403 start = end 00404 end += 4 00405 (length,) = _struct_I.unpack(str[start:end]) 00406 self.joint_names = [] 00407 for i in range(0, length): 00408 start = end 00409 end += 4 00410 (length,) = _struct_I.unpack(str[start:end]) 00411 start = end 00412 end += length 00413 val1 = str[start:end] 00414 self.joint_names.append(val1) 00415 start = end 00416 end += 4 00417 (length,) = _struct_I.unpack(str[start:end]) 00418 self.child_model_names = [] 00419 for i in range(0, length): 00420 start = end 00421 end += 4 00422 (length,) = _struct_I.unpack(str[start:end]) 00423 start = end 00424 end += length 00425 val1 = str[start:end] 00426 self.child_model_names.append(val1) 00427 _x = self 00428 start = end 00429 end += 2 00430 (_x.is_static, _x.success,) = _struct_2B.unpack(str[start:end]) 00431 self.is_static = bool(self.is_static) 00432 self.success = bool(self.success) 00433 start = end 00434 end += 4 00435 (length,) = _struct_I.unpack(str[start:end]) 00436 start = end 00437 end += length 00438 self.status_message = str[start:end] 00439 return self 00440 except struct.error as e: 00441 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00442 00443 _struct_I = roslib.message.struct_I 00444 _struct_2B = struct.Struct("<2B") 00445 class GetModelProperties(roslib.message.ServiceDefinition): 00446 _type = 'gazebo_msgs/GetModelProperties' 00447 _md5sum = '5717f7bd34ed990fa80e28b3015027a3' 00448 _request_class = GetModelPropertiesRequest 00449 _response_class = GetModelPropertiesResponse