00001
00002 #ifndef AR_RECOG_MESSAGE_TAG_H
00003 #define AR_RECOG_MESSAGE_TAG_H
00004 #include <string>
00005 #include <vector>
00006 #include <map>
00007 #include <ostream>
00008 #include "ros/serialization.h"
00009 #include "ros/builtin_message_traits.h"
00010 #include "ros/message_operations.h"
00011 #include "ros/time.h"
00012
00013 #include "ros/macros.h"
00014
00015 #include "ros/assert.h"
00016
00017
00018 namespace ar_recog
00019 {
00020 template <class ContainerAllocator>
00021 struct Tag_ {
00022 typedef Tag_<ContainerAllocator> Type;
00023
00024 Tag_()
00025 : id(0)
00026 , cf(0.0)
00027 , x(0)
00028 , y(0)
00029 , diameter(0.0)
00030 , distance(0.0)
00031 , xRot(0.0)
00032 , yRot(0.0)
00033 , zRot(0.0)
00034 , xMetric(0.0)
00035 , yMetric(0.0)
00036 , zMetric(0.0)
00037 , cwCorners()
00038 {
00039 cwCorners.assign(0.0);
00040 }
00041
00042 Tag_(const ContainerAllocator& _alloc)
00043 : id(0)
00044 , cf(0.0)
00045 , x(0)
00046 , y(0)
00047 , diameter(0.0)
00048 , distance(0.0)
00049 , xRot(0.0)
00050 , yRot(0.0)
00051 , zRot(0.0)
00052 , xMetric(0.0)
00053 , yMetric(0.0)
00054 , zMetric(0.0)
00055 , cwCorners()
00056 {
00057 cwCorners.assign(0.0);
00058 }
00059
00060 typedef uint32_t _id_type;
00061 uint32_t id;
00062
00063 typedef double _cf_type;
00064 double cf;
00065
00066 typedef uint32_t _x_type;
00067 uint32_t x;
00068
00069 typedef uint32_t _y_type;
00070 uint32_t y;
00071
00072 typedef double _diameter_type;
00073 double diameter;
00074
00075 typedef double _distance_type;
00076 double distance;
00077
00078 typedef double _xRot_type;
00079 double xRot;
00080
00081 typedef double _yRot_type;
00082 double yRot;
00083
00084 typedef double _zRot_type;
00085 double zRot;
00086
00087 typedef double _xMetric_type;
00088 double xMetric;
00089
00090 typedef double _yMetric_type;
00091 double yMetric;
00092
00093 typedef double _zMetric_type;
00094 double zMetric;
00095
00096 typedef boost::array<double, 8> _cwCorners_type;
00097 boost::array<double, 8> cwCorners;
00098
00099
00100 typedef boost::shared_ptr< ::ar_recog::Tag_<ContainerAllocator> > Ptr;
00101 typedef boost::shared_ptr< ::ar_recog::Tag_<ContainerAllocator> const> ConstPtr;
00102 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00103 };
00104 typedef ::ar_recog::Tag_<std::allocator<void> > Tag;
00105
00106 typedef boost::shared_ptr< ::ar_recog::Tag> TagPtr;
00107 typedef boost::shared_ptr< ::ar_recog::Tag const> TagConstPtr;
00108
00109
00110 template<typename ContainerAllocator>
00111 std::ostream& operator<<(std::ostream& s, const ::ar_recog::Tag_<ContainerAllocator> & v)
00112 {
00113 ros::message_operations::Printer< ::ar_recog::Tag_<ContainerAllocator> >::stream(s, "", v);
00114 return s;}
00115
00116 }
00117
00118 namespace ros
00119 {
00120 namespace message_traits
00121 {
00122 template<class ContainerAllocator> struct IsMessage< ::ar_recog::Tag_<ContainerAllocator> > : public TrueType {};
00123 template<class ContainerAllocator> struct IsMessage< ::ar_recog::Tag_<ContainerAllocator> const> : public TrueType {};
00124 template<class ContainerAllocator>
00125 struct MD5Sum< ::ar_recog::Tag_<ContainerAllocator> > {
00126 static const char* value()
00127 {
00128 return "8506b66f10a2975d80e32037f36b9ab4";
00129 }
00130
00131 static const char* value(const ::ar_recog::Tag_<ContainerAllocator> &) { return value(); }
00132 static const uint64_t static_value1 = 0x8506b66f10a2975dULL;
00133 static const uint64_t static_value2 = 0x80e32037f36b9ab4ULL;
00134 };
00135
00136 template<class ContainerAllocator>
00137 struct DataType< ::ar_recog::Tag_<ContainerAllocator> > {
00138 static const char* value()
00139 {
00140 return "ar_recog/Tag";
00141 }
00142
00143 static const char* value(const ::ar_recog::Tag_<ContainerAllocator> &) { return value(); }
00144 };
00145
00146 template<class ContainerAllocator>
00147 struct Definition< ::ar_recog::Tag_<ContainerAllocator> > {
00148 static const char* value()
00149 {
00150 return "# All screen measurements are in pixels, all spatial measurements are in meters.\n\
00151 # Angles in radians.\n\
00152 uint32 id\n\
00153 # This is a rating of confidence in the tag pattern identification 0 < cf < 1.\n\
00154 float64 cf\n\
00155 uint32 x\n\
00156 uint32 y\n\
00157 # The 'diameter' is the square root of the tag's actual area, as estimated by \n\
00158 # the AR software. You can use it to check the cf confidence.\n\
00159 float64 diameter\n\
00160 # This is the estimated distance from viewer to the center of the tag.\n\
00161 float64 distance\n\
00162 float64 xRot \n\
00163 float64 yRot \n\
00164 float64 zRot\n\
00165 float64 xMetric\n\
00166 float64 yMetric\n\
00167 float64 zMetric\n\
00168 # Screen coordinates of the four corners.\n\
00169 float64[8] cwCorners\n\
00170 # FOR TESTING ONLY\n\
00171 # Uncommenting this and uncommenting the similarly-marked lines in \n\
00172 # ar_recog.cpp will put the ARToolkit rotation matrix into the Tag message,\n\
00173 # which can be useful for debugging and testing.\n\
00174 # float64[3] c3\n\
00175 # float64[3] t0\n\
00176 # float64[3] t1\n\
00177 # float64[3] t2\n\
00178 \n\
00179 ";
00180 }
00181
00182 static const char* value(const ::ar_recog::Tag_<ContainerAllocator> &) { return value(); }
00183 };
00184
00185 template<class ContainerAllocator> struct IsFixedSize< ::ar_recog::Tag_<ContainerAllocator> > : public TrueType {};
00186 }
00187 }
00188
00189 namespace ros
00190 {
00191 namespace serialization
00192 {
00193
00194 template<class ContainerAllocator> struct Serializer< ::ar_recog::Tag_<ContainerAllocator> >
00195 {
00196 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00197 {
00198 stream.next(m.id);
00199 stream.next(m.cf);
00200 stream.next(m.x);
00201 stream.next(m.y);
00202 stream.next(m.diameter);
00203 stream.next(m.distance);
00204 stream.next(m.xRot);
00205 stream.next(m.yRot);
00206 stream.next(m.zRot);
00207 stream.next(m.xMetric);
00208 stream.next(m.yMetric);
00209 stream.next(m.zMetric);
00210 stream.next(m.cwCorners);
00211 }
00212
00213 ROS_DECLARE_ALLINONE_SERIALIZER;
00214 };
00215 }
00216 }
00217
00218 namespace ros
00219 {
00220 namespace message_operations
00221 {
00222
00223 template<class ContainerAllocator>
00224 struct Printer< ::ar_recog::Tag_<ContainerAllocator> >
00225 {
00226 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ar_recog::Tag_<ContainerAllocator> & v)
00227 {
00228 s << indent << "id: ";
00229 Printer<uint32_t>::stream(s, indent + " ", v.id);
00230 s << indent << "cf: ";
00231 Printer<double>::stream(s, indent + " ", v.cf);
00232 s << indent << "x: ";
00233 Printer<uint32_t>::stream(s, indent + " ", v.x);
00234 s << indent << "y: ";
00235 Printer<uint32_t>::stream(s, indent + " ", v.y);
00236 s << indent << "diameter: ";
00237 Printer<double>::stream(s, indent + " ", v.diameter);
00238 s << indent << "distance: ";
00239 Printer<double>::stream(s, indent + " ", v.distance);
00240 s << indent << "xRot: ";
00241 Printer<double>::stream(s, indent + " ", v.xRot);
00242 s << indent << "yRot: ";
00243 Printer<double>::stream(s, indent + " ", v.yRot);
00244 s << indent << "zRot: ";
00245 Printer<double>::stream(s, indent + " ", v.zRot);
00246 s << indent << "xMetric: ";
00247 Printer<double>::stream(s, indent + " ", v.xMetric);
00248 s << indent << "yMetric: ";
00249 Printer<double>::stream(s, indent + " ", v.yMetric);
00250 s << indent << "zMetric: ";
00251 Printer<double>::stream(s, indent + " ", v.zMetric);
00252 s << indent << "cwCorners[]" << std::endl;
00253 for (size_t i = 0; i < v.cwCorners.size(); ++i)
00254 {
00255 s << indent << " cwCorners[" << i << "]: ";
00256 Printer<double>::stream(s, indent + " ", v.cwCorners[i]);
00257 }
00258 }
00259 };
00260
00261
00262 }
00263 }
00264
00265 #endif // AR_RECOG_MESSAGE_TAG_H
00266