00001
00002 #ifndef FAST_PLANE_DETECTION_MESSAGE_PLANE_H
00003 #define FAST_PLANE_DETECTION_MESSAGE_PLANE_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "geometry_msgs/PoseStamped.h"
00014 #include "geometry_msgs/PointStamped.h"
00015 #include "geometry_msgs/Vector3Stamped.h"
00016 #include "geometry_msgs/PointStamped.h"
00017 #include "geometry_msgs/Point32.h"
00018 #include "geometry_msgs/Point32.h"
00019 #include "geometry_msgs/Point32.h"
00020 #include "geometry_msgs/Point32.h"
00021
00022 namespace fast_plane_detection
00023 {
00024 template <class ContainerAllocator>
00025 struct Plane_ : public ros::Message
00026 {
00027 typedef Plane_<ContainerAllocator> Type;
00028
00029 Plane_()
00030 : pose()
00031 , plane_point()
00032 , normal()
00033 , plane_d(0.0)
00034 , slave_point()
00035 , top_left()
00036 , top_right()
00037 , bottom_left()
00038 , bottom_right()
00039 , result(0)
00040 , percentage_inliers(0)
00041 , error(0.0)
00042 {
00043 }
00044
00045 Plane_(const ContainerAllocator& _alloc)
00046 : pose(_alloc)
00047 , plane_point(_alloc)
00048 , normal(_alloc)
00049 , plane_d(0.0)
00050 , slave_point(_alloc)
00051 , top_left(_alloc)
00052 , top_right(_alloc)
00053 , bottom_left(_alloc)
00054 , bottom_right(_alloc)
00055 , result(0)
00056 , percentage_inliers(0)
00057 , error(0.0)
00058 {
00059 }
00060
00061 typedef ::geometry_msgs::PoseStamped_<ContainerAllocator> _pose_type;
00062 ::geometry_msgs::PoseStamped_<ContainerAllocator> pose;
00063
00064 typedef ::geometry_msgs::PointStamped_<ContainerAllocator> _plane_point_type;
00065 ::geometry_msgs::PointStamped_<ContainerAllocator> plane_point;
00066
00067 typedef ::geometry_msgs::Vector3Stamped_<ContainerAllocator> _normal_type;
00068 ::geometry_msgs::Vector3Stamped_<ContainerAllocator> normal;
00069
00070 typedef double _plane_d_type;
00071 double plane_d;
00072
00073 typedef ::geometry_msgs::PointStamped_<ContainerAllocator> _slave_point_type;
00074 ::geometry_msgs::PointStamped_<ContainerAllocator> slave_point;
00075
00076 typedef ::geometry_msgs::Point32_<ContainerAllocator> _top_left_type;
00077 ::geometry_msgs::Point32_<ContainerAllocator> top_left;
00078
00079 typedef ::geometry_msgs::Point32_<ContainerAllocator> _top_right_type;
00080 ::geometry_msgs::Point32_<ContainerAllocator> top_right;
00081
00082 typedef ::geometry_msgs::Point32_<ContainerAllocator> _bottom_left_type;
00083 ::geometry_msgs::Point32_<ContainerAllocator> bottom_left;
00084
00085 typedef ::geometry_msgs::Point32_<ContainerAllocator> _bottom_right_type;
00086 ::geometry_msgs::Point32_<ContainerAllocator> bottom_right;
00087
00088 typedef int32_t _result_type;
00089 int32_t result;
00090
00091 typedef int32_t _percentage_inliers_type;
00092 int32_t percentage_inliers;
00093
00094 typedef float _error_type;
00095 float error;
00096
00097 enum { SUCCESS = 1 };
00098 enum { FEW_INLIERS = 2 };
00099 enum { NO_PLANE = 3 };
00100 enum { OTHER_ERROR = 4 };
00101
00102 private:
00103 static const char* __s_getDataType_() { return "fast_plane_detection/Plane"; }
00104 public:
00105 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00106
00107 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00108
00109 private:
00110 static const char* __s_getMD5Sum_() { return "548a78a6102fe015ca902d8a6da3bcd8"; }
00111 public:
00112 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00113
00114 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00115
00116 private:
00117 static const char* __s_getMessageDefinition_() { return "# Informs that a plane has been detected at a given location\n\
00118 \n\
00119 # The pose gives you the transform that take you to the coordinate system\n\
00120 # of the plane, with the origin somewhere in the plane and the \n\
00121 # z axis normal to the plane\n\
00122 geometry_msgs/PoseStamped pose\n\
00123 \n\
00124 # Point + normal vector of the plane\n\
00125 geometry_msgs/PointStamped plane_point\n\
00126 geometry_msgs/Vector3Stamped normal\n\
00127 float64 plane_d\n\
00128 \n\
00129 geometry_msgs/PointStamped slave_point\n\
00130 \n\
00131 \n\
00132 # These values give you the observed extents of the plane, along x and y,\n\
00133 # in the plane's own coordinate system (above)\n\
00134 # there is no guarantee that the origin of the plane coordinate system is\n\
00135 # inside the boundary defined by these values. \n\
00136 geometry_msgs/Point32 top_left\n\
00137 geometry_msgs/Point32 top_right\n\
00138 \n\
00139 geometry_msgs/Point32 bottom_left\n\
00140 geometry_msgs/Point32 bottom_right\n\
00141 \n\
00142 # There is no guarantee that the plane doe NOT extend further than these \n\
00143 # values; this is just as far as we've observed it.\n\
00144 \n\
00145 # Whether the detection has succeeded or failed\n\
00146 int32 SUCCESS = 1\n\
00147 int32 FEW_INLIERS = 2\n\
00148 int32 NO_PLANE = 3\n\
00149 int32 OTHER_ERROR = 4\n\
00150 int32 result\n\
00151 int32 percentage_inliers\n\
00152 \n\
00153 # confidence indicators of plane detection\n\
00154 # mean squared error\n\
00155 float32 error\n\
00156 ================================================================================\n\
00157 MSG: geometry_msgs/PoseStamped\n\
00158 # A Pose with reference coordinate frame and timestamp\n\
00159 Header header\n\
00160 Pose pose\n\
00161 \n\
00162 ================================================================================\n\
00163 MSG: std_msgs/Header\n\
00164 # Standard metadata for higher-level stamped data types.\n\
00165 # This is generally used to communicate timestamped data \n\
00166 # in a particular coordinate frame.\n\
00167 # \n\
00168 # sequence ID: consecutively increasing ID \n\
00169 uint32 seq\n\
00170 #Two-integer timestamp that is expressed as:\n\
00171 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00172 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00173 # time-handling sugar is provided by the client library\n\
00174 time stamp\n\
00175 #Frame this data is associated with\n\
00176 # 0: no frame\n\
00177 # 1: global frame\n\
00178 string frame_id\n\
00179 \n\
00180 ================================================================================\n\
00181 MSG: geometry_msgs/Pose\n\
00182 # A representation of pose in free space, composed of postion and orientation. \n\
00183 Point position\n\
00184 Quaternion orientation\n\
00185 \n\
00186 ================================================================================\n\
00187 MSG: geometry_msgs/Point\n\
00188 # This contains the position of a point in free space\n\
00189 float64 x\n\
00190 float64 y\n\
00191 float64 z\n\
00192 \n\
00193 ================================================================================\n\
00194 MSG: geometry_msgs/Quaternion\n\
00195 # This represents an orientation in free space in quaternion form.\n\
00196 \n\
00197 float64 x\n\
00198 float64 y\n\
00199 float64 z\n\
00200 float64 w\n\
00201 \n\
00202 ================================================================================\n\
00203 MSG: geometry_msgs/PointStamped\n\
00204 # This represents a Point with reference coordinate frame and timestamp\n\
00205 Header header\n\
00206 Point point\n\
00207 \n\
00208 ================================================================================\n\
00209 MSG: geometry_msgs/Vector3Stamped\n\
00210 # This represents a Vector3 with reference coordinate frame and timestamp\n\
00211 Header header\n\
00212 Vector3 vector\n\
00213 \n\
00214 ================================================================================\n\
00215 MSG: geometry_msgs/Vector3\n\
00216 # This represents a vector in free space. \n\
00217 \n\
00218 float64 x\n\
00219 float64 y\n\
00220 float64 z\n\
00221 ================================================================================\n\
00222 MSG: geometry_msgs/Point32\n\
00223 # This contains the position of a point in free space(with 32 bits of precision).\n\
00224 # It is recommeded to use Point wherever possible instead of Point32. \n\
00225 # \n\
00226 # This recommendation is to promote interoperability. \n\
00227 #\n\
00228 # This message is designed to take up less space when sending\n\
00229 # lots of points at once, as in the case of a PointCloud. \n\
00230 \n\
00231 float32 x\n\
00232 float32 y\n\
00233 float32 z\n\
00234 "; }
00235 public:
00236 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00237
00238 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00239
00240 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00241 {
00242 ros::serialization::OStream stream(write_ptr, 1000000000);
00243 ros::serialization::serialize(stream, pose);
00244 ros::serialization::serialize(stream, plane_point);
00245 ros::serialization::serialize(stream, normal);
00246 ros::serialization::serialize(stream, plane_d);
00247 ros::serialization::serialize(stream, slave_point);
00248 ros::serialization::serialize(stream, top_left);
00249 ros::serialization::serialize(stream, top_right);
00250 ros::serialization::serialize(stream, bottom_left);
00251 ros::serialization::serialize(stream, bottom_right);
00252 ros::serialization::serialize(stream, result);
00253 ros::serialization::serialize(stream, percentage_inliers);
00254 ros::serialization::serialize(stream, error);
00255 return stream.getData();
00256 }
00257
00258 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00259 {
00260 ros::serialization::IStream stream(read_ptr, 1000000000);
00261 ros::serialization::deserialize(stream, pose);
00262 ros::serialization::deserialize(stream, plane_point);
00263 ros::serialization::deserialize(stream, normal);
00264 ros::serialization::deserialize(stream, plane_d);
00265 ros::serialization::deserialize(stream, slave_point);
00266 ros::serialization::deserialize(stream, top_left);
00267 ros::serialization::deserialize(stream, top_right);
00268 ros::serialization::deserialize(stream, bottom_left);
00269 ros::serialization::deserialize(stream, bottom_right);
00270 ros::serialization::deserialize(stream, result);
00271 ros::serialization::deserialize(stream, percentage_inliers);
00272 ros::serialization::deserialize(stream, error);
00273 return stream.getData();
00274 }
00275
00276 ROS_DEPRECATED virtual uint32_t serializationLength() const
00277 {
00278 uint32_t size = 0;
00279 size += ros::serialization::serializationLength(pose);
00280 size += ros::serialization::serializationLength(plane_point);
00281 size += ros::serialization::serializationLength(normal);
00282 size += ros::serialization::serializationLength(plane_d);
00283 size += ros::serialization::serializationLength(slave_point);
00284 size += ros::serialization::serializationLength(top_left);
00285 size += ros::serialization::serializationLength(top_right);
00286 size += ros::serialization::serializationLength(bottom_left);
00287 size += ros::serialization::serializationLength(bottom_right);
00288 size += ros::serialization::serializationLength(result);
00289 size += ros::serialization::serializationLength(percentage_inliers);
00290 size += ros::serialization::serializationLength(error);
00291 return size;
00292 }
00293
00294 typedef boost::shared_ptr< ::fast_plane_detection::Plane_<ContainerAllocator> > Ptr;
00295 typedef boost::shared_ptr< ::fast_plane_detection::Plane_<ContainerAllocator> const> ConstPtr;
00296 };
00297 typedef ::fast_plane_detection::Plane_<std::allocator<void> > Plane;
00298
00299 typedef boost::shared_ptr< ::fast_plane_detection::Plane> PlanePtr;
00300 typedef boost::shared_ptr< ::fast_plane_detection::Plane const> PlaneConstPtr;
00301
00302
00303 template<typename ContainerAllocator>
00304 std::ostream& operator<<(std::ostream& s, const ::fast_plane_detection::Plane_<ContainerAllocator> & v)
00305 {
00306 ros::message_operations::Printer< ::fast_plane_detection::Plane_<ContainerAllocator> >::stream(s, "", v);
00307 return s;}
00308
00309 }
00310
00311 namespace ros
00312 {
00313 namespace message_traits
00314 {
00315 template<class ContainerAllocator>
00316 struct MD5Sum< ::fast_plane_detection::Plane_<ContainerAllocator> > {
00317 static const char* value()
00318 {
00319 return "548a78a6102fe015ca902d8a6da3bcd8";
00320 }
00321
00322 static const char* value(const ::fast_plane_detection::Plane_<ContainerAllocator> &) { return value(); }
00323 static const uint64_t static_value1 = 0x548a78a6102fe015ULL;
00324 static const uint64_t static_value2 = 0xca902d8a6da3bcd8ULL;
00325 };
00326
00327 template<class ContainerAllocator>
00328 struct DataType< ::fast_plane_detection::Plane_<ContainerAllocator> > {
00329 static const char* value()
00330 {
00331 return "fast_plane_detection/Plane";
00332 }
00333
00334 static const char* value(const ::fast_plane_detection::Plane_<ContainerAllocator> &) { return value(); }
00335 };
00336
00337 template<class ContainerAllocator>
00338 struct Definition< ::fast_plane_detection::Plane_<ContainerAllocator> > {
00339 static const char* value()
00340 {
00341 return "# Informs that a plane has been detected at a given location\n\
00342 \n\
00343 # The pose gives you the transform that take you to the coordinate system\n\
00344 # of the plane, with the origin somewhere in the plane and the \n\
00345 # z axis normal to the plane\n\
00346 geometry_msgs/PoseStamped pose\n\
00347 \n\
00348 # Point + normal vector of the plane\n\
00349 geometry_msgs/PointStamped plane_point\n\
00350 geometry_msgs/Vector3Stamped normal\n\
00351 float64 plane_d\n\
00352 \n\
00353 geometry_msgs/PointStamped slave_point\n\
00354 \n\
00355 \n\
00356 # These values give you the observed extents of the plane, along x and y,\n\
00357 # in the plane's own coordinate system (above)\n\
00358 # there is no guarantee that the origin of the plane coordinate system is\n\
00359 # inside the boundary defined by these values. \n\
00360 geometry_msgs/Point32 top_left\n\
00361 geometry_msgs/Point32 top_right\n\
00362 \n\
00363 geometry_msgs/Point32 bottom_left\n\
00364 geometry_msgs/Point32 bottom_right\n\
00365 \n\
00366 # There is no guarantee that the plane doe NOT extend further than these \n\
00367 # values; this is just as far as we've observed it.\n\
00368 \n\
00369 # Whether the detection has succeeded or failed\n\
00370 int32 SUCCESS = 1\n\
00371 int32 FEW_INLIERS = 2\n\
00372 int32 NO_PLANE = 3\n\
00373 int32 OTHER_ERROR = 4\n\
00374 int32 result\n\
00375 int32 percentage_inliers\n\
00376 \n\
00377 # confidence indicators of plane detection\n\
00378 # mean squared error\n\
00379 float32 error\n\
00380 ================================================================================\n\
00381 MSG: geometry_msgs/PoseStamped\n\
00382 # A Pose with reference coordinate frame and timestamp\n\
00383 Header header\n\
00384 Pose pose\n\
00385 \n\
00386 ================================================================================\n\
00387 MSG: std_msgs/Header\n\
00388 # Standard metadata for higher-level stamped data types.\n\
00389 # This is generally used to communicate timestamped data \n\
00390 # in a particular coordinate frame.\n\
00391 # \n\
00392 # sequence ID: consecutively increasing ID \n\
00393 uint32 seq\n\
00394 #Two-integer timestamp that is expressed as:\n\
00395 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00396 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00397 # time-handling sugar is provided by the client library\n\
00398 time stamp\n\
00399 #Frame this data is associated with\n\
00400 # 0: no frame\n\
00401 # 1: global frame\n\
00402 string frame_id\n\
00403 \n\
00404 ================================================================================\n\
00405 MSG: geometry_msgs/Pose\n\
00406 # A representation of pose in free space, composed of postion and orientation. \n\
00407 Point position\n\
00408 Quaternion orientation\n\
00409 \n\
00410 ================================================================================\n\
00411 MSG: geometry_msgs/Point\n\
00412 # This contains the position of a point in free space\n\
00413 float64 x\n\
00414 float64 y\n\
00415 float64 z\n\
00416 \n\
00417 ================================================================================\n\
00418 MSG: geometry_msgs/Quaternion\n\
00419 # This represents an orientation in free space in quaternion form.\n\
00420 \n\
00421 float64 x\n\
00422 float64 y\n\
00423 float64 z\n\
00424 float64 w\n\
00425 \n\
00426 ================================================================================\n\
00427 MSG: geometry_msgs/PointStamped\n\
00428 # This represents a Point with reference coordinate frame and timestamp\n\
00429 Header header\n\
00430 Point point\n\
00431 \n\
00432 ================================================================================\n\
00433 MSG: geometry_msgs/Vector3Stamped\n\
00434 # This represents a Vector3 with reference coordinate frame and timestamp\n\
00435 Header header\n\
00436 Vector3 vector\n\
00437 \n\
00438 ================================================================================\n\
00439 MSG: geometry_msgs/Vector3\n\
00440 # This represents a vector in free space. \n\
00441 \n\
00442 float64 x\n\
00443 float64 y\n\
00444 float64 z\n\
00445 ================================================================================\n\
00446 MSG: geometry_msgs/Point32\n\
00447 # This contains the position of a point in free space(with 32 bits of precision).\n\
00448 # It is recommeded to use Point wherever possible instead of Point32. \n\
00449 # \n\
00450 # This recommendation is to promote interoperability. \n\
00451 #\n\
00452 # This message is designed to take up less space when sending\n\
00453 # lots of points at once, as in the case of a PointCloud. \n\
00454 \n\
00455 float32 x\n\
00456 float32 y\n\
00457 float32 z\n\
00458 ";
00459 }
00460
00461 static const char* value(const ::fast_plane_detection::Plane_<ContainerAllocator> &) { return value(); }
00462 };
00463
00464 }
00465 }
00466
00467 namespace ros
00468 {
00469 namespace serialization
00470 {
00471
00472 template<class ContainerAllocator> struct Serializer< ::fast_plane_detection::Plane_<ContainerAllocator> >
00473 {
00474 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00475 {
00476 stream.next(m.pose);
00477 stream.next(m.plane_point);
00478 stream.next(m.normal);
00479 stream.next(m.plane_d);
00480 stream.next(m.slave_point);
00481 stream.next(m.top_left);
00482 stream.next(m.top_right);
00483 stream.next(m.bottom_left);
00484 stream.next(m.bottom_right);
00485 stream.next(m.result);
00486 stream.next(m.percentage_inliers);
00487 stream.next(m.error);
00488 }
00489
00490 ROS_DECLARE_ALLINONE_SERIALIZER;
00491 };
00492 }
00493 }
00494
00495 namespace ros
00496 {
00497 namespace message_operations
00498 {
00499
00500 template<class ContainerAllocator>
00501 struct Printer< ::fast_plane_detection::Plane_<ContainerAllocator> >
00502 {
00503 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::fast_plane_detection::Plane_<ContainerAllocator> & v)
00504 {
00505 s << indent << "pose: ";
00506 s << std::endl;
00507 Printer< ::geometry_msgs::PoseStamped_<ContainerAllocator> >::stream(s, indent + " ", v.pose);
00508 s << indent << "plane_point: ";
00509 s << std::endl;
00510 Printer< ::geometry_msgs::PointStamped_<ContainerAllocator> >::stream(s, indent + " ", v.plane_point);
00511 s << indent << "normal: ";
00512 s << std::endl;
00513 Printer< ::geometry_msgs::Vector3Stamped_<ContainerAllocator> >::stream(s, indent + " ", v.normal);
00514 s << indent << "plane_d: ";
00515 Printer<double>::stream(s, indent + " ", v.plane_d);
00516 s << indent << "slave_point: ";
00517 s << std::endl;
00518 Printer< ::geometry_msgs::PointStamped_<ContainerAllocator> >::stream(s, indent + " ", v.slave_point);
00519 s << indent << "top_left: ";
00520 s << std::endl;
00521 Printer< ::geometry_msgs::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.top_left);
00522 s << indent << "top_right: ";
00523 s << std::endl;
00524 Printer< ::geometry_msgs::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.top_right);
00525 s << indent << "bottom_left: ";
00526 s << std::endl;
00527 Printer< ::geometry_msgs::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.bottom_left);
00528 s << indent << "bottom_right: ";
00529 s << std::endl;
00530 Printer< ::geometry_msgs::Point32_<ContainerAllocator> >::stream(s, indent + " ", v.bottom_right);
00531 s << indent << "result: ";
00532 Printer<int32_t>::stream(s, indent + " ", v.result);
00533 s << indent << "percentage_inliers: ";
00534 Printer<int32_t>::stream(s, indent + " ", v.percentage_inliers);
00535 s << indent << "error: ";
00536 Printer<float>::stream(s, indent + " ", v.error);
00537 }
00538 };
00539
00540
00541 }
00542 }
00543
00544 #endif // FAST_PLANE_DETECTION_MESSAGE_PLANE_H
00545