_SymbolGroundingDeliverBaseRegion.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingDeliverBaseRegionRequest.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 SymbolGroundingDeliverBaseRegionRequest(genpy.Message):
00011   _md5sum = "23cc208c15dce6f450656fc4c209b68c"
00012   _type = "srs_symbolic_grounding/SymbolGroundingDeliverBaseRegionRequest"
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(SymbolGroundingDeliverBaseRegionRequest, 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(se)
00107     except TypeError as te: self._check_types(te)
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(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, ``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/SymbolGroundingDeliverBaseRegionResponse.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 SymbolGroundingDeliverBaseRegionResponse(genpy.Message):
00231   _md5sum = "35fceac223189b79e30fef6faae61e1e"
00232   _type = "srs_symbolic_grounding/SymbolGroundingDeliverBaseRegionResponse"
00233   _has_header = False #flag to mark the presence of a Header object
00234   _full_text = """geometry_msgs/Pose2D deliver_base_pose
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__ = ['deliver_base_pose','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        deliver_base_pose,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(SymbolGroundingDeliverBaseRegionResponse, self).__init__(*args, **kwds)
00268       #message fields cannot be None, assign default values for those that are
00269       if self.deliver_base_pose is None:
00270         self.deliver_base_pose = geometry_msgs.msg.Pose2D()
00271       if self.R is None:
00272         self.R = 0.
00273     else:
00274       self.deliver_base_pose = geometry_msgs.msg.Pose2D()
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       _x = self
00290       buff.write(_struct_3df.pack(_x.deliver_base_pose.x, _x.deliver_base_pose.y, _x.deliver_base_pose.theta, _x.R))
00291     except struct.error as se: self._check_types(se)
00292     except TypeError as te: self._check_types(te)
00293 
00294   def deserialize(self, str):
00295     """
00296     unpack serialized message in str into this message instance
00297     :param str: byte array of serialized message, ``str``
00298     """
00299     try:
00300       if self.deliver_base_pose is None:
00301         self.deliver_base_pose = geometry_msgs.msg.Pose2D()
00302       end = 0
00303       _x = self
00304       start = end
00305       end += 28
00306       (_x.deliver_base_pose.x, _x.deliver_base_pose.y, _x.deliver_base_pose.theta, _x.R,) = _struct_3df.unpack(str[start:end])
00307       return self
00308     except struct.error as e:
00309       raise genpy.DeserializationError(e) #most likely buffer underfill
00310 
00311 
00312   def serialize_numpy(self, buff, numpy):
00313     """
00314     serialize message with numpy array types into buffer
00315     :param buff: buffer, ``StringIO``
00316     :param numpy: numpy python module
00317     """
00318     try:
00319       _x = self
00320       buff.write(_struct_3df.pack(_x.deliver_base_pose.x, _x.deliver_base_pose.y, _x.deliver_base_pose.theta, _x.R))
00321     except struct.error as se: self._check_types(se)
00322     except TypeError as te: self._check_types(te)
00323 
00324   def deserialize_numpy(self, str, numpy):
00325     """
00326     unpack serialized message in str into this message instance using numpy for array types
00327     :param str: byte array of serialized message, ``str``
00328     :param numpy: numpy python module
00329     """
00330     try:
00331       if self.deliver_base_pose is None:
00332         self.deliver_base_pose = geometry_msgs.msg.Pose2D()
00333       end = 0
00334       _x = self
00335       start = end
00336       end += 28
00337       (_x.deliver_base_pose.x, _x.deliver_base_pose.y, _x.deliver_base_pose.theta, _x.R,) = _struct_3df.unpack(str[start:end])
00338       return self
00339     except struct.error as e:
00340       raise genpy.DeserializationError(e) #most likely buffer underfill
00341 
00342 _struct_I = genpy.struct_I
00343 _struct_3df = struct.Struct("<3df")
00344 class SymbolGroundingDeliverBaseRegion(object):
00345   _type          = 'srs_symbolic_grounding/SymbolGroundingDeliverBaseRegion'
00346   _md5sum = '1414d0f804748752b8fb6a7b28c03566'
00347   _request_class  = SymbolGroundingDeliverBaseRegionRequest
00348   _response_class = SymbolGroundingDeliverBaseRegionResponse


srs_symbolic_grounding
Author(s): Beisheng Liu
autogenerated on Sun Jan 5 2014 12:01:26