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