$search
00001 """autogenerated by genmsg_py from SymbolGroundingScanBasePoseRequest.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 SymbolGroundingScanBasePoseRequest(roslib.message.Message): 00009 _md5sum = "23cc208c15dce6f450656fc4c209b68c" 00010 _type = "srs_symbolic_grounding/SymbolGroundingScanBasePoseRequest" 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(SymbolGroundingScanBasePoseRequest, 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 SymbolGroundingScanBasePoseResponse.msg. Do not edit.""" 00223 import roslib.message 00224 import struct 00225 00226 import geometry_msgs.msg 00227 00228 class SymbolGroundingScanBasePoseResponse(roslib.message.Message): 00229 _md5sum = "66b4de75c1cdba6b484a2621de9dc0d6" 00230 _type = "srs_symbolic_grounding/SymbolGroundingScanBasePoseResponse" 00231 _has_header = False #flag to mark the presence of a Header object 00232 _full_text = """geometry_msgs/Pose2D[] scan_base_pose_list 00233 00234 00235 00236 00237 00238 ================================================================================ 00239 MSG: geometry_msgs/Pose2D 00240 # This expresses a position and orientation on a 2D manifold. 00241 00242 float64 x 00243 float64 y 00244 float64 theta 00245 """ 00246 __slots__ = ['scan_base_pose_list'] 00247 _slot_types = ['geometry_msgs/Pose2D[]'] 00248 00249 def __init__(self, *args, **kwds): 00250 """ 00251 Constructor. Any message fields that are implicitly/explicitly 00252 set to None will be assigned a default value. The recommend 00253 use is keyword arguments as this is more robust to future message 00254 changes. You cannot mix in-order arguments and keyword arguments. 00255 00256 The available fields are: 00257 scan_base_pose_list 00258 00259 @param args: complete set of field values, in .msg order 00260 @param kwds: use keyword arguments corresponding to message field names 00261 to set specific fields. 00262 """ 00263 if args or kwds: 00264 super(SymbolGroundingScanBasePoseResponse, self).__init__(*args, **kwds) 00265 #message fields cannot be None, assign default values for those that are 00266 if self.scan_base_pose_list is None: 00267 self.scan_base_pose_list = [] 00268 else: 00269 self.scan_base_pose_list = [] 00270 00271 def _get_types(self): 00272 """ 00273 internal API method 00274 """ 00275 return self._slot_types 00276 00277 def serialize(self, buff): 00278 """ 00279 serialize message into buffer 00280 @param buff: buffer 00281 @type buff: StringIO 00282 """ 00283 try: 00284 length = len(self.scan_base_pose_list) 00285 buff.write(_struct_I.pack(length)) 00286 for val1 in self.scan_base_pose_list: 00287 _x = val1 00288 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00289 except struct.error as se: self._check_types(se) 00290 except TypeError as te: self._check_types(te) 00291 00292 def deserialize(self, str): 00293 """ 00294 unpack serialized message in str into this message instance 00295 @param str: byte array of serialized message 00296 @type str: str 00297 """ 00298 try: 00299 end = 0 00300 start = end 00301 end += 4 00302 (length,) = _struct_I.unpack(str[start:end]) 00303 self.scan_base_pose_list = [] 00304 for i in range(0, length): 00305 val1 = geometry_msgs.msg.Pose2D() 00306 _x = val1 00307 start = end 00308 end += 24 00309 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00310 self.scan_base_pose_list.append(val1) 00311 return self 00312 except struct.error as e: 00313 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00314 00315 00316 def serialize_numpy(self, buff, numpy): 00317 """ 00318 serialize message with numpy array types into buffer 00319 @param buff: buffer 00320 @type buff: StringIO 00321 @param numpy: numpy python module 00322 @type numpy module 00323 """ 00324 try: 00325 length = len(self.scan_base_pose_list) 00326 buff.write(_struct_I.pack(length)) 00327 for val1 in self.scan_base_pose_list: 00328 _x = val1 00329 buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta)) 00330 except struct.error as se: self._check_types(se) 00331 except TypeError as te: self._check_types(te) 00332 00333 def deserialize_numpy(self, str, numpy): 00334 """ 00335 unpack serialized message in str into this message instance using numpy for array types 00336 @param str: byte array of serialized message 00337 @type str: str 00338 @param numpy: numpy python module 00339 @type numpy: module 00340 """ 00341 try: 00342 end = 0 00343 start = end 00344 end += 4 00345 (length,) = _struct_I.unpack(str[start:end]) 00346 self.scan_base_pose_list = [] 00347 for i in range(0, length): 00348 val1 = geometry_msgs.msg.Pose2D() 00349 _x = val1 00350 start = end 00351 end += 24 00352 (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end]) 00353 self.scan_base_pose_list.append(val1) 00354 return self 00355 except struct.error as e: 00356 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00357 00358 _struct_I = roslib.message.struct_I 00359 _struct_3d = struct.Struct("<3d") 00360 class SymbolGroundingScanBasePose(roslib.message.ServiceDefinition): 00361 _type = 'srs_symbolic_grounding/SymbolGroundingScanBasePose' 00362 _md5sum = '5b734f5eb1ee3323ec23158f8e5349f6' 00363 _request_class = SymbolGroundingScanBasePoseRequest 00364 _response_class = SymbolGroundingScanBasePoseResponse