$search
00001 """autogenerated by genmsg_py from SymbolGroundingScanBaseRegionRequest.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 SymbolGroundingScanBaseRegionRequest(roslib.message.Message): 00009 _md5sum = "23cc208c15dce6f450656fc4c209b68c" 00010 _type = "srs_symbolic_grounding/SymbolGroundingScanBaseRegionRequest" 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(SymbolGroundingScanBaseRegionRequest, 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 SymbolGroundingScanBaseRegionResponse.msg. Do not edit.""" 00223 import roslib.message 00224 import struct 00225 00226 import geometry_msgs.msg 00227 00228 class SymbolGroundingScanBaseRegionResponse(roslib.message.Message): 00229 _md5sum = "336c916541002c9b5379743669a22b3f" 00230 _type = "srs_symbolic_grounding/SymbolGroundingScanBaseRegionResponse" 00231 _has_header = False #flag to mark the presence of a Header object 00232 _full_text = """geometry_msgs/Pose2D[] scan_base_pose_list 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__ = ['scan_base_pose_list','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 scan_base_pose_list,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(SymbolGroundingScanBaseRegionResponse, self).__init__(*args, **kwds) 00266 #message fields cannot be None, assign default values for those that are 00267 if self.scan_base_pose_list is None: 00268 self.scan_base_pose_list = [] 00269 if self.R is None: 00270 self.R = 0. 00271 else: 00272 self.scan_base_pose_list = [] 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 length = len(self.scan_base_pose_list) 00289 buff.write(_struct_I.pack(length)) 00290 for val1 in self.scan_base_pose_list: 00291 _x = val1 00292 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00293 buff.write(_struct_f.pack(self.R)) 00294 except struct.error as se: self._check_types(se) 00295 except TypeError as te: self._check_types(te) 00296 00297 def deserialize(self, str): 00298 """ 00299 unpack serialized message in str into this message instance 00300 @param str: byte array of serialized message 00301 @type str: str 00302 """ 00303 try: 00304 end = 0 00305 start = end 00306 end += 4 00307 (length,) = _struct_I.unpack(str[start:end]) 00308 self.scan_base_pose_list = [] 00309 for i in range(0, length): 00310 val1 = geometry_msgs.msg.Pose2D() 00311 _x = val1 00312 start = end 00313 end += 24 00314 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00315 self.scan_base_pose_list.append(val1) 00316 start = end 00317 end += 4 00318 (self.R,) = _struct_f.unpack(str[start:end]) 00319 return self 00320 except struct.error as e: 00321 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00322 00323 00324 def serialize_numpy(self, buff, numpy): 00325 """ 00326 serialize message with numpy array types into buffer 00327 @param buff: buffer 00328 @type buff: StringIO 00329 @param numpy: numpy python module 00330 @type numpy module 00331 """ 00332 try: 00333 length = len(self.scan_base_pose_list) 00334 buff.write(_struct_I.pack(length)) 00335 for val1 in self.scan_base_pose_list: 00336 _x = val1 00337 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00338 buff.write(_struct_f.pack(self.R)) 00339 except struct.error as se: self._check_types(se) 00340 except TypeError as te: self._check_types(te) 00341 00342 def deserialize_numpy(self, str, numpy): 00343 """ 00344 unpack serialized message in str into this message instance using numpy for array types 00345 @param str: byte array of serialized message 00346 @type str: str 00347 @param numpy: numpy python module 00348 @type numpy: module 00349 """ 00350 try: 00351 end = 0 00352 start = end 00353 end += 4 00354 (length,) = _struct_I.unpack(str[start:end]) 00355 self.scan_base_pose_list = [] 00356 for i in range(0, length): 00357 val1 = geometry_msgs.msg.Pose2D() 00358 _x = val1 00359 start = end 00360 end += 24 00361 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00362 self.scan_base_pose_list.append(val1) 00363 start = end 00364 end += 4 00365 (self.R,) = _struct_f.unpack(str[start:end]) 00366 return self 00367 except struct.error as e: 00368 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00369 00370 _struct_I = roslib.message.struct_I 00371 _struct_f = struct.Struct("<f") 00372 _struct_3d = struct.Struct("<3d") 00373 class SymbolGroundingScanBaseRegion(roslib.message.ServiceDefinition): 00374 _type = 'srs_symbolic_grounding/SymbolGroundingScanBaseRegion' 00375 _md5sum = 'f3a35a97f0108a9ffe2888b385d0e10a' 00376 _request_class = SymbolGroundingScanBaseRegionRequest 00377 _response_class = SymbolGroundingScanBaseRegionResponse