_TableDetection.py
Go to the documentation of this file.
00001 """autogenerated by genpy from coverage_3d_msgs/TableDetection.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 TableDetection(genpy.Message):
00011   _md5sum = "74849012ef04940df5d05d9471d43193"
00012   _type = "coverage_3d_msgs/TableDetection"
00013   _has_header = True #flag to mark the presence of a Header object
00014   _full_text = """#This message holds a collection of 3d points, plus optional additional information about each point.
00015 #Each Point32 should be interpreted as a 3d point in the frame given in the header
00016 
00017 Header header
00018 int32 type #0: rectangle, 1:convex hull, 2:concave hull
00019 geometry_msgs/Pose center
00020 geometry_msgs/Point scale # not used for the convex hull
00021 geometry_msgs/Point[] points  #Array of 3d points on the outline of the table where spanning vectors intersect table boundary
00022 geometry_msgs/Point[] hull #Array containing convex or concave hull, this was requested
00023 
00024 ================================================================================
00025 MSG: std_msgs/Header
00026 # Standard metadata for higher-level stamped data types.
00027 # This is generally used to communicate timestamped data 
00028 # in a particular coordinate frame.
00029 # 
00030 # sequence ID: consecutively increasing ID 
00031 uint32 seq
00032 #Two-integer timestamp that is expressed as:
00033 # * stamp.secs: seconds (stamp_secs) since epoch
00034 # * stamp.nsecs: nanoseconds since stamp_secs
00035 # time-handling sugar is provided by the client library
00036 time stamp
00037 #Frame this data is associated with
00038 # 0: no frame
00039 # 1: global frame
00040 string frame_id
00041 
00042 ================================================================================
00043 MSG: geometry_msgs/Pose
00044 # A representation of pose in free space, composed of postion and orientation. 
00045 Point position
00046 Quaternion orientation
00047 
00048 ================================================================================
00049 MSG: geometry_msgs/Point
00050 # This contains the position of a point in free space
00051 float64 x
00052 float64 y
00053 float64 z
00054 
00055 ================================================================================
00056 MSG: geometry_msgs/Quaternion
00057 # This represents an orientation in free space in quaternion form.
00058 
00059 float64 x
00060 float64 y
00061 float64 z
00062 float64 w
00063 
00064 """
00065   __slots__ = ['header','type','center','scale','points','hull']
00066   _slot_types = ['std_msgs/Header','int32','geometry_msgs/Pose','geometry_msgs/Point','geometry_msgs/Point[]','geometry_msgs/Point[]']
00067 
00068   def __init__(self, *args, **kwds):
00069     """
00070     Constructor. Any message fields that are implicitly/explicitly
00071     set to None will be assigned a default value. The recommend
00072     use is keyword arguments as this is more robust to future message
00073     changes.  You cannot mix in-order arguments and keyword arguments.
00074 
00075     The available fields are:
00076        header,type,center,scale,points,hull
00077 
00078     :param args: complete set of field values, in .msg order
00079     :param kwds: use keyword arguments corresponding to message field names
00080     to set specific fields.
00081     """
00082     if args or kwds:
00083       super(TableDetection, self).__init__(*args, **kwds)
00084       #message fields cannot be None, assign default values for those that are
00085       if self.header is None:
00086         self.header = std_msgs.msg.Header()
00087       if self.type is None:
00088         self.type = 0
00089       if self.center is None:
00090         self.center = geometry_msgs.msg.Pose()
00091       if self.scale is None:
00092         self.scale = geometry_msgs.msg.Point()
00093       if self.points is None:
00094         self.points = []
00095       if self.hull is None:
00096         self.hull = []
00097     else:
00098       self.header = std_msgs.msg.Header()
00099       self.type = 0
00100       self.center = geometry_msgs.msg.Pose()
00101       self.scale = geometry_msgs.msg.Point()
00102       self.points = []
00103       self.hull = []
00104 
00105   def _get_types(self):
00106     """
00107     internal API method
00108     """
00109     return self._slot_types
00110 
00111   def serialize(self, buff):
00112     """
00113     serialize message into buffer
00114     :param buff: buffer, ``StringIO``
00115     """
00116     try:
00117       _x = self
00118       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00119       _x = self.header.frame_id
00120       length = len(_x)
00121       if python3 or type(_x) == unicode:
00122         _x = _x.encode('utf-8')
00123         length = len(_x)
00124       buff.write(struct.pack('<I%ss'%length, length, _x))
00125       _x = self
00126       buff.write(_struct_i10d.pack(_x.type, _x.center.position.x, _x.center.position.y, _x.center.position.z, _x.center.orientation.x, _x.center.orientation.y, _x.center.orientation.z, _x.center.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z))
00127       length = len(self.points)
00128       buff.write(_struct_I.pack(length))
00129       for val1 in self.points:
00130         _x = val1
00131         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00132       length = len(self.hull)
00133       buff.write(_struct_I.pack(length))
00134       for val1 in self.hull:
00135         _x = val1
00136         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00137     except struct.error as se: self._check_types(se)
00138     except TypeError as te: self._check_types(te)
00139 
00140   def deserialize(self, str):
00141     """
00142     unpack serialized message in str into this message instance
00143     :param str: byte array of serialized message, ``str``
00144     """
00145     try:
00146       if self.header is None:
00147         self.header = std_msgs.msg.Header()
00148       if self.center is None:
00149         self.center = geometry_msgs.msg.Pose()
00150       if self.scale is None:
00151         self.scale = geometry_msgs.msg.Point()
00152       if self.points is None:
00153         self.points = None
00154       if self.hull is None:
00155         self.hull = None
00156       end = 0
00157       _x = self
00158       start = end
00159       end += 12
00160       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00161       start = end
00162       end += 4
00163       (length,) = _struct_I.unpack(str[start:end])
00164       start = end
00165       end += length
00166       if python3:
00167         self.header.frame_id = str[start:end].decode('utf-8')
00168       else:
00169         self.header.frame_id = str[start:end]
00170       _x = self
00171       start = end
00172       end += 84
00173       (_x.type, _x.center.position.x, _x.center.position.y, _x.center.position.z, _x.center.orientation.x, _x.center.orientation.y, _x.center.orientation.z, _x.center.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_i10d.unpack(str[start:end])
00174       start = end
00175       end += 4
00176       (length,) = _struct_I.unpack(str[start:end])
00177       self.points = []
00178       for i in range(0, length):
00179         val1 = geometry_msgs.msg.Point()
00180         _x = val1
00181         start = end
00182         end += 24
00183         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00184         self.points.append(val1)
00185       start = end
00186       end += 4
00187       (length,) = _struct_I.unpack(str[start:end])
00188       self.hull = []
00189       for i in range(0, length):
00190         val1 = geometry_msgs.msg.Point()
00191         _x = val1
00192         start = end
00193         end += 24
00194         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00195         self.hull.append(val1)
00196       return self
00197     except struct.error as e:
00198       raise genpy.DeserializationError(e) #most likely buffer underfill
00199 
00200 
00201   def serialize_numpy(self, buff, numpy):
00202     """
00203     serialize message with numpy array types into buffer
00204     :param buff: buffer, ``StringIO``
00205     :param numpy: numpy python module
00206     """
00207     try:
00208       _x = self
00209       buff.write(_struct_3I.pack(_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs))
00210       _x = self.header.frame_id
00211       length = len(_x)
00212       if python3 or type(_x) == unicode:
00213         _x = _x.encode('utf-8')
00214         length = len(_x)
00215       buff.write(struct.pack('<I%ss'%length, length, _x))
00216       _x = self
00217       buff.write(_struct_i10d.pack(_x.type, _x.center.position.x, _x.center.position.y, _x.center.position.z, _x.center.orientation.x, _x.center.orientation.y, _x.center.orientation.z, _x.center.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z))
00218       length = len(self.points)
00219       buff.write(_struct_I.pack(length))
00220       for val1 in self.points:
00221         _x = val1
00222         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00223       length = len(self.hull)
00224       buff.write(_struct_I.pack(length))
00225       for val1 in self.hull:
00226         _x = val1
00227         buff.write(_struct_3d.pack(_x.x, _x.y, _x.z))
00228     except struct.error as se: self._check_types(se)
00229     except TypeError as te: self._check_types(te)
00230 
00231   def deserialize_numpy(self, str, numpy):
00232     """
00233     unpack serialized message in str into this message instance using numpy for array types
00234     :param str: byte array of serialized message, ``str``
00235     :param numpy: numpy python module
00236     """
00237     try:
00238       if self.header is None:
00239         self.header = std_msgs.msg.Header()
00240       if self.center is None:
00241         self.center = geometry_msgs.msg.Pose()
00242       if self.scale is None:
00243         self.scale = geometry_msgs.msg.Point()
00244       if self.points is None:
00245         self.points = None
00246       if self.hull is None:
00247         self.hull = None
00248       end = 0
00249       _x = self
00250       start = end
00251       end += 12
00252       (_x.header.seq, _x.header.stamp.secs, _x.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00253       start = end
00254       end += 4
00255       (length,) = _struct_I.unpack(str[start:end])
00256       start = end
00257       end += length
00258       if python3:
00259         self.header.frame_id = str[start:end].decode('utf-8')
00260       else:
00261         self.header.frame_id = str[start:end]
00262       _x = self
00263       start = end
00264       end += 84
00265       (_x.type, _x.center.position.x, _x.center.position.y, _x.center.position.z, _x.center.orientation.x, _x.center.orientation.y, _x.center.orientation.z, _x.center.orientation.w, _x.scale.x, _x.scale.y, _x.scale.z,) = _struct_i10d.unpack(str[start:end])
00266       start = end
00267       end += 4
00268       (length,) = _struct_I.unpack(str[start:end])
00269       self.points = []
00270       for i in range(0, length):
00271         val1 = geometry_msgs.msg.Point()
00272         _x = val1
00273         start = end
00274         end += 24
00275         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00276         self.points.append(val1)
00277       start = end
00278       end += 4
00279       (length,) = _struct_I.unpack(str[start:end])
00280       self.hull = []
00281       for i in range(0, length):
00282         val1 = geometry_msgs.msg.Point()
00283         _x = val1
00284         start = end
00285         end += 24
00286         (_x.x, _x.y, _x.z,) = _struct_3d.unpack(str[start:end])
00287         self.hull.append(val1)
00288       return self
00289     except struct.error as e:
00290       raise genpy.DeserializationError(e) #most likely buffer underfill
00291 
00292 _struct_I = genpy.struct_I
00293 _struct_3I = struct.Struct("<3I")
00294 _struct_i10d = struct.Struct("<i10d")
00295 _struct_3d = struct.Struct("<3d")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties Friends


coverage_3d_msgs
Author(s): Juergen Hess
autogenerated on Wed Dec 26 2012 15:25:24