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