$search
00001 """autogenerated by genmsg_py from GetWorldPropertiesRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class GetWorldPropertiesRequest(roslib.message.Message): 00007 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00008 _type = "gazebo/GetWorldPropertiesRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """ 00011 00012 00013 """ 00014 __slots__ = [] 00015 _slot_types = [] 00016 00017 def __init__(self, *args, **kwds): 00018 """ 00019 Constructor. Any message fields that are implicitly/explicitly 00020 set to None will be assigned a default value. The recommend 00021 use is keyword arguments as this is more robust to future message 00022 changes. You cannot mix in-order arguments and keyword arguments. 00023 00024 The available fields are: 00025 00026 00027 @param args: complete set of field values, in .msg order 00028 @param kwds: use keyword arguments corresponding to message field names 00029 to set specific fields. 00030 """ 00031 if args or kwds: 00032 super(GetWorldPropertiesRequest, self).__init__(*args, **kwds) 00033 00034 def _get_types(self): 00035 """ 00036 internal API method 00037 """ 00038 return self._slot_types 00039 00040 def serialize(self, buff): 00041 """ 00042 serialize message into buffer 00043 @param buff: buffer 00044 @type buff: StringIO 00045 """ 00046 try: 00047 pass 00048 except struct.error as se: self._check_types(se) 00049 except TypeError as te: self._check_types(te) 00050 00051 def deserialize(self, str): 00052 """ 00053 unpack serialized message in str into this message instance 00054 @param str: byte array of serialized message 00055 @type str: str 00056 """ 00057 try: 00058 end = 0 00059 return self 00060 except struct.error as e: 00061 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00062 00063 00064 def serialize_numpy(self, buff, numpy): 00065 """ 00066 serialize message with numpy array types into buffer 00067 @param buff: buffer 00068 @type buff: StringIO 00069 @param numpy: numpy python module 00070 @type numpy module 00071 """ 00072 try: 00073 pass 00074 except struct.error as se: self._check_types(se) 00075 except TypeError as te: self._check_types(te) 00076 00077 def deserialize_numpy(self, str, numpy): 00078 """ 00079 unpack serialized message in str into this message instance using numpy for array types 00080 @param str: byte array of serialized message 00081 @type str: str 00082 @param numpy: numpy python module 00083 @type numpy: module 00084 """ 00085 try: 00086 end = 0 00087 return self 00088 except struct.error as e: 00089 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00090 00091 _struct_I = roslib.message.struct_I 00092 """autogenerated by genmsg_py from GetWorldPropertiesResponse.msg. Do not edit.""" 00093 import roslib.message 00094 import struct 00095 00096 00097 class GetWorldPropertiesResponse(roslib.message.Message): 00098 _md5sum = "36bb0f2eccf4d8be971410c22818ba3f" 00099 _type = "gazebo/GetWorldPropertiesResponse" 00100 _has_header = False #flag to mark the presence of a Header object 00101 _full_text = """float64 sim_time 00102 string[] model_names 00103 bool rendering_enabled 00104 bool success 00105 string status_message 00106 00107 00108 """ 00109 __slots__ = ['sim_time','model_names','rendering_enabled','success','status_message'] 00110 _slot_types = ['float64','string[]','bool','bool','string'] 00111 00112 def __init__(self, *args, **kwds): 00113 """ 00114 Constructor. Any message fields that are implicitly/explicitly 00115 set to None will be assigned a default value. The recommend 00116 use is keyword arguments as this is more robust to future message 00117 changes. You cannot mix in-order arguments and keyword arguments. 00118 00119 The available fields are: 00120 sim_time,model_names,rendering_enabled,success,status_message 00121 00122 @param args: complete set of field values, in .msg order 00123 @param kwds: use keyword arguments corresponding to message field names 00124 to set specific fields. 00125 """ 00126 if args or kwds: 00127 super(GetWorldPropertiesResponse, self).__init__(*args, **kwds) 00128 #message fields cannot be None, assign default values for those that are 00129 if self.sim_time is None: 00130 self.sim_time = 0. 00131 if self.model_names is None: 00132 self.model_names = [] 00133 if self.rendering_enabled is None: 00134 self.rendering_enabled = False 00135 if self.success is None: 00136 self.success = False 00137 if self.status_message is None: 00138 self.status_message = '' 00139 else: 00140 self.sim_time = 0. 00141 self.model_names = [] 00142 self.rendering_enabled = False 00143 self.success = False 00144 self.status_message = '' 00145 00146 def _get_types(self): 00147 """ 00148 internal API method 00149 """ 00150 return self._slot_types 00151 00152 def serialize(self, buff): 00153 """ 00154 serialize message into buffer 00155 @param buff: buffer 00156 @type buff: StringIO 00157 """ 00158 try: 00159 buff.write(_struct_d.pack(self.sim_time)) 00160 length = len(self.model_names) 00161 buff.write(_struct_I.pack(length)) 00162 for val1 in self.model_names: 00163 length = len(val1) 00164 buff.write(struct.pack('<I%ss'%length, length, val1)) 00165 _x = self 00166 buff.write(_struct_2B.pack(_x.rendering_enabled, _x.success)) 00167 _x = self.status_message 00168 length = len(_x) 00169 buff.write(struct.pack('<I%ss'%length, length, _x)) 00170 except struct.error as se: self._check_types(se) 00171 except TypeError as te: self._check_types(te) 00172 00173 def deserialize(self, str): 00174 """ 00175 unpack serialized message in str into this message instance 00176 @param str: byte array of serialized message 00177 @type str: str 00178 """ 00179 try: 00180 end = 0 00181 start = end 00182 end += 8 00183 (self.sim_time,) = _struct_d.unpack(str[start:end]) 00184 start = end 00185 end += 4 00186 (length,) = _struct_I.unpack(str[start:end]) 00187 self.model_names = [] 00188 for i in range(0, length): 00189 start = end 00190 end += 4 00191 (length,) = _struct_I.unpack(str[start:end]) 00192 start = end 00193 end += length 00194 val1 = str[start:end] 00195 self.model_names.append(val1) 00196 _x = self 00197 start = end 00198 end += 2 00199 (_x.rendering_enabled, _x.success,) = _struct_2B.unpack(str[start:end]) 00200 self.rendering_enabled = bool(self.rendering_enabled) 00201 self.success = bool(self.success) 00202 start = end 00203 end += 4 00204 (length,) = _struct_I.unpack(str[start:end]) 00205 start = end 00206 end += length 00207 self.status_message = str[start:end] 00208 return self 00209 except struct.error as e: 00210 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00211 00212 00213 def serialize_numpy(self, buff, numpy): 00214 """ 00215 serialize message with numpy array types into buffer 00216 @param buff: buffer 00217 @type buff: StringIO 00218 @param numpy: numpy python module 00219 @type numpy module 00220 """ 00221 try: 00222 buff.write(_struct_d.pack(self.sim_time)) 00223 length = len(self.model_names) 00224 buff.write(_struct_I.pack(length)) 00225 for val1 in self.model_names: 00226 length = len(val1) 00227 buff.write(struct.pack('<I%ss'%length, length, val1)) 00228 _x = self 00229 buff.write(_struct_2B.pack(_x.rendering_enabled, _x.success)) 00230 _x = self.status_message 00231 length = len(_x) 00232 buff.write(struct.pack('<I%ss'%length, length, _x)) 00233 except struct.error as se: self._check_types(se) 00234 except TypeError as te: self._check_types(te) 00235 00236 def deserialize_numpy(self, str, numpy): 00237 """ 00238 unpack serialized message in str into this message instance using numpy for array types 00239 @param str: byte array of serialized message 00240 @type str: str 00241 @param numpy: numpy python module 00242 @type numpy: module 00243 """ 00244 try: 00245 end = 0 00246 start = end 00247 end += 8 00248 (self.sim_time,) = _struct_d.unpack(str[start:end]) 00249 start = end 00250 end += 4 00251 (length,) = _struct_I.unpack(str[start:end]) 00252 self.model_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.model_names.append(val1) 00261 _x = self 00262 start = end 00263 end += 2 00264 (_x.rendering_enabled, _x.success,) = _struct_2B.unpack(str[start:end]) 00265 self.rendering_enabled = bool(self.rendering_enabled) 00266 self.success = bool(self.success) 00267 start = end 00268 end += 4 00269 (length,) = _struct_I.unpack(str[start:end]) 00270 start = end 00271 end += length 00272 self.status_message = str[start:end] 00273 return self 00274 except struct.error as e: 00275 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00276 00277 _struct_I = roslib.message.struct_I 00278 _struct_d = struct.Struct("<d") 00279 _struct_2B = struct.Struct("<2B") 00280 class GetWorldProperties(roslib.message.ServiceDefinition): 00281 _type = 'gazebo/GetWorldProperties' 00282 _md5sum = '36bb0f2eccf4d8be971410c22818ba3f' 00283 _request_class = GetWorldPropertiesRequest 00284 _response_class = GetWorldPropertiesResponse