00001
00002 #ifndef OBJECT_RECOGNITION_GUI_MESSAGE_MODELHYPOTHESIS_H
00003 #define OBJECT_RECOGNITION_GUI_MESSAGE_MODELHYPOTHESIS_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 "geometric_shapes_msgs/Shape.h"
00014 #include "geometry_msgs/PoseStamped.h"
00015
00016 namespace object_recognition_gui
00017 {
00018 template <class ContainerAllocator>
00019 struct ModelHypothesis_ : public ros::Message
00020 {
00021 typedef ModelHypothesis_<ContainerAllocator> Type;
00022
00023 ModelHypothesis_()
00024 : mesh()
00025 , pose()
00026 {
00027 }
00028
00029 ModelHypothesis_(const ContainerAllocator& _alloc)
00030 : mesh(_alloc)
00031 , pose(_alloc)
00032 {
00033 }
00034
00035 typedef ::geometric_shapes_msgs::Shape_<ContainerAllocator> _mesh_type;
00036 ::geometric_shapes_msgs::Shape_<ContainerAllocator> mesh;
00037
00038 typedef ::geometry_msgs::PoseStamped_<ContainerAllocator> _pose_type;
00039 ::geometry_msgs::PoseStamped_<ContainerAllocator> pose;
00040
00041
00042 private:
00043 static const char* __s_getDataType_() { return "object_recognition_gui/ModelHypothesis"; }
00044 public:
00045 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00046
00047 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00048
00049 private:
00050 static const char* __s_getMD5Sum_() { return "4fbf66f058abb32b34d3bbb399568762"; }
00051 public:
00052 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00053
00054 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00055
00056 private:
00057 static const char* __s_getMessageDefinition_() { return "#describes a hypothesis about a recognized object (mesh+pose)\n\
00058 \n\
00059 geometric_shapes_msgs/Shape mesh\n\
00060 geometry_msgs/PoseStamped pose\n\
00061 \n\
00062 ================================================================================\n\
00063 MSG: geometric_shapes_msgs/Shape\n\
00064 byte SPHERE=0\n\
00065 byte BOX=1\n\
00066 byte CYLINDER=2\n\
00067 byte MESH=3\n\
00068 \n\
00069 byte type\n\
00070 \n\
00071 \n\
00072 #### define sphere, box, cylinder ####\n\
00073 # the origin of each shape is considered at the shape's center\n\
00074 \n\
00075 # for sphere\n\
00076 # radius := dimensions[0]\n\
00077 \n\
00078 # for cylinder\n\
00079 # radius := dimensions[0]\n\
00080 # length := dimensions[1]\n\
00081 # the length is along the Z axis\n\
00082 \n\
00083 # for box\n\
00084 # size_x := dimensions[0]\n\
00085 # size_y := dimensions[1]\n\
00086 # size_z := dimensions[2]\n\
00087 float64[] dimensions\n\
00088 \n\
00089 \n\
00090 #### define mesh ####\n\
00091 \n\
00092 # list of triangles; triangle k is defined by tre vertices located\n\
00093 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]\n\
00094 int32[] triangles\n\
00095 geometry_msgs/Point[] vertices\n\
00096 \n\
00097 ================================================================================\n\
00098 MSG: geometry_msgs/Point\n\
00099 # This contains the position of a point in free space\n\
00100 float64 x\n\
00101 float64 y\n\
00102 float64 z\n\
00103 \n\
00104 ================================================================================\n\
00105 MSG: geometry_msgs/PoseStamped\n\
00106 # A Pose with reference coordinate frame and timestamp\n\
00107 Header header\n\
00108 Pose pose\n\
00109 \n\
00110 ================================================================================\n\
00111 MSG: std_msgs/Header\n\
00112 # Standard metadata for higher-level stamped data types.\n\
00113 # This is generally used to communicate timestamped data \n\
00114 # in a particular coordinate frame.\n\
00115 # \n\
00116 # sequence ID: consecutively increasing ID \n\
00117 uint32 seq\n\
00118 #Two-integer timestamp that is expressed as:\n\
00119 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00120 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00121 # time-handling sugar is provided by the client library\n\
00122 time stamp\n\
00123 #Frame this data is associated with\n\
00124 # 0: no frame\n\
00125 # 1: global frame\n\
00126 string frame_id\n\
00127 \n\
00128 ================================================================================\n\
00129 MSG: geometry_msgs/Pose\n\
00130 # A representation of pose in free space, composed of postion and orientation. \n\
00131 Point position\n\
00132 Quaternion orientation\n\
00133 \n\
00134 ================================================================================\n\
00135 MSG: geometry_msgs/Quaternion\n\
00136 # This represents an orientation in free space in quaternion form.\n\
00137 \n\
00138 float64 x\n\
00139 float64 y\n\
00140 float64 z\n\
00141 float64 w\n\
00142 \n\
00143 "; }
00144 public:
00145 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00146
00147 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00148
00149 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00150 {
00151 ros::serialization::OStream stream(write_ptr, 1000000000);
00152 ros::serialization::serialize(stream, mesh);
00153 ros::serialization::serialize(stream, pose);
00154 return stream.getData();
00155 }
00156
00157 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00158 {
00159 ros::serialization::IStream stream(read_ptr, 1000000000);
00160 ros::serialization::deserialize(stream, mesh);
00161 ros::serialization::deserialize(stream, pose);
00162 return stream.getData();
00163 }
00164
00165 ROS_DEPRECATED virtual uint32_t serializationLength() const
00166 {
00167 uint32_t size = 0;
00168 size += ros::serialization::serializationLength(mesh);
00169 size += ros::serialization::serializationLength(pose);
00170 return size;
00171 }
00172
00173 typedef boost::shared_ptr< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> > Ptr;
00174 typedef boost::shared_ptr< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> const> ConstPtr;
00175 };
00176 typedef ::object_recognition_gui::ModelHypothesis_<std::allocator<void> > ModelHypothesis;
00177
00178 typedef boost::shared_ptr< ::object_recognition_gui::ModelHypothesis> ModelHypothesisPtr;
00179 typedef boost::shared_ptr< ::object_recognition_gui::ModelHypothesis const> ModelHypothesisConstPtr;
00180
00181
00182 template<typename ContainerAllocator>
00183 std::ostream& operator<<(std::ostream& s, const ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> & v)
00184 {
00185 ros::message_operations::Printer< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> >::stream(s, "", v);
00186 return s;}
00187
00188 }
00189
00190 namespace ros
00191 {
00192 namespace message_traits
00193 {
00194 template<class ContainerAllocator>
00195 struct MD5Sum< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> > {
00196 static const char* value()
00197 {
00198 return "4fbf66f058abb32b34d3bbb399568762";
00199 }
00200
00201 static const char* value(const ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> &) { return value(); }
00202 static const uint64_t static_value1 = 0x4fbf66f058abb32bULL;
00203 static const uint64_t static_value2 = 0x34d3bbb399568762ULL;
00204 };
00205
00206 template<class ContainerAllocator>
00207 struct DataType< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> > {
00208 static const char* value()
00209 {
00210 return "object_recognition_gui/ModelHypothesis";
00211 }
00212
00213 static const char* value(const ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> &) { return value(); }
00214 };
00215
00216 template<class ContainerAllocator>
00217 struct Definition< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> > {
00218 static const char* value()
00219 {
00220 return "#describes a hypothesis about a recognized object (mesh+pose)\n\
00221 \n\
00222 geometric_shapes_msgs/Shape mesh\n\
00223 geometry_msgs/PoseStamped pose\n\
00224 \n\
00225 ================================================================================\n\
00226 MSG: geometric_shapes_msgs/Shape\n\
00227 byte SPHERE=0\n\
00228 byte BOX=1\n\
00229 byte CYLINDER=2\n\
00230 byte MESH=3\n\
00231 \n\
00232 byte type\n\
00233 \n\
00234 \n\
00235 #### define sphere, box, cylinder ####\n\
00236 # the origin of each shape is considered at the shape's center\n\
00237 \n\
00238 # for sphere\n\
00239 # radius := dimensions[0]\n\
00240 \n\
00241 # for cylinder\n\
00242 # radius := dimensions[0]\n\
00243 # length := dimensions[1]\n\
00244 # the length is along the Z axis\n\
00245 \n\
00246 # for box\n\
00247 # size_x := dimensions[0]\n\
00248 # size_y := dimensions[1]\n\
00249 # size_z := dimensions[2]\n\
00250 float64[] dimensions\n\
00251 \n\
00252 \n\
00253 #### define mesh ####\n\
00254 \n\
00255 # list of triangles; triangle k is defined by tre vertices located\n\
00256 # at indices triangles[3k], triangles[3k+1], triangles[3k+2]\n\
00257 int32[] triangles\n\
00258 geometry_msgs/Point[] vertices\n\
00259 \n\
00260 ================================================================================\n\
00261 MSG: geometry_msgs/Point\n\
00262 # This contains the position of a point in free space\n\
00263 float64 x\n\
00264 float64 y\n\
00265 float64 z\n\
00266 \n\
00267 ================================================================================\n\
00268 MSG: geometry_msgs/PoseStamped\n\
00269 # A Pose with reference coordinate frame and timestamp\n\
00270 Header header\n\
00271 Pose pose\n\
00272 \n\
00273 ================================================================================\n\
00274 MSG: std_msgs/Header\n\
00275 # Standard metadata for higher-level stamped data types.\n\
00276 # This is generally used to communicate timestamped data \n\
00277 # in a particular coordinate frame.\n\
00278 # \n\
00279 # sequence ID: consecutively increasing ID \n\
00280 uint32 seq\n\
00281 #Two-integer timestamp that is expressed as:\n\
00282 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00283 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00284 # time-handling sugar is provided by the client library\n\
00285 time stamp\n\
00286 #Frame this data is associated with\n\
00287 # 0: no frame\n\
00288 # 1: global frame\n\
00289 string frame_id\n\
00290 \n\
00291 ================================================================================\n\
00292 MSG: geometry_msgs/Pose\n\
00293 # A representation of pose in free space, composed of postion and orientation. \n\
00294 Point position\n\
00295 Quaternion orientation\n\
00296 \n\
00297 ================================================================================\n\
00298 MSG: geometry_msgs/Quaternion\n\
00299 # This represents an orientation in free space in quaternion form.\n\
00300 \n\
00301 float64 x\n\
00302 float64 y\n\
00303 float64 z\n\
00304 float64 w\n\
00305 \n\
00306 ";
00307 }
00308
00309 static const char* value(const ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> &) { return value(); }
00310 };
00311
00312 }
00313 }
00314
00315 namespace ros
00316 {
00317 namespace serialization
00318 {
00319
00320 template<class ContainerAllocator> struct Serializer< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> >
00321 {
00322 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00323 {
00324 stream.next(m.mesh);
00325 stream.next(m.pose);
00326 }
00327
00328 ROS_DECLARE_ALLINONE_SERIALIZER;
00329 };
00330 }
00331 }
00332
00333 namespace ros
00334 {
00335 namespace message_operations
00336 {
00337
00338 template<class ContainerAllocator>
00339 struct Printer< ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> >
00340 {
00341 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::object_recognition_gui::ModelHypothesis_<ContainerAllocator> & v)
00342 {
00343 s << indent << "mesh: ";
00344 s << std::endl;
00345 Printer< ::geometric_shapes_msgs::Shape_<ContainerAllocator> >::stream(s, indent + " ", v.mesh);
00346 s << indent << "pose: ";
00347 s << std::endl;
00348 Printer< ::geometry_msgs::PoseStamped_<ContainerAllocator> >::stream(s, indent + " ", v.pose);
00349 }
00350 };
00351
00352
00353 }
00354 }
00355
00356 #endif // OBJECT_RECOGNITION_GUI_MESSAGE_MODELHYPOTHESIS_H
00357