_ScanBasePose.py
Go to the documentation of this file.
00001 """autogenerated by genpy from srs_symbolic_grounding/ScanBasePoseRequest.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 ScanBasePoseRequest(genpy.Message):
00011   _md5sum = "e9544004a6cbf3086f8e6192829b56f4"
00012   _type = "srs_symbolic_grounding/ScanBasePoseRequest"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """srs_msgs/SRSSpatialInfo parent_obj_geometry
00015 
00016 ================================================================================
00017 MSG: srs_msgs/SRSSpatialInfo
00018 # Point point
00019 # Orientation angles
00020 float32 l
00021 float32 w
00022 float32 h
00023 
00024 geometry_msgs/Pose pose
00025 
00026 ================================================================================
00027 MSG: geometry_msgs/Pose
00028 # A representation of pose in free space, composed of postion and orientation. 
00029 Point position
00030 Quaternion orientation
00031 
00032 ================================================================================
00033 MSG: geometry_msgs/Point
00034 # This contains the position of a point in free space
00035 float64 x
00036 float64 y
00037 float64 z
00038 
00039 ================================================================================
00040 MSG: geometry_msgs/Quaternion
00041 # This represents an orientation in free space in quaternion form.
00042 
00043 float64 x
00044 float64 y
00045 float64 z
00046 float64 w
00047 
00048 """
00049   __slots__ = ['parent_obj_geometry']
00050   _slot_types = ['srs_msgs/SRSSpatialInfo']
00051 
00052   def __init__(self, *args, **kwds):
00053     """
00054     Constructor. Any message fields that are implicitly/explicitly
00055     set to None will be assigned a default value. The recommend
00056     use is keyword arguments as this is more robust to future message
00057     changes.  You cannot mix in-order arguments and keyword arguments.
00058 
00059     The available fields are:
00060        parent_obj_geometry
00061 
00062     :param args: complete set of field values, in .msg order
00063     :param kwds: use keyword arguments corresponding to message field names
00064     to set specific fields.
00065     """
00066     if args or kwds:
00067       super(ScanBasePoseRequest, self).__init__(*args, **kwds)
00068       #message fields cannot be None, assign default values for those that are
00069       if self.parent_obj_geometry is None:
00070         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00071     else:
00072       self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00073 
00074   def _get_types(self):
00075     """
00076     internal API method
00077     """
00078     return self._slot_types
00079 
00080   def serialize(self, buff):
00081     """
00082     serialize message into buffer
00083     :param buff: buffer, ``StringIO``
00084     """
00085     try:
00086       _x = self
00087       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))
00088     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00089     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00090 
00091   def deserialize(self, str):
00092     """
00093     unpack serialized message in str into this message instance
00094     :param str: byte array of serialized message, ``str``
00095     """
00096     try:
00097       if self.parent_obj_geometry is None:
00098         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00099       end = 0
00100       _x = self
00101       start = end
00102       end += 68
00103       (_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])
00104       return self
00105     except struct.error as e:
00106       raise genpy.DeserializationError(e) #most likely buffer underfill
00107 
00108 
00109   def serialize_numpy(self, buff, numpy):
00110     """
00111     serialize message with numpy array types into buffer
00112     :param buff: buffer, ``StringIO``
00113     :param numpy: numpy python module
00114     """
00115     try:
00116       _x = self
00117       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))
00118     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00119     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00120 
00121   def deserialize_numpy(self, str, numpy):
00122     """
00123     unpack serialized message in str into this message instance using numpy for array types
00124     :param str: byte array of serialized message, ``str``
00125     :param numpy: numpy python module
00126     """
00127     try:
00128       if self.parent_obj_geometry is None:
00129         self.parent_obj_geometry = srs_msgs.msg.SRSSpatialInfo()
00130       end = 0
00131       _x = self
00132       start = end
00133       end += 68
00134       (_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])
00135       return self
00136     except struct.error as e:
00137       raise genpy.DeserializationError(e) #most likely buffer underfill
00138 
00139 _struct_I = genpy.struct_I
00140 _struct_3f7d = struct.Struct("<3f7d")
00141 """autogenerated by genpy from srs_symbolic_grounding/ScanBasePoseResponse.msg. Do not edit."""
00142 import sys
00143 python3 = True if sys.hexversion > 0x03000000 else False
00144 import genpy
00145 import struct
00146 
00147 import geometry_msgs.msg
00148 
00149 class ScanBasePoseResponse(genpy.Message):
00150   _md5sum = "66b4de75c1cdba6b484a2621de9dc0d6"
00151   _type = "srs_symbolic_grounding/ScanBasePoseResponse"
00152   _has_header = False #flag to mark the presence of a Header object
00153   _full_text = """geometry_msgs/Pose2D[] scan_base_pose_list
00154 
00155 
00156 
00157 
00158 
00159 ================================================================================
00160 MSG: geometry_msgs/Pose2D
00161 # This expresses a position and orientation on a 2D manifold.
00162 
00163 float64 x
00164 float64 y
00165 float64 theta
00166 """
00167   __slots__ = ['scan_base_pose_list']
00168   _slot_types = ['geometry_msgs/Pose2D[]']
00169 
00170   def __init__(self, *args, **kwds):
00171     """
00172     Constructor. Any message fields that are implicitly/explicitly
00173     set to None will be assigned a default value. The recommend
00174     use is keyword arguments as this is more robust to future message
00175     changes.  You cannot mix in-order arguments and keyword arguments.
00176 
00177     The available fields are:
00178        scan_base_pose_list
00179 
00180     :param args: complete set of field values, in .msg order
00181     :param kwds: use keyword arguments corresponding to message field names
00182     to set specific fields.
00183     """
00184     if args or kwds:
00185       super(ScanBasePoseResponse, self).__init__(*args, **kwds)
00186       #message fields cannot be None, assign default values for those that are
00187       if self.scan_base_pose_list is None:
00188         self.scan_base_pose_list = []
00189     else:
00190       self.scan_base_pose_list = []
00191 
00192   def _get_types(self):
00193     """
00194     internal API method
00195     """
00196     return self._slot_types
00197 
00198   def serialize(self, buff):
00199     """
00200     serialize message into buffer
00201     :param buff: buffer, ``StringIO``
00202     """
00203     try:
00204       length = len(self.scan_base_pose_list)
00205       buff.write(_struct_I.pack(length))
00206       for val1 in self.scan_base_pose_list:
00207         _x = val1
00208         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00209     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00210     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00211 
00212   def deserialize(self, str):
00213     """
00214     unpack serialized message in str into this message instance
00215     :param str: byte array of serialized message, ``str``
00216     """
00217     try:
00218       if self.scan_base_pose_list is None:
00219         self.scan_base_pose_list = None
00220       end = 0
00221       start = end
00222       end += 4
00223       (length,) = _struct_I.unpack(str[start:end])
00224       self.scan_base_pose_list = []
00225       for i in range(0, length):
00226         val1 = geometry_msgs.msg.Pose2D()
00227         _x = val1
00228         start = end
00229         end += 24
00230         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00231         self.scan_base_pose_list.append(val1)
00232       return self
00233     except struct.error as e:
00234       raise genpy.DeserializationError(e) #most likely buffer underfill
00235 
00236 
00237   def serialize_numpy(self, buff, numpy):
00238     """
00239     serialize message with numpy array types into buffer
00240     :param buff: buffer, ``StringIO``
00241     :param numpy: numpy python module
00242     """
00243     try:
00244       length = len(self.scan_base_pose_list)
00245       buff.write(_struct_I.pack(length))
00246       for val1 in self.scan_base_pose_list:
00247         _x = val1
00248         buff.write(_struct_3d.pack(_x.x, _x.y, _x.theta))
00249     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00250     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00251 
00252   def deserialize_numpy(self, str, numpy):
00253     """
00254     unpack serialized message in str into this message instance using numpy for array types
00255     :param str: byte array of serialized message, ``str``
00256     :param numpy: numpy python module
00257     """
00258     try:
00259       if self.scan_base_pose_list is None:
00260         self.scan_base_pose_list = None
00261       end = 0
00262       start = end
00263       end += 4
00264       (length,) = _struct_I.unpack(str[start:end])
00265       self.scan_base_pose_list = []
00266       for i in range(0, length):
00267         val1 = geometry_msgs.msg.Pose2D()
00268         _x = val1
00269         start = end
00270         end += 24
00271         (_x.x, _x.y, _x.theta,) = _struct_3d.unpack(str[start:end])
00272         self.scan_base_pose_list.append(val1)
00273       return self
00274     except struct.error as e:
00275       raise genpy.DeserializationError(e) #most likely buffer underfill
00276 
00277 _struct_I = genpy.struct_I
00278 _struct_3d = struct.Struct("<3d")
00279 class ScanBasePose(object):
00280   _type          = 'srs_symbolic_grounding/ScanBasePose'
00281   _md5sum = '0b68fdc0a9a83294fed2acbcecc407b6'
00282   _request_class  = ScanBasePoseRequest
00283   _response_class = ScanBasePoseResponse


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