00001 """autogenerated by genpy from turtlebot_panorama/TakePanoRequest.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 TakePanoRequest(genpy.Message):
00009 _md5sum = "f52c694c82704221735cc576c7587ecc"
00010 _type = "turtlebot_panorama/TakePanoRequest"
00011 _has_header = False
00012 _full_text = """
00013 uint8 mode
00014
00015 uint8 SNAPANDROTATE=0
00016
00017 uint8 CONTINUOUS=1
00018
00019 uint8 STOP=2
00020
00021 float32 pano_angle
00022
00023 float32 snap_interval
00024
00025 float32 rot_vel
00026
00027
00028 """
00029
00030 SNAPANDROTATE = 0
00031 CONTINUOUS = 1
00032 STOP = 2
00033
00034 __slots__ = ['mode','pano_angle','snap_interval','rot_vel']
00035 _slot_types = ['uint8','float32','float32','float32']
00036
00037 def __init__(self, *args, **kwds):
00038 """
00039 Constructor. Any message fields that are implicitly/explicitly
00040 set to None will be assigned a default value. The recommend
00041 use is keyword arguments as this is more robust to future message
00042 changes. You cannot mix in-order arguments and keyword arguments.
00043
00044 The available fields are:
00045 mode,pano_angle,snap_interval,rot_vel
00046
00047 :param args: complete set of field values, in .msg order
00048 :param kwds: use keyword arguments corresponding to message field names
00049 to set specific fields.
00050 """
00051 if args or kwds:
00052 super(TakePanoRequest, self).__init__(*args, **kwds)
00053
00054 if self.mode is None:
00055 self.mode = 0
00056 if self.pano_angle is None:
00057 self.pano_angle = 0.
00058 if self.snap_interval is None:
00059 self.snap_interval = 0.
00060 if self.rot_vel is None:
00061 self.rot_vel = 0.
00062 else:
00063 self.mode = 0
00064 self.pano_angle = 0.
00065 self.snap_interval = 0.
00066 self.rot_vel = 0.
00067
00068 def _get_types(self):
00069 """
00070 internal API method
00071 """
00072 return self._slot_types
00073
00074 def serialize(self, buff):
00075 """
00076 serialize message into buffer
00077 :param buff: buffer, ``StringIO``
00078 """
00079 try:
00080 _x = self
00081 buff.write(_struct_B3f.pack(_x.mode, _x.pano_angle, _x.snap_interval, _x.rot_vel))
00082 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00083 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00084
00085 def deserialize(self, str):
00086 """
00087 unpack serialized message in str into this message instance
00088 :param str: byte array of serialized message, ``str``
00089 """
00090 try:
00091 end = 0
00092 _x = self
00093 start = end
00094 end += 13
00095 (_x.mode, _x.pano_angle, _x.snap_interval, _x.rot_vel,) = _struct_B3f.unpack(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
00109 buff.write(_struct_B3f.pack(_x.mode, _x.pano_angle, _x.snap_interval, _x.rot_vel))
00110 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00111 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00112
00113 def deserialize_numpy(self, str, numpy):
00114 """
00115 unpack serialized message in str into this message instance using numpy for array types
00116 :param str: byte array of serialized message, ``str``
00117 :param numpy: numpy python module
00118 """
00119 try:
00120 end = 0
00121 _x = self
00122 start = end
00123 end += 13
00124 (_x.mode, _x.pano_angle, _x.snap_interval, _x.rot_vel,) = _struct_B3f.unpack(str[start:end])
00125 return self
00126 except struct.error as e:
00127 raise genpy.DeserializationError(e)
00128
00129 _struct_I = genpy.struct_I
00130 _struct_B3f = struct.Struct("<B3f")
00131 """autogenerated by genpy from turtlebot_panorama/TakePanoResponse.msg. Do not edit."""
00132 import sys
00133 python3 = True if sys.hexversion > 0x03000000 else False
00134 import genpy
00135 import struct
00136
00137
00138 class TakePanoResponse(genpy.Message):
00139 _md5sum = "1ebe3e03b034aa9578d367d7cf6ed627"
00140 _type = "turtlebot_panorama/TakePanoResponse"
00141 _has_header = False
00142 _full_text = """
00143 uint8 status
00144 uint8 STARTED=0
00145 uint8 IN_PROGRESS=1
00146 uint8 STOPPED=2
00147
00148 """
00149
00150 STARTED = 0
00151 IN_PROGRESS = 1
00152 STOPPED = 2
00153
00154 __slots__ = ['status']
00155 _slot_types = ['uint8']
00156
00157 def __init__(self, *args, **kwds):
00158 """
00159 Constructor. Any message fields that are implicitly/explicitly
00160 set to None will be assigned a default value. The recommend
00161 use is keyword arguments as this is more robust to future message
00162 changes. You cannot mix in-order arguments and keyword arguments.
00163
00164 The available fields are:
00165 status
00166
00167 :param args: complete set of field values, in .msg order
00168 :param kwds: use keyword arguments corresponding to message field names
00169 to set specific fields.
00170 """
00171 if args or kwds:
00172 super(TakePanoResponse, self).__init__(*args, **kwds)
00173
00174 if self.status is None:
00175 self.status = 0
00176 else:
00177 self.status = 0
00178
00179 def _get_types(self):
00180 """
00181 internal API method
00182 """
00183 return self._slot_types
00184
00185 def serialize(self, buff):
00186 """
00187 serialize message into buffer
00188 :param buff: buffer, ``StringIO``
00189 """
00190 try:
00191 buff.write(_struct_B.pack(self.status))
00192 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00193 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00194
00195 def deserialize(self, str):
00196 """
00197 unpack serialized message in str into this message instance
00198 :param str: byte array of serialized message, ``str``
00199 """
00200 try:
00201 end = 0
00202 start = end
00203 end += 1
00204 (self.status,) = _struct_B.unpack(str[start:end])
00205 return self
00206 except struct.error as e:
00207 raise genpy.DeserializationError(e)
00208
00209
00210 def serialize_numpy(self, buff, numpy):
00211 """
00212 serialize message with numpy array types into buffer
00213 :param buff: buffer, ``StringIO``
00214 :param numpy: numpy python module
00215 """
00216 try:
00217 buff.write(_struct_B.pack(self.status))
00218 except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00219 except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00220
00221 def deserialize_numpy(self, str, numpy):
00222 """
00223 unpack serialized message in str into this message instance using numpy for array types
00224 :param str: byte array of serialized message, ``str``
00225 :param numpy: numpy python module
00226 """
00227 try:
00228 end = 0
00229 start = end
00230 end += 1
00231 (self.status,) = _struct_B.unpack(str[start:end])
00232 return self
00233 except struct.error as e:
00234 raise genpy.DeserializationError(e)
00235
00236 _struct_I = genpy.struct_I
00237 _struct_B = struct.Struct("<B")
00238 class TakePano(object):
00239 _type = 'turtlebot_panorama/TakePano'
00240 _md5sum = 'ae9e615a5f5b5081544bd9259c9e0f4e'
00241 _request_class = TakePanoRequest
00242 _response_class = TakePanoResponse