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