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