00001 """autogenerated by genpy from openraveros/env_setRequest.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 env_setRequest(genpy.Message):
00009 _md5sum = "912134b9acb15f89f82428a80c7617cf"
00010 _type = "openraveros/env_setRequest"
00011 _has_header = False
00012 _full_text = """
00013
00014 uint32 setmask
00015 uint32 Set_Simulation=1
00016 uint32 Set_PhysicsEngine=2
00017 uint32 Set_CollisionChecker=4
00018 uint32 Set_Gravity=8
00019 uint32 Set_DebugLevel=32
00020 uint32 Set_Viewer=64
00021 uint32 Set_ViewerDims=128
00022
00023
00024 uint8 sim_action
00025 uint8 SimAction_Start=1
00026 uint8 SimAction_Stop=2
00027 uint8 SimAction_Timestep=3
00028 float32 sim_timestep
00029
00030 string physicsengine
00031 string collisionchecker
00032 string viewer
00033 int32 viewerwidth
00034 int32 viewerheight
00035 float32[3] gravity
00036 string debuglevel
00037
00038 """
00039
00040 Set_Simulation = 1
00041 Set_PhysicsEngine = 2
00042 Set_CollisionChecker = 4
00043 Set_Gravity = 8
00044 Set_DebugLevel = 32
00045 Set_Viewer = 64
00046 Set_ViewerDims = 128
00047 SimAction_Start = 1
00048 SimAction_Stop = 2
00049 SimAction_Timestep = 3
00050
00051 __slots__ = ['setmask','sim_action','sim_timestep','physicsengine','collisionchecker','viewer','viewerwidth','viewerheight','gravity','debuglevel']
00052 _slot_types = ['uint32','uint8','float32','string','string','string','int32','int32','float32[3]','string']
00053
00054 def __init__(self, *args, **kwds):
00055 """
00056 Constructor. Any message fields that are implicitly/explicitly
00057 set to None will be assigned a default value. The recommend
00058 use is keyword arguments as this is more robust to future message
00059 changes. You cannot mix in-order arguments and keyword arguments.
00060
00061 The available fields are:
00062 setmask,sim_action,sim_timestep,physicsengine,collisionchecker,viewer,viewerwidth,viewerheight,gravity,debuglevel
00063
00064 :param args: complete set of field values, in .msg order
00065 :param kwds: use keyword arguments corresponding to message field names
00066 to set specific fields.
00067 """
00068 if args or kwds:
00069 super(env_setRequest, self).__init__(*args, **kwds)
00070
00071 if self.setmask is None:
00072 self.setmask = 0
00073 if self.sim_action is None:
00074 self.sim_action = 0
00075 if self.sim_timestep is None:
00076 self.sim_timestep = 0.
00077 if self.physicsengine is None:
00078 self.physicsengine = ''
00079 if self.collisionchecker is None:
00080 self.collisionchecker = ''
00081 if self.viewer is None:
00082 self.viewer = ''
00083 if self.viewerwidth is None:
00084 self.viewerwidth = 0
00085 if self.viewerheight is None:
00086 self.viewerheight = 0
00087 if self.gravity is None:
00088 self.gravity = [0.,0.,0.]
00089 if self.debuglevel is None:
00090 self.debuglevel = ''
00091 else:
00092 self.setmask = 0
00093 self.sim_action = 0
00094 self.sim_timestep = 0.
00095 self.physicsengine = ''
00096 self.collisionchecker = ''
00097 self.viewer = ''
00098 self.viewerwidth = 0
00099 self.viewerheight = 0
00100 self.gravity = [0.,0.,0.]
00101 self.debuglevel = ''
00102
00103 def _get_types(self):
00104 """
00105 internal API method
00106 """
00107 return self._slot_types
00108
00109 def serialize(self, buff):
00110 """
00111 serialize message into buffer
00112 :param buff: buffer, ``StringIO``
00113 """
00114 try:
00115 _x = self
00116 buff.write(_struct_IBf.pack(_x.setmask, _x.sim_action, _x.sim_timestep))
00117 _x = self.physicsengine
00118 length = len(_x)
00119 if python3 or type(_x) == unicode:
00120 _x = _x.encode('utf-8')
00121 length = len(_x)
00122 buff.write(struct.pack('<I%ss'%length, length, _x))
00123 _x = self.collisionchecker
00124 length = len(_x)
00125 if python3 or type(_x) == unicode:
00126 _x = _x.encode('utf-8')
00127 length = len(_x)
00128 buff.write(struct.pack('<I%ss'%length, length, _x))
00129 _x = self.viewer
00130 length = len(_x)
00131 if python3 or type(_x) == unicode:
00132 _x = _x.encode('utf-8')
00133 length = len(_x)
00134 buff.write(struct.pack('<I%ss'%length, length, _x))
00135 _x = self
00136 buff.write(_struct_2i.pack(_x.viewerwidth, _x.viewerheight))
00137 buff.write(_struct_3f.pack(*self.gravity))
00138 _x = self.debuglevel
00139 length = len(_x)
00140 if python3 or type(_x) == unicode:
00141 _x = _x.encode('utf-8')
00142 length = len(_x)
00143 buff.write(struct.pack('<I%ss'%length, length, _x))
00144 except struct.error as se: self._check_types(se)
00145 except TypeError as te: self._check_types(te)
00146
00147 def deserialize(self, str):
00148 """
00149 unpack serialized message in str into this message instance
00150 :param str: byte array of serialized message, ``str``
00151 """
00152 try:
00153 end = 0
00154 _x = self
00155 start = end
00156 end += 9
00157 (_x.setmask, _x.sim_action, _x.sim_timestep,) = _struct_IBf.unpack(str[start:end])
00158 start = end
00159 end += 4
00160 (length,) = _struct_I.unpack(str[start:end])
00161 start = end
00162 end += length
00163 if python3:
00164 self.physicsengine = str[start:end].decode('utf-8')
00165 else:
00166 self.physicsengine = str[start:end]
00167 start = end
00168 end += 4
00169 (length,) = _struct_I.unpack(str[start:end])
00170 start = end
00171 end += length
00172 if python3:
00173 self.collisionchecker = str[start:end].decode('utf-8')
00174 else:
00175 self.collisionchecker = str[start:end]
00176 start = end
00177 end += 4
00178 (length,) = _struct_I.unpack(str[start:end])
00179 start = end
00180 end += length
00181 if python3:
00182 self.viewer = str[start:end].decode('utf-8')
00183 else:
00184 self.viewer = str[start:end]
00185 _x = self
00186 start = end
00187 end += 8
00188 (_x.viewerwidth, _x.viewerheight,) = _struct_2i.unpack(str[start:end])
00189 start = end
00190 end += 12
00191 self.gravity = _struct_3f.unpack(str[start:end])
00192 start = end
00193 end += 4
00194 (length,) = _struct_I.unpack(str[start:end])
00195 start = end
00196 end += length
00197 if python3:
00198 self.debuglevel = str[start:end].decode('utf-8')
00199 else:
00200 self.debuglevel = str[start:end]
00201 return self
00202 except struct.error as e:
00203 raise genpy.DeserializationError(e)
00204
00205
00206 def serialize_numpy(self, buff, numpy):
00207 """
00208 serialize message with numpy array types into buffer
00209 :param buff: buffer, ``StringIO``
00210 :param numpy: numpy python module
00211 """
00212 try:
00213 _x = self
00214 buff.write(_struct_IBf.pack(_x.setmask, _x.sim_action, _x.sim_timestep))
00215 _x = self.physicsengine
00216 length = len(_x)
00217 if python3 or type(_x) == unicode:
00218 _x = _x.encode('utf-8')
00219 length = len(_x)
00220 buff.write(struct.pack('<I%ss'%length, length, _x))
00221 _x = self.collisionchecker
00222 length = len(_x)
00223 if python3 or type(_x) == unicode:
00224 _x = _x.encode('utf-8')
00225 length = len(_x)
00226 buff.write(struct.pack('<I%ss'%length, length, _x))
00227 _x = self.viewer
00228 length = len(_x)
00229 if python3 or type(_x) == unicode:
00230 _x = _x.encode('utf-8')
00231 length = len(_x)
00232 buff.write(struct.pack('<I%ss'%length, length, _x))
00233 _x = self
00234 buff.write(_struct_2i.pack(_x.viewerwidth, _x.viewerheight))
00235 buff.write(self.gravity.tostring())
00236 _x = self.debuglevel
00237 length = len(_x)
00238 if python3 or type(_x) == unicode:
00239 _x = _x.encode('utf-8')
00240 length = len(_x)
00241 buff.write(struct.pack('<I%ss'%length, length, _x))
00242 except struct.error as se: self._check_types(se)
00243 except TypeError as te: self._check_types(te)
00244
00245 def deserialize_numpy(self, str, numpy):
00246 """
00247 unpack serialized message in str into this message instance using numpy for array types
00248 :param str: byte array of serialized message, ``str``
00249 :param numpy: numpy python module
00250 """
00251 try:
00252 end = 0
00253 _x = self
00254 start = end
00255 end += 9
00256 (_x.setmask, _x.sim_action, _x.sim_timestep,) = _struct_IBf.unpack(str[start:end])
00257 start = end
00258 end += 4
00259 (length,) = _struct_I.unpack(str[start:end])
00260 start = end
00261 end += length
00262 if python3:
00263 self.physicsengine = str[start:end].decode('utf-8')
00264 else:
00265 self.physicsengine = str[start:end]
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.collisionchecker = str[start:end].decode('utf-8')
00273 else:
00274 self.collisionchecker = 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.viewer = str[start:end].decode('utf-8')
00282 else:
00283 self.viewer = str[start:end]
00284 _x = self
00285 start = end
00286 end += 8
00287 (_x.viewerwidth, _x.viewerheight,) = _struct_2i.unpack(str[start:end])
00288 start = end
00289 end += 12
00290 self.gravity = numpy.frombuffer(str[start:end], dtype=numpy.float32, count=3)
00291 start = end
00292 end += 4
00293 (length,) = _struct_I.unpack(str[start:end])
00294 start = end
00295 end += length
00296 if python3:
00297 self.debuglevel = str[start:end].decode('utf-8')
00298 else:
00299 self.debuglevel = str[start:end]
00300 return self
00301 except struct.error as e:
00302 raise genpy.DeserializationError(e)
00303
00304 _struct_I = genpy.struct_I
00305 _struct_2i = struct.Struct("<2i")
00306 _struct_IBf = struct.Struct("<IBf")
00307 _struct_3f = struct.Struct("<3f")
00308 """autogenerated by genpy from openraveros/env_setResponse.msg. Do not edit."""
00309 import sys
00310 python3 = True if sys.hexversion > 0x03000000 else False
00311 import genpy
00312 import struct
00313
00314
00315 class env_setResponse(genpy.Message):
00316 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00317 _type = "openraveros/env_setResponse"
00318 _has_header = False
00319 _full_text = """
00320
00321 """
00322 __slots__ = []
00323 _slot_types = []
00324
00325 def __init__(self, *args, **kwds):
00326 """
00327 Constructor. Any message fields that are implicitly/explicitly
00328 set to None will be assigned a default value. The recommend
00329 use is keyword arguments as this is more robust to future message
00330 changes. You cannot mix in-order arguments and keyword arguments.
00331
00332 The available fields are:
00333
00334
00335 :param args: complete set of field values, in .msg order
00336 :param kwds: use keyword arguments corresponding to message field names
00337 to set specific fields.
00338 """
00339 if args or kwds:
00340 super(env_setResponse, self).__init__(*args, **kwds)
00341
00342 def _get_types(self):
00343 """
00344 internal API method
00345 """
00346 return self._slot_types
00347
00348 def serialize(self, buff):
00349 """
00350 serialize message into buffer
00351 :param buff: buffer, ``StringIO``
00352 """
00353 try:
00354 pass
00355 except struct.error as se: self._check_types(se)
00356 except TypeError as te: self._check_types(te)
00357
00358 def deserialize(self, str):
00359 """
00360 unpack serialized message in str into this message instance
00361 :param str: byte array of serialized message, ``str``
00362 """
00363 try:
00364 end = 0
00365 return self
00366 except struct.error as e:
00367 raise genpy.DeserializationError(e)
00368
00369
00370 def serialize_numpy(self, buff, numpy):
00371 """
00372 serialize message with numpy array types into buffer
00373 :param buff: buffer, ``StringIO``
00374 :param numpy: numpy python module
00375 """
00376 try:
00377 pass
00378 except struct.error as se: self._check_types(se)
00379 except TypeError as te: self._check_types(te)
00380
00381 def deserialize_numpy(self, str, numpy):
00382 """
00383 unpack serialized message in str into this message instance using numpy for array types
00384 :param str: byte array of serialized message, ``str``
00385 :param numpy: numpy python module
00386 """
00387 try:
00388 end = 0
00389 return self
00390 except struct.error as e:
00391 raise genpy.DeserializationError(e)
00392
00393 _struct_I = genpy.struct_I
00394 class env_set(object):
00395 _type = 'openraveros/env_set'
00396 _md5sum = '912134b9acb15f89f82428a80c7617cf'
00397 _request_class = env_setRequest
00398 _response_class = env_setResponse