_TableCluster.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ias_table_msgs/TableCluster.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 std_msgs.msg
00009 
00010 class TableCluster(genpy.Message):
00011   _md5sum = "4ea47c48cb127cf14882b6238c7c7d6a"
00012   _type = "ias_table_msgs/TableCluster"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """Header header
00015 geometry_msgs/Point32 center
00016 geometry_msgs/Point32 min_bound
00017 geometry_msgs/Point32 max_bound
00018  
00019 ================================================================================
00020 MSG: std_msgs/Header
00021 # Standard metadata for higher-level stamped data types.
00022 # This is generally used to communicate timestamped data 
00023 # in a particular coordinate frame.
00024 # 
00025 # sequence ID: consecutively increasing ID 
00026 uint32 seq
00027 #Two-integer timestamp that is expressed as:
00028 # * stamp.secs: seconds (stamp_secs) since epoch
00029 # * stamp.nsecs: nanoseconds since stamp_secs
00030 # time-handling sugar is provided by the client library
00031 time stamp
00032 #Frame this data is associated with
00033 # 0: no frame
00034 # 1: global frame
00035 string frame_id
00036 
00037 ================================================================================
00038 MSG: geometry_msgs/Point32
00039 # This contains the position of a point in free space(with 32 bits of precision).
00040 # It is recommeded to use Point wherever possible instead of Point32.  
00041 # 
00042 # This recommendation is to promote interoperability.  
00043 #
00044 # This message is designed to take up less space when sending
00045 # lots of points at once, as in the case of a PointCloud.  
00046 
00047 float32 x
00048 float32 y
00049 float32 z
00050 """
00051   __slots__ = ['header','center','min_bound','max_bound']
00052   _slot_types = ['std_msgs/Header','geometry_msgs/Point32','geometry_msgs/Point32','geometry_msgs/Point32']
00053 
00054   def __init__(self, *args, **kwds):
00055     """
00056     Constructor. Any message fields that are implicitly/explicitly
00057     set to None will be assigned a default value. The recommend
00058     use is keyword arguments as this is more robust to future message
00059     changes.  You cannot mix in-order arguments and keyword arguments.
00060 
00061     The available fields are:
00062        header,center,min_bound,max_bound
00063 
00064     :param args: complete set of field values, in .msg order
00065     :param kwds: use keyword arguments corresponding to message field names
00066     to set specific fields.
00067     """
00068     if args or kwds:
00069       super(TableCluster, self).__init__(*args, **kwds)
00070       #message fields cannot be None, assign default values for those that are
00071       if self.header is None:
00072         self.header = std_msgs.msg.Header()
00073       if self.center is None:
00074         self.center = geometry_msgs.msg.Point32()
00075       if self.min_bound is None:
00076         self.min_bound = geometry_msgs.msg.Point32()
00077       if self.max_bound is None:
00078         self.max_bound = geometry_msgs.msg.Point32()
00079     else:
00080       self.header = std_msgs.msg.Header()
00081       self.center = geometry_msgs.msg.Point32()
00082       self.min_bound = geometry_msgs.msg.Point32()
00083       self.max_bound = geometry_msgs.msg.Point32()
00084 
00085   def _get_types(self):
00086     """
00087     internal API method
00088     """
00089     return self._slot_types
00090 
00091   def serialize(self, buff):
00092     """
00093     serialize message into buffer
00094     :param buff: buffer, ``StringIO``
00095     """
00096     try:
00097       _x = self
00098       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00099       _x = self.header.frame_id
00100       length = len(_x)
00101       if python3 or type(_x) == unicode:
00102         _x = _x.encode('utf-8')
00103         length = len(_x)
00104       buff.write(struct.pack('<I%ss'%length, length, _x))
00105       _x = self
00106       buff.write(_struct_9f.pack(_x.center.x, _x.center.y, _x.center.z, _x.min_bound.x, _x.min_bound.y, _x.min_bound.z, _x.max_bound.x, _x.max_bound.y, _x.max_bound.z))
00107     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00108     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00109 
00110   def deserialize(self, str):
00111     """
00112     unpack serialized message in str into this message instance
00113     :param str: byte array of serialized message, ``str``
00114     """
00115     try:
00116       if self.header is None:
00117         self.header = std_msgs.msg.Header()
00118       if self.center is None:
00119         self.center = geometry_msgs.msg.Point32()
00120       if self.min_bound is None:
00121         self.min_bound = geometry_msgs.msg.Point32()
00122       if self.max_bound is None:
00123         self.max_bound = geometry_msgs.msg.Point32()
00124       end = 0
00125       _x = self
00126       start = end
00127       end += 12
00128       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00129       start = end
00130       end += 4
00131       (length,) = _struct_I.unpack(str[start:end])
00132       start = end
00133       end += length
00134       if python3:
00135         self.header.frame_id = str[start:end].decode('utf-8')
00136       else:
00137         self.header.frame_id = str[start:end]
00138       _x = self
00139       start = end
00140       end += 36
00141       (_x.center.x, _x.center.y, _x.center.z, _x.min_bound.x, _x.min_bound.y, _x.min_bound.z, _x.max_bound.x, _x.max_bound.y, _x.max_bound.z,) = _struct_9f.unpack(str[start:end])
00142       return self
00143     except struct.error as e:
00144       raise genpy.DeserializationError(e) #most likely buffer underfill
00145 
00146 
00147   def serialize_numpy(self, buff, numpy):
00148     """
00149     serialize message with numpy array types into buffer
00150     :param buff: buffer, ``StringIO``
00151     :param numpy: numpy python module
00152     """
00153     try:
00154       _x = self
00155       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00156       _x = self.header.frame_id
00157       length = len(_x)
00158       if python3 or type(_x) == unicode:
00159         _x = _x.encode('utf-8')
00160         length = len(_x)
00161       buff.write(struct.pack('<I%ss'%length, length, _x))
00162       _x = self
00163       buff.write(_struct_9f.pack(_x.center.x, _x.center.y, _x.center.z, _x.min_bound.x, _x.min_bound.y, _x.min_bound.z, _x.max_bound.x, _x.max_bound.y, _x.max_bound.z))
00164     except struct.error as se: self._check_types(struct.error("%s: '%s' when writing '%s'" % (type(se), str(se), str(_x))))
00165     except TypeError as te: self._check_types(ValueError("%s: '%s' when writing '%s'" % (type(te), str(te), str(_x))))
00166 
00167   def deserialize_numpy(self, str, numpy):
00168     """
00169     unpack serialized message in str into this message instance using numpy for array types
00170     :param str: byte array of serialized message, ``str``
00171     :param numpy: numpy python module
00172     """
00173     try:
00174       if self.header is None:
00175         self.header = std_msgs.msg.Header()
00176       if self.center is None:
00177         self.center = geometry_msgs.msg.Point32()
00178       if self.min_bound is None:
00179         self.min_bound = geometry_msgs.msg.Point32()
00180       if self.max_bound is None:
00181         self.max_bound = geometry_msgs.msg.Point32()
00182       end = 0
00183       _x = self
00184       start = end
00185       end += 12
00186       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00187       start = end
00188       end += 4
00189       (length,) = _struct_I.unpack(str[start:end])
00190       start = end
00191       end += length
00192       if python3:
00193         self.header.frame_id = str[start:end].decode('utf-8')
00194       else:
00195         self.header.frame_id = str[start:end]
00196       _x = self
00197       start = end
00198       end += 36
00199       (_x.center.x, _x.center.y, _x.center.z, _x.min_bound.x, _x.min_bound.y, _x.min_bound.z, _x.max_bound.x, _x.max_bound.y, _x.max_bound.z,) = _struct_9f.unpack(str[start:end])
00200       return self
00201     except struct.error as e:
00202       raise genpy.DeserializationError(e) #most likely buffer underfill
00203 
00204 _struct_I = genpy.struct_I
00205 _struct_3I = struct.Struct("<3I")
00206 _struct_9f = struct.Struct("<9f")


ias_table_msgs
Author(s):
autogenerated on Mon Oct 6 2014 00:49:32