00001
00002 #ifndef SBA_MESSAGE_PROJECTION_H
00003 #define SBA_MESSAGE_PROJECTION_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
00014 namespace sba
00015 {
00016 template <class ContainerAllocator>
00017 struct Projection_ : public ros::Message
00018 {
00019 typedef Projection_<ContainerAllocator> Type;
00020
00021 Projection_()
00022 : camindex(0)
00023 , pointindex(0)
00024 , u(0.0)
00025 , v(0.0)
00026 , d(0.0)
00027 , stereo(false)
00028 , usecovariance(false)
00029 , covariance()
00030 {
00031 covariance.assign(0.0);
00032 }
00033
00034 Projection_(const ContainerAllocator& _alloc)
00035 : camindex(0)
00036 , pointindex(0)
00037 , u(0.0)
00038 , v(0.0)
00039 , d(0.0)
00040 , stereo(false)
00041 , usecovariance(false)
00042 , covariance()
00043 {
00044 covariance.assign(0.0);
00045 }
00046
00047 typedef uint32_t _camindex_type;
00048 uint32_t camindex;
00049
00050 typedef uint32_t _pointindex_type;
00051 uint32_t pointindex;
00052
00053 typedef double _u_type;
00054 double u;
00055
00056 typedef double _v_type;
00057 double v;
00058
00059 typedef double _d_type;
00060 double d;
00061
00062 typedef uint8_t _stereo_type;
00063 uint8_t stereo;
00064
00065 typedef uint8_t _usecovariance_type;
00066 uint8_t usecovariance;
00067
00068 typedef boost::array<double, 9> _covariance_type;
00069 boost::array<double, 9> covariance;
00070
00071
00072 ROS_DEPRECATED uint32_t get_covariance_size() const { return (uint32_t)covariance.size(); }
00073 private:
00074 static const char* __s_getDataType_() { return "sba/Projection"; }
00075 public:
00076 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00077
00078 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00079
00080 private:
00081 static const char* __s_getMD5Sum_() { return "3d5a2ac666ca0038812f550185cfc756"; }
00082 public:
00083 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00084
00085 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00086
00087 private:
00088 static const char* __s_getMessageDefinition_() { return "# Projection\n\
00089 \n\
00090 # Camera index\n\
00091 uint32 camindex\n\
00092 \n\
00093 # Point index\n\
00094 uint32 pointindex\n\
00095 \n\
00096 # Projection into the image plane\n\
00097 float64 u\n\
00098 float64 v\n\
00099 float64 d\n\
00100 \n\
00101 # Is this a stereo projection? (true if stereo, false if monocular)\n\
00102 bool stereo\n\
00103 \n\
00104 # Use a covariance matrix?\n\
00105 bool usecovariance\n\
00106 \n\
00107 # A 3x3 covariance matrix describing the error\n\
00108 float64[9] covariance\n\
00109 \n\
00110 \n\
00111 "; }
00112 public:
00113 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00114
00115 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00116
00117 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00118 {
00119 ros::serialization::OStream stream(write_ptr, 1000000000);
00120 ros::serialization::serialize(stream, camindex);
00121 ros::serialization::serialize(stream, pointindex);
00122 ros::serialization::serialize(stream, u);
00123 ros::serialization::serialize(stream, v);
00124 ros::serialization::serialize(stream, d);
00125 ros::serialization::serialize(stream, stereo);
00126 ros::serialization::serialize(stream, usecovariance);
00127 ros::serialization::serialize(stream, covariance);
00128 return stream.getData();
00129 }
00130
00131 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00132 {
00133 ros::serialization::IStream stream(read_ptr, 1000000000);
00134 ros::serialization::deserialize(stream, camindex);
00135 ros::serialization::deserialize(stream, pointindex);
00136 ros::serialization::deserialize(stream, u);
00137 ros::serialization::deserialize(stream, v);
00138 ros::serialization::deserialize(stream, d);
00139 ros::serialization::deserialize(stream, stereo);
00140 ros::serialization::deserialize(stream, usecovariance);
00141 ros::serialization::deserialize(stream, covariance);
00142 return stream.getData();
00143 }
00144
00145 ROS_DEPRECATED virtual uint32_t serializationLength() const
00146 {
00147 uint32_t size = 0;
00148 size += ros::serialization::serializationLength(camindex);
00149 size += ros::serialization::serializationLength(pointindex);
00150 size += ros::serialization::serializationLength(u);
00151 size += ros::serialization::serializationLength(v);
00152 size += ros::serialization::serializationLength(d);
00153 size += ros::serialization::serializationLength(stereo);
00154 size += ros::serialization::serializationLength(usecovariance);
00155 size += ros::serialization::serializationLength(covariance);
00156 return size;
00157 }
00158
00159 typedef boost::shared_ptr< ::sba::Projection_<ContainerAllocator> > Ptr;
00160 typedef boost::shared_ptr< ::sba::Projection_<ContainerAllocator> const> ConstPtr;
00161 };
00162 typedef ::sba::Projection_<std::allocator<void> > Projection;
00163
00164 typedef boost::shared_ptr< ::sba::Projection> ProjectionPtr;
00165 typedef boost::shared_ptr< ::sba::Projection const> ProjectionConstPtr;
00166
00167
00168 template<typename ContainerAllocator>
00169 std::ostream& operator<<(std::ostream& s, const ::sba::Projection_<ContainerAllocator> & v)
00170 {
00171 ros::message_operations::Printer< ::sba::Projection_<ContainerAllocator> >::stream(s, "", v);
00172 return s;}
00173
00174 }
00175
00176 namespace ros
00177 {
00178 namespace message_traits
00179 {
00180 template<class ContainerAllocator>
00181 struct MD5Sum< ::sba::Projection_<ContainerAllocator> > {
00182 static const char* value()
00183 {
00184 return "3d5a2ac666ca0038812f550185cfc756";
00185 }
00186
00187 static const char* value(const ::sba::Projection_<ContainerAllocator> &) { return value(); }
00188 static const uint64_t static_value1 = 0x3d5a2ac666ca0038ULL;
00189 static const uint64_t static_value2 = 0x812f550185cfc756ULL;
00190 };
00191
00192 template<class ContainerAllocator>
00193 struct DataType< ::sba::Projection_<ContainerAllocator> > {
00194 static const char* value()
00195 {
00196 return "sba/Projection";
00197 }
00198
00199 static const char* value(const ::sba::Projection_<ContainerAllocator> &) { return value(); }
00200 };
00201
00202 template<class ContainerAllocator>
00203 struct Definition< ::sba::Projection_<ContainerAllocator> > {
00204 static const char* value()
00205 {
00206 return "# Projection\n\
00207 \n\
00208 # Camera index\n\
00209 uint32 camindex\n\
00210 \n\
00211 # Point index\n\
00212 uint32 pointindex\n\
00213 \n\
00214 # Projection into the image plane\n\
00215 float64 u\n\
00216 float64 v\n\
00217 float64 d\n\
00218 \n\
00219 # Is this a stereo projection? (true if stereo, false if monocular)\n\
00220 bool stereo\n\
00221 \n\
00222 # Use a covariance matrix?\n\
00223 bool usecovariance\n\
00224 \n\
00225 # A 3x3 covariance matrix describing the error\n\
00226 float64[9] covariance\n\
00227 \n\
00228 \n\
00229 ";
00230 }
00231
00232 static const char* value(const ::sba::Projection_<ContainerAllocator> &) { return value(); }
00233 };
00234
00235 template<class ContainerAllocator> struct IsFixedSize< ::sba::Projection_<ContainerAllocator> > : public TrueType {};
00236 }
00237 }
00238
00239 namespace ros
00240 {
00241 namespace serialization
00242 {
00243
00244 template<class ContainerAllocator> struct Serializer< ::sba::Projection_<ContainerAllocator> >
00245 {
00246 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00247 {
00248 stream.next(m.camindex);
00249 stream.next(m.pointindex);
00250 stream.next(m.u);
00251 stream.next(m.v);
00252 stream.next(m.d);
00253 stream.next(m.stereo);
00254 stream.next(m.usecovariance);
00255 stream.next(m.covariance);
00256 }
00257
00258 ROS_DECLARE_ALLINONE_SERIALIZER;
00259 };
00260 }
00261 }
00262
00263 namespace ros
00264 {
00265 namespace message_operations
00266 {
00267
00268 template<class ContainerAllocator>
00269 struct Printer< ::sba::Projection_<ContainerAllocator> >
00270 {
00271 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sba::Projection_<ContainerAllocator> & v)
00272 {
00273 s << indent << "camindex: ";
00274 Printer<uint32_t>::stream(s, indent + " ", v.camindex);
00275 s << indent << "pointindex: ";
00276 Printer<uint32_t>::stream(s, indent + " ", v.pointindex);
00277 s << indent << "u: ";
00278 Printer<double>::stream(s, indent + " ", v.u);
00279 s << indent << "v: ";
00280 Printer<double>::stream(s, indent + " ", v.v);
00281 s << indent << "d: ";
00282 Printer<double>::stream(s, indent + " ", v.d);
00283 s << indent << "stereo: ";
00284 Printer<uint8_t>::stream(s, indent + " ", v.stereo);
00285 s << indent << "usecovariance: ";
00286 Printer<uint8_t>::stream(s, indent + " ", v.usecovariance);
00287 s << indent << "covariance[]" << std::endl;
00288 for (size_t i = 0; i < v.covariance.size(); ++i)
00289 {
00290 s << indent << " covariance[" << i << "]: ";
00291 Printer<double>::stream(s, indent + " ", v.covariance[i]);
00292 }
00293 }
00294 };
00295
00296
00297 }
00298 }
00299
00300 #endif // SBA_MESSAGE_PROJECTION_H
00301