00001
00002 #ifndef CAMERA_POSE_CALIBRATION_MESSAGE_CAMERAMEASUREMENT_H
00003 #define CAMERA_POSE_CALIBRATION_MESSAGE_CAMERAMEASUREMENT_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 "calibration_msgs/CalibrationPattern.h"
00019 #include "sensor_msgs/CameraInfo.h"
00020
00021 namespace camera_pose_calibration
00022 {
00023 template <class ContainerAllocator>
00024 struct CameraMeasurement_ {
00025 typedef CameraMeasurement_<ContainerAllocator> Type;
00026
00027 CameraMeasurement_()
00028 : header()
00029 , camera_id()
00030 , features()
00031 , cam_info()
00032 {
00033 }
00034
00035 CameraMeasurement_(const ContainerAllocator& _alloc)
00036 : header(_alloc)
00037 , camera_id(_alloc)
00038 , features(_alloc)
00039 , cam_info(_alloc)
00040 {
00041 }
00042
00043 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00044 ::std_msgs::Header_<ContainerAllocator> header;
00045
00046 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _camera_id_type;
00047 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > camera_id;
00048
00049 typedef ::calibration_msgs::CalibrationPattern_<ContainerAllocator> _features_type;
00050 ::calibration_msgs::CalibrationPattern_<ContainerAllocator> features;
00051
00052 typedef ::sensor_msgs::CameraInfo_<ContainerAllocator> _cam_info_type;
00053 ::sensor_msgs::CameraInfo_<ContainerAllocator> cam_info;
00054
00055
00056 typedef boost::shared_ptr< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> > Ptr;
00057 typedef boost::shared_ptr< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> const> ConstPtr;
00058 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00059 };
00060 typedef ::camera_pose_calibration::CameraMeasurement_<std::allocator<void> > CameraMeasurement;
00061
00062 typedef boost::shared_ptr< ::camera_pose_calibration::CameraMeasurement> CameraMeasurementPtr;
00063 typedef boost::shared_ptr< ::camera_pose_calibration::CameraMeasurement const> CameraMeasurementConstPtr;
00064
00065
00066 template<typename ContainerAllocator>
00067 std::ostream& operator<<(std::ostream& s, const ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> & v)
00068 {
00069 ros::message_operations::Printer< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> >::stream(s, "", v);
00070 return s;}
00071
00072 }
00073
00074 namespace ros
00075 {
00076 namespace message_traits
00077 {
00078 template<class ContainerAllocator> struct IsMessage< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> > : public TrueType {};
00079 template<class ContainerAllocator> struct IsMessage< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> const> : public TrueType {};
00080 template<class ContainerAllocator>
00081 struct MD5Sum< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> > {
00082 static const char* value()
00083 {
00084 return "d3ae2f15509fe7ea7859c8e2a9ea04c9";
00085 }
00086
00087 static const char* value(const ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> &) { return value(); }
00088 static const uint64_t static_value1 = 0xd3ae2f15509fe7eaULL;
00089 static const uint64_t static_value2 = 0x7859c8e2a9ea04c9ULL;
00090 };
00091
00092 template<class ContainerAllocator>
00093 struct DataType< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> > {
00094 static const char* value()
00095 {
00096 return "camera_pose_calibration/CameraMeasurement";
00097 }
00098
00099 static const char* value(const ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> &) { return value(); }
00100 };
00101
00102 template<class ContainerAllocator>
00103 struct Definition< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> > {
00104 static const char* value()
00105 {
00106 return "Header header\n\
00107 string camera_id\n\
00108 calibration_msgs/CalibrationPattern features\n\
00109 sensor_msgs/CameraInfo cam_info\n\
00110 \n\
00111 ================================================================================\n\
00112 MSG: std_msgs/Header\n\
00113 # Standard metadata for higher-level stamped data types.\n\
00114 # This is generally used to communicate timestamped data \n\
00115 # in a particular coordinate frame.\n\
00116 # \n\
00117 # sequence ID: consecutively increasing ID \n\
00118 uint32 seq\n\
00119 #Two-integer timestamp that is expressed as:\n\
00120 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00121 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00122 # time-handling sugar is provided by the client library\n\
00123 time stamp\n\
00124 #Frame this data is associated with\n\
00125 # 0: no frame\n\
00126 # 1: global frame\n\
00127 string frame_id\n\
00128 \n\
00129 ================================================================================\n\
00130 MSG: calibration_msgs/CalibrationPattern\n\
00131 Header header\n\
00132 geometry_msgs/Point[] object_points\n\
00133 geometry_msgs/Point[] image_points\n\
00134 uint8 success\n\
00135 \n\
00136 ================================================================================\n\
00137 MSG: geometry_msgs/Point\n\
00138 # This contains the position of a point in free space\n\
00139 float64 x\n\
00140 float64 y\n\
00141 float64 z\n\
00142 \n\
00143 ================================================================================\n\
00144 MSG: sensor_msgs/CameraInfo\n\
00145 # This message defines meta information for a camera. It should be in a\n\
00146 # camera namespace on topic \"camera_info\" and accompanied by up to five\n\
00147 # image topics named:\n\
00148 #\n\
00149 # image_raw - raw data from the camera driver, possibly Bayer encoded\n\
00150 # image - monochrome, distorted\n\
00151 # image_color - color, distorted\n\
00152 # image_rect - monochrome, rectified\n\
00153 # image_rect_color - color, rectified\n\
00154 #\n\
00155 # The image_pipeline contains packages (image_proc, stereo_image_proc)\n\
00156 # for producing the four processed image topics from image_raw and\n\
00157 # camera_info. The meaning of the camera parameters are described in\n\
00158 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.\n\
00159 #\n\
00160 # The image_geometry package provides a user-friendly interface to\n\
00161 # common operations using this meta information. If you want to, e.g.,\n\
00162 # project a 3d point into image coordinates, we strongly recommend\n\
00163 # using image_geometry.\n\
00164 #\n\
00165 # If the camera is uncalibrated, the matrices D, K, R, P should be left\n\
00166 # zeroed out. In particular, clients may assume that K[0] == 0.0\n\
00167 # indicates an uncalibrated camera.\n\
00168 \n\
00169 #######################################################################\n\
00170 # Image acquisition info #\n\
00171 #######################################################################\n\
00172 \n\
00173 # Time of image acquisition, camera coordinate frame ID\n\
00174 Header header # Header timestamp should be acquisition time of image\n\
00175 # Header frame_id should be optical frame of camera\n\
00176 # origin of frame should be optical center of camera\n\
00177 # +x should point to the right in the image\n\
00178 # +y should point down in the image\n\
00179 # +z should point into the plane of the image\n\
00180 \n\
00181 \n\
00182 #######################################################################\n\
00183 # Calibration Parameters #\n\
00184 #######################################################################\n\
00185 # These are fixed during camera calibration. Their values will be the #\n\
00186 # same in all messages until the camera is recalibrated. Note that #\n\
00187 # self-calibrating systems may \"recalibrate\" frequently. #\n\
00188 # #\n\
00189 # The internal parameters can be used to warp a raw (distorted) image #\n\
00190 # to: #\n\
00191 # 1. An undistorted image (requires D and K) #\n\
00192 # 2. A rectified image (requires D, K, R) #\n\
00193 # The projection matrix P projects 3D points into the rectified image.#\n\
00194 #######################################################################\n\
00195 \n\
00196 # The image dimensions with which the camera was calibrated. Normally\n\
00197 # this will be the full camera resolution in pixels.\n\
00198 uint32 height\n\
00199 uint32 width\n\
00200 \n\
00201 # The distortion model used. Supported models are listed in\n\
00202 # sensor_msgs/distortion_models.h. For most cameras, \"plumb_bob\" - a\n\
00203 # simple model of radial and tangential distortion - is sufficent.\n\
00204 string distortion_model\n\
00205 \n\
00206 # The distortion parameters, size depending on the distortion model.\n\
00207 # For \"plumb_bob\", the 5 parameters are: (k1, k2, t1, t2, k3).\n\
00208 float64[] D\n\
00209 \n\
00210 # Intrinsic camera matrix for the raw (distorted) images.\n\
00211 # [fx 0 cx]\n\
00212 # K = [ 0 fy cy]\n\
00213 # [ 0 0 1]\n\
00214 # Projects 3D points in the camera coordinate frame to 2D pixel\n\
00215 # coordinates using the focal lengths (fx, fy) and principal point\n\
00216 # (cx, cy).\n\
00217 float64[9] K # 3x3 row-major matrix\n\
00218 \n\
00219 # Rectification matrix (stereo cameras only)\n\
00220 # A rotation matrix aligning the camera coordinate system to the ideal\n\
00221 # stereo image plane so that epipolar lines in both stereo images are\n\
00222 # parallel.\n\
00223 float64[9] R # 3x3 row-major matrix\n\
00224 \n\
00225 # Projection/camera matrix\n\
00226 # [fx' 0 cx' Tx]\n\
00227 # P = [ 0 fy' cy' Ty]\n\
00228 # [ 0 0 1 0]\n\
00229 # By convention, this matrix specifies the intrinsic (camera) matrix\n\
00230 # of the processed (rectified) image. That is, the left 3x3 portion\n\
00231 # is the normal camera intrinsic matrix for the rectified image.\n\
00232 # It projects 3D points in the camera coordinate frame to 2D pixel\n\
00233 # coordinates using the focal lengths (fx', fy') and principal point\n\
00234 # (cx', cy') - these may differ from the values in K.\n\
00235 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will\n\
00236 # also have R = the identity and P[1:3,1:3] = K.\n\
00237 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the\n\
00238 # position of the optical center of the second camera in the first\n\
00239 # camera's frame. We assume Tz = 0 so both cameras are in the same\n\
00240 # stereo image plane. The first camera always has Tx = Ty = 0. For\n\
00241 # the right (second) camera of a horizontal stereo pair, Ty = 0 and\n\
00242 # Tx = -fx' * B, where B is the baseline between the cameras.\n\
00243 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto\n\
00244 # the rectified image is given by:\n\
00245 # [u v w]' = P * [X Y Z 1]'\n\
00246 # x = u / w\n\
00247 # y = v / w\n\
00248 # This holds for both images of a stereo pair.\n\
00249 float64[12] P # 3x4 row-major matrix\n\
00250 \n\
00251 \n\
00252 #######################################################################\n\
00253 # Operational Parameters #\n\
00254 #######################################################################\n\
00255 # These define the image region actually captured by the camera #\n\
00256 # driver. Although they affect the geometry of the output image, they #\n\
00257 # may be changed freely without recalibrating the camera. #\n\
00258 #######################################################################\n\
00259 \n\
00260 # Binning refers here to any camera setting which combines rectangular\n\
00261 # neighborhoods of pixels into larger \"super-pixels.\" It reduces the\n\
00262 # resolution of the output image to\n\
00263 # (width / binning_x) x (height / binning_y).\n\
00264 # The default values binning_x = binning_y = 0 is considered the same\n\
00265 # as binning_x = binning_y = 1 (no subsampling).\n\
00266 uint32 binning_x\n\
00267 uint32 binning_y\n\
00268 \n\
00269 # Region of interest (subwindow of full camera resolution), given in\n\
00270 # full resolution (unbinned) image coordinates. A particular ROI\n\
00271 # always denotes the same window of pixels on the camera sensor,\n\
00272 # regardless of binning settings.\n\
00273 # The default setting of roi (all values 0) is considered the same as\n\
00274 # full resolution (roi.width = width, roi.height = height).\n\
00275 RegionOfInterest roi\n\
00276 \n\
00277 ================================================================================\n\
00278 MSG: sensor_msgs/RegionOfInterest\n\
00279 # This message is used to specify a region of interest within an image.\n\
00280 #\n\
00281 # When used to specify the ROI setting of the camera when the image was\n\
00282 # taken, the height and width fields should either match the height and\n\
00283 # width fields for the associated image; or height = width = 0\n\
00284 # indicates that the full resolution image was captured.\n\
00285 \n\
00286 uint32 x_offset # Leftmost pixel of the ROI\n\
00287 # (0 if the ROI includes the left edge of the image)\n\
00288 uint32 y_offset # Topmost pixel of the ROI\n\
00289 # (0 if the ROI includes the top edge of the image)\n\
00290 uint32 height # Height of ROI\n\
00291 uint32 width # Width of ROI\n\
00292 \n\
00293 # True if a distinct rectified ROI should be calculated from the \"raw\"\n\
00294 # ROI in this message. Typically this should be False if the full image\n\
00295 # is captured (ROI not used), and True if a subwindow is captured (ROI\n\
00296 # used).\n\
00297 bool do_rectify\n\
00298 \n\
00299 ";
00300 }
00301
00302 static const char* value(const ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> &) { return value(); }
00303 };
00304
00305 template<class ContainerAllocator> struct HasHeader< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> > : public TrueType {};
00306 template<class ContainerAllocator> struct HasHeader< const ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> > : public TrueType {};
00307 }
00308 }
00309
00310 namespace ros
00311 {
00312 namespace serialization
00313 {
00314
00315 template<class ContainerAllocator> struct Serializer< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> >
00316 {
00317 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00318 {
00319 stream.next(m.header);
00320 stream.next(m.camera_id);
00321 stream.next(m.features);
00322 stream.next(m.cam_info);
00323 }
00324
00325 ROS_DECLARE_ALLINONE_SERIALIZER;
00326 };
00327 }
00328 }
00329
00330 namespace ros
00331 {
00332 namespace message_operations
00333 {
00334
00335 template<class ContainerAllocator>
00336 struct Printer< ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> >
00337 {
00338 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::camera_pose_calibration::CameraMeasurement_<ContainerAllocator> & v)
00339 {
00340 s << indent << "header: ";
00341 s << std::endl;
00342 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00343 s << indent << "camera_id: ";
00344 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.camera_id);
00345 s << indent << "features: ";
00346 s << std::endl;
00347 Printer< ::calibration_msgs::CalibrationPattern_<ContainerAllocator> >::stream(s, indent + " ", v.features);
00348 s << indent << "cam_info: ";
00349 s << std::endl;
00350 Printer< ::sensor_msgs::CameraInfo_<ContainerAllocator> >::stream(s, indent + " ", v.cam_info);
00351 }
00352 };
00353
00354
00355 }
00356 }
00357
00358 #endif // CAMERA_POSE_CALIBRATION_MESSAGE_CAMERAMEASUREMENT_H
00359