_SymbolGroundingGraspBasePoseExperimental.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingGraspBasePoseExperimentalRequest.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 SymbolGroundingGraspBasePoseExperimentalRequest(genpy.Message):
00011   _md5sum = "929217c873801a8d83a0ef0a0ff55374"
00012   _type = "srs_symbolic_grounding/SymbolGroundingGraspBasePoseExperimentalRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """geometry_msgs/Pose target_obj_pose
00015 
00016 
00017 srs_msgs/SRSSpatialInfo parent_obj_geometry
00018 srs_msgs/SRSSpatialInfo[] furniture_geometry_list
00019 
00020 ================================================================================
00021 MSG: geometry_msgs/Pose
00022 # A representation of pose in free space, composed of postion and orientation. 
00023 Point position
00024 Quaternion orientation
00025 
00026 ================================================================================
00027 MSG: geometry_msgs/Point
00028 # This contains the position of a point in free space
00029 float64 x
00030 float64 y
00031 float64 z
00032 
00033 ================================================================================
00034 MSG: geometry_msgs/Quaternion
00035 # This represents an orientation in free space in quaternion form.
00036 
00037 float64 x
00038 float64 y
00039 float64 z
00040 float64 w
00041 
00042 ================================================================================
00043 MSG: srs_msgs/SRSSpatialInfo
00044 # Point point
00045 # Orientation angles
00046 float32 l
00047 float32 w
00048 float32 h
00049 
00050 geometry_msgs/Pose pose
00051 
00052 """
00053   __slots__ = ['target_obj_pose','parent_obj_geometry','furniture_geometry_list']
00054   _slot_types = ['geometry_msgs/Pose','srs_msgs/SRSSpatialInfo','srs_msgs/SRSSpatialInfo[]']
00055 
00056   def __init__(self, *args, **kwds):
00057     """
00058     Constructor. Any message fields that are implicitly/explicitly
00059     set to None will be assigned a default value. The recommend
00060     use is keyword arguments as this is more robust to future message
00061     changes.  You cannot mix in-order arguments and keyword arguments.
00062 
00063     The available fields are:
00064        target_obj_pose,parent_obj_geometry,furniture_geometry_list
00065 
00066     :param args: complete set of field values, in .msg order
00067     :param kwds: use keyword arguments corresponding to message field names
00068     to set specific fields.
00069     """
00070     if args or kwds:
00071       super(SymbolGroundingGraspBasePoseExperimentalRequest, self).__init__(*args, **kwds)
00072       #message fields cannot be None, assign default values for those that are
00073       if self.target_obj_pose is None:
00074         self.target_obj_pose = geometry_msgs.msg.Pose()
00075       if self.parent_obj_geometry is None:
00076         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00077       if self.furniture_geometry_list is None:
00078         self.furniture_geometry_list = []
00079     else:
00080       self.target_obj_pose = geometry_msgs.msg.Pose()
00081       self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00082       self.furniture_geometry_list = []
00083 
00084   def _get_types(self):
00085     """
00086     internal API method
00087     """
00088     return self._slot_types
00089 
00090   def serialize(self, buff):
00091     """
00092     serialize message into buffer
00093     :param buff: buffer, ``StringIO``
00094     """
00095     try:
00096       _x = self
00097       buff.write(_struct_7d3f7d.pack(_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _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))
00098       length = len(self.furniture_geometry_list)
00099       buff.write(_struct_I.pack(length))
00100       for val1 in self.furniture_geometry_list:
00101         _x = val1
00102         buff.write(_struct_3f.pack(_x.l, _x.w, _x.h))
00103         _v1 = val1.pose
00104         _v2 = _v1.position
00105         _x = _v2
00106         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00107         _v3 = _v1.orientation
00108         _x = _v3
00109         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00110     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00111     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00112 
00113   def deserialize(self, str):
00114     """
00115     unpack serialized message in str into this message instance
00116     :param str: byte array of serialized message, ``str``
00117     """
00118     try:
00119       if self.target_obj_pose is None:
00120         self.target_obj_pose = geometry_msgs.msg.Pose()
00121       if self.parent_obj_geometry is None:
00122         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00123       if self.furniture_geometry_list is None:
00124         self.furniture_geometry_list = None
00125       end = 0
00126       _x = self
00127       start = end
00128       end += 124
00129       (_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _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_7d3f7d.unpack(str[start:end])
00130       start = end
00131       end += 4
00132       (length,) = _struct_I.unpack(str[start:end])
00133       self.furniture_geometry_list = []
00134       for i in range(0, length):
00135         val1 = srs_msgs.msg.SRSSpatialInfo()
00136         _x = val1
00137         start = end
00138         end += 12
00139         (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end])
00140         _v4 = val1.pose
00141         _v5 = _v4.position
00142         _x = _v5
00143         start = end
00144         end += 24
00145         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00146         _v6 = _v4.orientation
00147         _x = _v6
00148         start = end
00149         end += 32
00150         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00151         self.furniture_geometry_list.append(val1)
00152       return self
00153     except struct.error as e:
00154       raise genpy.DeserializationError(e) #most likely buffer underfill
00155 
00156 
00157   def serialize_numpy(self, buff, numpy):
00158     """
00159     serialize message with numpy array types into buffer
00160     :param buff: buffer, ``StringIO``
00161     :param numpy: numpy python module
00162     """
00163     try:
00164       _x = self
00165       buff.write(_struct_7d3f7d.pack(_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _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))
00166       length = len(self.furniture_geometry_list)
00167       buff.write(_struct_I.pack(length))
00168       for val1 in self.furniture_geometry_list:
00169         _x = val1
00170         buff.write(_struct_3f.pack(_x.l, _x.w, _x.h))
00171         _v7 = val1.pose
00172         _v8 = _v7.position
00173         _x = _v8
00174         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00175         _v9 = _v7.orientation
00176         _x = _v9
00177         buff.write(_struct_4d.pack(_x.x, _x.y, _x.z, _x.w))
00178     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00179     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00180 
00181   def deserialize_numpy(self, str, numpy):
00182     """
00183     unpack serialized message in str into this message instance using numpy for array types
00184     :param str: byte array of serialized message, ``str``
00185     :param numpy: numpy python module
00186     """
00187     try:
00188       if self.target_obj_pose is None:
00189         self.target_obj_pose = geometry_msgs.msg.Pose()
00190       if self.parent_obj_geometry is None:
00191         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00192       if self.furniture_geometry_list is None:
00193         self.furniture_geometry_list = None
00194       end = 0
00195       _x = self
00196       start = end
00197       end += 124
00198       (_x.target_obj_pose.position.x, _x.target_obj_pose.position.y, _x.target_obj_pose.position.z, _x.target_obj_pose.orientation.x, _x.target_obj_pose.orientation.y, _x.target_obj_pose.orientation.z, _x.target_obj_pose.orientation.w, _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_7d3f7d.unpack(str[start:end])
00199       start = end
00200       end += 4
00201       (length,) = _struct_I.unpack(str[start:end])
00202       self.furniture_geometry_list = []
00203       for i in range(0, length):
00204         val1 = srs_msgs.msg.SRSSpatialInfo()
00205         _x = val1
00206         start = end
00207         end += 12
00208         (_x.l, _x.w, _x.h,) = _struct_3f.unpack(str[start:end])
00209         _v10 = val1.pose
00210         _v11 = _v10.position
00211         _x = _v11
00212         start = end
00213         end += 24
00214         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00215         _v12 = _v10.orientation
00216         _x = _v12
00217         start = end
00218         end += 32
00219         (_x.x, _x.y, _x.z, _x.w,) = _struct_4d.unpack(str[start:end])
00220         self.furniture_geometry_list.append(val1)
00221       return self
00222     except struct.error as e:
00223       raise genpy.DeserializationError(e) #most likely buffer underfill
00224 
00225 _struct_I = genpy.struct_I
00226 _struct_4d = struct.Struct("<4d")
00227 _struct_3d = struct.Struct("<3d")
00228 _struct_7d3f7d = struct.Struct("<7d3f7d")
00229 _struct_3f = struct.Struct("<3f")
00230 """autogenerated by genpy from srs_symbolic_grounding/SymbolGroundingGraspBasePoseExperimentalResponse.msg. Do not edit."""
00231 import sys
00232 python3 = True if sys.hexversion > 0x03000000 else False
00233 import genpy
00234 import struct
00235 
00236 import geometry_msgs.msg
00237 
00238 class SymbolGroundingGraspBasePoseExperimentalResponse(genpy.Message):
00239   _md5sum = "1166b4429d4bb491f620326781fed922"
00240   _type = "srs_symbolic_grounding/SymbolGroundingGraspBasePoseExperimentalResponse"
00241   _has_header = False #flag to mark the presence of a Header object
00242   _full_text = """bool obstacle_check
00243 float32 reach
00244 geometry_msgs/Pose2D grasp_base_pose
00245 
00246 
00247 ================================================================================
00248 MSG: geometry_msgs/Pose2D
00249 # This expresses a position and orientation on a 2D manifold.
00250 
00251 float64 x
00252 float64 y
00253 float64 theta
00254 """
00255   __slots__ = ['obstacle_check','reach','grasp_base_pose']
00256   _slot_types = ['bool','float32','geometry_msgs/Pose2D']
00257 
00258   def __init__(self, *args, **kwds):
00259     """
00260     Constructor. Any message fields that are implicitly/explicitly
00261     set to None will be assigned a default value. The recommend
00262     use is keyword arguments as this is more robust to future message
00263     changes.  You cannot mix in-order arguments and keyword arguments.
00264 
00265     The available fields are:
00266        obstacle_check,reach,grasp_base_pose
00267 
00268     :param args: complete set of field values, in .msg order
00269     :param kwds: use keyword arguments corresponding to message field names
00270     to set specific fields.
00271     """
00272     if args or kwds:
00273       super(SymbolGroundingGraspBasePoseExperimentalResponse, self).__init__(*args, **kwds)
00274       #message fields cannot be None, assign default values for those that are
00275       if self.obstacle_check is None:
00276         self.obstacle_check = False
00277       if self.reach is None:
00278         self.reach = 0.
00279       if self.grasp_base_pose is None:
00280         self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00281     else:
00282       self.obstacle_check = False
00283       self.reach = 0.
00284       self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00285 
00286   def _get_types(self):
00287     """
00288     internal API method
00289     """
00290     return self._slot_types
00291 
00292   def serialize(self, buff):
00293     """
00294     serialize message into buffer
00295     :param buff: buffer, ``StringIO``
00296     """
00297     try:
00298       _x = self
00299       buff.write(_struct_Bf3d.pack(_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta))
00300     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00301     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00302 
00303   def deserialize(self, str):
00304     """
00305     unpack serialized message in str into this message instance
00306     :param str: byte array of serialized message, ``str``
00307     """
00308     try:
00309       if self.grasp_base_pose is None:
00310         self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00311       end = 0
00312       _x = self
00313       start = end
00314       end += 29
00315       (_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta,) = _struct_Bf3d.unpack(str[start:end])
00316       self.obstacle_check = bool(self.obstacle_check)
00317       return self
00318     except struct.error as e:
00319       raise genpy.DeserializationError(e) #most likely buffer underfill
00320 
00321 
00322   def serialize_numpy(self, buff, numpy):
00323     """
00324     serialize message with numpy array types into buffer
00325     :param buff: buffer, ``StringIO``
00326     :param numpy: numpy python module
00327     """
00328     try:
00329       _x = self
00330       buff.write(_struct_Bf3d.pack(_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta))
00331     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00332     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00333 
00334   def deserialize_numpy(self, str, numpy):
00335     """
00336     unpack serialized message in str into this message instance using numpy for array types
00337     :param str: byte array of serialized message, ``str``
00338     :param numpy: numpy python module
00339     """
00340     try:
00341       if self.grasp_base_pose is None:
00342         self.grasp_base_pose = geometry_msgs.msg.Pose2D()
00343       end = 0
00344       _x = self
00345       start = end
00346       end += 29
00347       (_x.obstacle_check, _x.reach, _x.grasp_base_pose.x, _x.grasp_base_pose.y, _x.grasp_base_pose.theta,) = _struct_Bf3d.unpack(str[start:end])
00348       self.obstacle_check = bool(self.obstacle_check)
00349       return self
00350     except struct.error as e:
00351       raise genpy.DeserializationError(e) #most likely buffer underfill
00352 
00353 _struct_I = genpy.struct_I
00354 _struct_Bf3d = struct.Struct("<Bf3d")
00355 class SymbolGroundingGraspBasePoseExperimental(object):
00356   _type          = 'srs_symbolic_grounding/SymbolGroundingGraspBasePoseExperimental'
00357   _md5sum = '80365e2dd1e4f246fb4542bfaa7f0518'
00358   _request_class  = SymbolGroundingGraspBasePoseExperimentalRequest
00359   _response_class = SymbolGroundingGraspBasePoseExperimentalResponse


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