Go to the documentation of this file.00001
00002 #ifndef SBA_MESSAGE_FRAME_H
00003 #define SBA_MESSAGE_FRAME_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 #include "std_msgs/Header.h"
00018 #include "sba/CameraNode.h"
00019 #include "sba/WorldPoint.h"
00020 #include "sba/Projection.h"
00021
00022 namespace sba
00023 {
00024 template <class ContainerAllocator>
00025 struct Frame_ {
00026 typedef Frame_<ContainerAllocator> Type;
00027
00028 Frame_()
00029 : header()
00030 , nodes()
00031 , points()
00032 , projections()
00033 {
00034 }
00035
00036 Frame_(const ContainerAllocator& _alloc)
00037 : header(_alloc)
00038 , nodes(_alloc)
00039 , points(_alloc)
00040 , projections(_alloc)
00041 {
00042 }
00043
00044 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00045 ::std_msgs::Header_<ContainerAllocator> header;
00046
00047 typedef std::vector< ::sba::CameraNode_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sba::CameraNode_<ContainerAllocator> >::other > _nodes_type;
00048 std::vector< ::sba::CameraNode_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sba::CameraNode_<ContainerAllocator> >::other > nodes;
00049
00050 typedef std::vector< ::sba::WorldPoint_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sba::WorldPoint_<ContainerAllocator> >::other > _points_type;
00051 std::vector< ::sba::WorldPoint_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sba::WorldPoint_<ContainerAllocator> >::other > points;
00052
00053 typedef std::vector< ::sba::Projection_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sba::Projection_<ContainerAllocator> >::other > _projections_type;
00054 std::vector< ::sba::Projection_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::sba::Projection_<ContainerAllocator> >::other > projections;
00055
00056
00057 typedef boost::shared_ptr< ::sba::Frame_<ContainerAllocator> > Ptr;
00058 typedef boost::shared_ptr< ::sba::Frame_<ContainerAllocator> const> ConstPtr;
00059 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00060 };
00061 typedef ::sba::Frame_<std::allocator<void> > Frame;
00062
00063 typedef boost::shared_ptr< ::sba::Frame> FramePtr;
00064 typedef boost::shared_ptr< ::sba::Frame const> FrameConstPtr;
00065
00066
00067 template<typename ContainerAllocator>
00068 std::ostream& operator<<(std::ostream& s, const ::sba::Frame_<ContainerAllocator> & v)
00069 {
00070 ros::message_operations::Printer< ::sba::Frame_<ContainerAllocator> >::stream(s, "", v);
00071 return s;}
00072
00073 }
00074
00075 namespace ros
00076 {
00077 namespace message_traits
00078 {
00079 template<class ContainerAllocator> struct IsMessage< ::sba::Frame_<ContainerAllocator> > : public TrueType {};
00080 template<class ContainerAllocator> struct IsMessage< ::sba::Frame_<ContainerAllocator> const> : public TrueType {};
00081 template<class ContainerAllocator>
00082 struct MD5Sum< ::sba::Frame_<ContainerAllocator> > {
00083 static const char* value()
00084 {
00085 return "418ca143f82258a762de2cff21411737";
00086 }
00087
00088 static const char* value(const ::sba::Frame_<ContainerAllocator> &) { return value(); }
00089 static const uint64_t static_value1 = 0x418ca143f82258a7ULL;
00090 static const uint64_t static_value2 = 0x62de2cff21411737ULL;
00091 };
00092
00093 template<class ContainerAllocator>
00094 struct DataType< ::sba::Frame_<ContainerAllocator> > {
00095 static const char* value()
00096 {
00097 return "sba/Frame";
00098 }
00099
00100 static const char* value(const ::sba::Frame_<ContainerAllocator> &) { return value(); }
00101 };
00102
00103 template<class ContainerAllocator>
00104 struct Definition< ::sba::Frame_<ContainerAllocator> > {
00105 static const char* value()
00106 {
00107 return "# New Frame\n\
00108 Header header\n\
00109 \n\
00110 # New nodes (generally just 1, but want to leave this open)\n\
00111 CameraNode[] nodes\n\
00112 \n\
00113 # New points added from the frame\n\
00114 WorldPoint[] points\n\
00115 \n\
00116 # New projections\n\
00117 Projection[] projections\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: sba/CameraNode\n\
00139 # Node Parameters\n\
00140 uint32 index\n\
00141 \n\
00142 # Contains a translation and rotation\n\
00143 geometry_msgs/Transform transform\n\
00144 \n\
00145 # Camera parameters from the K matrix\n\
00146 float64 fx\n\
00147 float64 fy\n\
00148 float64 cx\n\
00149 float64 cy\n\
00150 \n\
00151 # Only relevant for a stereo camera\n\
00152 float64 baseline\n\
00153 \n\
00154 # Whether the camera is fixed in space: i.e., its position is known\n\
00155 bool fixed\n\
00156 \n\
00157 ================================================================================\n\
00158 MSG: geometry_msgs/Transform\n\
00159 # This represents the transform between two coordinate frames in free space.\n\
00160 \n\
00161 Vector3 translation\n\
00162 Quaternion rotation\n\
00163 \n\
00164 ================================================================================\n\
00165 MSG: geometry_msgs/Vector3\n\
00166 # This represents a vector in free space. \n\
00167 \n\
00168 float64 x\n\
00169 float64 y\n\
00170 float64 z\n\
00171 ================================================================================\n\
00172 MSG: geometry_msgs/Quaternion\n\
00173 # This represents an orientation in free space in quaternion form.\n\
00174 \n\
00175 float64 x\n\
00176 float64 y\n\
00177 float64 z\n\
00178 float64 w\n\
00179 \n\
00180 ================================================================================\n\
00181 MSG: sba/WorldPoint\n\
00182 # World Point parameters\n\
00183 \n\
00184 # Point index\n\
00185 uint32 index\n\
00186 \n\
00187 # Coordinates in the world frame\n\
00188 float64 x\n\
00189 float64 y\n\
00190 float64 z\n\
00191 float64 w\n\
00192 \n\
00193 ================================================================================\n\
00194 MSG: sba/Projection\n\
00195 # Projection\n\
00196 \n\
00197 # Camera index\n\
00198 uint32 camindex\n\
00199 \n\
00200 # Point index\n\
00201 uint32 pointindex\n\
00202 \n\
00203 # Projection into the image plane\n\
00204 float64 u\n\
00205 float64 v\n\
00206 float64 d\n\
00207 \n\
00208 # Is this a stereo projection? (true if stereo, false if monocular)\n\
00209 bool stereo\n\
00210 \n\
00211 # Use a covariance matrix?\n\
00212 bool usecovariance\n\
00213 \n\
00214 # A 3x3 covariance matrix describing the error\n\
00215 float64[9] covariance\n\
00216 \n\
00217 \n\
00218 ";
00219 }
00220
00221 static const char* value(const ::sba::Frame_<ContainerAllocator> &) { return value(); }
00222 };
00223
00224 template<class ContainerAllocator> struct HasHeader< ::sba::Frame_<ContainerAllocator> > : public TrueType {};
00225 template<class ContainerAllocator> struct HasHeader< const ::sba::Frame_<ContainerAllocator> > : public TrueType {};
00226 }
00227 }
00228
00229 namespace ros
00230 {
00231 namespace serialization
00232 {
00233
00234 template<class ContainerAllocator> struct Serializer< ::sba::Frame_<ContainerAllocator> >
00235 {
00236 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00237 {
00238 stream.next(m.header);
00239 stream.next(m.nodes);
00240 stream.next(m.points);
00241 stream.next(m.projections);
00242 }
00243
00244 ROS_DECLARE_ALLINONE_SERIALIZER;
00245 };
00246 }
00247 }
00248
00249 namespace ros
00250 {
00251 namespace message_operations
00252 {
00253
00254 template<class ContainerAllocator>
00255 struct Printer< ::sba::Frame_<ContainerAllocator> >
00256 {
00257 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sba::Frame_<ContainerAllocator> & v)
00258 {
00259 s << indent << "header: ";
00260 s << std::endl;
00261 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00262 s << indent << "nodes[]" << std::endl;
00263 for (size_t i = 0; i < v.nodes.size(); ++i)
00264 {
00265 s << indent << " nodes[" << i << "]: ";
00266 s << std::endl;
00267 s << indent;
00268 Printer< ::sba::CameraNode_<ContainerAllocator> >::stream(s, indent + " ", v.nodes[i]);
00269 }
00270 s << indent << "points[]" << std::endl;
00271 for (size_t i = 0; i < v.points.size(); ++i)
00272 {
00273 s << indent << " points[" << i << "]: ";
00274 s << std::endl;
00275 s << indent;
00276 Printer< ::sba::WorldPoint_<ContainerAllocator> >::stream(s, indent + " ", v.points[i]);
00277 }
00278 s << indent << "projections[]" << std::endl;
00279 for (size_t i = 0; i < v.projections.size(); ++i)
00280 {
00281 s << indent << " projections[" << i << "]: ";
00282 s << std::endl;
00283 s << indent;
00284 Printer< ::sba::Projection_<ContainerAllocator> >::stream(s, indent + " ", v.projections[i]);
00285 }
00286 }
00287 };
00288
00289
00290 }
00291 }
00292
00293 #endif // SBA_MESSAGE_FRAME_H
00294