00001 """autogenerated by genpy from pr2_clutter_helper/GetImageRequest.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 GetImageRequest(genpy.Message):
00009 _md5sum = "13abbc87c0c0b2fc9a6d87f74375a5d7"
00010 _type = "pr2_clutter_helper/GetImageRequest"
00011 _has_header = False
00012 _full_text = """string topic_name
00013 string msg_type
00014
00015 """
00016 __slots__ = ['topic_name','msg_type']
00017 _slot_types = ['string','string']
00018
00019 def __init__(self, *args, **kwds):
00020 """
00021 Constructor. Any message fields that are implicitly/explicitly
00022 set to None will be assigned a default value. The recommend
00023 use is keyword arguments as this is more robust to future message
00024 changes. You cannot mix in-order arguments and keyword arguments.
00025
00026 The available fields are:
00027 topic_name,msg_type
00028
00029 :param args: complete set of field values, in .msg order
00030 :param kwds: use keyword arguments corresponding to message field names
00031 to set specific fields.
00032 """
00033 if args or kwds:
00034 super(GetImageRequest, self).__init__(*args, **kwds)
00035
00036 if self.topic_name is None:
00037 self.topic_name = ''
00038 if self.msg_type is None:
00039 self.msg_type = ''
00040 else:
00041 self.topic_name = ''
00042 self.msg_type = ''
00043
00044 def _get_types(self):
00045 """
00046 internal API method
00047 """
00048 return self._slot_types
00049
00050 def serialize(self, buff):
00051 """
00052 serialize message into buffer
00053 :param buff: buffer, ``StringIO``
00054 """
00055 try:
00056 _x = self.topic_name
00057 length = len(_x)
00058 if python3 or type(_x) == unicode:
00059 _x = _x.encode('utf-8')
00060 length = len(_x)
00061 buff.write(struct.pack('<I%ss'%length, length, _x))
00062 _x = self.msg_type
00063 length = len(_x)
00064 if python3 or type(_x) == unicode:
00065 _x = _x.encode('utf-8')
00066 length = len(_x)
00067 buff.write(struct.pack('<I%ss'%length, length, _x))
00068 except struct.error as se: self._check_types(se)
00069 except TypeError as te: self._check_types(te)
00070
00071 def deserialize(self, str):
00072 """
00073 unpack serialized message in str into this message instance
00074 :param str: byte array of serialized message, ``str``
00075 """
00076 try:
00077 end = 0
00078 start = end
00079 end += 4
00080 (length,) = _struct_I.unpack(str[start:end])
00081 start = end
00082 end += length
00083 if python3:
00084 self.topic_name = str[start:end].decode('utf-8')
00085 else:
00086 self.topic_name = str[start:end]
00087 start = end
00088 end += 4
00089 (length,) = _struct_I.unpack(str[start:end])
00090 start = end
00091 end += length
00092 if python3:
00093 self.msg_type = str[start:end].decode('utf-8')
00094 else:
00095 self.msg_type = str[start:end]
00096 return self
00097 except struct.error as e:
00098 raise genpy.DeserializationError(e)
00099
00100
00101 def serialize_numpy(self, buff, numpy):
00102 """
00103 serialize message with numpy array types into buffer
00104 :param buff: buffer, ``StringIO``
00105 :param numpy: numpy python module
00106 """
00107 try:
00108 _x = self.topic_name
00109 length = len(_x)
00110 if python3 or type(_x) == unicode:
00111 _x = _x.encode('utf-8')
00112 length = len(_x)
00113 buff.write(struct.pack('<I%ss'%length, length, _x))
00114 _x = self.msg_type
00115 length = len(_x)
00116 if python3 or type(_x) == unicode:
00117 _x = _x.encode('utf-8')
00118 length = len(_x)
00119 buff.write(struct.pack('<I%ss'%length, length, _x))
00120 except struct.error as se: self._check_types(se)
00121 except TypeError as te: self._check_types(te)
00122
00123 def deserialize_numpy(self, str, numpy):
00124 """
00125 unpack serialized message in str into this message instance using numpy for array types
00126 :param str: byte array of serialized message, ``str``
00127 :param numpy: numpy python module
00128 """
00129 try:
00130 end = 0
00131 start = end
00132 end += 4
00133 (length,) = _struct_I.unpack(str[start:end])
00134 start = end
00135 end += length
00136 if python3:
00137 self.topic_name = str[start:end].decode('utf-8')
00138 else:
00139 self.topic_name = str[start:end]
00140 start = end
00141 end += 4
00142 (length,) = _struct_I.unpack(str[start:end])
00143 start = end
00144 end += length
00145 if python3:
00146 self.msg_type = str[start:end].decode('utf-8')
00147 else:
00148 self.msg_type = str[start:end]
00149 return self
00150 except struct.error as e:
00151 raise genpy.DeserializationError(e)
00152
00153 _struct_I = genpy.struct_I
00154 """autogenerated by genpy from pr2_clutter_helper/GetImageResponse.msg. Do not edit."""
00155 import sys
00156 python3 = True if sys.hexversion > 0x03000000 else False
00157 import genpy
00158 import struct
00159
00160 import std_msgs.msg
00161 import sensor_msgs.msg
00162
00163 class GetImageResponse(genpy.Message):
00164 _md5sum = "b13d2865c5af2a64e6e30ab1b56e1dd5"
00165 _type = "pr2_clutter_helper/GetImageResponse"
00166 _has_header = False
00167 _full_text = """sensor_msgs/Image image
00168
00169
00170 ================================================================================
00171 MSG: sensor_msgs/Image
00172 # This message contains an uncompressed image
00173 # (0, 0) is at top-left corner of image
00174 #
00175
00176 Header header # Header timestamp should be acquisition time of image
00177 # Header frame_id should be optical frame of camera
00178 # origin of frame should be optical center of cameara
00179 # +x should point to the right in the image
00180 # +y should point down in the image
00181 # +z should point into to plane of the image
00182 # If the frame_id here and the frame_id of the CameraInfo
00183 # message associated with the image conflict
00184 # the behavior is undefined
00185
00186 uint32 height # image height, that is, number of rows
00187 uint32 width # image width, that is, number of columns
00188
00189 # The legal values for encoding are in file src/image_encodings.cpp
00190 # If you want to standardize a new string format, join
00191 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.
00192
00193 string encoding # Encoding of pixels -- channel meaning, ordering, size
00194 # taken from the list of strings in src/image_encodings.cpp
00195
00196 uint8 is_bigendian # is this data bigendian?
00197 uint32 step # Full row length in bytes
00198 uint8[] data # actual matrix data, size is (step * rows)
00199
00200 ================================================================================
00201 MSG: std_msgs/Header
00202 # Standard metadata for higher-level stamped data types.
00203 # This is generally used to communicate timestamped data
00204 # in a particular coordinate frame.
00205 #
00206 # sequence ID: consecutively increasing ID
00207 uint32 seq
00208 #Two-integer timestamp that is expressed as:
00209 # * stamp.secs: seconds (stamp_secs) since epoch
00210 # * stamp.nsecs: nanoseconds since stamp_secs
00211 # time-handling sugar is provided by the client library
00212 time stamp
00213 #Frame this data is associated with
00214 # 0: no frame
00215 # 1: global frame
00216 string frame_id
00217
00218 """
00219 __slots__ = ['image']
00220 _slot_types = ['sensor_msgs/Image']
00221
00222 def __init__(self, *args, **kwds):
00223 """
00224 Constructor. Any message fields that are implicitly/explicitly
00225 set to None will be assigned a default value. The recommend
00226 use is keyword arguments as this is more robust to future message
00227 changes. You cannot mix in-order arguments and keyword arguments.
00228
00229 The available fields are:
00230 image
00231
00232 :param args: complete set of field values, in .msg order
00233 :param kwds: use keyword arguments corresponding to message field names
00234 to set specific fields.
00235 """
00236 if args or kwds:
00237 super(GetImageResponse, self).__init__(*args, **kwds)
00238
00239 if self.image is None:
00240 self.image = sensor_msgs.msg.Image()
00241 else:
00242 self.image = sensor_msgs.msg.Image()
00243
00244 def _get_types(self):
00245 """
00246 internal API method
00247 """
00248 return self._slot_types
00249
00250 def serialize(self, buff):
00251 """
00252 serialize message into buffer
00253 :param buff: buffer, ``StringIO``
00254 """
00255 try:
00256 _x = self
00257 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00258 _x = self.image.header.frame_id
00259 length = len(_x)
00260 if python3 or type(_x) == unicode:
00261 _x = _x.encode('utf-8')
00262 length = len(_x)
00263 buff.write(struct.pack('<I%ss'%length, length, _x))
00264 _x = self
00265 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00266 _x = self.image.encoding
00267 length = len(_x)
00268 if python3 or type(_x) == unicode:
00269 _x = _x.encode('utf-8')
00270 length = len(_x)
00271 buff.write(struct.pack('<I%ss'%length, length, _x))
00272 _x = self
00273 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00274 _x = self.image.data
00275 length = len(_x)
00276
00277 if type(_x) in [list, tuple]:
00278 buff.write(struct.pack('<I%sB'%length, length, *_x))
00279 else:
00280 buff.write(struct.pack('<I%ss'%length, length, _x))
00281 except struct.error as se: self._check_types(se)
00282 except TypeError as te: self._check_types(te)
00283
00284 def deserialize(self, str):
00285 """
00286 unpack serialized message in str into this message instance
00287 :param str: byte array of serialized message, ``str``
00288 """
00289 try:
00290 if self.image is None:
00291 self.image = sensor_msgs.msg.Image()
00292 end = 0
00293 _x = self
00294 start = end
00295 end += 12
00296 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00297 start = end
00298 end += 4
00299 (length,) = _struct_I.unpack(str[start:end])
00300 start = end
00301 end += length
00302 if python3:
00303 self.image.header.frame_id = str[start:end].decode('utf-8')
00304 else:
00305 self.image.header.frame_id = str[start:end]
00306 _x = self
00307 start = end
00308 end += 8
00309 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00310 start = end
00311 end += 4
00312 (length,) = _struct_I.unpack(str[start:end])
00313 start = end
00314 end += length
00315 if python3:
00316 self.image.encoding = str[start:end].decode('utf-8')
00317 else:
00318 self.image.encoding = str[start:end]
00319 _x = self
00320 start = end
00321 end += 5
00322 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00323 start = end
00324 end += 4
00325 (length,) = _struct_I.unpack(str[start:end])
00326 start = end
00327 end += length
00328 if python3:
00329 self.image.data = str[start:end].decode('utf-8')
00330 else:
00331 self.image.data = str[start:end]
00332 return self
00333 except struct.error as e:
00334 raise genpy.DeserializationError(e)
00335
00336
00337 def serialize_numpy(self, buff, numpy):
00338 """
00339 serialize message with numpy array types into buffer
00340 :param buff: buffer, ``StringIO``
00341 :param numpy: numpy python module
00342 """
00343 try:
00344 _x = self
00345 buff.write(_struct_3I.pack(_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs))
00346 _x = self.image.header.frame_id
00347 length = len(_x)
00348 if python3 or type(_x) == unicode:
00349 _x = _x.encode('utf-8')
00350 length = len(_x)
00351 buff.write(struct.pack('<I%ss'%length, length, _x))
00352 _x = self
00353 buff.write(_struct_2I.pack(_x.image.height, _x.image.width))
00354 _x = self.image.encoding
00355 length = len(_x)
00356 if python3 or type(_x) == unicode:
00357 _x = _x.encode('utf-8')
00358 length = len(_x)
00359 buff.write(struct.pack('<I%ss'%length, length, _x))
00360 _x = self
00361 buff.write(_struct_BI.pack(_x.image.is_bigendian, _x.image.step))
00362 _x = self.image.data
00363 length = len(_x)
00364
00365 if type(_x) in [list, tuple]:
00366 buff.write(struct.pack('<I%sB'%length, length, *_x))
00367 else:
00368 buff.write(struct.pack('<I%ss'%length, length, _x))
00369 except struct.error as se: self._check_types(se)
00370 except TypeError as te: self._check_types(te)
00371
00372 def deserialize_numpy(self, str, numpy):
00373 """
00374 unpack serialized message in str into this message instance using numpy for array types
00375 :param str: byte array of serialized message, ``str``
00376 :param numpy: numpy python module
00377 """
00378 try:
00379 if self.image is None:
00380 self.image = sensor_msgs.msg.Image()
00381 end = 0
00382 _x = self
00383 start = end
00384 end += 12
00385 (_x.image.header.seq, _x.image.header.stamp.secs, _x.image.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00386 start = end
00387 end += 4
00388 (length,) = _struct_I.unpack(str[start:end])
00389 start = end
00390 end += length
00391 if python3:
00392 self.image.header.frame_id = str[start:end].decode('utf-8')
00393 else:
00394 self.image.header.frame_id = str[start:end]
00395 _x = self
00396 start = end
00397 end += 8
00398 (_x.image.height, _x.image.width,) = _struct_2I.unpack(str[start:end])
00399 start = end
00400 end += 4
00401 (length,) = _struct_I.unpack(str[start:end])
00402 start = end
00403 end += length
00404 if python3:
00405 self.image.encoding = str[start:end].decode('utf-8')
00406 else:
00407 self.image.encoding = str[start:end]
00408 _x = self
00409 start = end
00410 end += 5
00411 (_x.image.is_bigendian, _x.image.step,) = _struct_BI.unpack(str[start:end])
00412 start = end
00413 end += 4
00414 (length,) = _struct_I.unpack(str[start:end])
00415 start = end
00416 end += length
00417 if python3:
00418 self.image.data = str[start:end].decode('utf-8')
00419 else:
00420 self.image.data = str[start:end]
00421 return self
00422 except struct.error as e:
00423 raise genpy.DeserializationError(e)
00424
00425 _struct_I = genpy.struct_I
00426 _struct_3I = struct.Struct("<3I")
00427 _struct_2I = struct.Struct("<2I")
00428 _struct_BI = struct.Struct("<BI")
00429 class GetImage(object):
00430 _type = 'pr2_clutter_helper/GetImage'
00431 _md5sum = '45eeb3e02dd8ff4ceecaf796323cbe24'
00432 _request_class = GetImageRequest
00433 _response_class = GetImageResponse