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