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