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