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