$search
00001 """autogenerated by genmsg_py from SymbolGroundingExploreBasePoseRequest.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import geometry_msgs.msg 00006 import srs_msgs.msg 00007 00008 class SymbolGroundingExploreBasePoseRequest(roslib.message.Message): 00009 _md5sum = "23cc208c15dce6f450656fc4c209b68c" 00010 _type = "srs_symbolic_grounding/SymbolGroundingExploreBasePoseRequest" 00011 _has_header = False #flag to mark the presence of a Header object 00012 _full_text = """srs_msgs/SRSSpatialInfo parent_obj_geometry 00013 srs_msgs/SRSSpatialInfo[] furniture_geometry_list 00014 00015 ================================================================================ 00016 MSG: srs_msgs/SRSSpatialInfo 00017 # Point point 00018 # Orientation angles 00019 float32 l 00020 float32 w 00021 float32 h 00022 00023 geometry_msgs/Pose pose 00024 00025 ================================================================================ 00026 MSG: geometry_msgs/Pose 00027 # A representation of pose in free space, composed of postion and orientation. 00028 Point position 00029 Quaternion orientation 00030 00031 ================================================================================ 00032 MSG: geometry_msgs/Point 00033 # This contains the position of a point in free space 00034 float64 x 00035 float64 y 00036 float64 z 00037 00038 ================================================================================ 00039 MSG: geometry_msgs/Quaternion 00040 # This represents an orientation in free space in quaternion form. 00041 00042 float64 x 00043 float64 y 00044 float64 z 00045 float64 w 00046 00047 """ 00048 __slots__ = ['parent_obj_geometry','furniture_geometry_list'] 00049 _slot_types = ['srs_msgs/SRSSpatialInfo','srs_msgs/SRSSpatialInfo[]'] 00050 00051 def __init__(self, *args, **kwds): 00052 """ 00053 Constructor. Any message fields that are implicitly/explicitly 00054 set to None will be assigned a default value. The recommend 00055 use is keyword arguments as this is more robust to future message 00056 changes. You cannot mix in-order arguments and keyword arguments. 00057 00058 The available fields are: 00059 parent_obj_geometry,furniture_geometry_list 00060 00061 @param args: complete set of field values, in .msg order 00062 @param kwds: use keyword arguments corresponding to message field names 00063 to set specific fields. 00064 """ 00065 if args or kwds: 00066 super(SymbolGroundingExploreBasePoseRequest, self).__init__(*args, **kwds) 00067 #message fields cannot be None, assign default values for those that are 00068 if self.parent_obj_geometry is None: 00069 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo() 00070 if self.furniture_geometry_list is None: 00071 self.furniture_geometry_list = [] 00072 else: 00073 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo() 00074 self.furniture_geometry_list = [] 00075 00076 def _get_types(self): 00077 """ 00078 internal API method 00079 """ 00080 return self._slot_types 00081 00082 def serialize(self, buff): 00083 """ 00084 serialize message into buffer 00085 @param buff: buffer 00086 @type buff: StringIO 00087 """ 00088 try: 00089 _x = self 00090 buff.write(_struct_3f7d.pack(_x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w)) 00091 length = len(self.furniture_geometry_list) 00092 buff.write(_struct_I.pack(length)) 00093 for val1 in self.furniture_geometry_list: 00094 _x = val1 00095 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h)) 00096 _v1 = val1.pose 00097 _v2 = _v1.position 00098 _x = _v2 00099 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00100 _v3 = _v1.orientation 00101 _x = _v3 00102 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00103 except struct.error as se: self._check_types(se) 00104 except TypeError as te: self._check_types(te) 00105 00106 def deserialize(self, str): 00107 """ 00108 unpack serialized message in str into this message instance 00109 @param str: byte array of serialized message 00110 @type str: str 00111 """ 00112 try: 00113 if self.parent_obj_geometry is None: 00114 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo() 00115 end = 0 00116 _x = self 00117 start = end 00118 end += 68 00119 (_x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w,) = _struct_3f7d.unpack(str[start:end]) 00120 start = end 00121 end += 4 00122 (length,) = _struct_I.unpack(str[start:end]) 00123 self.furniture_geometry_list = [] 00124 for i in range(0, length): 00125 val1 = srs_msgs.msg.SRSSpatialInfo() 00126 _x = val1 00127 start = end 00128 end += 12 00129 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end]) 00130 _v4 = val1.pose 00131 _v5 = _v4.position 00132 _x = _v5 00133 start = end 00134 end += 24 00135 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00136 _v6 = _v4.orientation 00137 _x = _v6 00138 start = end 00139 end += 32 00140 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00141 self.furniture_geometry_list.append(val1) 00142 return self 00143 except struct.error as e: 00144 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00145 00146 00147 def serialize_numpy(self, buff, numpy): 00148 """ 00149 serialize message with numpy array types into buffer 00150 @param buff: buffer 00151 @type buff: StringIO 00152 @param numpy: numpy python module 00153 @type numpy module 00154 """ 00155 try: 00156 _x = self 00157 buff.write(_struct_3f7d.pack(_x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w)) 00158 length = len(self.furniture_geometry_list) 00159 buff.write(_struct_I.pack(length)) 00160 for val1 in self.furniture_geometry_list: 00161 _x = val1 00162 buff.write(_struct_3f.pack(_x.l, _x.w, _x.h)) 00163 _v7 = val1.pose 00164 _v8 = _v7.position 00165 _x = _v8 00166 buff.write(_struct_3d.pack(_x.x, _x.y, _x.z)) 00167 _v9 = _v7.orientation 00168 _x = _v9 00169 buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w)) 00170 except struct.error as se: self._check_types(se) 00171 except TypeError as te: self._check_types(te) 00172 00173 def deserialize_numpy(self, str, numpy): 00174 """ 00175 unpack serialized message in str into this message instance using numpy for array types 00176 @param str: byte array of serialized message 00177 @type str: str 00178 @param numpy: numpy python module 00179 @type numpy: module 00180 """ 00181 try: 00182 if self.parent_obj_geometry is None: 00183 self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo() 00184 end = 0 00185 _x = self 00186 start = end 00187 end += 68 00188 (_x.parent_obj_geometry.l, _x.parent_obj_geometry.w, _x.parent_obj_geometry.h, _x.parent_obj_geometry.pose.position.x, _x.parent_obj_geometry.pose.position.y, _x.parent_obj_geometry.pose.position.z, _x.parent_obj_geometry.pose.orientation.x, _x.parent_obj_geometry.pose.orientation.y, _x.parent_obj_geometry.pose.orientation.z, _x.parent_obj_geometry.pose.orientation.w,) = _struct_3f7d.unpack(str[start:end]) 00189 start = end 00190 end += 4 00191 (length,) = _struct_I.unpack(str[start:end]) 00192 self.furniture_geometry_list = [] 00193 for i in range(0, length): 00194 val1 = srs_msgs.msg.SRSSpatialInfo() 00195 _x = val1 00196 start = end 00197 end += 12 00198 (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end]) 00199 _v10 = val1.pose 00200 _v11 = _v10.position 00201 _x = _v11 00202 start = end 00203 end += 24 00204 (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end]) 00205 _v12 = _v10.orientation 00206 _x = _v12 00207 start = end 00208 end += 32 00209 (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end]) 00210 self.furniture_geometry_list.append(val1) 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_4d = struct.Struct("<4d") 00217 _struct_3f = struct.Struct("<3f") 00218 _struct_3f7d = struct.Struct("<3f7d") 00219 _struct_3d = struct.Struct("<3d") 00220 """autogenerated by genmsg_py from SymbolGroundingExploreBasePoseResponse.msg. Do not edit.""" 00221 import roslib.message 00222 import struct 00223 00224 import geometry_msgs.msg 00225 00226 class SymbolGroundingExploreBasePoseResponse(roslib.message.Message): 00227 _md5sum = "769d7fb980986ff55d6f22225f033b69" 00228 _type = "srs_symbolic_grounding/SymbolGroundingExploreBasePoseResponse" 00229 _has_header = False #flag to mark the presence of a Header object 00230 _full_text = """geometry_msgs/Pose2D[] explore_base_pose_list 00231 00232 00233 00234 00235 00236 ================================================================================ 00237 MSG: geometry_msgs/Pose2D 00238 # This expresses a position and orientation on a 2D manifold. 00239 00240 float64 x 00241 float64 y 00242 float64 theta 00243 """ 00244 __slots__ = ['explore_base_pose_list'] 00245 _slot_types = ['geometry_msgs/Pose2D[]'] 00246 00247 def __init__(self, *args, **kwds): 00248 """ 00249 Constructor. Any message fields that are implicitly/explicitly 00250 set to None will be assigned a default value. The recommend 00251 use is keyword arguments as this is more robust to future message 00252 changes. You cannot mix in-order arguments and keyword arguments. 00253 00254 The available fields are: 00255 explore_base_pose_list 00256 00257 @param args: complete set of field values, in .msg order 00258 @param kwds: use keyword arguments corresponding to message field names 00259 to set specific fields. 00260 """ 00261 if args or kwds: 00262 super(SymbolGroundingExploreBasePoseResponse, self).__init__(*args, **kwds) 00263 #message fields cannot be None, assign default values for those that are 00264 if self.explore_base_pose_list is None: 00265 self.explore_base_pose_list = [] 00266 else: 00267 self.explore_base_pose_list = [] 00268 00269 def _get_types(self): 00270 """ 00271 internal API method 00272 """ 00273 return self._slot_types 00274 00275 def serialize(self, buff): 00276 """ 00277 serialize message into buffer 00278 @param buff: buffer 00279 @type buff: StringIO 00280 """ 00281 try: 00282 length = len(self.explore_base_pose_list) 00283 buff.write(_struct_I.pack(length)) 00284 for val1 in self.explore_base_pose_list: 00285 _x = val1 00286 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00287 except struct.error as se: self._check_types(se) 00288 except TypeError as te: self._check_types(te) 00289 00290 def deserialize(self, str): 00291 """ 00292 unpack serialized message in str into this message instance 00293 @param str: byte array of serialized message 00294 @type str: str 00295 """ 00296 try: 00297 end = 0 00298 start = end 00299 end += 4 00300 (length,) = _struct_I.unpack(str[start:end]) 00301 self.explore_base_pose_list = [] 00302 for i in range(0, length): 00303 val1 = geometry_msgs.msg.Pose2D() 00304 _x = val1 00305 start = end 00306 end += 24 00307 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00308 self.explore_base_pose_list.append(val1) 00309 return self 00310 except struct.error as e: 00311 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00312 00313 00314 def serialize_numpy(self, buff, numpy): 00315 """ 00316 serialize message with numpy array types into buffer 00317 @param buff: buffer 00318 @type buff: StringIO 00319 @param numpy: numpy python module 00320 @type numpy module 00321 """ 00322 try: 00323 length = len(self.explore_base_pose_list) 00324 buff.write(_struct_I.pack(length)) 00325 for val1 in self.explore_base_pose_list: 00326 _x = val1 00327 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00328 except struct.error as se: self._check_types(se) 00329 except TypeError as te: self._check_types(te) 00330 00331 def deserialize_numpy(self, str, numpy): 00332 """ 00333 unpack serialized message in str into this message instance using numpy for array types 00334 @param str: byte array of serialized message 00335 @type str: str 00336 @param numpy: numpy python module 00337 @type numpy: module 00338 """ 00339 try: 00340 end = 0 00341 start = end 00342 end += 4 00343 (length,) = _struct_I.unpack(str[start:end]) 00344 self.explore_base_pose_list = [] 00345 for i in range(0, length): 00346 val1 = geometry_msgs.msg.Pose2D() 00347 _x = val1 00348 start = end 00349 end += 24 00350 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00351 self.explore_base_pose_list.append(val1) 00352 return self 00353 except struct.error as e: 00354 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00355 00356 _struct_I = roslib.message.struct_I 00357 _struct_3d = struct.Struct("<3d") 00358 class SymbolGroundingExploreBasePose(roslib.message.ServiceDefinition): 00359 _type = 'srs_symbolic_grounding/SymbolGroundingExploreBasePose' 00360 _md5sum = '159a1f856b1040c3078859c07478c7c0' 00361 _request_class = SymbolGroundingExploreBasePoseRequest 00362 _response_class = SymbolGroundingExploreBasePoseResponse