Go to the documentation of this file.00001 """autogenerated by genpy from pano_ros/StitchGoal.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 StitchGoal(genpy.Message):
00009 _md5sum = "2286405d213866ca1e7b46f37127c016"
00010 _type = "pano_ros/StitchGoal"
00011 _has_header = False
00012 _full_text = """# ====== DO NOT MODIFY! AUTOGENERATED FROM AN ACTION DEFINITION ======
00013 # Define the goal
00014 #full path to the input bag that has atleast camera_info and image messages
00015 string bag_file_name
00016 #full path to the desired output file. jpg or png extension required
00017 string stitch_file_name
00018
00019 """
00020 __slots__ = ['bag_file_name','stitch_file_name']
00021 _slot_types = ['string','string']
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 bag_file_name,stitch_file_name
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(StitchGoal, self).__init__(*args, **kwds)
00039
00040 if self.bag_file_name is None:
00041 self.bag_file_name = ''
00042 if self.stitch_file_name is None:
00043 self.stitch_file_name = ''
00044 else:
00045 self.bag_file_name = ''
00046 self.stitch_file_name = ''
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.bag_file_name
00061 length = len(_x)
00062 if python3 or type(_x) == unicode:
00063 _x = _x.encode('utf-8')
00064 length = len(_x)
00065 buff.write(struct.pack('<I%ss'%length, length, _x))
00066 _x = self.stitch_file_name
00067 length = len(_x)
00068 if python3 or type(_x) == unicode:
00069 _x = _x.encode('utf-8')
00070 length = len(_x)
00071 buff.write(struct.pack('<I%ss'%length, length, _x))
00072 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00073 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00074
00075 def deserialize(self, str):
00076 """
00077 unpack serialized message in str into this message instance
00078 :param str: byte array of serialized message, ``str``
00079 """
00080 try:
00081 end = 0
00082 start = end
00083 end += 4
00084 (length,) = _struct_I.unpack(str[start:end])
00085 start = end
00086 end += length
00087 if python3:
00088 self.bag_file_name = str[start:end].decode('utf-8')
00089 else:
00090 self.bag_file_name = str[start:end]
00091 start = end
00092 end += 4
00093 (length,) = _struct_I.unpack(str[start:end])
00094 start = end
00095 end += length
00096 if python3:
00097 self.stitch_file_name = str[start:end].decode('utf-8')
00098 else:
00099 self.stitch_file_name = str[start:end]
00100 return self
00101 except struct.error as e:
00102 raise genpy.DeserializationError(e)
00103
00104
00105 def serialize_numpy(self, buff, numpy):
00106 """
00107 serialize message with numpy array types into buffer
00108 :param buff: buffer, ``StringIO``
00109 :param numpy: numpy python module
00110 """
00111 try:
00112 _x = self.bag_file_name
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.stitch_file_name
00119 length = len(_x)
00120 if python3 or type(_x) == unicode:
00121 _x = _x.encode('utf-8')
00122 length = len(_x)
00123 buff.write(struct.pack('<I%ss'%length, length, _x))
00124 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00125 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00126
00127 def deserialize_numpy(self, str, numpy):
00128 """
00129 unpack serialized message in str into this message instance using numpy for array types
00130 :param str: byte array of serialized message, ``str``
00131 :param numpy: numpy python module
00132 """
00133 try:
00134 end = 0
00135 start = end
00136 end += 4
00137 (length,) = _struct_I.unpack(str[start:end])
00138 start = end
00139 end += length
00140 if python3:
00141 self.bag_file_name = str[start:end].decode('utf-8')
00142 else:
00143 self.bag_file_name = str[start:end]
00144 start = end
00145 end += 4
00146 (length,) = _struct_I.unpack(str[start:end])
00147 start = end
00148 end += length
00149 if python3:
00150 self.stitch_file_name = str[start:end].decode('utf-8')
00151 else:
00152 self.stitch_file_name = str[start:end]
00153 return self
00154 except struct.error as e:
00155 raise genpy.DeserializationError(e)
00156
00157 _struct_I = genpy.struct_I