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