_SymbolGroundingExploreBasePose.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingExploreBasePoseRequest.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006 
00007 import geometry_msgs.msg
00008 import srs_msgs.msg
00009 
00010 class SymbolGroundingExploreBasePoseRequest(genpy.Message):
00011   _md5sum = "23cc208c15dce6f450656fc4c209b68c"
00012   _type = "srs_symbolic_grounding/SymbolGroundingExploreBasePoseRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """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(SymbolGroundingExploreBasePoseRequest, 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, ``StringIO``
00088     """
00089     try:
00090       _x = self
00091       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))
00092       length = len(self.furniture_geometry_list)
00093       buff.write(_struct_I.pack(length))
00094       for val1 in self.furniture_geometry_list:
00095         _x = val1
00096         buff.write(_struct_3f.pack(_x.l, _x.w, _x.h))
00097         _v1 = val1.pose
00098         _v2 = _v1.position
00099         _x = _v2
00100         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00101         _v3 = _v1.orientation
00102         _x = _v3
00103         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00104     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00105     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00106 
00107   def deserialize(self, str):
00108     """
00109     unpack serialized message in str into this message instance
00110     :param str: byte array of serialized message, ``str``
00111     """
00112     try:
00113       if self.parent_obj_geometry is None:
00114         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00115       if self.furniture_geometry_list is None:
00116         self.furniture_geometry_list = None
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 genpy.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, ``StringIO``
00153     :param numpy: numpy python 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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00171     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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, ``str``
00177     :param numpy: numpy python module
00178     """
00179     try:
00180       if self.parent_obj_geometry is None:
00181         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00182       if self.furniture_geometry_list is None:
00183         self.furniture_geometry_list = None
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 genpy.DeserializationError(e) #most likely buffer underfill
00214 
00215 _struct_I = genpy.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 genpy from srs_symbolic_grounding/SymbolGroundingExploreBasePoseResponse.msg. Do not edit."""
00221 import sys
00222 python3 = True if sys.hexversion > 0x03000000 else False
00223 import genpy
00224 import struct
00225 
00226 import geometry_msgs.msg
00227 
00228 class SymbolGroundingExploreBasePoseResponse(genpy.Message):
00229   _md5sum = "769d7fb980986ff55d6f22225f033b69"
00230   _type = "srs_symbolic_grounding/SymbolGroundingExploreBasePoseResponse"
00231   _has_header = False #flag to mark the presence of a Header object
00232   _full_text = """geometry_msgs/Pose2D[] explore_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__ = ['explore_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        explore_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(SymbolGroundingExploreBasePoseResponse, self).__init__(*args, **kwds)
00265       #message fields cannot be None, assign default values for those that are
00266       if self.explore_base_pose_list is None:
00267         self.explore_base_pose_list = []
00268     else:
00269       self.explore_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, ``StringIO``
00281     """
00282     try:
00283       length = len(self.explore_base_pose_list)
00284       buff.write(_struct_I.pack(length))
00285       for val1 in self.explore_base_pose_list:
00286         _x = val1
00287         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00288     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00289     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00290 
00291   def deserialize(self, str):
00292     """
00293     unpack serialized message in str into this message instance
00294     :param str: byte array of serialized message, ``str``
00295     """
00296     try:
00297       if self.explore_base_pose_list is None:
00298         self.explore_base_pose_list = None
00299       end = 0
00300       start = end
00301       end += 4
00302       (length,) = _struct_I.unpack(str[start:end])
00303       self.explore_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.explore_base_pose_list.append(val1)
00311       return self
00312     except struct.error as e:
00313       raise genpy.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, ``StringIO``
00320     :param numpy: numpy python 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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00329     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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, ``str``
00335     :param numpy: numpy python module
00336     """
00337     try:
00338       if self.explore_base_pose_list is None:
00339         self.explore_base_pose_list = None
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 genpy.DeserializationError(e) #most likely buffer underfill
00355 
00356 _struct_I = genpy.struct_I
00357 _struct_3d = struct.Struct("<3d")
00358 class SymbolGroundingExploreBasePose(object):
00359   _type          = 'srs_symbolic_grounding/SymbolGroundingExploreBasePose'
00360   _md5sum = '159a1f856b1040c3078859c07478c7c0'
00361   _request_class  = SymbolGroundingExploreBasePoseRequest
00362   _response_class = SymbolGroundingExploreBasePoseResponse


srs_symbolic_grounding
Author(s): Beisheng Liu
autogenerated on Mon Oct 6 2014 08:23:09