$search
00001 """autogenerated by genmsg_py from ActionInfoRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class ActionInfoRequest(roslib.message.Message): 00007 _md5sum = "967d0b0c0d858ded8a6a69abbce0c981" 00008 _type = "pr2_object_manipulation_msgs/ActionInfoRequest" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """string group_name 00011 00012 """ 00013 __slots__ = ['group_name'] 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 group_name 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(ActionInfoRequest, self).__init__(*args, **kwds) 00032 #message fields cannot be None, assign default values for those that are 00033 if self.group_name is None: 00034 self.group_name = '' 00035 else: 00036 self.group_name = '' 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.group_name 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.group_name = 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.group_name 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.group_name = 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 ActionInfoResponse.msg. Do not edit.""" 00113 import roslib.message 00114 import struct 00115 00116 00117 class ActionInfoResponse(roslib.message.Message): 00118 _md5sum = "e44a7e7bcb900acadbcc28b132378f0c" 00119 _type = "pr2_object_manipulation_msgs/ActionInfoResponse" 00120 _has_header = False #flag to mark the presence of a Header object 00121 _full_text = """string[] services 00122 00123 00124 """ 00125 __slots__ = ['services'] 00126 _slot_types = ['string[]'] 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 services 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(ActionInfoResponse, self).__init__(*args, **kwds) 00144 #message fields cannot be None, assign default values for those that are 00145 if self.services is None: 00146 self.services = [] 00147 else: 00148 self.services = [] 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 length = len(self.services) 00164 buff.write(_struct_I.pack(length)) 00165 for val1 in self.services: 00166 length = len(val1) 00167 buff.write(struct.pack('<I%ss'%length, length, val1)) 00168 except struct.error as se: self._check_types(se) 00169 except TypeError as te: self._check_types(te) 00170 00171 def deserialize(self, str): 00172 """ 00173 unpack serialized message in str into this message instance 00174 @param str: byte array of serialized message 00175 @type str: str 00176 """ 00177 try: 00178 end = 0 00179 start = end 00180 end += 4 00181 (length,) = _struct_I.unpack(str[start:end]) 00182 self.services = [] 00183 for i in range(0, length): 00184 start = end 00185 end += 4 00186 (length,) = _struct_I.unpack(str[start:end]) 00187 start = end 00188 end += length 00189 val1 = str[start:end] 00190 self.services.append(val1) 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 length = len(self.services) 00206 buff.write(_struct_I.pack(length)) 00207 for val1 in self.services: 00208 length = len(val1) 00209 buff.write(struct.pack('<I%ss'%length, length, val1)) 00210 except struct.error as se: self._check_types(se) 00211 except TypeError as te: self._check_types(te) 00212 00213 def deserialize_numpy(self, str, numpy): 00214 """ 00215 unpack serialized message in str into this message instance using numpy for array types 00216 @param str: byte array of serialized message 00217 @type str: str 00218 @param numpy: numpy python module 00219 @type numpy: module 00220 """ 00221 try: 00222 end = 0 00223 start = end 00224 end += 4 00225 (length,) = _struct_I.unpack(str[start:end]) 00226 self.services = [] 00227 for i in range(0, length): 00228 start = end 00229 end += 4 00230 (length,) = _struct_I.unpack(str[start:end]) 00231 start = end 00232 end += length 00233 val1 = str[start:end] 00234 self.services.append(val1) 00235 return self 00236 except struct.error as e: 00237 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00238 00239 _struct_I = roslib.message.struct_I 00240 class ActionInfo(roslib.message.ServiceDefinition): 00241 _type = 'pr2_object_manipulation_msgs/ActionInfo' 00242 _md5sum = 'b4dcbce28f871a5e7ff4303d2b46d67c' 00243 _request_class = ActionInfoRequest 00244 _response_class = ActionInfoResponse