00001 """autogenerated by genpy from gazebo_msgs/GetModelPropertiesRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class GetModelPropertiesRequest(genpy.Message):
00009 _md5sum = "ea31c8eab6fc401383cf528a7c0984ba"
00010 _type = "gazebo_msgs/GetModelPropertiesRequest"
00011 _has_header = False
00012 _full_text = """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
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, ``StringIO``
00050 """
00051 try:
00052 _x = self.model_name
00053 length = len(_x)
00054 if python3 or type(_x) == unicode:
00055 _x = _x.encode('utf-8')
00056 length = len(_x)
00057 buff.write(struct.pack('<I%ss'%length, length, _x))
00058 except struct.error as se: self._check_types(se)
00059 except TypeError as te: self._check_types(te)
00060
00061 def deserialize(self, str):
00062 """
00063 unpack serialized message in str into this message instance
00064 :param str: byte array of serialized message, ``str``
00065 """
00066 try:
00067 end = 0
00068 start = end
00069 end += 4
00070 (length,) = _struct_I.unpack(str[start:end])
00071 start = end
00072 end += length
00073 if python3:
00074 self.model_name = str[start:end].decode('utf-8')
00075 else:
00076 self.model_name = str[start:end]
00077 return self
00078 except struct.error as e:
00079 raise genpy.DeserializationError(e)
00080
00081
00082 def serialize_numpy(self, buff, numpy):
00083 """
00084 serialize message with numpy array types into buffer
00085 :param buff: buffer, ``StringIO``
00086 :param numpy: numpy python module
00087 """
00088 try:
00089 _x = self.model_name
00090 length = len(_x)
00091 if python3 or type(_x) == unicode:
00092 _x = _x.encode('utf-8')
00093 length = len(_x)
00094 buff.write(struct.pack('<I%ss'%length, length, _x))
00095 except struct.error as se: self._check_types(se)
00096 except TypeError as te: self._check_types(te)
00097
00098 def deserialize_numpy(self, str, numpy):
00099 """
00100 unpack serialized message in str into this message instance using numpy for array types
00101 :param str: byte array of serialized message, ``str``
00102 :param numpy: numpy python module
00103 """
00104 try:
00105 end = 0
00106 start = end
00107 end += 4
00108 (length,) = _struct_I.unpack(str[start:end])
00109 start = end
00110 end += length
00111 if python3:
00112 self.model_name = str[start:end].decode('utf-8')
00113 else:
00114 self.model_name = str[start:end]
00115 return self
00116 except struct.error as e:
00117 raise genpy.DeserializationError(e)
00118
00119 _struct_I = genpy.struct_I
00120 """autogenerated by genpy from gazebo_msgs/GetModelPropertiesResponse.msg. Do not edit."""
00121 import sys
00122 python3 = True if sys.hexversion > 0x03000000 else False
00123 import genpy
00124 import struct
00125
00126
00127 class GetModelPropertiesResponse(genpy.Message):
00128 _md5sum = "b7f370938ef77b464b95f1bab3ec5028"
00129 _type = "gazebo_msgs/GetModelPropertiesResponse"
00130 _has_header = False
00131 _full_text = """string parent_model_name
00132 string canonical_body_name
00133 string[] body_names
00134 string[] geom_names
00135 string[] joint_names
00136 string[] child_model_names
00137 bool is_static
00138 bool success
00139 string status_message
00140
00141
00142 """
00143 __slots__ = ['parent_model_name','canonical_body_name','body_names','geom_names','joint_names','child_model_names','is_static','success','status_message']
00144 _slot_types = ['string','string','string[]','string[]','string[]','string[]','bool','bool','string']
00145
00146 def __init__(self, *args, **kwds):
00147 """
00148 Constructor. Any message fields that are implicitly/explicitly
00149 set to None will be assigned a default value. The recommend
00150 use is keyword arguments as this is more robust to future message
00151 changes. You cannot mix in-order arguments and keyword arguments.
00152
00153 The available fields are:
00154 parent_model_name,canonical_body_name,body_names,geom_names,joint_names,child_model_names,is_static,success,status_message
00155
00156 :param args: complete set of field values, in .msg order
00157 :param kwds: use keyword arguments corresponding to message field names
00158 to set specific fields.
00159 """
00160 if args or kwds:
00161 super(GetModelPropertiesResponse, self).__init__(*args, **kwds)
00162
00163 if self.parent_model_name is None:
00164 self.parent_model_name = ''
00165 if self.canonical_body_name is None:
00166 self.canonical_body_name = ''
00167 if self.body_names is None:
00168 self.body_names = []
00169 if self.geom_names is None:
00170 self.geom_names = []
00171 if self.joint_names is None:
00172 self.joint_names = []
00173 if self.child_model_names is None:
00174 self.child_model_names = []
00175 if self.is_static is None:
00176 self.is_static = False
00177 if self.success is None:
00178 self.success = False
00179 if self.status_message is None:
00180 self.status_message = ''
00181 else:
00182 self.parent_model_name = ''
00183 self.canonical_body_name = ''
00184 self.body_names = []
00185 self.geom_names = []
00186 self.joint_names = []
00187 self.child_model_names = []
00188 self.is_static = False
00189 self.success = False
00190 self.status_message = ''
00191
00192 def _get_types(self):
00193 """
00194 internal API method
00195 """
00196 return self._slot_types
00197
00198 def serialize(self, buff):
00199 """
00200 serialize message into buffer
00201 :param buff: buffer, ``StringIO``
00202 """
00203 try:
00204 _x = self.parent_model_name
00205 length = len(_x)
00206 if python3 or type(_x) == unicode:
00207 _x = _x.encode('utf-8')
00208 length = len(_x)
00209 buff.write(struct.pack('<I%ss'%length, length, _x))
00210 _x = self.canonical_body_name
00211 length = len(_x)
00212 if python3 or type(_x) == unicode:
00213 _x = _x.encode('utf-8')
00214 length = len(_x)
00215 buff.write(struct.pack('<I%ss'%length, length, _x))
00216 length = len(self.body_names)
00217 buff.write(_struct_I.pack(length))
00218 for val1 in self.body_names:
00219 length = len(val1)
00220 if python3 or type(val1) == unicode:
00221 val1 = val1.encode('utf-8')
00222 length = len(val1)
00223 buff.write(struct.pack('<I%ss'%length, length, val1))
00224 length = len(self.geom_names)
00225 buff.write(_struct_I.pack(length))
00226 for val1 in self.geom_names:
00227 length = len(val1)
00228 if python3 or type(val1) == unicode:
00229 val1 = val1.encode('utf-8')
00230 length = len(val1)
00231 buff.write(struct.pack('<I%ss'%length, length, val1))
00232 length = len(self.joint_names)
00233 buff.write(_struct_I.pack(length))
00234 for val1 in self.joint_names:
00235 length = len(val1)
00236 if python3 or type(val1) == unicode:
00237 val1 = val1.encode('utf-8')
00238 length = len(val1)
00239 buff.write(struct.pack('<I%ss'%length, length, val1))
00240 length = len(self.child_model_names)
00241 buff.write(_struct_I.pack(length))
00242 for val1 in self.child_model_names:
00243 length = len(val1)
00244 if python3 or type(val1) == unicode:
00245 val1 = val1.encode('utf-8')
00246 length = len(val1)
00247 buff.write(struct.pack('<I%ss'%length, length, val1))
00248 _x = self
00249 buff.write(_struct_2B.pack(_x.is_static, _x.success))
00250 _x = self.status_message
00251 length = len(_x)
00252 if python3 or type(_x) == unicode:
00253 _x = _x.encode('utf-8')
00254 length = len(_x)
00255 buff.write(struct.pack('<I%ss'%length, length, _x))
00256 except struct.error as se: self._check_types(se)
00257 except TypeError as te: self._check_types(te)
00258
00259 def deserialize(self, str):
00260 """
00261 unpack serialized message in str into this message instance
00262 :param str: byte array of serialized message, ``str``
00263 """
00264 try:
00265 end = 0
00266 start = end
00267 end += 4
00268 (length,) = _struct_I.unpack(str[start:end])
00269 start = end
00270 end += length
00271 if python3:
00272 self.parent_model_name = str[start:end].decode('utf-8')
00273 else:
00274 self.parent_model_name = str[start:end]
00275 start = end
00276 end += 4
00277 (length,) = _struct_I.unpack(str[start:end])
00278 start = end
00279 end += length
00280 if python3:
00281 self.canonical_body_name = str[start:end].decode('utf-8')
00282 else:
00283 self.canonical_body_name = str[start:end]
00284 start = end
00285 end += 4
00286 (length,) = _struct_I.unpack(str[start:end])
00287 self.body_names = []
00288 for i in range(0, length):
00289 start = end
00290 end += 4
00291 (length,) = _struct_I.unpack(str[start:end])
00292 start = end
00293 end += length
00294 if python3:
00295 val1 = str[start:end].decode('utf-8')
00296 else:
00297 val1 = str[start:end]
00298 self.body_names.append(val1)
00299 start = end
00300 end += 4
00301 (length,) = _struct_I.unpack(str[start:end])
00302 self.geom_names = []
00303 for i in range(0, length):
00304 start = end
00305 end += 4
00306 (length,) = _struct_I.unpack(str[start:end])
00307 start = end
00308 end += length
00309 if python3:
00310 val1 = str[start:end].decode('utf-8')
00311 else:
00312 val1 = str[start:end]
00313 self.geom_names.append(val1)
00314 start = end
00315 end += 4
00316 (length,) = _struct_I.unpack(str[start:end])
00317 self.joint_names = []
00318 for i in range(0, length):
00319 start = end
00320 end += 4
00321 (length,) = _struct_I.unpack(str[start:end])
00322 start = end
00323 end += length
00324 if python3:
00325 val1 = str[start:end].decode('utf-8')
00326 else:
00327 val1 = str[start:end]
00328 self.joint_names.append(val1)
00329 start = end
00330 end += 4
00331 (length,) = _struct_I.unpack(str[start:end])
00332 self.child_model_names = []
00333 for i in range(0, length):
00334 start = end
00335 end += 4
00336 (length,) = _struct_I.unpack(str[start:end])
00337 start = end
00338 end += length
00339 if python3:
00340 val1 = str[start:end].decode('utf-8')
00341 else:
00342 val1 = str[start:end]
00343 self.child_model_names.append(val1)
00344 _x = self
00345 start = end
00346 end += 2
00347 (_x.is_static, _x.success,) = _struct_2B.unpack(str[start:end])
00348 self.is_static = bool(self.is_static)
00349 self.success = bool(self.success)
00350 start = end
00351 end += 4
00352 (length,) = _struct_I.unpack(str[start:end])
00353 start = end
00354 end += length
00355 if python3:
00356 self.status_message = str[start:end].decode('utf-8')
00357 else:
00358 self.status_message = str[start:end]
00359 return self
00360 except struct.error as e:
00361 raise genpy.DeserializationError(e)
00362
00363
00364 def serialize_numpy(self, buff, numpy):
00365 """
00366 serialize message with numpy array types into buffer
00367 :param buff: buffer, ``StringIO``
00368 :param numpy: numpy python module
00369 """
00370 try:
00371 _x = self.parent_model_name
00372 length = len(_x)
00373 if python3 or type(_x) == unicode:
00374 _x = _x.encode('utf-8')
00375 length = len(_x)
00376 buff.write(struct.pack('<I%ss'%length, length, _x))
00377 _x = self.canonical_body_name
00378 length = len(_x)
00379 if python3 or type(_x) == unicode:
00380 _x = _x.encode('utf-8')
00381 length = len(_x)
00382 buff.write(struct.pack('<I%ss'%length, length, _x))
00383 length = len(self.body_names)
00384 buff.write(_struct_I.pack(length))
00385 for val1 in self.body_names:
00386 length = len(val1)
00387 if python3 or type(val1) == unicode:
00388 val1 = val1.encode('utf-8')
00389 length = len(val1)
00390 buff.write(struct.pack('<I%ss'%length, length, val1))
00391 length = len(self.geom_names)
00392 buff.write(_struct_I.pack(length))
00393 for val1 in self.geom_names:
00394 length = len(val1)
00395 if python3 or type(val1) == unicode:
00396 val1 = val1.encode('utf-8')
00397 length = len(val1)
00398 buff.write(struct.pack('<I%ss'%length, length, val1))
00399 length = len(self.joint_names)
00400 buff.write(_struct_I.pack(length))
00401 for val1 in self.joint_names:
00402 length = len(val1)
00403 if python3 or type(val1) == unicode:
00404 val1 = val1.encode('utf-8')
00405 length = len(val1)
00406 buff.write(struct.pack('<I%ss'%length, length, val1))
00407 length = len(self.child_model_names)
00408 buff.write(_struct_I.pack(length))
00409 for val1 in self.child_model_names:
00410 length = len(val1)
00411 if python3 or type(val1) == unicode:
00412 val1 = val1.encode('utf-8')
00413 length = len(val1)
00414 buff.write(struct.pack('<I%ss'%length, length, val1))
00415 _x = self
00416 buff.write(_struct_2B.pack(_x.is_static, _x.success))
00417 _x = self.status_message
00418 length = len(_x)
00419 if python3 or type(_x) == unicode:
00420 _x = _x.encode('utf-8')
00421 length = len(_x)
00422 buff.write(struct.pack('<I%ss'%length, length, _x))
00423 except struct.error as se: self._check_types(se)
00424 except TypeError as te: self._check_types(te)
00425
00426 def deserialize_numpy(self, str, numpy):
00427 """
00428 unpack serialized message in str into this message instance using numpy for array types
00429 :param str: byte array of serialized message, ``str``
00430 :param numpy: numpy python module
00431 """
00432 try:
00433 end = 0
00434 start = end
00435 end += 4
00436 (length,) = _struct_I.unpack(str[start:end])
00437 start = end
00438 end += length
00439 if python3:
00440 self.parent_model_name = str[start:end].decode('utf-8')
00441 else:
00442 self.parent_model_name = str[start:end]
00443 start = end
00444 end += 4
00445 (length,) = _struct_I.unpack(str[start:end])
00446 start = end
00447 end += length
00448 if python3:
00449 self.canonical_body_name = str[start:end].decode('utf-8')
00450 else:
00451 self.canonical_body_name = str[start:end]
00452 start = end
00453 end += 4
00454 (length,) = _struct_I.unpack(str[start:end])
00455 self.body_names = []
00456 for i in range(0, length):
00457 start = end
00458 end += 4
00459 (length,) = _struct_I.unpack(str[start:end])
00460 start = end
00461 end += length
00462 if python3:
00463 val1 = str[start:end].decode('utf-8')
00464 else:
00465 val1 = str[start:end]
00466 self.body_names.append(val1)
00467 start = end
00468 end += 4
00469 (length,) = _struct_I.unpack(str[start:end])
00470 self.geom_names = []
00471 for i in range(0, length):
00472 start = end
00473 end += 4
00474 (length,) = _struct_I.unpack(str[start:end])
00475 start = end
00476 end += length
00477 if python3:
00478 val1 = str[start:end].decode('utf-8')
00479 else:
00480 val1 = str[start:end]
00481 self.geom_names.append(val1)
00482 start = end
00483 end += 4
00484 (length,) = _struct_I.unpack(str[start:end])
00485 self.joint_names = []
00486 for i in range(0, length):
00487 start = end
00488 end += 4
00489 (length,) = _struct_I.unpack(str[start:end])
00490 start = end
00491 end += length
00492 if python3:
00493 val1 = str[start:end].decode('utf-8')
00494 else:
00495 val1 = str[start:end]
00496 self.joint_names.append(val1)
00497 start = end
00498 end += 4
00499 (length,) = _struct_I.unpack(str[start:end])
00500 self.child_model_names = []
00501 for i in range(0, length):
00502 start = end
00503 end += 4
00504 (length,) = _struct_I.unpack(str[start:end])
00505 start = end
00506 end += length
00507 if python3:
00508 val1 = str[start:end].decode('utf-8')
00509 else:
00510 val1 = str[start:end]
00511 self.child_model_names.append(val1)
00512 _x = self
00513 start = end
00514 end += 2
00515 (_x.is_static, _x.success,) = _struct_2B.unpack(str[start:end])
00516 self.is_static = bool(self.is_static)
00517 self.success = bool(self.success)
00518 start = end
00519 end += 4
00520 (length,) = _struct_I.unpack(str[start:end])
00521 start = end
00522 end += length
00523 if python3:
00524 self.status_message = str[start:end].decode('utf-8')
00525 else:
00526 self.status_message = str[start:end]
00527 return self
00528 except struct.error as e:
00529 raise genpy.DeserializationError(e)
00530
00531 _struct_I = genpy.struct_I
00532 _struct_2B = struct.Struct("<2B")
00533 class GetModelProperties(object):
00534 _type = 'gazebo_msgs/GetModelProperties'
00535 _md5sum = '5717f7bd34ed990fa80e28b3015027a3'
00536 _request_class = GetModelPropertiesRequest
00537 _response_class = GetModelPropertiesResponse