$search
00001 """autogenerated by genmsg_py from TeleportAbsoluteRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class TeleportAbsoluteRequest(roslib.message.Message): 00007 _md5sum = "a130bc60ee6513855dc62ea83fcc5b20" 00008 _type = "turtlesim/TeleportAbsoluteRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """float32 x 00011 float32 y 00012 float32 theta 00013 00014 """ 00015 __slots__ = ['x','y','theta'] 00016 _slot_types = ['float32','float32','float32'] 00017 00018 def __init__(self, *args, **kwds): 00019 """ 00020 Constructor. Any message fields that are implicitly/explicitly 00021 set to None will be assigned a default value. The recommend 00022 use is keyword arguments as this is more robust to future message 00023 changes. You cannot mix in-order arguments and keyword arguments. 00024 00025 The available fields are: 00026 x,y,theta 00027 00028 @param args: complete set of field values, in .msg order 00029 @param kwds: use keyword arguments corresponding to message field names 00030 to set specific fields. 00031 """ 00032 if args or kwds: 00033 super(TeleportAbsoluteRequest, self).__init__(*args, **kwds) 00034 #message fields cannot be None, assign default values for those that are 00035 if self.x is None: 00036 self.x = 0. 00037 if self.y is None: 00038 self.y = 0. 00039 if self.theta is None: 00040 self.theta = 0. 00041 else: 00042 self.x = 0. 00043 self.y = 0. 00044 self.theta = 0. 00045 00046 def _get_types(self): 00047 """ 00048 internal API method 00049 """ 00050 return self._slot_types 00051 00052 def serialize(self, buff): 00053 """ 00054 serialize message into buffer 00055 @param buff: buffer 00056 @type buff: StringIO 00057 """ 00058 try: 00059 _x = self 00060 buff.write(_struct_3f.pack(_x.x, _x.y, _x.theta)) 00061 except struct.error as se: self._check_types(se) 00062 except TypeError as te: self._check_types(te) 00063 00064 def deserialize(self, str): 00065 """ 00066 unpack serialized message in str into this message instance 00067 @param str: byte array of serialized message 00068 @type str: str 00069 """ 00070 try: 00071 end = 0 00072 _x = self 00073 start = end 00074 end += 12 00075 (_x.x, _x.y, _x.theta,) = _struct_3f.unpack(str[start:end]) 00076 return self 00077 except struct.error as e: 00078 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00079 00080 00081 def serialize_numpy(self, buff, numpy): 00082 """ 00083 serialize message with numpy array types into buffer 00084 @param buff: buffer 00085 @type buff: StringIO 00086 @param numpy: numpy python module 00087 @type numpy module 00088 """ 00089 try: 00090 _x = self 00091 buff.write(_struct_3f.pack(_x.x, _x.y, _x.theta)) 00092 except struct.error as se: self._check_types(se) 00093 except TypeError as te: self._check_types(te) 00094 00095 def deserialize_numpy(self, str, numpy): 00096 """ 00097 unpack serialized message in str into this message instance using numpy for array types 00098 @param str: byte array of serialized message 00099 @type str: str 00100 @param numpy: numpy python module 00101 @type numpy: module 00102 """ 00103 try: 00104 end = 0 00105 _x = self 00106 start = end 00107 end += 12 00108 (_x.x, _x.y, _x.theta,) = _struct_3f.unpack(str[start:end]) 00109 return self 00110 except struct.error as e: 00111 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00112 00113 _struct_I = roslib.message.struct_I 00114 _struct_3f = struct.Struct("<3f") 00115 """autogenerated by genmsg_py from TeleportAbsoluteResponse.msg. Do not edit.""" 00116 import roslib.message 00117 import struct 00118 00119 00120 class TeleportAbsoluteResponse(roslib.message.Message): 00121 _md5sum = "d41d8cd98f00b204e9800998ecf8427e" 00122 _type = "turtlesim/TeleportAbsoluteResponse" 00123 _has_header = False #flag to mark the presence of a Header object 00124 _full_text = """ 00125 00126 """ 00127 __slots__ = [] 00128 _slot_types = [] 00129 00130 def __init__(self, *args, **kwds): 00131 """ 00132 Constructor. Any message fields that are implicitly/explicitly 00133 set to None will be assigned a default value. The recommend 00134 use is keyword arguments as this is more robust to future message 00135 changes. You cannot mix in-order arguments and keyword arguments. 00136 00137 The available fields are: 00138 00139 00140 @param args: complete set of field values, in .msg order 00141 @param kwds: use keyword arguments corresponding to message field names 00142 to set specific fields. 00143 """ 00144 if args or kwds: 00145 super(TeleportAbsoluteResponse, self).__init__(*args, **kwds) 00146 00147 def _get_types(self): 00148 """ 00149 internal API method 00150 """ 00151 return self._slot_types 00152 00153 def serialize(self, buff): 00154 """ 00155 serialize message into buffer 00156 @param buff: buffer 00157 @type buff: StringIO 00158 """ 00159 try: 00160 pass 00161 except struct.error as se: self._check_types(se) 00162 except TypeError as te: self._check_types(te) 00163 00164 def deserialize(self, str): 00165 """ 00166 unpack serialized message in str into this message instance 00167 @param str: byte array of serialized message 00168 @type str: str 00169 """ 00170 try: 00171 end = 0 00172 return self 00173 except struct.error as e: 00174 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00175 00176 00177 def serialize_numpy(self, buff, numpy): 00178 """ 00179 serialize message with numpy array types into buffer 00180 @param buff: buffer 00181 @type buff: StringIO 00182 @param numpy: numpy python module 00183 @type numpy module 00184 """ 00185 try: 00186 pass 00187 except struct.error as se: self._check_types(se) 00188 except TypeError as te: self._check_types(te) 00189 00190 def deserialize_numpy(self, str, numpy): 00191 """ 00192 unpack serialized message in str into this message instance using numpy for array types 00193 @param str: byte array of serialized message 00194 @type str: str 00195 @param numpy: numpy python module 00196 @type numpy: module 00197 """ 00198 try: 00199 end = 0 00200 return self 00201 except struct.error as e: 00202 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00203 00204 _struct_I = roslib.message.struct_I 00205 class TeleportAbsolute(roslib.message.ServiceDefinition): 00206 _type = 'turtlesim/TeleportAbsolute' 00207 _md5sum = 'a130bc60ee6513855dc62ea83fcc5b20' 00208 _request_class = TeleportAbsoluteRequest 00209 _response_class = TeleportAbsoluteResponse