00001
00002 #ifndef CR_CAPTURE_MESSAGE_RAWCLOUDDATA_H
00003 #define CR_CAPTURE_MESSAGE_RAWCLOUDDATA_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 "sensor_msgs/Image.h"
00019 #include "sensor_msgs/Image.h"
00020 #include "sensor_msgs/Image.h"
00021 #include "sensor_msgs/Image.h"
00022 #include "sensor_msgs/CameraInfo.h"
00023 #include "sensor_msgs/Image.h"
00024 #include "sensor_msgs/Image.h"
00025 #include "sensor_msgs/CameraInfo.h"
00026 #include "sensor_msgs/CameraInfo.h"
00027 #include "cr_capture/PixelIndices.h"
00028 #include "sensor_msgs/PointCloud2.h"
00029
00030 namespace cr_capture
00031 {
00032 template <class ContainerAllocator>
00033 struct RawCloudData_ {
00034 typedef RawCloudData_<ContainerAllocator> Type;
00035
00036 RawCloudData_()
00037 : header()
00038 , intensity()
00039 , confidence()
00040 , depth()
00041 , depth16()
00042 , range_info()
00043 , left_image()
00044 , right_image()
00045 , left_info()
00046 , right_info()
00047 , pixel_indices()
00048 , point_cloud()
00049 {
00050 }
00051
00052 RawCloudData_(const ContainerAllocator& _alloc)
00053 : header(_alloc)
00054 , intensity(_alloc)
00055 , confidence(_alloc)
00056 , depth(_alloc)
00057 , depth16(_alloc)
00058 , range_info(_alloc)
00059 , left_image(_alloc)
00060 , right_image(_alloc)
00061 , left_info(_alloc)
00062 , right_info(_alloc)
00063 , pixel_indices(_alloc)
00064 , point_cloud(_alloc)
00065 {
00066 }
00067
00068 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00069 ::std_msgs::Header_<ContainerAllocator> header;
00070
00071 typedef ::sensor_msgs::Image_<ContainerAllocator> _intensity_type;
00072 ::sensor_msgs::Image_<ContainerAllocator> intensity;
00073
00074 typedef ::sensor_msgs::Image_<ContainerAllocator> _confidence_type;
00075 ::sensor_msgs::Image_<ContainerAllocator> confidence;
00076
00077 typedef ::sensor_msgs::Image_<ContainerAllocator> _depth_type;
00078 ::sensor_msgs::Image_<ContainerAllocator> depth;
00079
00080 typedef ::sensor_msgs::Image_<ContainerAllocator> _depth16_type;
00081 ::sensor_msgs::Image_<ContainerAllocator> depth16;
00082
00083 typedef ::sensor_msgs::CameraInfo_<ContainerAllocator> _range_info_type;
00084 ::sensor_msgs::CameraInfo_<ContainerAllocator> range_info;
00085
00086 typedef ::sensor_msgs::Image_<ContainerAllocator> _left_image_type;
00087 ::sensor_msgs::Image_<ContainerAllocator> left_image;
00088
00089 typedef ::sensor_msgs::Image_<ContainerAllocator> _right_image_type;
00090 ::sensor_msgs::Image_<ContainerAllocator> right_image;
00091
00092 typedef ::sensor_msgs::CameraInfo_<ContainerAllocator> _left_info_type;
00093 ::sensor_msgs::CameraInfo_<ContainerAllocator> left_info;
00094
00095 typedef ::sensor_msgs::CameraInfo_<ContainerAllocator> _right_info_type;
00096 ::sensor_msgs::CameraInfo_<ContainerAllocator> right_info;
00097
00098 typedef ::cr_capture::PixelIndices_<ContainerAllocator> _pixel_indices_type;
00099 ::cr_capture::PixelIndices_<ContainerAllocator> pixel_indices;
00100
00101 typedef ::sensor_msgs::PointCloud2_<ContainerAllocator> _point_cloud_type;
00102 ::sensor_msgs::PointCloud2_<ContainerAllocator> point_cloud;
00103
00104
00105 typedef boost::shared_ptr< ::cr_capture::RawCloudData_<ContainerAllocator> > Ptr;
00106 typedef boost::shared_ptr< ::cr_capture::RawCloudData_<ContainerAllocator> const> ConstPtr;
00107 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00108 };
00109 typedef ::cr_capture::RawCloudData_<std::allocator<void> > RawCloudData;
00110
00111 typedef boost::shared_ptr< ::cr_capture::RawCloudData> RawCloudDataPtr;
00112 typedef boost::shared_ptr< ::cr_capture::RawCloudData const> RawCloudDataConstPtr;
00113
00114
00115 template<typename ContainerAllocator>
00116 std::ostream& operator<<(std::ostream& s, const ::cr_capture::RawCloudData_<ContainerAllocator> & v)
00117 {
00118 ros::message_operations::Printer< ::cr_capture::RawCloudData_<ContainerAllocator> >::stream(s, "", v);
00119 return s;}
00120
00121 }
00122
00123 namespace ros
00124 {
00125 namespace message_traits
00126 {
00127 template<class ContainerAllocator> struct IsMessage< ::cr_capture::RawCloudData_<ContainerAllocator> > : public TrueType {};
00128 template<class ContainerAllocator> struct IsMessage< ::cr_capture::RawCloudData_<ContainerAllocator> const> : public TrueType {};
00129 template<class ContainerAllocator>
00130 struct MD5Sum< ::cr_capture::RawCloudData_<ContainerAllocator> > {
00131 static const char* value()
00132 {
00133 return "576b69ba11e4225220315b3f3359d42e";
00134 }
00135
00136 static const char* value(const ::cr_capture::RawCloudData_<ContainerAllocator> &) { return value(); }
00137 static const uint64_t static_value1 = 0x576b69ba11e42252ULL;
00138 static const uint64_t static_value2 = 0x20315b3f3359d42eULL;
00139 };
00140
00141 template<class ContainerAllocator>
00142 struct DataType< ::cr_capture::RawCloudData_<ContainerAllocator> > {
00143 static const char* value()
00144 {
00145 return "cr_capture/RawCloudData";
00146 }
00147
00148 static const char* value(const ::cr_capture::RawCloudData_<ContainerAllocator> &) { return value(); }
00149 };
00150
00151 template<class ContainerAllocator>
00152 struct Definition< ::cr_capture::RawCloudData_<ContainerAllocator> > {
00153 static const char* value()
00154 {
00155 return "Header header\n\
00156 # range sensor\n\
00157 sensor_msgs/Image intensity\n\
00158 sensor_msgs/Image confidence\n\
00159 sensor_msgs/Image depth\n\
00160 sensor_msgs/Image depth16\n\
00161 # sensor_msgs/PointCloud point_cloud_raw\n\
00162 sensor_msgs/CameraInfo range_info\n\
00163 \n\
00164 # camera\n\
00165 sensor_msgs/Image left_image\n\
00166 sensor_msgs/Image right_image\n\
00167 sensor_msgs/CameraInfo left_info\n\
00168 sensor_msgs/CameraInfo right_info\n\
00169 \n\
00170 # result\n\
00171 cr_capture/PixelIndices pixel_indices\n\
00172 sensor_msgs/PointCloud2 point_cloud\n\
00173 \n\
00174 ================================================================================\n\
00175 MSG: std_msgs/Header\n\
00176 # Standard metadata for higher-level stamped data types.\n\
00177 # This is generally used to communicate timestamped data \n\
00178 # in a particular coordinate frame.\n\
00179 # \n\
00180 # sequence ID: consecutively increasing ID \n\
00181 uint32 seq\n\
00182 #Two-integer timestamp that is expressed as:\n\
00183 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00184 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00185 # time-handling sugar is provided by the client library\n\
00186 time stamp\n\
00187 #Frame this data is associated with\n\
00188 # 0: no frame\n\
00189 # 1: global frame\n\
00190 string frame_id\n\
00191 \n\
00192 ================================================================================\n\
00193 MSG: sensor_msgs/Image\n\
00194 # This message contains an uncompressed image\n\
00195 # (0, 0) is at top-left corner of image\n\
00196 #\n\
00197 \n\
00198 Header header # Header timestamp should be acquisition time of image\n\
00199 # Header frame_id should be optical frame of camera\n\
00200 # origin of frame should be optical center of cameara\n\
00201 # +x should point to the right in the image\n\
00202 # +y should point down in the image\n\
00203 # +z should point into to plane of the image\n\
00204 # If the frame_id here and the frame_id of the CameraInfo\n\
00205 # message associated with the image conflict\n\
00206 # the behavior is undefined\n\
00207 \n\
00208 uint32 height # image height, that is, number of rows\n\
00209 uint32 width # image width, that is, number of columns\n\
00210 \n\
00211 # The legal values for encoding are in file src/image_encodings.cpp\n\
00212 # If you want to standardize a new string format, join\n\
00213 # ros-users@lists.sourceforge.net and send an email proposing a new encoding.\n\
00214 \n\
00215 string encoding # Encoding of pixels -- channel meaning, ordering, size\n\
00216 # taken from the list of strings in src/image_encodings.cpp\n\
00217 \n\
00218 uint8 is_bigendian # is this data bigendian?\n\
00219 uint32 step # Full row length in bytes\n\
00220 uint8[] data # actual matrix data, size is (step * rows)\n\
00221 \n\
00222 ================================================================================\n\
00223 MSG: sensor_msgs/CameraInfo\n\
00224 # This message defines meta information for a camera. It should be in a\n\
00225 # camera namespace on topic \"camera_info\" and accompanied by up to five\n\
00226 # image topics named:\n\
00227 #\n\
00228 # image_raw - raw data from the camera driver, possibly Bayer encoded\n\
00229 # image - monochrome, distorted\n\
00230 # image_color - color, distorted\n\
00231 # image_rect - monochrome, rectified\n\
00232 # image_rect_color - color, rectified\n\
00233 #\n\
00234 # The image_pipeline contains packages (image_proc, stereo_image_proc)\n\
00235 # for producing the four processed image topics from image_raw and\n\
00236 # camera_info. The meaning of the camera parameters are described in\n\
00237 # detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.\n\
00238 #\n\
00239 # The image_geometry package provides a user-friendly interface to\n\
00240 # common operations using this meta information. If you want to, e.g.,\n\
00241 # project a 3d point into image coordinates, we strongly recommend\n\
00242 # using image_geometry.\n\
00243 #\n\
00244 # If the camera is uncalibrated, the matrices D, K, R, P should be left\n\
00245 # zeroed out. In particular, clients may assume that K[0] == 0.0\n\
00246 # indicates an uncalibrated camera.\n\
00247 \n\
00248 #######################################################################\n\
00249 # Image acquisition info #\n\
00250 #######################################################################\n\
00251 \n\
00252 # Time of image acquisition, camera coordinate frame ID\n\
00253 Header header # Header timestamp should be acquisition time of image\n\
00254 # Header frame_id should be optical frame of camera\n\
00255 # origin of frame should be optical center of camera\n\
00256 # +x should point to the right in the image\n\
00257 # +y should point down in the image\n\
00258 # +z should point into the plane of the image\n\
00259 \n\
00260 \n\
00261 #######################################################################\n\
00262 # Calibration Parameters #\n\
00263 #######################################################################\n\
00264 # These are fixed during camera calibration. Their values will be the #\n\
00265 # same in all messages until the camera is recalibrated. Note that #\n\
00266 # self-calibrating systems may \"recalibrate\" frequently. #\n\
00267 # #\n\
00268 # The internal parameters can be used to warp a raw (distorted) image #\n\
00269 # to: #\n\
00270 # 1. An undistorted image (requires D and K) #\n\
00271 # 2. A rectified image (requires D, K, R) #\n\
00272 # The projection matrix P projects 3D points into the rectified image.#\n\
00273 #######################################################################\n\
00274 \n\
00275 # The image dimensions with which the camera was calibrated. Normally\n\
00276 # this will be the full camera resolution in pixels.\n\
00277 uint32 height\n\
00278 uint32 width\n\
00279 \n\
00280 # The distortion model used. Supported models are listed in\n\
00281 # sensor_msgs/distortion_models.h. For most cameras, \"plumb_bob\" - a\n\
00282 # simple model of radial and tangential distortion - is sufficent.\n\
00283 string distortion_model\n\
00284 \n\
00285 # The distortion parameters, size depending on the distortion model.\n\
00286 # For \"plumb_bob\", the 5 parameters are: (k1, k2, t1, t2, k3).\n\
00287 float64[] D\n\
00288 \n\
00289 # Intrinsic camera matrix for the raw (distorted) images.\n\
00290 # [fx 0 cx]\n\
00291 # K = [ 0 fy cy]\n\
00292 # [ 0 0 1]\n\
00293 # Projects 3D points in the camera coordinate frame to 2D pixel\n\
00294 # coordinates using the focal lengths (fx, fy) and principal point\n\
00295 # (cx, cy).\n\
00296 float64[9] K # 3x3 row-major matrix\n\
00297 \n\
00298 # Rectification matrix (stereo cameras only)\n\
00299 # A rotation matrix aligning the camera coordinate system to the ideal\n\
00300 # stereo image plane so that epipolar lines in both stereo images are\n\
00301 # parallel.\n\
00302 float64[9] R # 3x3 row-major matrix\n\
00303 \n\
00304 # Projection/camera matrix\n\
00305 # [fx' 0 cx' Tx]\n\
00306 # P = [ 0 fy' cy' Ty]\n\
00307 # [ 0 0 1 0]\n\
00308 # By convention, this matrix specifies the intrinsic (camera) matrix\n\
00309 # of the processed (rectified) image. That is, the left 3x3 portion\n\
00310 # is the normal camera intrinsic matrix for the rectified image.\n\
00311 # It projects 3D points in the camera coordinate frame to 2D pixel\n\
00312 # coordinates using the focal lengths (fx', fy') and principal point\n\
00313 # (cx', cy') - these may differ from the values in K.\n\
00314 # For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will\n\
00315 # also have R = the identity and P[1:3,1:3] = K.\n\
00316 # For a stereo pair, the fourth column [Tx Ty 0]' is related to the\n\
00317 # position of the optical center of the second camera in the first\n\
00318 # camera's frame. We assume Tz = 0 so both cameras are in the same\n\
00319 # stereo image plane. The first camera always has Tx = Ty = 0. For\n\
00320 # the right (second) camera of a horizontal stereo pair, Ty = 0 and\n\
00321 # Tx = -fx' * B, where B is the baseline between the cameras.\n\
00322 # Given a 3D point [X Y Z]', the projection (x, y) of the point onto\n\
00323 # the rectified image is given by:\n\
00324 # [u v w]' = P * [X Y Z 1]'\n\
00325 # x = u / w\n\
00326 # y = v / w\n\
00327 # This holds for both images of a stereo pair.\n\
00328 float64[12] P # 3x4 row-major matrix\n\
00329 \n\
00330 \n\
00331 #######################################################################\n\
00332 # Operational Parameters #\n\
00333 #######################################################################\n\
00334 # These define the image region actually captured by the camera #\n\
00335 # driver. Although they affect the geometry of the output image, they #\n\
00336 # may be changed freely without recalibrating the camera. #\n\
00337 #######################################################################\n\
00338 \n\
00339 # Binning refers here to any camera setting which combines rectangular\n\
00340 # neighborhoods of pixels into larger \"super-pixels.\" It reduces the\n\
00341 # resolution of the output image to\n\
00342 # (width / binning_x) x (height / binning_y).\n\
00343 # The default values binning_x = binning_y = 0 is considered the same\n\
00344 # as binning_x = binning_y = 1 (no subsampling).\n\
00345 uint32 binning_x\n\
00346 uint32 binning_y\n\
00347 \n\
00348 # Region of interest (subwindow of full camera resolution), given in\n\
00349 # full resolution (unbinned) image coordinates. A particular ROI\n\
00350 # always denotes the same window of pixels on the camera sensor,\n\
00351 # regardless of binning settings.\n\
00352 # The default setting of roi (all values 0) is considered the same as\n\
00353 # full resolution (roi.width = width, roi.height = height).\n\
00354 RegionOfInterest roi\n\
00355 \n\
00356 ================================================================================\n\
00357 MSG: sensor_msgs/RegionOfInterest\n\
00358 # This message is used to specify a region of interest within an image.\n\
00359 #\n\
00360 # When used to specify the ROI setting of the camera when the image was\n\
00361 # taken, the height and width fields should either match the height and\n\
00362 # width fields for the associated image; or height = width = 0\n\
00363 # indicates that the full resolution image was captured.\n\
00364 \n\
00365 uint32 x_offset # Leftmost pixel of the ROI\n\
00366 # (0 if the ROI includes the left edge of the image)\n\
00367 uint32 y_offset # Topmost pixel of the ROI\n\
00368 # (0 if the ROI includes the top edge of the image)\n\
00369 uint32 height # Height of ROI\n\
00370 uint32 width # Width of ROI\n\
00371 \n\
00372 # True if a distinct rectified ROI should be calculated from the \"raw\"\n\
00373 # ROI in this message. Typically this should be False if the full image\n\
00374 # is captured (ROI not used), and True if a subwindow is captured (ROI\n\
00375 # used).\n\
00376 bool do_rectify\n\
00377 \n\
00378 ================================================================================\n\
00379 MSG: cr_capture/PixelIndices\n\
00380 Header header\n\
00381 int32[] indices # [[lu,ru,v],...] \n\
00382 \n\
00383 ================================================================================\n\
00384 MSG: sensor_msgs/PointCloud2\n\
00385 # This message holds a collection of N-dimensional points, which may\n\
00386 # contain additional information such as normals, intensity, etc. The\n\
00387 # point data is stored as a binary blob, its layout described by the\n\
00388 # contents of the \"fields\" array.\n\
00389 \n\
00390 # The point cloud data may be organized 2d (image-like) or 1d\n\
00391 # (unordered). Point clouds organized as 2d images may be produced by\n\
00392 # camera depth sensors such as stereo or time-of-flight.\n\
00393 \n\
00394 # Time of sensor data acquisition, and the coordinate frame ID (for 3d\n\
00395 # points).\n\
00396 Header header\n\
00397 \n\
00398 # 2D structure of the point cloud. If the cloud is unordered, height is\n\
00399 # 1 and width is the length of the point cloud.\n\
00400 uint32 height\n\
00401 uint32 width\n\
00402 \n\
00403 # Describes the channels and their layout in the binary data blob.\n\
00404 PointField[] fields\n\
00405 \n\
00406 bool is_bigendian # Is this data bigendian?\n\
00407 uint32 point_step # Length of a point in bytes\n\
00408 uint32 row_step # Length of a row in bytes\n\
00409 uint8[] data # Actual point data, size is (row_step*height)\n\
00410 \n\
00411 bool is_dense # True if there are no invalid points\n\
00412 \n\
00413 ================================================================================\n\
00414 MSG: sensor_msgs/PointField\n\
00415 # This message holds the description of one point entry in the\n\
00416 # PointCloud2 message format.\n\
00417 uint8 INT8 = 1\n\
00418 uint8 UINT8 = 2\n\
00419 uint8 INT16 = 3\n\
00420 uint8 UINT16 = 4\n\
00421 uint8 INT32 = 5\n\
00422 uint8 UINT32 = 6\n\
00423 uint8 FLOAT32 = 7\n\
00424 uint8 FLOAT64 = 8\n\
00425 \n\
00426 string name # Name of field\n\
00427 uint32 offset # Offset from start of point struct\n\
00428 uint8 datatype # Datatype enumeration, see above\n\
00429 uint32 count # How many elements in the field\n\
00430 \n\
00431 ";
00432 }
00433
00434 static const char* value(const ::cr_capture::RawCloudData_<ContainerAllocator> &) { return value(); }
00435 };
00436
00437 template<class ContainerAllocator> struct HasHeader< ::cr_capture::RawCloudData_<ContainerAllocator> > : public TrueType {};
00438 template<class ContainerAllocator> struct HasHeader< const ::cr_capture::RawCloudData_<ContainerAllocator> > : public TrueType {};
00439 }
00440 }
00441
00442 namespace ros
00443 {
00444 namespace serialization
00445 {
00446
00447 template<class ContainerAllocator> struct Serializer< ::cr_capture::RawCloudData_<ContainerAllocator> >
00448 {
00449 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00450 {
00451 stream.next(m.header);
00452 stream.next(m.intensity);
00453 stream.next(m.confidence);
00454 stream.next(m.depth);
00455 stream.next(m.depth16);
00456 stream.next(m.range_info);
00457 stream.next(m.left_image);
00458 stream.next(m.right_image);
00459 stream.next(m.left_info);
00460 stream.next(m.right_info);
00461 stream.next(m.pixel_indices);
00462 stream.next(m.point_cloud);
00463 }
00464
00465 ROS_DECLARE_ALLINONE_SERIALIZER;
00466 };
00467 }
00468 }
00469
00470 namespace ros
00471 {
00472 namespace message_operations
00473 {
00474
00475 template<class ContainerAllocator>
00476 struct Printer< ::cr_capture::RawCloudData_<ContainerAllocator> >
00477 {
00478 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::cr_capture::RawCloudData_<ContainerAllocator> & v)
00479 {
00480 s << indent << "header: ";
00481 s << std::endl;
00482 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00483 s << indent << "intensity: ";
00484 s << std::endl;
00485 Printer< ::sensor_msgs::Image_<ContainerAllocator> >::stream(s, indent + " ", v.intensity);
00486 s << indent << "confidence: ";
00487 s << std::endl;
00488 Printer< ::sensor_msgs::Image_<ContainerAllocator> >::stream(s, indent + " ", v.confidence);
00489 s << indent << "depth: ";
00490 s << std::endl;
00491 Printer< ::sensor_msgs::Image_<ContainerAllocator> >::stream(s, indent + " ", v.depth);
00492 s << indent << "depth16: ";
00493 s << std::endl;
00494 Printer< ::sensor_msgs::Image_<ContainerAllocator> >::stream(s, indent + " ", v.depth16);
00495 s << indent << "range_info: ";
00496 s << std::endl;
00497 Printer< ::sensor_msgs::CameraInfo_<ContainerAllocator> >::stream(s, indent + " ", v.range_info);
00498 s << indent << "left_image: ";
00499 s << std::endl;
00500 Printer< ::sensor_msgs::Image_<ContainerAllocator> >::stream(s, indent + " ", v.left_image);
00501 s << indent << "right_image: ";
00502 s << std::endl;
00503 Printer< ::sensor_msgs::Image_<ContainerAllocator> >::stream(s, indent + " ", v.right_image);
00504 s << indent << "left_info: ";
00505 s << std::endl;
00506 Printer< ::sensor_msgs::CameraInfo_<ContainerAllocator> >::stream(s, indent + " ", v.left_info);
00507 s << indent << "right_info: ";
00508 s << std::endl;
00509 Printer< ::sensor_msgs::CameraInfo_<ContainerAllocator> >::stream(s, indent + " ", v.right_info);
00510 s << indent << "pixel_indices: ";
00511 s << std::endl;
00512 Printer< ::cr_capture::PixelIndices_<ContainerAllocator> >::stream(s, indent + " ", v.pixel_indices);
00513 s << indent << "point_cloud: ";
00514 s << std::endl;
00515 Printer< ::sensor_msgs::PointCloud2_<ContainerAllocator> >::stream(s, indent + " ", v.point_cloud);
00516 }
00517 };
00518
00519
00520 }
00521 }
00522
00523 #endif // CR_CAPTURE_MESSAGE_RAWCLOUDDATA_H
00524