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