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