00001 """autogenerated by genpy from plumesim/ReadPlumeSimRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import geometry_msgs.msg
00008 import nav_msgs.msg
00009 import std_msgs.msg
00010
00011 class ReadPlumeSimRequest(genpy.Message):
00012 _md5sum = "75d9701e058ed9a7608ba3dbc16b5b7e"
00013 _type = "plumesim/ReadPlumeSimRequest"
00014 _has_header = False
00015 _full_text = """nav_msgs/Odometry odom
00016
00017 ================================================================================
00018 MSG: nav_msgs/Odometry
00019 # This represents an estimate of a position and velocity in free space.
00020 # The pose in this message should be specified in the coordinate frame given by header.frame_id.
00021 # The twist in this message should be specified in the coordinate frame given by the child_frame_id
00022 Header header
00023 string child_frame_id
00024 geometry_msgs/PoseWithCovariance pose
00025 geometry_msgs/TwistWithCovariance twist
00026
00027 ================================================================================
00028 MSG: std_msgs/Header
00029 # Standard metadata for higher-level stamped data types.
00030 # This is generally used to communicate timestamped data
00031 # in a particular coordinate frame.
00032 #
00033 # sequence ID: consecutively increasing ID
00034 uint32 seq
00035 #Two-integer timestamp that is expressed as:
00036 # * stamp.secs: seconds (stamp_secs) since epoch
00037 # * stamp.nsecs: nanoseconds since stamp_secs
00038 # time-handling sugar is provided by the client library
00039 time stamp
00040 #Frame this data is associated with
00041 # 0: no frame
00042 # 1: global frame
00043 string frame_id
00044
00045 ================================================================================
00046 MSG: geometry_msgs/PoseWithCovariance
00047 # This represents a pose in free space with uncertainty.
00048
00049 Pose pose
00050
00051 # Row-major representation of the 6x6 covariance matrix
00052 # The orientation parameters use a fixed-axis representation.
00053 # In order, the parameters are:
00054 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00055 float64[36] covariance
00056
00057 ================================================================================
00058 MSG: geometry_msgs/Pose
00059 # A representation of pose in free space, composed of postion and orientation.
00060 Point position
00061 Quaternion orientation
00062
00063 ================================================================================
00064 MSG: geometry_msgs/Point
00065 # This contains the position of a point in free space
00066 float64 x
00067 float64 y
00068 float64 z
00069
00070 ================================================================================
00071 MSG: geometry_msgs/Quaternion
00072 # This represents an orientation in free space in quaternion form.
00073
00074 float64 x
00075 float64 y
00076 float64 z
00077 float64 w
00078
00079 ================================================================================
00080 MSG: geometry_msgs/TwistWithCovariance
00081 # This expresses velocity in free space with uncertianty.
00082
00083 Twist twist
00084
00085 # Row-major representation of the 6x6 covariance matrix
00086 # The orientation parameters use a fixed-axis representation.
00087 # In order, the parameters are:
00088 # (x, y, z, rotation about X axis, rotation about Y axis, rotation about Z axis)
00089 float64[36] covariance
00090
00091 ================================================================================
00092 MSG: geometry_msgs/Twist
00093 # This expresses velocity in free space broken into it's linear and angular parts.
00094 Vector3 linear
00095 Vector3 angular
00096
00097 ================================================================================
00098 MSG: geometry_msgs/Vector3
00099 # This represents a vector in free space.
00100
00101 float64 x
00102 float64 y
00103 float64 z
00104 """
00105 __slots__ = ['odom']
00106 _slot_types = ['nav_msgs/Odometry']
00107
00108 def __init__(self, *args, **kwds):
00109 """
00110 Constructor. Any message fields that are implicitly/explicitly
00111 set to None will be assigned a default value. The recommend
00112 use is keyword arguments as this is more robust to future message
00113 changes. You cannot mix in-order arguments and keyword arguments.
00114
00115 The available fields are:
00116 odom
00117
00118 :param args: complete set of field values, in .msg order
00119 :param kwds: use keyword arguments corresponding to message field names
00120 to set specific fields.
00121 """
00122 if args or kwds:
00123 super(ReadPlumeSimRequest, self).__init__(*args, **kwds)
00124
00125 if self.odom is None:
00126 self.odom = nav_msgs.msg.Odometry()
00127 else:
00128 self.odom = nav_msgs.msg.Odometry()
00129
00130 def _get_types(self):
00131 """
00132 internal API method
00133 """
00134 return self._slot_types
00135
00136 def serialize(self, buff):
00137 """
00138 serialize message into buffer
00139 :param buff: buffer, ``StringIO``
00140 """
00141 try:
00142 _x = self
00143 buff.write(_struct_3I.pack(_x.odom.header.seq, _x.odom.header.stamp.secs, _x.odom.header.stamp.nsecs))
00144 _x = self.odom.header.frame_id
00145 length = len(_x)
00146 if python3 or type(_x) == unicode:
00147 _x = _x.encode('utf-8')
00148 length = len(_x)
00149 buff.write(struct.pack('<I%ss'%length, length, _x))
00150 _x = self.odom.child_frame_id
00151 length = len(_x)
00152 if python3 or type(_x) == unicode:
00153 _x = _x.encode('utf-8')
00154 length = len(_x)
00155 buff.write(struct.pack('<I%ss'%length, length, _x))
00156 _x = self
00157 buff.write(_struct_7d.pack(_x.odom.pose.pose.position.x, _x.odom.pose.pose.position.y, _x.odom.pose.pose.position.z, _x.odom.pose.pose.orientation.x, _x.odom.pose.pose.orientation.y, _x.odom.pose.pose.orientation.z, _x.odom.pose.pose.orientation.w))
00158 buff.write(_struct_36d.pack(*self.odom.pose.covariance))
00159 _x = self
00160 buff.write(_struct_6d.pack(_x.odom.twist.twist.linear.x, _x.odom.twist.twist.linear.y, _x.odom.twist.twist.linear.z, _x.odom.twist.twist.angular.x, _x.odom.twist.twist.angular.y, _x.odom.twist.twist.angular.z))
00161 buff.write(_struct_36d.pack(*self.odom.twist.covariance))
00162 except struct.error as se: self._check_types(se)
00163 except TypeError as te: self._check_types(te)
00164
00165 def deserialize(self, str):
00166 """
00167 unpack serialized message in str into this message instance
00168 :param str: byte array of serialized message, ``str``
00169 """
00170 try:
00171 if self.odom is None:
00172 self.odom = nav_msgs.msg.Odometry()
00173 end = 0
00174 _x = self
00175 start = end
00176 end += 12
00177 (_x.odom.header.seq, _x.odom.header.stamp.secs, _x.odom.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00178 start = end
00179 end += 4
00180 (length,) = _struct_I.unpack(str[start:end])
00181 start = end
00182 end += length
00183 if python3:
00184 self.odom.header.frame_id = str[start:end].decode('utf-8')
00185 else:
00186 self.odom.header.frame_id = str[start:end]
00187 start = end
00188 end += 4
00189 (length,) = _struct_I.unpack(str[start:end])
00190 start = end
00191 end += length
00192 if python3:
00193 self.odom.child_frame_id = str[start:end].decode('utf-8')
00194 else:
00195 self.odom.child_frame_id = str[start:end]
00196 _x = self
00197 start = end
00198 end += 56
00199 (_x.odom.pose.pose.position.x, _x.odom.pose.pose.position.y, _x.odom.pose.pose.position.z, _x.odom.pose.pose.orientation.x, _x.odom.pose.pose.orientation.y, _x.odom.pose.pose.orientation.z, _x.odom.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00200 start = end
00201 end += 288
00202 self.odom.pose.covariance = _struct_36d.unpack(str[start:end])
00203 _x = self
00204 start = end
00205 end += 48
00206 (_x.odom.twist.twist.linear.x, _x.odom.twist.twist.linear.y, _x.odom.twist.twist.linear.z, _x.odom.twist.twist.angular.x, _x.odom.twist.twist.angular.y, _x.odom.twist.twist.angular.z,) = _struct_6d.unpack(str[start:end])
00207 start = end
00208 end += 288
00209 self.odom.twist.covariance = _struct_36d.unpack(str[start:end])
00210 return self
00211 except struct.error as e:
00212 raise genpy.DeserializationError(e)
00213
00214
00215 def serialize_numpy(self, buff, numpy):
00216 """
00217 serialize message with numpy array types into buffer
00218 :param buff: buffer, ``StringIO``
00219 :param numpy: numpy python module
00220 """
00221 try:
00222 _x = self
00223 buff.write(_struct_3I.pack(_x.odom.header.seq, _x.odom.header.stamp.secs, _x.odom.header.stamp.nsecs))
00224 _x = self.odom.header.frame_id
00225 length = len(_x)
00226 if python3 or type(_x) == unicode:
00227 _x = _x.encode('utf-8')
00228 length = len(_x)
00229 buff.write(struct.pack('<I%ss'%length, length, _x))
00230 _x = self.odom.child_frame_id
00231 length = len(_x)
00232 if python3 or type(_x) == unicode:
00233 _x = _x.encode('utf-8')
00234 length = len(_x)
00235 buff.write(struct.pack('<I%ss'%length, length, _x))
00236 _x = self
00237 buff.write(_struct_7d.pack(_x.odom.pose.pose.position.x, _x.odom.pose.pose.position.y, _x.odom.pose.pose.position.z, _x.odom.pose.pose.orientation.x, _x.odom.pose.pose.orientation.y, _x.odom.pose.pose.orientation.z, _x.odom.pose.pose.orientation.w))
00238 buff.write(self.odom.pose.covariance.tostring())
00239 _x = self
00240 buff.write(_struct_6d.pack(_x.odom.twist.twist.linear.x, _x.odom.twist.twist.linear.y, _x.odom.twist.twist.linear.z, _x.odom.twist.twist.angular.x, _x.odom.twist.twist.angular.y, _x.odom.twist.twist.angular.z))
00241 buff.write(self.odom.twist.covariance.tostring())
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 if self.odom is None:
00253 self.odom = nav_msgs.msg.Odometry()
00254 end = 0
00255 _x = self
00256 start = end
00257 end += 12
00258 (_x.odom.header.seq, _x.odom.header.stamp.secs, _x.odom.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00259 start = end
00260 end += 4
00261 (length,) = _struct_I.unpack(str[start:end])
00262 start = end
00263 end += length
00264 if python3:
00265 self.odom.header.frame_id = str[start:end].decode('utf-8')
00266 else:
00267 self.odom.header.frame_id = str[start:end]
00268 start = end
00269 end += 4
00270 (length,) = _struct_I.unpack(str[start:end])
00271 start = end
00272 end += length
00273 if python3:
00274 self.odom.child_frame_id = str[start:end].decode('utf-8')
00275 else:
00276 self.odom.child_frame_id = str[start:end]
00277 _x = self
00278 start = end
00279 end += 56
00280 (_x.odom.pose.pose.position.x, _x.odom.pose.pose.position.y, _x.odom.pose.pose.position.z, _x.odom.pose.pose.orientation.x, _x.odom.pose.pose.orientation.y, _x.odom.pose.pose.orientation.z, _x.odom.pose.pose.orientation.w,) = _struct_7d.unpack(str[start:end])
00281 start = end
00282 end += 288
00283 self.odom.pose.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00284 _x = self
00285 start = end
00286 end += 48
00287 (_x.odom.twist.twist.linear.x, _x.odom.twist.twist.linear.y, _x.odom.twist.twist.linear.z, _x.odom.twist.twist.angular.x, _x.odom.twist.twist.angular.y, _x.odom.twist.twist.angular.z,) = _struct_6d.unpack(str[start:end])
00288 start = end
00289 end += 288
00290 self.odom.twist.covariance = numpy.frombuffer(str[start:end], dtype=numpy.float64, count=36)
00291 return self
00292 except struct.error as e:
00293 raise genpy.DeserializationError(e)
00294
00295 _struct_I = genpy.struct_I
00296 _struct_3I = struct.Struct("<3I")
00297 _struct_7d = struct.Struct("<7d")
00298 _struct_6d = struct.Struct("<6d")
00299 _struct_36d = struct.Struct("<36d")
00300 """autogenerated by genpy from plumesim/ReadPlumeSimResponse.msg. Do not edit."""
00301 import sys
00302 python3 = True if sys.hexversion > 0x03000000 else False
00303 import genpy
00304 import struct
00305
00306 import lse_sensor_msgs.msg
00307 import std_msgs.msg
00308
00309 class ReadPlumeSimResponse(genpy.Message):
00310 _md5sum = "00e4f5cde9687a2123c63ffe6a52373c"
00311 _type = "plumesim/ReadPlumeSimResponse"
00312 _has_header = False
00313 _full_text = """lse_sensor_msgs/Nostril nostril
00314
00315
00316 ================================================================================
00317 MSG: lse_sensor_msgs/Nostril
00318 # Single gas sensor msg
00319
00320 Header header # timestamp and frame_id
00321
00322 string sensor_model
00323
00324 # Gases enums
00325 uint8 ORGANIC_SOLVENTS=0
00326 uint8 AIR_CONTAMINANTS=1
00327 uint8 GENERAL_COMBUSTIBLE=3
00328 uint8 NATURAL_GAS_METHANE=4
00329
00330 uint8[] gas_type # the types of gases detected by the sensor
00331
00332 float32 reading # ppm
00333
00334 float32 min_reading # ppm
00335 float32 max_reading # ppm
00336
00337 float32 clean_air # ppm
00338
00339 uint16 raw_data # mV
00340
00341 ================================================================================
00342 MSG: std_msgs/Header
00343 # Standard metadata for higher-level stamped data types.
00344 # This is generally used to communicate timestamped data
00345 # in a particular coordinate frame.
00346 #
00347 # sequence ID: consecutively increasing ID
00348 uint32 seq
00349 #Two-integer timestamp that is expressed as:
00350 # * stamp.secs: seconds (stamp_secs) since epoch
00351 # * stamp.nsecs: nanoseconds since stamp_secs
00352 # time-handling sugar is provided by the client library
00353 time stamp
00354 #Frame this data is associated with
00355 # 0: no frame
00356 # 1: global frame
00357 string frame_id
00358
00359 """
00360 __slots__ = ['nostril']
00361 _slot_types = ['lse_sensor_msgs/Nostril']
00362
00363 def __init__(self, *args, **kwds):
00364 """
00365 Constructor. Any message fields that are implicitly/explicitly
00366 set to None will be assigned a default value. The recommend
00367 use is keyword arguments as this is more robust to future message
00368 changes. You cannot mix in-order arguments and keyword arguments.
00369
00370 The available fields are:
00371 nostril
00372
00373 :param args: complete set of field values, in .msg order
00374 :param kwds: use keyword arguments corresponding to message field names
00375 to set specific fields.
00376 """
00377 if args or kwds:
00378 super(ReadPlumeSimResponse, self).__init__(*args, **kwds)
00379
00380 if self.nostril is None:
00381 self.nostril = lse_sensor_msgs.msg.Nostril()
00382 else:
00383 self.nostril = lse_sensor_msgs.msg.Nostril()
00384
00385 def _get_types(self):
00386 """
00387 internal API method
00388 """
00389 return self._slot_types
00390
00391 def serialize(self, buff):
00392 """
00393 serialize message into buffer
00394 :param buff: buffer, ``StringIO``
00395 """
00396 try:
00397 _x = self
00398 buff.write(_struct_3I.pack(_x.nostril.header.seq, _x.nostril.header.stamp.secs, _x.nostril.header.stamp.nsecs))
00399 _x = self.nostril.header.frame_id
00400 length = len(_x)
00401 if python3 or type(_x) == unicode:
00402 _x = _x.encode('utf-8')
00403 length = len(_x)
00404 buff.write(struct.pack('<I%ss'%length, length, _x))
00405 _x = self.nostril.sensor_model
00406 length = len(_x)
00407 if python3 or type(_x) == unicode:
00408 _x = _x.encode('utf-8')
00409 length = len(_x)
00410 buff.write(struct.pack('<I%ss'%length, length, _x))
00411 _x = self.nostril.gas_type
00412 length = len(_x)
00413
00414 if type(_x) in [list, tuple]:
00415 buff.write(struct.pack('<I%sB'%length, length, *_x))
00416 else:
00417 buff.write(struct.pack('<I%ss'%length, length, _x))
00418 _x = self
00419 buff.write(_struct_4fH.pack(_x.nostril.reading, _x.nostril.min_reading, _x.nostril.max_reading, _x.nostril.clean_air, _x.nostril.raw_data))
00420 except struct.error as se: self._check_types(se)
00421 except TypeError as te: self._check_types(te)
00422
00423 def deserialize(self, str):
00424 """
00425 unpack serialized message in str into this message instance
00426 :param str: byte array of serialized message, ``str``
00427 """
00428 try:
00429 if self.nostril is None:
00430 self.nostril = lse_sensor_msgs.msg.Nostril()
00431 end = 0
00432 _x = self
00433 start = end
00434 end += 12
00435 (_x.nostril.header.seq, _x.nostril.header.stamp.secs, _x.nostril.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00436 start = end
00437 end += 4
00438 (length,) = _struct_I.unpack(str[start:end])
00439 start = end
00440 end += length
00441 if python3:
00442 self.nostril.header.frame_id = str[start:end].decode('utf-8')
00443 else:
00444 self.nostril.header.frame_id = str[start:end]
00445 start = end
00446 end += 4
00447 (length,) = _struct_I.unpack(str[start:end])
00448 start = end
00449 end += length
00450 if python3:
00451 self.nostril.sensor_model = str[start:end].decode('utf-8')
00452 else:
00453 self.nostril.sensor_model = str[start:end]
00454 start = end
00455 end += 4
00456 (length,) = _struct_I.unpack(str[start:end])
00457 start = end
00458 end += length
00459 if python3:
00460 self.nostril.gas_type = str[start:end].decode('utf-8')
00461 else:
00462 self.nostril.gas_type = str[start:end]
00463 _x = self
00464 start = end
00465 end += 18
00466 (_x.nostril.reading, _x.nostril.min_reading, _x.nostril.max_reading, _x.nostril.clean_air, _x.nostril.raw_data,) = _struct_4fH.unpack(str[start:end])
00467 return self
00468 except struct.error as e:
00469 raise genpy.DeserializationError(e)
00470
00471
00472 def serialize_numpy(self, buff, numpy):
00473 """
00474 serialize message with numpy array types into buffer
00475 :param buff: buffer, ``StringIO``
00476 :param numpy: numpy python module
00477 """
00478 try:
00479 _x = self
00480 buff.write(_struct_3I.pack(_x.nostril.header.seq, _x.nostril.header.stamp.secs, _x.nostril.header.stamp.nsecs))
00481 _x = self.nostril.header.frame_id
00482 length = len(_x)
00483 if python3 or type(_x) == unicode:
00484 _x = _x.encode('utf-8')
00485 length = len(_x)
00486 buff.write(struct.pack('<I%ss'%length, length, _x))
00487 _x = self.nostril.sensor_model
00488 length = len(_x)
00489 if python3 or type(_x) == unicode:
00490 _x = _x.encode('utf-8')
00491 length = len(_x)
00492 buff.write(struct.pack('<I%ss'%length, length, _x))
00493 _x = self.nostril.gas_type
00494 length = len(_x)
00495
00496 if type(_x) in [list, tuple]:
00497 buff.write(struct.pack('<I%sB'%length, length, *_x))
00498 else:
00499 buff.write(struct.pack('<I%ss'%length, length, _x))
00500 _x = self
00501 buff.write(_struct_4fH.pack(_x.nostril.reading, _x.nostril.min_reading, _x.nostril.max_reading, _x.nostril.clean_air, _x.nostril.raw_data))
00502 except struct.error as se: self._check_types(se)
00503 except TypeError as te: self._check_types(te)
00504
00505 def deserialize_numpy(self, str, numpy):
00506 """
00507 unpack serialized message in str into this message instance using numpy for array types
00508 :param str: byte array of serialized message, ``str``
00509 :param numpy: numpy python module
00510 """
00511 try:
00512 if self.nostril is None:
00513 self.nostril = lse_sensor_msgs.msg.Nostril()
00514 end = 0
00515 _x = self
00516 start = end
00517 end += 12
00518 (_x.nostril.header.seq, _x.nostril.header.stamp.secs, _x.nostril.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00519 start = end
00520 end += 4
00521 (length,) = _struct_I.unpack(str[start:end])
00522 start = end
00523 end += length
00524 if python3:
00525 self.nostril.header.frame_id = str[start:end].decode('utf-8')
00526 else:
00527 self.nostril.header.frame_id = str[start:end]
00528 start = end
00529 end += 4
00530 (length,) = _struct_I.unpack(str[start:end])
00531 start = end
00532 end += length
00533 if python3:
00534 self.nostril.sensor_model = str[start:end].decode('utf-8')
00535 else:
00536 self.nostril.sensor_model = str[start:end]
00537 start = end
00538 end += 4
00539 (length,) = _struct_I.unpack(str[start:end])
00540 start = end
00541 end += length
00542 if python3:
00543 self.nostril.gas_type = str[start:end].decode('utf-8')
00544 else:
00545 self.nostril.gas_type = str[start:end]
00546 _x = self
00547 start = end
00548 end += 18
00549 (_x.nostril.reading, _x.nostril.min_reading, _x.nostril.max_reading, _x.nostril.clean_air, _x.nostril.raw_data,) = _struct_4fH.unpack(str[start:end])
00550 return self
00551 except struct.error as e:
00552 raise genpy.DeserializationError(e)
00553
00554 _struct_I = genpy.struct_I
00555 _struct_3I = struct.Struct("<3I")
00556 _struct_4fH = struct.Struct("<4fH")
00557 class ReadPlumeSim(object):
00558 _type = 'plumesim/ReadPlumeSim'
00559 _md5sum = 'b2dd24c23e79efb882ddc2b20efde99a'
00560 _request_class = ReadPlumeSimRequest
00561 _response_class = ReadPlumeSimResponse