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