00001
00002
00003 package ros.pkg.sensor_msgs.srv;
00004
00005 import java.nio.ByteBuffer;
00006
00007
00008 public class SetCameraInfo extends ros.communication.Service<SetCameraInfo.Request, SetCameraInfo.Response> {
00009
00010 public static java.lang.String __s_getDataType() { return "sensor_msgs/SetCameraInfo"; }
00011 public static java.lang.String __s_getMD5Sum() { return "bef1df590ed75ed1f393692395e15482"; }
00012
00013 public java.lang.String getDataType() { return SetCameraInfo.__s_getDataType(); }
00014 public java.lang.String getMD5Sum() { return SetCameraInfo.__s_getMD5Sum(); }
00015
00016 public SetCameraInfo.Request createRequest() {
00017 return new SetCameraInfo.Request();
00018 }
00019
00020 public SetCameraInfo.Response createResponse() {
00021 return new SetCameraInfo.Response();
00022 }
00023
00024 static public class Request extends ros.communication.Message {
00025
00026 public ros.pkg.sensor_msgs.msg.CameraInfo camera_info = new ros.pkg.sensor_msgs.msg.CameraInfo();
00027
00028 public Request() {
00029 }
00030
00031 public static java.lang.String __s_getDataType() { return "sensor_msgs/SetCameraInfoRequest"; }
00032 public java.lang.String getDataType() { return __s_getDataType(); }
00033 public static java.lang.String __s_getMD5Sum() { return "ee34be01fdeee563d0d99cd594d5581d"; }
00034 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00035 public static java.lang.String __s_getServerMD5Sum() { return "bef1df590ed75ed1f393692395e15482"; }
00036 public java.lang.String getServerMD5Sum() { return __s_getServerMD5Sum(); }
00037 public static java.lang.String __s_getMessageDefinition() { return "\n" +
00038 "\n" +
00039 "\n" +
00040 "\n" +
00041 "\n" +
00042 "\n" +
00043 "\n" +
00044 "\n" +
00045 "sensor_msgs/CameraInfo camera_info\n" +
00046 "\n" +
00047 "================================================================================\n" +
00048 "MSG: sensor_msgs/CameraInfo\n" +
00049 "# This message defines meta information for a camera. It should be in a\n" +
00050 "# camera namespace on topic \"camera_info\" and accompanied by up to five\n" +
00051 "# image topics named:\n" +
00052 "#\n" +
00053 "# image_raw - raw data from the camera driver, possibly Bayer encoded\n" +
00054 "# image - monochrome, distorted\n" +
00055 "# image_color - color, distorted\n" +
00056 "# image_rect - monochrome, rectified\n" +
00057 "# image_rect_color - color, rectified\n" +
00058 "#\n" +
00059 "# The image_pipeline contains packages (image_proc, stereo_image_proc)\n" +
00060 "# for producing the four processed image topics from image_raw and\n" +
00061 "# camera_info. The meaning of the camera parameters are described in\n" +
00062 "# detail at http://www.ros.org/wiki/image_pipeline/CameraInfo.\n" +
00063 "#\n" +
00064 "# The image_geometry package provides a user-friendly interface to\n" +
00065 "# common operations using this meta information. If you want to, e.g.,\n" +
00066 "# project a 3d point into image coordinates, we strongly recommend\n" +
00067 "# using image_geometry.\n" +
00068 "#\n" +
00069 "# If the camera is uncalibrated, the matrices D, K, R, P should be left\n" +
00070 "# zeroed out. In particular, clients may assume that K[0] == 0.0\n" +
00071 "# indicates an uncalibrated camera.\n" +
00072 "\n" +
00073 "#######################################################################\n" +
00074 "# Image acquisition info #\n" +
00075 "#######################################################################\n" +
00076 "\n" +
00077 "# Time of image acquisition, camera coordinate frame ID\n" +
00078 "Header header # Header timestamp should be acquisition time of image\n" +
00079 " # Header frame_id should be optical frame of camera\n" +
00080 " # origin of frame should be optical center of camera\n" +
00081 " # +x should point to the right in the image\n" +
00082 " # +y should point down in the image\n" +
00083 " # +z should point into the plane of the image\n" +
00084 "\n" +
00085 "\n" +
00086 "#######################################################################\n" +
00087 "# Calibration Parameters #\n" +
00088 "#######################################################################\n" +
00089 "# These are fixed during camera calibration. Their values will be the #\n" +
00090 "# same in all messages until the camera is recalibrated. Note that #\n" +
00091 "# self-calibrating systems may \"recalibrate\" frequently. #\n" +
00092 "# #\n" +
00093 "# The internal parameters can be used to warp a raw (distorted) image #\n" +
00094 "# to: #\n" +
00095 "# 1. An undistorted image (requires D and K) #\n" +
00096 "# 2. A rectified image (requires D, K, R) #\n" +
00097 "# The projection matrix P projects 3D points into the rectified image.#\n" +
00098 "#######################################################################\n" +
00099 "\n" +
00100 "# The image dimensions with which the camera was calibrated. Normally\n" +
00101 "# this will be the full camera resolution in pixels.\n" +
00102 "uint32 height\n" +
00103 "uint32 width\n" +
00104 "\n" +
00105 "# The distortion model used. Supported models are listed in\n" +
00106 "# sensor_msgs/distortion_models.h. For most cameras, \"plumb_bob\" - a\n" +
00107 "# simple model of radial and tangential distortion - is sufficent.\n" +
00108 "string distortion_model\n" +
00109 "\n" +
00110 "# The distortion parameters, size depending on the distortion model.\n" +
00111 "# For \"plumb_bob\", the 5 parameters are: (k1, k2, t1, t2, k3).\n" +
00112 "float64[] D\n" +
00113 "\n" +
00114 "# Intrinsic camera matrix for the raw (distorted) images.\n" +
00115 "# [fx 0 cx]\n" +
00116 "# K = [ 0 fy cy]\n" +
00117 "# [ 0 0 1]\n" +
00118 "# Projects 3D points in the camera coordinate frame to 2D pixel\n" +
00119 "# coordinates using the focal lengths (fx, fy) and principal point\n" +
00120 "# (cx, cy).\n" +
00121 "float64[9] K # 3x3 row-major matrix\n" +
00122 "\n" +
00123 "# Rectification matrix (stereo cameras only)\n" +
00124 "# A rotation matrix aligning the camera coordinate system to the ideal\n" +
00125 "# stereo image plane so that epipolar lines in both stereo images are\n" +
00126 "# parallel.\n" +
00127 "float64[9] R # 3x3 row-major matrix\n" +
00128 "\n" +
00129 "# Projection/camera matrix\n" +
00130 "# [fx' 0 cx' Tx]\n" +
00131 "# P = [ 0 fy' cy' Ty]\n" +
00132 "# [ 0 0 1 0]\n" +
00133 "# By convention, this matrix specifies the intrinsic (camera) matrix\n" +
00134 "# of the processed (rectified) image. That is, the left 3x3 portion\n" +
00135 "# is the normal camera intrinsic matrix for the rectified image.\n" +
00136 "# It projects 3D points in the camera coordinate frame to 2D pixel\n" +
00137 "# coordinates using the focal lengths (fx', fy') and principal point\n" +
00138 "# (cx', cy') - these may differ from the values in K.\n" +
00139 "# For monocular cameras, Tx = Ty = 0. Normally, monocular cameras will\n" +
00140 "# also have R = the identity and P[1:3,1:3] = K.\n" +
00141 "# For a stereo pair, the fourth column [Tx Ty 0]' is related to the\n" +
00142 "# position of the optical center of the second camera in the first\n" +
00143 "# camera's frame. We assume Tz = 0 so both cameras are in the same\n" +
00144 "# stereo image plane. The first camera always has Tx = Ty = 0. For\n" +
00145 "# the right (second) camera of a horizontal stereo pair, Ty = 0 and\n" +
00146 "# Tx = -fx' * B, where B is the baseline between the cameras.\n" +
00147 "# Given a 3D point [X Y Z]', the projection (x, y) of the point onto\n" +
00148 "# the rectified image is given by:\n" +
00149 "# [u v w]' = P * [X Y Z 1]'\n" +
00150 "# x = u / w\n" +
00151 "# y = v / w\n" +
00152 "# This holds for both images of a stereo pair.\n" +
00153 "float64[12] P # 3x4 row-major matrix\n" +
00154 "\n" +
00155 "\n" +
00156 "#######################################################################\n" +
00157 "# Operational Parameters #\n" +
00158 "#######################################################################\n" +
00159 "# These define the image region actually captured by the camera #\n" +
00160 "# driver. Although they affect the geometry of the output image, they #\n" +
00161 "# may be changed freely without recalibrating the camera. #\n" +
00162 "#######################################################################\n" +
00163 "\n" +
00164 "# Binning refers here to any camera setting which combines rectangular\n" +
00165 "# neighborhoods of pixels into larger \"super-pixels.\" It reduces the\n" +
00166 "# resolution of the output image to\n" +
00167 "# (width / binning_x) x (height / binning_y).\n" +
00168 "# The default values binning_x = binning_y = 0 is considered the same\n" +
00169 "# as binning_x = binning_y = 1 (no subsampling).\n" +
00170 "uint32 binning_x\n" +
00171 "uint32 binning_y\n" +
00172 "\n" +
00173 "# Region of interest (subwindow of full camera resolution), given in\n" +
00174 "# full resolution (unbinned) image coordinates. A particular ROI\n" +
00175 "# always denotes the same window of pixels on the camera sensor,\n" +
00176 "# regardless of binning settings.\n" +
00177 "# The default setting of roi (all values 0) is considered the same as\n" +
00178 "# full resolution (roi.width = width, roi.height = height).\n" +
00179 "RegionOfInterest roi\n" +
00180 "\n" +
00181 "================================================================================\n" +
00182 "MSG: std_msgs/Header\n" +
00183 "# Standard metadata for higher-level stamped data types.\n" +
00184 "# This is generally used to communicate timestamped data \n" +
00185 "# in a particular coordinate frame.\n" +
00186 "# \n" +
00187 "# sequence ID: consecutively increasing ID \n" +
00188 "uint32 seq\n" +
00189 "#Two-integer timestamp that is expressed as:\n" +
00190 "# * stamp.secs: seconds (stamp_secs) since epoch\n" +
00191 "# * stamp.nsecs: nanoseconds since stamp_secs\n" +
00192 "# time-handling sugar is provided by the client library\n" +
00193 "time stamp\n" +
00194 "#Frame this data is associated with\n" +
00195 "# 0: no frame\n" +
00196 "# 1: global frame\n" +
00197 "string frame_id\n" +
00198 "\n" +
00199 "================================================================================\n" +
00200 "MSG: sensor_msgs/RegionOfInterest\n" +
00201 "# This message is used to specify a region of interest within an image.\n" +
00202 "#\n" +
00203 "# When used to specify the ROI setting of the camera when the image was\n" +
00204 "# taken, the height and width fields should either match the height and\n" +
00205 "# width fields for the associated image; or height = width = 0\n" +
00206 "# indicates that the full resolution image was captured.\n" +
00207 "\n" +
00208 "uint32 x_offset # Leftmost pixel of the ROI\n" +
00209 " # (0 if the ROI includes the left edge of the image)\n" +
00210 "uint32 y_offset # Topmost pixel of the ROI\n" +
00211 " # (0 if the ROI includes the top edge of the image)\n" +
00212 "uint32 height # Height of ROI\n" +
00213 "uint32 width # Width of ROI\n" +
00214 "\n" +
00215 "# True if a distinct rectified ROI should be calculated from the \"raw\"\n" +
00216 "# ROI in this message. Typically this should be False if the full image\n" +
00217 "# is captured (ROI not used), and True if a subwindow is captured (ROI\n" +
00218 "# used).\n" +
00219 "bool do_rectify\n" +
00220 "\n" +
00221 ""; }
00222 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00223
00224 public Request clone() {
00225 Request c = new Request();
00226 c.deserialize(serialize(0));
00227 return c;
00228 }
00229
00230 public void setTo(ros.communication.Message m) {
00231 deserialize(m.serialize(0));
00232 }
00233
00234 public int serializationLength() {
00235 int __l = 0;
00236 __l += camera_info.serializationLength();
00237 return __l;
00238 }
00239
00240 public void serialize(ByteBuffer bb, int seq) {
00241 camera_info.serialize(bb, seq);
00242 }
00243
00244 public void deserialize(ByteBuffer bb) {
00245 camera_info.deserialize(bb);
00246 }
00247
00248 @SuppressWarnings("all")
00249 public boolean equals(Object o) {
00250 if(!(o instanceof Request))
00251 return false;
00252 Request other = (Request) o;
00253 return
00254 camera_info.equals(other.camera_info) &&
00255 true;
00256 }
00257
00258 @SuppressWarnings("all")
00259 public int hashCode() {
00260 final int prime = 31;
00261 int result = 1;
00262 long tmp;
00263 result = prime * result + (this.camera_info == null ? 0 : this.camera_info.hashCode());
00264 return result;
00265 }
00266 }
00267
00268 static public class Response extends ros.communication.Message {
00269
00270 public boolean success;
00271 public java.lang.String status_message = new java.lang.String();
00272
00273 public Response() {
00274 }
00275
00276 public static java.lang.String __s_getDataType() { return "sensor_msgs/SetCameraInfoResponse"; }
00277 public java.lang.String getDataType() { return __s_getDataType(); }
00278 public static java.lang.String __s_getMD5Sum() { return "2ec6f3eff0161f4257b808b12bc830c2"; }
00279 public java.lang.String getMD5Sum() { return __s_getMD5Sum(); }
00280 public static java.lang.String __s_getServerMD5Sum() { return "bef1df590ed75ed1f393692395e15482"; }
00281 public java.lang.String getServerMD5Sum() { return __s_getServerMD5Sum(); }
00282 public static java.lang.String __s_getMessageDefinition() { return "bool success\n" +
00283 "string status_message\n" +
00284 "\n" +
00285 "\n" +
00286 ""; }
00287 public java.lang.String getMessageDefinition() { return __s_getMessageDefinition(); }
00288
00289 public Response clone() {
00290 Response c = new Response();
00291 c.deserialize(serialize(0));
00292 return c;
00293 }
00294
00295 public void setTo(ros.communication.Message m) {
00296 deserialize(m.serialize(0));
00297 }
00298
00299 public int serializationLength() {
00300 int __l = 0;
00301 __l += 1;
00302 __l += 4 + status_message.length();
00303 return __l;
00304 }
00305
00306 public void serialize(ByteBuffer bb, int seq) {
00307 bb.put((byte)(success ? 1 : 0));
00308 Serialization.writeString(bb, status_message);
00309 }
00310
00311 public void deserialize(ByteBuffer bb) {
00312 success = bb.get() != 0 ? true : false;
00313 status_message = Serialization.readString(bb);
00314 }
00315
00316 @SuppressWarnings("all")
00317 public boolean equals(Object o) {
00318 if(!(o instanceof Response))
00319 return false;
00320 Response other = (Response) o;
00321 return
00322 success == other.success &&
00323 status_message.equals(other.status_message) &&
00324 true;
00325 }
00326
00327 @SuppressWarnings("all")
00328 public int hashCode() {
00329 final int prime = 31;
00330 int result = 1;
00331 long tmp;
00332 result = prime * result + (this.success ? 1231 : 1237);
00333 result = prime * result + (this.status_message == null ? 0 : this.status_message.hashCode());
00334 return result;
00335 }
00336 }
00337
00338 }
00339