_Plane.py
Go to the documentation of this file.
00001 """autogenerated by genpy from fast_plane_detection/Plane.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 Plane(genpy.Message):
00011   _md5sum = "e876d3c2247eeda0c0207fae33ce01a9"
00012   _type = "fast_plane_detection/Plane"
00013   _has_header = False #flag to mark the presence of a Header object
00014   _full_text = """# Informs that a plane has been detected at a given location
00015 
00016 # The pose gives you the transform that take you to the coordinate system
00017 # of the plane, with the origin somewhere in the plane and the 
00018 # z axis normal to the plane
00019 geometry_msgs/PoseStamped pose
00020                           
00021 # Point + normal vector of the plane
00022 geometry_msgs/PointStamped plane_point
00023 geometry_msgs/Vector3Stamped normal
00024 geometry_msgs/PointStamped slave_point
00025                            
00026 # These values give you the observed extents of the plane, along x and y,
00027 # in the plane's own coordinate system (above)
00028 # there is no guarantee that the origin of the plane coordinate system is
00029 # inside the boundary defined by these values. 
00030 geometry_msgs/Point32 top_left
00031 geometry_msgs/Point32 top_right
00032 
00033 geometry_msgs/Point32 bottom_left
00034 geometry_msgs/Point32 bottom_right
00035  
00036 # There is no guarantee that the plane doe NOT extend further than these 
00037 # values; this is just as far as we've observed it.
00038 
00039 # Whether the detection has succeeded or failed
00040 int32 SUCCESS = 1
00041 int32 FEW_INLIERS = 2
00042 int32 NO_PLANE = 3
00043 int32 OTHER_ERROR = 4
00044 int32 result
00045 
00046 # inliers over whole region
00047 float32 percentage_inliers
00048 # inliers of valid disparities
00049 int32 percentage_disp_inliers
00050 # number of valid disparities
00051 int32 percentage_valid_disp
00052 
00053 # confidence indicators of plane detection
00054 # mean squared error
00055 float32 error
00056 
00057 ================================================================================
00058 MSG: geometry_msgs/PoseStamped
00059 # A Pose with reference coordinate frame and timestamp
00060 Header header
00061 Pose pose
00062 
00063 ================================================================================
00064 MSG: std_msgs/Header
00065 # Standard metadata for higher-level stamped data types.
00066 # This is generally used to communicate timestamped data 
00067 # in a particular coordinate frame.
00068 # 
00069 # sequence ID: consecutively increasing ID 
00070 uint32 seq
00071 #Two-integer timestamp that is expressed as:
00072 # * stamp.secs: seconds (stamp_secs) since epoch
00073 # * stamp.nsecs: nanoseconds since stamp_secs
00074 # time-handling sugar is provided by the client library
00075 time stamp
00076 #Frame this data is associated with
00077 # 0: no frame
00078 # 1: global frame
00079 string frame_id
00080 
00081 ================================================================================
00082 MSG: geometry_msgs/Pose
00083 # A representation of pose in free space, composed of postion and orientation. 
00084 Point position
00085 Quaternion orientation
00086 
00087 ================================================================================
00088 MSG: geometry_msgs/Point
00089 # This contains the position of a point in free space
00090 float64 x
00091 float64 y
00092 float64 z
00093 
00094 ================================================================================
00095 MSG: geometry_msgs/Quaternion
00096 # This represents an orientation in free space in quaternion form.
00097 
00098 float64 x
00099 float64 y
00100 float64 z
00101 float64 w
00102 
00103 ================================================================================
00104 MSG: geometry_msgs/PointStamped
00105 # This represents a Point with reference coordinate frame and timestamp
00106 Header header
00107 Point point
00108 
00109 ================================================================================
00110 MSG: geometry_msgs/Vector3Stamped
00111 # This represents a Vector3 with reference coordinate frame and timestamp
00112 Header header
00113 Vector3 vector
00114 
00115 ================================================================================
00116 MSG: geometry_msgs/Vector3
00117 # This represents a vector in free space. 
00118 
00119 float64 x
00120 float64 y
00121 float64 z
00122 ================================================================================
00123 MSG: geometry_msgs/Point32
00124 # This contains the position of a point in free space(with 32 bits of precision).
00125 # It is recommeded to use Point wherever possible instead of Point32.  
00126 # 
00127 # This recommendation is to promote interoperability.  
00128 #
00129 # This message is designed to take up less space when sending
00130 # lots of points at once, as in the case of a PointCloud.  
00131 
00132 float32 x
00133 float32 y
00134 float32 z
00135 """
00136   # Pseudo-constants
00137   SUCCESS = 1
00138   FEW_INLIERS = 2
00139   NO_PLANE = 3
00140   OTHER_ERROR = 4
00141 
00142   __slots__ = ['pose','plane_point','normal','slave_point','top_left','top_right','bottom_left','bottom_right','result','percentage_inliers','percentage_disp_inliers','percentage_valid_disp','error']
00143   _slot_types = ['geometry_msgs/PoseStamped','geometry_msgs/PointStamped','geometry_msgs/Vector3Stamped','geometry_msgs/PointStamped','geometry_msgs/Point32','geometry_msgs/Point32','geometry_msgs/Point32','geometry_msgs/Point32','int32','float32','int32','int32','float32']
00144 
00145   def __init__(self, *args, **kwds):
00146     """
00147     Constructor. Any message fields that are implicitly/explicitly
00148     set to None will be assigned a default value. The recommend
00149     use is keyword arguments as this is more robust to future message
00150     changes.  You cannot mix in-order arguments and keyword arguments.
00151 
00152     The available fields are:
00153        pose,plane_point,normal,slave_point,top_left,top_right,bottom_left,bottom_right,result,percentage_inliers,percentage_disp_inliers,percentage_valid_disp,error
00154 
00155     :param args: complete set of field values, in .msg order
00156     :param kwds: use keyword arguments corresponding to message field names
00157     to set specific fields.
00158     """
00159     if args or kwds:
00160       super(Plane, self).__init__(*args, **kwds)
00161       #message fields cannot be None, assign default values for those that are
00162       if self.pose is None:
00163         self.pose = geometry_msgs.msg.PoseStamped()
00164       if self.plane_point is None:
00165         self.plane_point = geometry_msgs.msg.PointStamped()
00166       if self.normal is None:
00167         self.normal = geometry_msgs.msg.Vector3Stamped()
00168       if self.slave_point is None:
00169         self.slave_point = geometry_msgs.msg.PointStamped()
00170       if self.top_left is None:
00171         self.top_left = geometry_msgs.msg.Point32()
00172       if self.top_right is None:
00173         self.top_right = geometry_msgs.msg.Point32()
00174       if self.bottom_left is None:
00175         self.bottom_left = geometry_msgs.msg.Point32()
00176       if self.bottom_right is None:
00177         self.bottom_right = geometry_msgs.msg.Point32()
00178       if self.result is None:
00179         self.result = 0
00180       if self.percentage_inliers is None:
00181         self.percentage_inliers = 0.
00182       if self.percentage_disp_inliers is None:
00183         self.percentage_disp_inliers = 0
00184       if self.percentage_valid_disp is None:
00185         self.percentage_valid_disp = 0
00186       if self.error is None:
00187         self.error = 0.
00188     else:
00189       self.pose = geometry_msgs.msg.PoseStamped()
00190       self.plane_point = geometry_msgs.msg.PointStamped()
00191       self.normal = geometry_msgs.msg.Vector3Stamped()
00192       self.slave_point = geometry_msgs.msg.PointStamped()
00193       self.top_left = geometry_msgs.msg.Point32()
00194       self.top_right = geometry_msgs.msg.Point32()
00195       self.bottom_left = geometry_msgs.msg.Point32()
00196       self.bottom_right = geometry_msgs.msg.Point32()
00197       self.result = 0
00198       self.percentage_inliers = 0.
00199       self.percentage_disp_inliers = 0
00200       self.percentage_valid_disp = 0
00201       self.error = 0.
00202 
00203   def _get_types(self):
00204     """
00205     internal API method
00206     """
00207     return self._slot_types
00208 
00209   def serialize(self, buff):
00210     """
00211     serialize message into buffer
00212     :param buff: buffer, ``StringIO``
00213     """
00214     try:
00215       _x = self
00216       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00217       _x = self.pose.header.frame_id
00218       length = len(_x)
00219       if python3 or type(_x) == unicode:
00220         _x = _x.encode('utf-8')
00221         length = len(_x)
00222       buff.write(struct.pack('<I%ss'%length, length, _x))
00223       _x = self
00224       buff.write(_struct_7d3I.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.plane_point.header.seq, _x.plane_point.header.stamp.secs, _x.plane_point.header.stamp.nsecs))
00225       _x = self.plane_point.header.frame_id
00226       length = len(_x)
00227       if python3 or type(_x) == unicode:
00228         _x = _x.encode('utf-8')
00229         length = len(_x)
00230       buff.write(struct.pack('<I%ss'%length, length, _x))
00231       _x = self
00232       buff.write(_struct_3d3I.pack(_x.plane_point.point.x, _x.plane_point.point.y, _x.plane_point.point.z, _x.normal.header.seq, _x.normal.header.stamp.secs, _x.normal.header.stamp.nsecs))
00233       _x = self.normal.header.frame_id
00234       length = len(_x)
00235       if python3 or type(_x) == unicode:
00236         _x = _x.encode('utf-8')
00237         length = len(_x)
00238       buff.write(struct.pack('<I%ss'%length, length, _x))
00239       _x = self
00240       buff.write(_struct_3d3I.pack(_x.normal.vector.x, _x.normal.vector.y, _x.normal.vector.z, _x.slave_point.header.seq, _x.slave_point.header.stamp.secs, _x.slave_point.header.stamp.nsecs))
00241       _x = self.slave_point.header.frame_id
00242       length = len(_x)
00243       if python3 or type(_x) == unicode:
00244         _x = _x.encode('utf-8')
00245         length = len(_x)
00246       buff.write(struct.pack('<I%ss'%length, length, _x))
00247       _x = self
00248       buff.write(_struct_3d12fif2if.pack(_x.slave_point.point.x, _x.slave_point.point.y, _x.slave_point.point.z, _x.top_left.x, _x.top_left.y, _x.top_left.z, _x.top_right.x, _x.top_right.y, _x.top_right.z, _x.bottom_left.x, _x.bottom_left.y, _x.bottom_left.z, _x.bottom_right.x, _x.bottom_right.y, _x.bottom_right.z, _x.result, _x.percentage_inliers, _x.percentage_disp_inliers, _x.percentage_valid_disp, _x.error))
00249     except struct.error as se: self._check_types(se)
00250     except TypeError as te: self._check_types(te)
00251 
00252   def deserialize(self, str):
00253     """
00254     unpack serialized message in str into this message instance
00255     :param str: byte array of serialized message, ``str``
00256     """
00257     try:
00258       if self.pose is None:
00259         self.pose = geometry_msgs.msg.PoseStamped()
00260       if self.plane_point is None:
00261         self.plane_point = geometry_msgs.msg.PointStamped()
00262       if self.normal is None:
00263         self.normal = geometry_msgs.msg.Vector3Stamped()
00264       if self.slave_point is None:
00265         self.slave_point = geometry_msgs.msg.PointStamped()
00266       if self.top_left is None:
00267         self.top_left = geometry_msgs.msg.Point32()
00268       if self.top_right is None:
00269         self.top_right = geometry_msgs.msg.Point32()
00270       if self.bottom_left is None:
00271         self.bottom_left = geometry_msgs.msg.Point32()
00272       if self.bottom_right is None:
00273         self.bottom_right = geometry_msgs.msg.Point32()
00274       end = 0
00275       _x = self
00276       start = end
00277       end += 12
00278       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00279       start = end
00280       end += 4
00281       (length,) = _struct_I.unpack(str[start:end])
00282       start = end
00283       end += length
00284       if python3:
00285         self.pose.header.frame_id = str[start:end].decode('utf-8')
00286       else:
00287         self.pose.header.frame_id = str[start:end]
00288       _x = self
00289       start = end
00290       end += 68
00291       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.plane_point.header.seq, _x.plane_point.header.stamp.secs, _x.plane_point.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00292       start = end
00293       end += 4
00294       (length,) = _struct_I.unpack(str[start:end])
00295       start = end
00296       end += length
00297       if python3:
00298         self.plane_point.header.frame_id = str[start:end].decode('utf-8')
00299       else:
00300         self.plane_point.header.frame_id = str[start:end]
00301       _x = self
00302       start = end
00303       end += 36
00304       (_x.plane_point.point.x, _x.plane_point.point.y, _x.plane_point.point.z, _x.normal.header.seq, _x.normal.header.stamp.secs, _x.normal.header.stamp.nsecs,) = _struct_3d3I.unpack(str[start:end])
00305       start = end
00306       end += 4
00307       (length,) = _struct_I.unpack(str[start:end])
00308       start = end
00309       end += length
00310       if python3:
00311         self.normal.header.frame_id = str[start:end].decode('utf-8')
00312       else:
00313         self.normal.header.frame_id = str[start:end]
00314       _x = self
00315       start = end
00316       end += 36
00317       (_x.normal.vector.x, _x.normal.vector.y, _x.normal.vector.z, _x.slave_point.header.seq, _x.slave_point.header.stamp.secs, _x.slave_point.header.stamp.nsecs,) = _struct_3d3I.unpack(str[start:end])
00318       start = end
00319       end += 4
00320       (length,) = _struct_I.unpack(str[start:end])
00321       start = end
00322       end += length
00323       if python3:
00324         self.slave_point.header.frame_id = str[start:end].decode('utf-8')
00325       else:
00326         self.slave_point.header.frame_id = str[start:end]
00327       _x = self
00328       start = end
00329       end += 92
00330       (_x.slave_point.point.x, _x.slave_point.point.y, _x.slave_point.point.z, _x.top_left.x, _x.top_left.y, _x.top_left.z, _x.top_right.x, _x.top_right.y, _x.top_right.z, _x.bottom_left.x, _x.bottom_left.y, _x.bottom_left.z, _x.bottom_right.x, _x.bottom_right.y, _x.bottom_right.z, _x.result, _x.percentage_inliers, _x.percentage_disp_inliers, _x.percentage_valid_disp, _x.error,) = _struct_3d12fif2if.unpack(str[start:end])
00331       return self
00332     except struct.error as e:
00333       raise genpy.DeserializationError(e) #most likely buffer underfill
00334 
00335 
00336   def serialize_numpy(self, buff, numpy):
00337     """
00338     serialize message with numpy array types into buffer
00339     :param buff: buffer, ``StringIO``
00340     :param numpy: numpy python module
00341     """
00342     try:
00343       _x = self
00344       buff.write(_struct_3I.pack(_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs))
00345       _x = self.pose.header.frame_id
00346       length = len(_x)
00347       if python3 or type(_x) == unicode:
00348         _x = _x.encode('utf-8')
00349         length = len(_x)
00350       buff.write(struct.pack('<I%ss'%length, length, _x))
00351       _x = self
00352       buff.write(_struct_7d3I.pack(_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.plane_point.header.seq, _x.plane_point.header.stamp.secs, _x.plane_point.header.stamp.nsecs))
00353       _x = self.plane_point.header.frame_id
00354       length = len(_x)
00355       if python3 or type(_x) == unicode:
00356         _x = _x.encode('utf-8')
00357         length = len(_x)
00358       buff.write(struct.pack('<I%ss'%length, length, _x))
00359       _x = self
00360       buff.write(_struct_3d3I.pack(_x.plane_point.point.x, _x.plane_point.point.y, _x.plane_point.point.z, _x.normal.header.seq, _x.normal.header.stamp.secs, _x.normal.header.stamp.nsecs))
00361       _x = self.normal.header.frame_id
00362       length = len(_x)
00363       if python3 or type(_x) == unicode:
00364         _x = _x.encode('utf-8')
00365         length = len(_x)
00366       buff.write(struct.pack('<I%ss'%length, length, _x))
00367       _x = self
00368       buff.write(_struct_3d3I.pack(_x.normal.vector.x, _x.normal.vector.y, _x.normal.vector.z, _x.slave_point.header.seq, _x.slave_point.header.stamp.secs, _x.slave_point.header.stamp.nsecs))
00369       _x = self.slave_point.header.frame_id
00370       length = len(_x)
00371       if python3 or type(_x) == unicode:
00372         _x = _x.encode('utf-8')
00373         length = len(_x)
00374       buff.write(struct.pack('<I%ss'%length, length, _x))
00375       _x = self
00376       buff.write(_struct_3d12fif2if.pack(_x.slave_point.point.x, _x.slave_point.point.y, _x.slave_point.point.z, _x.top_left.x, _x.top_left.y, _x.top_left.z, _x.top_right.x, _x.top_right.y, _x.top_right.z, _x.bottom_left.x, _x.bottom_left.y, _x.bottom_left.z, _x.bottom_right.x, _x.bottom_right.y, _x.bottom_right.z, _x.result, _x.percentage_inliers, _x.percentage_disp_inliers, _x.percentage_valid_disp, _x.error))
00377     except struct.error as se: self._check_types(se)
00378     except TypeError as te: self._check_types(te)
00379 
00380   def deserialize_numpy(self, str, numpy):
00381     """
00382     unpack serialized message in str into this message instance using numpy for array types
00383     :param str: byte array of serialized message, ``str``
00384     :param numpy: numpy python module
00385     """
00386     try:
00387       if self.pose is None:
00388         self.pose = geometry_msgs.msg.PoseStamped()
00389       if self.plane_point is None:
00390         self.plane_point = geometry_msgs.msg.PointStamped()
00391       if self.normal is None:
00392         self.normal = geometry_msgs.msg.Vector3Stamped()
00393       if self.slave_point is None:
00394         self.slave_point = geometry_msgs.msg.PointStamped()
00395       if self.top_left is None:
00396         self.top_left = geometry_msgs.msg.Point32()
00397       if self.top_right is None:
00398         self.top_right = geometry_msgs.msg.Point32()
00399       if self.bottom_left is None:
00400         self.bottom_left = geometry_msgs.msg.Point32()
00401       if self.bottom_right is None:
00402         self.bottom_right = geometry_msgs.msg.Point32()
00403       end = 0
00404       _x = self
00405       start = end
00406       end += 12
00407       (_x.pose.header.seq, _x.pose.header.stamp.secs, _x.pose.header.stamp.nsecs,) = _struct_3I.unpack(str[start:end])
00408       start = end
00409       end += 4
00410       (length,) = _struct_I.unpack(str[start:end])
00411       start = end
00412       end += length
00413       if python3:
00414         self.pose.header.frame_id = str[start:end].decode('utf-8')
00415       else:
00416         self.pose.header.frame_id = str[start:end]
00417       _x = self
00418       start = end
00419       end += 68
00420       (_x.pose.pose.position.x, _x.pose.pose.position.y, _x.pose.pose.position.z, _x.pose.pose.orientation.x, _x.pose.pose.orientation.y, _x.pose.pose.orientation.z, _x.pose.pose.orientation.w, _x.plane_point.header.seq, _x.plane_point.header.stamp.secs, _x.plane_point.header.stamp.nsecs,) = _struct_7d3I.unpack(str[start:end])
00421       start = end
00422       end += 4
00423       (length,) = _struct_I.unpack(str[start:end])
00424       start = end
00425       end += length
00426       if python3:
00427         self.plane_point.header.frame_id = str[start:end].decode('utf-8')
00428       else:
00429         self.plane_point.header.frame_id = str[start:end]
00430       _x = self
00431       start = end
00432       end += 36
00433       (_x.plane_point.point.x, _x.plane_point.point.y, _x.plane_point.point.z, _x.normal.header.seq, _x.normal.header.stamp.secs, _x.normal.header.stamp.nsecs,) = _struct_3d3I.unpack(str[start:end])
00434       start = end
00435       end += 4
00436       (length,) = _struct_I.unpack(str[start:end])
00437       start = end
00438       end += length
00439       if python3:
00440         self.normal.header.frame_id = str[start:end].decode('utf-8')
00441       else:
00442         self.normal.header.frame_id = str[start:end]
00443       _x = self
00444       start = end
00445       end += 36
00446       (_x.normal.vector.x, _x.normal.vector.y, _x.normal.vector.z, _x.slave_point.header.seq, _x.slave_point.header.stamp.secs, _x.slave_point.header.stamp.nsecs,) = _struct_3d3I.unpack(str[start:end])
00447       start = end
00448       end += 4
00449       (length,) = _struct_I.unpack(str[start:end])
00450       start = end
00451       end += length
00452       if python3:
00453         self.slave_point.header.frame_id = str[start:end].decode('utf-8')
00454       else:
00455         self.slave_point.header.frame_id = str[start:end]
00456       _x = self
00457       start = end
00458       end += 92
00459       (_x.slave_point.point.x, _x.slave_point.point.y, _x.slave_point.point.z, _x.top_left.x, _x.top_left.y, _x.top_left.z, _x.top_right.x, _x.top_right.y, _x.top_right.z, _x.bottom_left.x, _x.bottom_left.y, _x.bottom_left.z, _x.bottom_right.x, _x.bottom_right.y, _x.bottom_right.z, _x.result, _x.percentage_inliers, _x.percentage_disp_inliers, _x.percentage_valid_disp, _x.error,) = _struct_3d12fif2if.unpack(str[start:end])
00460       return self
00461     except struct.error as e:
00462       raise genpy.DeserializationError(e) #most likely buffer underfill
00463 
00464 _struct_I = genpy.struct_I
00465 _struct_3d12fif2if = struct.Struct("<3d12fif2if")
00466 _struct_3d3I = struct.Struct("<3d3I")
00467 _struct_3I = struct.Struct("<3I")
00468 _struct_7d3I = struct.Struct("<7d3I")
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines


fast_plane_detection
Author(s): Jeannette Bohg
autogenerated on Wed Jan 23 2013 16:52:53