00001 """autogenerated by genpy from youbot_overhead_localization/SetGoalRequest.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 SetGoalRequest(genpy.Message):
00009 _md5sum = "49184c962cf32771270d2b7842a6d0c4"
00010 _type = "youbot_overhead_localization/SetGoalRequest"
00011 _has_header = False
00012 _full_text = """string topic_name
00013 int32 x
00014 int32 y
00015
00016 """
00017 __slots__ = ['topic_name','x','y']
00018 _slot_types = ['string','int32','int32']
00019
00020 def __init__(self, *args, **kwds):
00021 """
00022 Constructor. Any message fields that are implicitly/explicitly
00023 set to None will be assigned a default value. The recommend
00024 use is keyword arguments as this is more robust to future message
00025 changes. You cannot mix in-order arguments and keyword arguments.
00026
00027 The available fields are:
00028 topic_name,x,y
00029
00030 :param args: complete set of field values, in .msg order
00031 :param kwds: use keyword arguments corresponding to message field names
00032 to set specific fields.
00033 """
00034 if args or kwds:
00035 super(SetGoalRequest, self).__init__(*args, **kwds)
00036
00037 if self.topic_name is None:
00038 self.topic_name = ''
00039 if self.x is None:
00040 self.x = 0
00041 if self.y is None:
00042 self.y = 0
00043 else:
00044 self.topic_name = ''
00045 self.x = 0
00046 self.y = 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.topic_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
00067 buff.write(_struct_2i.pack(_x.x, _x.y))
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 _x = self
00088 start = end
00089 end += 8
00090 (_x.x, _x.y,) = _struct_2i.unpack(str[start:end])
00091 return self
00092 except struct.error as e:
00093 raise genpy.DeserializationError(e)
00094
00095
00096 def serialize_numpy(self, buff, numpy):
00097 """
00098 serialize message with numpy array types into buffer
00099 :param buff: buffer, ``StringIO``
00100 :param numpy: numpy python module
00101 """
00102 try:
00103 _x = self.topic_name
00104 length = len(_x)
00105 if python3 or type(_x) == unicode:
00106 _x = _x.encode('utf-8')
00107 length = len(_x)
00108 buff.write(struct.pack('<I%ss'%length, length, _x))
00109 _x = self
00110 buff.write(_struct_2i.pack(_x.x, _x.y))
00111 except struct.error as se: self._check_types(se)
00112 except TypeError as te: self._check_types(te)
00113
00114 def deserialize_numpy(self, str, numpy):
00115 """
00116 unpack serialized message in str into this message instance using numpy for array types
00117 :param str: byte array of serialized message, ``str``
00118 :param numpy: numpy python module
00119 """
00120 try:
00121 end = 0
00122 start = end
00123 end += 4
00124 (length,) = _struct_I.unpack(str[start:end])
00125 start = end
00126 end += length
00127 if python3:
00128 self.topic_name = str[start:end].decode('utf-8')
00129 else:
00130 self.topic_name = str[start:end]
00131 _x = self
00132 start = end
00133 end += 8
00134 (_x.x, _x.y,) = _struct_2i.unpack(str[start:end])
00135 return self
00136 except struct.error as e:
00137 raise genpy.DeserializationError(e)
00138
00139 _struct_I = genpy.struct_I
00140 _struct_2i = struct.Struct("<2i")
00141 """autogenerated by genpy from youbot_overhead_localization/SetGoalResponse.msg. Do not edit."""
00142 import sys
00143 python3 = True if sys.hexversion > 0x03000000 else False
00144 import genpy
00145 import struct
00146
00147
00148 class SetGoalResponse(genpy.Message):
00149 _md5sum = "d41d8cd98f00b204e9800998ecf8427e"
00150 _type = "youbot_overhead_localization/SetGoalResponse"
00151 _has_header = False
00152 _full_text = """
00153
00154 """
00155 __slots__ = []
00156 _slot_types = []
00157
00158 def __init__(self, *args, **kwds):
00159 """
00160 Constructor. Any message fields that are implicitly/explicitly
00161 set to None will be assigned a default value. The recommend
00162 use is keyword arguments as this is more robust to future message
00163 changes. You cannot mix in-order arguments and keyword arguments.
00164
00165 The available fields are:
00166
00167
00168 :param args: complete set of field values, in .msg order
00169 :param kwds: use keyword arguments corresponding to message field names
00170 to set specific fields.
00171 """
00172 if args or kwds:
00173 super(SetGoalResponse, self).__init__(*args, **kwds)
00174
00175 def _get_types(self):
00176 """
00177 internal API method
00178 """
00179 return self._slot_types
00180
00181 def serialize(self, buff):
00182 """
00183 serialize message into buffer
00184 :param buff: buffer, ``StringIO``
00185 """
00186 try:
00187 pass
00188 except struct.error as se: self._check_types(se)
00189 except TypeError as te: self._check_types(te)
00190
00191 def deserialize(self, str):
00192 """
00193 unpack serialized message in str into this message instance
00194 :param str: byte array of serialized message, ``str``
00195 """
00196 try:
00197 end = 0
00198 return self
00199 except struct.error as e:
00200 raise genpy.DeserializationError(e)
00201
00202
00203 def serialize_numpy(self, buff, numpy):
00204 """
00205 serialize message with numpy array types into buffer
00206 :param buff: buffer, ``StringIO``
00207 :param numpy: numpy python module
00208 """
00209 try:
00210 pass
00211 except struct.error as se: self._check_types(se)
00212 except TypeError as te: self._check_types(te)
00213
00214 def deserialize_numpy(self, str, numpy):
00215 """
00216 unpack serialized message in str into this message instance using numpy for array types
00217 :param str: byte array of serialized message, ``str``
00218 :param numpy: numpy python module
00219 """
00220 try:
00221 end = 0
00222 return self
00223 except struct.error as e:
00224 raise genpy.DeserializationError(e)
00225
00226 _struct_I = genpy.struct_I
00227 class SetGoal(object):
00228 _type = 'youbot_overhead_localization/SetGoal'
00229 _md5sum = '49184c962cf32771270d2b7842a6d0c4'
00230 _request_class = SetGoalRequest
00231 _response_class = SetGoalResponse