_SymbolGroundingScanBasePose.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingScanBasePoseRequest.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 SymbolGroundingScanBasePoseRequest(genpy.Message):
00011   _md5sum = "23cc208c15dce6f450656fc4c209b68c"
00012   _type = "srs_symbolic_grounding/SymbolGroundingScanBasePoseRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """
00015 
00016 srs_msgs/SRSSpatialInfo parent_obj_geometry
00017 srs_msgs/SRSSpatialInfo[] furniture_geometry_list
00018 
00019 ================================================================================
00020 MSG: srs_msgs/SRSSpatialInfo
00021 # Point point
00022 # Orientation angles
00023 float32 l
00024 float32 w
00025 float32 h
00026 
00027 geometry_msgs/Pose pose
00028 
00029 ================================================================================
00030 MSG: geometry_msgs/Pose
00031 # A representation of pose in free space, composed of postion and orientation. 
00032 Point position
00033 Quaternion orientation
00034 
00035 ================================================================================
00036 MSG: geometry_msgs/Point
00037 # This contains the position of a point in free space
00038 float64 x
00039 float64 y
00040 float64 z
00041 
00042 ================================================================================
00043 MSG: geometry_msgs/Quaternion
00044 # This represents an orientation in free space in quaternion form.
00045 
00046 float64 x
00047 float64 y
00048 float64 z
00049 float64 w
00050 
00051 """
00052   __slots__ = ['parent_obj_geometry','furniture_geometry_list']
00053   _slot_types = ['srs_msgs/SRSSpatialInfo','srs_msgs/SRSSpatialInfo[]']
00054 
00055   def __init__(self, *args, **kwds):
00056     """
00057     Constructor. Any message fields that are implicitly/explicitly
00058     set to None will be assigned a default value. The recommend
00059     use is keyword arguments as this is more robust to future message
00060     changes.  You cannot mix in-order arguments and keyword arguments.
00061 
00062     The available fields are:
00063        parent_obj_geometry,furniture_geometry_list
00064 
00065     :param args: complete set of field values, in .msg order
00066     :param kwds: use keyword arguments corresponding to message field names
00067     to set specific fields.
00068     """
00069     if args or kwds:
00070       super(SymbolGroundingScanBasePoseRequest, self).__init__(*args, **kwds)
00071       #message fields cannot be None, assign default values for those that are
00072       if self.parent_obj_geometry is None:
00073         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00074       if self.furniture_geometry_list is None:
00075         self.furniture_geometry_list = []
00076     else:
00077       self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00078       self.furniture_geometry_list = []
00079 
00080   def _get_types(self):
00081     """
00082     internal API method
00083     """
00084     return self._slot_types
00085 
00086   def serialize(self, buff):
00087     """
00088     serialize message into buffer
00089     :param buff: buffer, ``StringIO``
00090     """
00091     try:
00092       _x = self
00093       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))
00094       length = len(self.furniture_geometry_list)
00095       buff.write(_struct_I.pack(length))
00096       for val1 in self.furniture_geometry_list:
00097         _x = val1
00098         buff.write(_struct_3f.pack(_x.l, _x.w, _x.h))
00099         _v1 = val1.pose
00100         _v2 = _v1.position
00101         _x = _v2
00102         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00103         _v3 = _v1.orientation
00104         _x = _v3
00105         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00106     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00107     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00108 
00109   def deserialize(self, str):
00110     """
00111     unpack serialized message in str into this message instance
00112     :param str: byte array of serialized message, ``str``
00113     """
00114     try:
00115       if self.parent_obj_geometry is None:
00116         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00117       if self.furniture_geometry_list is None:
00118         self.furniture_geometry_list = None
00119       end = 0
00120       _x = self
00121       start = end
00122       end += 68
00123       (_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])
00124       start = end
00125       end += 4
00126       (length,) = _struct_I.unpack(str[start:end])
00127       self.furniture_geometry_list = []
00128       for i in range(0, length):
00129         val1 = srs_msgs.msg.SRSSpatialInfo()
00130         _x = val1
00131         start = end
00132         end += 12
00133         (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end])
00134         _v4 = val1.pose
00135         _v5 = _v4.position
00136         _x = _v5
00137         start = end
00138         end += 24
00139         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00140         _v6 = _v4.orientation
00141         _x = _v6
00142         start = end
00143         end += 32
00144         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00145         self.furniture_geometry_list.append(val1)
00146       return self
00147     except struct.error as e:
00148       raise genpy.DeserializationError(e) #most likely buffer underfill
00149 
00150 
00151   def serialize_numpy(self, buff, numpy):
00152     """
00153     serialize message with numpy array types into buffer
00154     :param buff: buffer, ``StringIO``
00155     :param numpy: numpy python 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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00173     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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, ``str``
00179     :param numpy: numpy python module
00180     """
00181     try:
00182       if self.parent_obj_geometry is None:
00183         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00184       if self.furniture_geometry_list is None:
00185         self.furniture_geometry_list = None
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 genpy.DeserializationError(e) #most likely buffer underfill
00216 
00217 _struct_I = genpy.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 genpy from srs_symbolic_grounding/SymbolGroundingScanBasePoseResponse.msg. Do not edit."""
00223 import sys
00224 python3 = True if sys.hexversion > 0x03000000 else False
00225 import genpy
00226 import struct
00227 
00228 import geometry_msgs.msg
00229 
00230 class SymbolGroundingScanBasePoseResponse(genpy.Message):
00231   _md5sum = "66b4de75c1cdba6b484a2621de9dc0d6"
00232   _type = "srs_symbolic_grounding/SymbolGroundingScanBasePoseResponse"
00233   _has_header = False #flag to mark the presence of a Header object
00234   _full_text = """geometry_msgs/Pose2D[] scan_base_pose_list
00235 
00236 
00237 
00238 
00239 
00240 ================================================================================
00241 MSG: geometry_msgs/Pose2D
00242 # This expresses a position and orientation on a 2D manifold.
00243 
00244 float64 x
00245 float64 y
00246 float64 theta
00247 """
00248   __slots__ = ['scan_base_pose_list']
00249   _slot_types = ['geometry_msgs/Pose2D[]']
00250 
00251   def __init__(self, *args, **kwds):
00252     """
00253     Constructor. Any message fields that are implicitly/explicitly
00254     set to None will be assigned a default value. The recommend
00255     use is keyword arguments as this is more robust to future message
00256     changes.  You cannot mix in-order arguments and keyword arguments.
00257 
00258     The available fields are:
00259        scan_base_pose_list
00260 
00261     :param args: complete set of field values, in .msg order
00262     :param kwds: use keyword arguments corresponding to message field names
00263     to set specific fields.
00264     """
00265     if args or kwds:
00266       super(SymbolGroundingScanBasePoseResponse, self).__init__(*args, **kwds)
00267       #message fields cannot be None, assign default values for those that are
00268       if self.scan_base_pose_list is None:
00269         self.scan_base_pose_list = []
00270     else:
00271       self.scan_base_pose_list = []
00272 
00273   def _get_types(self):
00274     """
00275     internal API method
00276     """
00277     return self._slot_types
00278 
00279   def serialize(self, buff):
00280     """
00281     serialize message into buffer
00282     :param buff: buffer, ``StringIO``
00283     """
00284     try:
00285       length = len(self.scan_base_pose_list)
00286       buff.write(_struct_I.pack(length))
00287       for val1 in self.scan_base_pose_list:
00288         _x = val1
00289         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00290     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00291     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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, ``str``
00297     """
00298     try:
00299       if self.scan_base_pose_list is None:
00300         self.scan_base_pose_list = None
00301       end = 0
00302       start = end
00303       end += 4
00304       (length,) = _struct_I.unpack(str[start:end])
00305       self.scan_base_pose_list = []
00306       for i in range(0, length):
00307         val1 = geometry_msgs.msg.Pose2D()
00308         _x = val1
00309         start = end
00310         end += 24
00311         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00312         self.scan_base_pose_list.append(val1)
00313       return self
00314     except struct.error as e:
00315       raise genpy.DeserializationError(e) #most likely buffer underfill
00316 
00317 
00318   def serialize_numpy(self, buff, numpy):
00319     """
00320     serialize message with numpy array types into buffer
00321     :param buff: buffer, ``StringIO``
00322     :param numpy: numpy python 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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00331     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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, ``str``
00337     :param numpy: numpy python module
00338     """
00339     try:
00340       if self.scan_base_pose_list is None:
00341         self.scan_base_pose_list = None
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 genpy.DeserializationError(e) #most likely buffer underfill
00357 
00358 _struct_I = genpy.struct_I
00359 _struct_3d = struct.Struct("<3d")
00360 class SymbolGroundingScanBasePose(object):
00361   _type          = 'srs_symbolic_grounding/SymbolGroundingScanBasePose'
00362   _md5sum = '5b734f5eb1ee3323ec23158f8e5349f6'
00363   _request_class  = SymbolGroundingScanBasePoseRequest
00364   _response_class = SymbolGroundingScanBasePoseResponse


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