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