_SymbolGroundingScanBaseRegion.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingScanBaseRegionRequest.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 SymbolGroundingScanBaseRegionRequest(genpy.Message):
00011   _md5sum = "23cc208c15dce6f450656fc4c209b68c"
00012   _type = "srs_symbolic_grounding/SymbolGroundingScanBaseRegionRequest"
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(SymbolGroundingScanBaseRegionRequest, 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/SymbolGroundingScanBaseRegionResponse.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 SymbolGroundingScanBaseRegionResponse(genpy.Message):
00231   _md5sum = "336c916541002c9b5379743669a22b3f"
00232   _type = "srs_symbolic_grounding/SymbolGroundingScanBaseRegionResponse"
00233   _has_header = False #flag to mark the presence of a Header object
00234   _full_text = """geometry_msgs/Pose2D[] scan_base_pose_list
00235 float32 R
00236 
00237 
00238 
00239 
00240 
00241 ================================================================================
00242 MSG: geometry_msgs/Pose2D
00243 # This expresses a position and orientation on a 2D manifold.
00244 
00245 float64 x
00246 float64 y
00247 float64 theta
00248 """
00249   __slots__ = ['scan_base_pose_list','R']
00250   _slot_types = ['geometry_msgs/Pose2D[]','float32']
00251 
00252   def __init__(self, *args, **kwds):
00253     """
00254     Constructor. Any message fields that are implicitly/explicitly
00255     set to None will be assigned a default value. The recommend
00256     use is keyword arguments as this is more robust to future message
00257     changes.  You cannot mix in-order arguments and keyword arguments.
00258 
00259     The available fields are:
00260        scan_base_pose_list,R
00261 
00262     :param args: complete set of field values, in .msg order
00263     :param kwds: use keyword arguments corresponding to message field names
00264     to set specific fields.
00265     """
00266     if args or kwds:
00267       super(SymbolGroundingScanBaseRegionResponse, self).__init__(*args, **kwds)
00268       #message fields cannot be None, assign default values for those that are
00269       if self.scan_base_pose_list is None:
00270         self.scan_base_pose_list = []
00271       if self.R is None:
00272         self.R = 0.
00273     else:
00274       self.scan_base_pose_list = []
00275       self.R = 0.
00276 
00277   def _get_types(self):
00278     """
00279     internal API method
00280     """
00281     return self._slot_types
00282 
00283   def serialize(self, buff):
00284     """
00285     serialize message into buffer
00286     :param buff: buffer, ``StringIO``
00287     """
00288     try:
00289       length = len(self.scan_base_pose_list)
00290       buff.write(_struct_I.pack(length))
00291       for val1 in self.scan_base_pose_list:
00292         _x = val1
00293         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00294       buff.write(_struct_f.pack(self.R))
00295     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00296     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00297 
00298   def deserialize(self, str):
00299     """
00300     unpack serialized message in str into this message instance
00301     :param str: byte array of serialized message, ``str``
00302     """
00303     try:
00304       if self.scan_base_pose_list is None:
00305         self.scan_base_pose_list = None
00306       end = 0
00307       start = end
00308       end += 4
00309       (length,) = _struct_I.unpack(str[start:end])
00310       self.scan_base_pose_list = []
00311       for i in range(0, length):
00312         val1 = geometry_msgs.msg.Pose2D()
00313         _x = val1
00314         start = end
00315         end += 24
00316         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00317         self.scan_base_pose_list.append(val1)
00318       start = end
00319       end += 4
00320       (self.R,) = _struct_f.unpack(str[start:end])
00321       return self
00322     except struct.error as e:
00323       raise genpy.DeserializationError(e) #most likely buffer underfill
00324 
00325 
00326   def serialize_numpy(self, buff, numpy):
00327     """
00328     serialize message with numpy array types into buffer
00329     :param buff: buffer, ``StringIO``
00330     :param numpy: numpy python 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(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00340     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
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, ``str``
00346     :param numpy: numpy python module
00347     """
00348     try:
00349       if self.scan_base_pose_list is None:
00350         self.scan_base_pose_list = None
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 genpy.DeserializationError(e) #most likely buffer underfill
00369 
00370 _struct_I = genpy.struct_I
00371 _struct_f = struct.Struct("<f")
00372 _struct_3d = struct.Struct("<3d")
00373 class SymbolGroundingScanBaseRegion(object):
00374   _type          = 'srs_symbolic_grounding/SymbolGroundingScanBaseRegion'
00375   _md5sum = 'f3a35a97f0108a9ffe2888b385d0e10a'
00376   _request_class  = SymbolGroundingScanBaseRegionRequest
00377   _response_class = SymbolGroundingScanBaseRegionResponse


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