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