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