/usr/include/sensor_msgs/CameraInfo.h is in libsensor-msgs-dev 1.12.5-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 | // Generated by gencpp from file sensor_msgs/CameraInfo.msg
// DO NOT EDIT!
#ifndef SENSOR_MSGS_MESSAGE_CAMERAINFO_H
#define SENSOR_MSGS_MESSAGE_CAMERAINFO_H
#include <string>
#include <vector>
#include <map>
#include <ros/types.h>
#include <ros/serialization.h>
#include <ros/builtin_message_traits.h>
#include <ros/message_operations.h>
#include <std_msgs/Header.h>
#include <sensor_msgs/RegionOfInterest.h>
namespace sensor_msgs
{
template <class ContainerAllocator>
struct CameraInfo_
{
typedef CameraInfo_<ContainerAllocator> Type;
CameraInfo_()
: header()
, height(0)
, width(0)
, distortion_model()
, D()
, K()
, R()
, P()
, binning_x(0)
, binning_y(0)
, roi() {
K.assign(0.0);
R.assign(0.0);
P.assign(0.0);
}
CameraInfo_(const ContainerAllocator& _alloc)
: header(_alloc)
, height(0)
, width(0)
, distortion_model(_alloc)
, D(_alloc)
, K()
, R()
, P()
, binning_x(0)
, binning_y(0)
, roi(_alloc) {
(void)_alloc;
K.assign(0.0);
R.assign(0.0);
P.assign(0.0);
}
typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
_header_type header;
typedef uint32_t _height_type;
_height_type height;
typedef uint32_t _width_type;
_width_type width;
typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _distortion_model_type;
_distortion_model_type distortion_model;
typedef std::vector<double, typename ContainerAllocator::template rebind<double>::other > _D_type;
_D_type D;
typedef boost::array<double, 9> _K_type;
_K_type K;
typedef boost::array<double, 9> _R_type;
_R_type R;
typedef boost::array<double, 12> _P_type;
_P_type P;
typedef uint32_t _binning_x_type;
_binning_x_type binning_x;
typedef uint32_t _binning_y_type;
_binning_y_type binning_y;
typedef ::sensor_msgs::RegionOfInterest_<ContainerAllocator> _roi_type;
_roi_type roi;
typedef boost::shared_ptr< ::sensor_msgs::CameraInfo_<ContainerAllocator> > Ptr;
typedef boost::shared_ptr< ::sensor_msgs::CameraInfo_<ContainerAllocator> const> ConstPtr;
}; // struct CameraInfo_
typedef ::sensor_msgs::CameraInfo_<std::allocator<void> > CameraInfo;
typedef boost::shared_ptr< ::sensor_msgs::CameraInfo > CameraInfoPtr;
typedef boost::shared_ptr< ::sensor_msgs::CameraInfo const> CameraInfoConstPtr;
// constants requiring out of line definition
template<typename ContainerAllocator>
std::ostream& operator<<(std::ostream& s, const ::sensor_msgs::CameraInfo_<ContainerAllocator> & v)
{
ros::message_operations::Printer< ::sensor_msgs::CameraInfo_<ContainerAllocator> >::stream(s, "", v);
return s;
}
} // namespace sensor_msgs
namespace ros
{
namespace message_traits
{
// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True}
// !!!!!!!!!!! ['__class__', '__delattr__', '__dict__', '__doc__', '__eq__', '__format__', '__getattribute__', '__hash__', '__init__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_parsed_fields', 'constants', 'fields', 'full_name', 'has_header', 'header_present', 'names', 'package', 'parsed_fields', 'short_name', 'text', 'types']
template <class ContainerAllocator>
struct IsFixedSize< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
: FalseType
{ };
template <class ContainerAllocator>
struct IsFixedSize< ::sensor_msgs::CameraInfo_<ContainerAllocator> const>
: FalseType
{ };
template <class ContainerAllocator>
struct IsMessage< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct IsMessage< ::sensor_msgs::CameraInfo_<ContainerAllocator> const>
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
: TrueType
{ };
template <class ContainerAllocator>
struct HasHeader< ::sensor_msgs::CameraInfo_<ContainerAllocator> const>
: TrueType
{ };
template<class ContainerAllocator>
struct MD5Sum< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
{
static const char* value()
{
return "c9a58c1b0b154e0e6da7578cb991d214";
}
static const char* value(const ::sensor_msgs::CameraInfo_<ContainerAllocator>&) { return value(); }
static const uint64_t static_value1 = 0xc9a58c1b0b154e0eULL;
static const uint64_t static_value2 = 0x6da7578cb991d214ULL;
};
template<class ContainerAllocator>
struct DataType< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
{
static const char* value()
{
return "sensor_msgs/CameraInfo";
}
static const char* value(const ::sensor_msgs::CameraInfo_<ContainerAllocator>&) { return value(); }
};
template<class ContainerAllocator>
struct Definition< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
{
static const char* value()
{
return "# This message defines meta information for a camera. It should be in a\n\
# camera namespace on topic \"camera_info\" and accompanied by up to five\n\
# image topics named:\n\
#\n\
# image_raw - raw data from the camera driver, possibly Bayer encoded\n\
# image - monochrome, distorted\n\
# image_color - color, distorted\n\
# image_rect - monochrome, rectified\n\
# image_rect_color - color, rectified\n\
#\n\
# The image_pipeline contains packages (image_proc, stereo_image_proc)\n\
# for producing the four processed image topics from image_raw and\n\
# camera_info. The meaning of the camera parameters are described in\n\
# detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.\n\
#\n\
# The image_geometry package provides a user-friendly interface to\n\
# common operations using this meta information. If you want to, e.g.,\n\
# project a 3d point into image coordinates, we strongly recommend\n\
# using image_geometry.\n\
#\n\
# If the camera is uncalibrated, the matrices D, K, R, P should be left\n\
# zeroed out. In particular, clients may assume that K[0] == 0.0\n\
# indicates an uncalibrated camera.\n\
\n\
#######################################################################\n\
# Image acquisition info #\n\
#######################################################################\n\
\n\
# Time of image acquisition, camera coordinate frame ID\n\
Header header # Header timestamp should be acquisition time of image\n\
# Header frame_id should be optical frame of camera\n\
# origin of frame should be optical center of camera\n\
# +x should point to the right in the image\n\
# +y should point down in the image\n\
# +z should point into the plane of the image\n\
\n\
\n\
#######################################################################\n\
# Calibration Parameters #\n\
#######################################################################\n\
# These are fixed during camera calibration. Their values will be the #\n\
# same in all messages until the camera is recalibrated. Note that #\n\
# self-calibrating systems may \"recalibrate\" frequently. #\n\
# #\n\
# The internal parameters can be used to warp a raw (distorted) image #\n\
# to: #\n\
# 1. An undistorted image (requires D and K) #\n\
# 2. A rectified image (requires D, K, R) #\n\
# The projection matrix P projects 3D points into the rectified image.#\n\
#######################################################################\n\
\n\
# The image dimensions with which the camera was calibrated. Normally\n\
# this will be the full camera resolution in pixels.\n\
uint32 height\n\
uint32 width\n\
\n\
# The distortion model used. Supported models are listed in\n\
# sensor_msgs/distortion_models.h. For most cameras, \"plumb_bob\" - a\n\
# simple model of radial and tangential distortion - is sufficient.\n\
string distortion_model\n\
\n\
# The distortion parameters, size depending on the distortion model.\n\
# For \"plumb_bob\", the 5 parameters are: (k1, k2, t1, t2, k3).\n\
float64[] D\n\
\n\
# Intrinsic camera matrix for the raw (distorted) images.\n\
# [fx 0 cx]\n\
# K = [ 0 fy cy]\n\
# [ 0 0 1]\n\
# Projects 3D points in the camera coordinate frame to 2D pixel\n\
# coordinates using the focal lengths (fx, fy) and principal point\n\
# (cx, cy).\n\
float64[9] K # 3x3 row-major matrix\n\
\n\
# Rectification matrix (stereo cameras only)\n\
# A rotation matrix aligning the camera coordinate system to the ideal\n\
# stereo image plane so that epipolar lines in both stereo images are\n\
# parallel.\n\
float64[9] R # 3x3 row-major matrix\n\
\n\
# Projection/camera matrix\n\
# [fx' 0 cx' Tx]\n\
# P = [ 0 fy' cy' Ty]\n\
# [ 0 0 1 0]\n\
# By convention, this matrix specifies the intrinsic (camera) matrix\n\
# of the processed (rectified) image. That is, the left 3x3 portion\n\
# is the normal camera intrinsic matrix for the rectified image.\n\
# It projects 3D points in the camera coordinate frame to 2D pixel\n\
# coordinates using the focal lengths (fx', fy') and principal point\n\
# (cx', cy') - these may differ from the values in K.\n\
# For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will\n\
# also have R = the identity and P[1:3,1:3] = K.\n\
# For a stereo pair, the fourth column [Tx Ty 0]' is related to the\n\
# position of the optical center of the second camera in the first\n\
# camera's frame. We assume Tz = 0 so both cameras are in the same\n\
# stereo image plane. The first camera always has Tx = Ty = 0. For\n\
# the right (second) camera of a horizontal stereo pair, Ty = 0 and\n\
# Tx = -fx' * B, where B is the baseline between the cameras.\n\
# Given a 3D point [X Y Z]', the projection (x, y) of the point onto\n\
# the rectified image is given by:\n\
# [u v w]' = P * [X Y Z 1]'\n\
# x = u / w\n\
# y = v / w\n\
# This holds for both images of a stereo pair.\n\
float64[12] P # 3x4 row-major matrix\n\
\n\
\n\
#######################################################################\n\
# Operational Parameters #\n\
#######################################################################\n\
# These define the image region actually captured by the camera #\n\
# driver. Although they affect the geometry of the output image, they #\n\
# may be changed freely without recalibrating the camera. #\n\
#######################################################################\n\
\n\
# Binning refers here to any camera setting which combines rectangular\n\
# neighborhoods of pixels into larger \"super-pixels.\" It reduces the\n\
# resolution of the output image to\n\
# (width / binning_x) x (height / binning_y).\n\
# The default values binning_x = binning_y = 0 is considered the same\n\
# as binning_x = binning_y = 1 (no subsampling).\n\
uint32 binning_x\n\
uint32 binning_y\n\
\n\
# Region of interest (subwindow of full camera resolution), given in\n\
# full resolution (unbinned) image coordinates. A particular ROI\n\
# always denotes the same window of pixels on the camera sensor,\n\
# regardless of binning settings.\n\
# The default setting of roi (all values 0) is considered the same as\n\
# full resolution (roi.width = width, roi.height = height).\n\
RegionOfInterest roi\n\
\n\
================================================================================\n\
MSG: std_msgs/Header\n\
# Standard metadata for higher-level stamped data types.\n\
# This is generally used to communicate timestamped data \n\
# in a particular coordinate frame.\n\
# \n\
# sequence ID: consecutively increasing ID \n\
uint32 seq\n\
#Two-integer timestamp that is expressed as:\n\
# * stamp.sec: seconds (stamp_secs) since epoch (in Python the variable is called 'secs')\n\
# * stamp.nsec: nanoseconds since stamp_secs (in Python the variable is called 'nsecs')\n\
# time-handling sugar is provided by the client library\n\
time stamp\n\
#Frame this data is associated with\n\
# 0: no frame\n\
# 1: global frame\n\
string frame_id\n\
\n\
================================================================================\n\
MSG: sensor_msgs/RegionOfInterest\n\
# This message is used to specify a region of interest within an image.\n\
#\n\
# When used to specify the ROI setting of the camera when the image was\n\
# taken, the height and width fields should either match the height and\n\
# width fields for the associated image; or height = width = 0\n\
# indicates that the full resolution image was captured.\n\
\n\
uint32 x_offset # Leftmost pixel of the ROI\n\
# (0 if the ROI includes the left edge of the image)\n\
uint32 y_offset # Topmost pixel of the ROI\n\
# (0 if the ROI includes the top edge of the image)\n\
uint32 height # Height of ROI\n\
uint32 width # Width of ROI\n\
\n\
# True if a distinct rectified ROI should be calculated from the \"raw\"\n\
# ROI in this message. Typically this should be False if the full image\n\
# is captured (ROI not used), and True if a subwindow is captured (ROI\n\
# used).\n\
bool do_rectify\n\
";
}
static const char* value(const ::sensor_msgs::CameraInfo_<ContainerAllocator>&) { return value(); }
};
} // namespace message_traits
} // namespace ros
namespace ros
{
namespace serialization
{
template<class ContainerAllocator> struct Serializer< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
{
template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
{
stream.next(m.header);
stream.next(m.height);
stream.next(m.width);
stream.next(m.distortion_model);
stream.next(m.D);
stream.next(m.K);
stream.next(m.R);
stream.next(m.P);
stream.next(m.binning_x);
stream.next(m.binning_y);
stream.next(m.roi);
}
ROS_DECLARE_ALLINONE_SERIALIZER
}; // struct CameraInfo_
} // namespace serialization
} // namespace ros
namespace ros
{
namespace message_operations
{
template<class ContainerAllocator>
struct Printer< ::sensor_msgs::CameraInfo_<ContainerAllocator> >
{
template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sensor_msgs::CameraInfo_<ContainerAllocator>& v)
{
s << indent << "header: ";
s << std::endl;
Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
s << indent << "height: ";
Printer<uint32_t>::stream(s, indent + " ", v.height);
s << indent << "width: ";
Printer<uint32_t>::stream(s, indent + " ", v.width);
s << indent << "distortion_model: ";
Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.distortion_model);
s << indent << "D[]" << std::endl;
for (size_t i = 0; i < v.D.size(); ++i)
{
s << indent << " D[" << i << "]: ";
Printer<double>::stream(s, indent + " ", v.D[i]);
}
s << indent << "K[]" << std::endl;
for (size_t i = 0; i < v.K.size(); ++i)
{
s << indent << " K[" << i << "]: ";
Printer<double>::stream(s, indent + " ", v.K[i]);
}
s << indent << "R[]" << std::endl;
for (size_t i = 0; i < v.R.size(); ++i)
{
s << indent << " R[" << i << "]: ";
Printer<double>::stream(s, indent + " ", v.R[i]);
}
s << indent << "P[]" << std::endl;
for (size_t i = 0; i < v.P.size(); ++i)
{
s << indent << " P[" << i << "]: ";
Printer<double>::stream(s, indent + " ", v.P[i]);
}
s << indent << "binning_x: ";
Printer<uint32_t>::stream(s, indent + " ", v.binning_x);
s << indent << "binning_y: ";
Printer<uint32_t>::stream(s, indent + " ", v.binning_y);
s << indent << "roi: ";
s << std::endl;
Printer< ::sensor_msgs::RegionOfInterest_<ContainerAllocator> >::stream(s, indent + " ", v.roi);
}
};
} // namespace message_operations
} // namespace ros
#endif // SENSOR_MSGS_MESSAGE_CAMERAINFO_H
|