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