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