camera_info_definitions.hpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2015 Aldebaran
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 
00018 #ifndef CAMERA_INFO_DEF_HPP
00019 #define CAMERA_INFO_DEF_HPP
00020 
00021 #include <sensor_msgs/CameraInfo.h>
00022 #include <boost/assign/list_of.hpp>
00023 
00024 namespace naoqi
00025 {
00026 namespace converter
00027 {
00028 namespace camera_info_definitions
00029 {
00030 
00034 inline sensor_msgs::CameraInfo createCameraInfoTOPVGA()
00035 {
00036   sensor_msgs::CameraInfo cam_info_msg;
00037 
00038   cam_info_msg.header.frame_id = "CameraTop_optical_frame";
00039 
00040   cam_info_msg.width = 640;
00041   cam_info_msg.height = 480;
00042   cam_info_msg.K = boost::array<double, 9>{{ 556.845054830986, 0, 309.366895338178, 0, 555.898679730161, 230.592233628776, 0, 0, 1 }};
00043 
00044   cam_info_msg.distortion_model = "plumb_bob";
00045   cam_info_msg.D = boost::assign::list_of(-0.0545211535376379)(0.0691973423510287)(-0.00241094929163055)(-0.00112245009306511)(0).convert_to_container<std::vector<double> >();
00046 
00047   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00048 
00049   cam_info_msg.P = boost::array<double, 12>{{ 551.589721679688, 0, 308.271132841983, 0, 0, 550.291320800781, 229.20143668168, 0, 0, 0, 1, 0 }};
00050 
00051   return cam_info_msg;
00052 }
00053 
00054 
00055 inline sensor_msgs::CameraInfo createCameraInfoTOPQVGA()
00056 {
00057   sensor_msgs::CameraInfo cam_info_msg;
00058 
00059   cam_info_msg.header.frame_id = "CameraTop_optical_frame";
00060 
00061   cam_info_msg.width = 320;
00062   cam_info_msg.height = 240;
00063   cam_info_msg.K = boost::array<double, 9>{{ 274.139508945831, 0, 141.184472810944, 0, 275.741846757374, 106.693773654172, 0, 0, 1 }};
00064 
00065   cam_info_msg.distortion_model = "plumb_bob";
00066   cam_info_msg.D = boost::assign::list_of(-0.0870160932911717)(0.128210165050533)(0.003379500659424)(-0.00106205540818586)(0).convert_to_container<std::vector<double> >();
00067 
00068   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00069 
00070   cam_info_msg.P = boost::array<double, 12>{{ 272.423675537109, 0, 141.131930791285, 0, 0, 273.515747070312, 107.391746054313, 0, 0, 0, 1, 0 }};
00071 
00072   return cam_info_msg;
00073 }
00074 
00075 
00076 inline sensor_msgs::CameraInfo createCameraInfoTOPQQVGA()
00077 {
00078   sensor_msgs::CameraInfo cam_info_msg;
00079 
00080   cam_info_msg.header.frame_id = "CameraTop_optical_frame";
00081 
00082   cam_info_msg.width = 160;
00083   cam_info_msg.height = 120;
00084   cam_info_msg.K = boost::array<double, 9>{{ 139.424539568966, 0, 76.9073669920582, 0, 139.25542782325, 59.5554242026743, 0, 0, 1 }};
00085 
00086   cam_info_msg.distortion_model = "plumb_bob";
00087   cam_info_msg.D = boost::assign::list_of(-0.0843564504845967)(0.125733083790192)(0.00275901756247071)(-0.00138645823460527)(0).convert_to_container<std::vector<double> >();
00088 
00089   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00090 
00091   cam_info_msg.P = boost::array<double, 12>{{ 137.541534423828, 0, 76.3004646597892, 0, 0, 136.815216064453, 59.3909799751191, 0, 0, 0, 1, 0 }};
00092 
00093   return cam_info_msg;
00094 }
00095 
00096 
00100 inline sensor_msgs::CameraInfo createCameraInfoBOTTOMVGA()
00101 {
00102   sensor_msgs::CameraInfo cam_info_msg;
00103 
00104   cam_info_msg.header.frame_id = "CameraBottom_optical_frame";
00105 
00106   cam_info_msg.width = 640;
00107   cam_info_msg.height = 480;
00108   cam_info_msg.K = boost::array<double, 9>{{ 558.570339530768, 0, 308.885375457296, 0, 556.122943034837, 247.600724811385, 0, 0, 1 }};
00109 
00110   cam_info_msg.distortion_model = "plumb_bob";
00111   cam_info_msg.D = boost::assign::list_of(-0.0648763971625288)(0.0612520196884308)(0.0038281538281731)(-0.00551104078371959)(0).convert_to_container<std::vector<double> >();
00112 
00113   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00114 
00115   cam_info_msg.P = boost::array<double, 12>{{ 549.571655273438, 0, 304.799679526441, 0, 0, 549.687316894531, 248.526959297022, 0, 0, 0, 1, 0 }};
00116 
00117   return cam_info_msg;
00118 }
00119 
00120 
00121 inline sensor_msgs::CameraInfo createCameraInfoBOTTOMQVGA()
00122 {
00123   sensor_msgs::CameraInfo cam_info_msg;
00124 
00125   cam_info_msg.header.frame_id = "CameraBottom_optical_frame";
00126 
00127   cam_info_msg.width = 320;
00128   cam_info_msg.height = 240;
00129   cam_info_msg.K = boost::array<double, 9>{{ 278.236008818534, 0, 156.194471689706, 0, 279.380102992049, 126.007123836447, 0, 0, 1 }};
00130 
00131   cam_info_msg.distortion_model = "plumb_bob";
00132   cam_info_msg.D = boost::assign::list_of(-0.0481869853715082)(0.0201858398559121)(0.0030362056699177)(-0.00172241952442813)(0).convert_to_container<std::vector<double> >();
00133 
00134   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00135 
00136   cam_info_msg.P = boost::array<double, 12>{{ 273.491455078125, 0, 155.112454709117, 0, 0, 275.743133544922, 126.057357467223, 0, 0, 0, 1, 0 }};
00137 
00138   return cam_info_msg;
00139 }
00140 
00141 
00142 inline sensor_msgs::CameraInfo createCameraInfoBOTTOMQQVGA()
00143 {
00144   sensor_msgs::CameraInfo cam_info_msg;
00145 
00146   cam_info_msg.header.frame_id = "CameraBottom_optical_frame";
00147 
00148   cam_info_msg.width = 160;
00149   cam_info_msg.height = 120;
00150   cam_info_msg.K = boost::array<double, 9>{{ 141.611855886672, 0, 78.6494086288656, 0, 141.367163830175, 58.9220646201529, 0, 0, 1 }};
00151 
00152   cam_info_msg.distortion_model = "plumb_bob";
00153   cam_info_msg.D = boost::assign::list_of(-0.0688388724945936)(0.0697453843669642)(0.00309518737071049)(-0.00570486993696543)(0).convert_to_container<std::vector<double> >();
00154 
00155   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00156 
00157   cam_info_msg.P = boost::array<double, 12>{{ 138.705535888672, 0, 77.2544255212306, 0, 0, 138.954086303711, 58.7000861760043, 0, 0, 0, 1, 0 }};
00158 
00159   return cam_info_msg;
00160 }
00161 
00162 
00166 inline sensor_msgs::CameraInfo createCameraInfoDEPTHVGA()
00167 {
00168   sensor_msgs::CameraInfo cam_info_msg;
00169 
00170   cam_info_msg.header.frame_id = "CameraDepth_optical_frame";
00171 
00172   cam_info_msg.width = 640;
00173   cam_info_msg.height = 480;
00174   cam_info_msg.K = boost::array<double, 9>{{ 525, 0, 319.5000000, 0, 525, 239.5000000000000, 0, 0, 1  }};
00175 
00176   //cam_info_msg.distortion_model = "plumb_bob";
00177   //cam_info_msg.D = boost::assign::list_of(-0.0688388724945936)(0.0697453843669642)(0.00309518737071049)(-0.00570486993696543)(0);
00178 
00179   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00180 
00181   cam_info_msg.P = boost::array<double, 12>{{ 525, 0, 319.500000, 0, 0, 525, 239.5000000000, 0, 0, 0, 1, 0 }};
00182 
00183   return cam_info_msg;
00184 }
00185 
00186 
00187 inline sensor_msgs::CameraInfo createCameraInfoDEPTHQVGA()
00188 {
00189   sensor_msgs::CameraInfo cam_info_msg;
00190 
00191   cam_info_msg.header.frame_id = "CameraDepth_optical_frame";
00192 
00193   cam_info_msg.width = 320;
00194   cam_info_msg.height = 240;
00195   cam_info_msg.K = boost::array<double, 9>{{ 525/2.0f, 0, 319.5000000/2.0f, 0, 525/2.0f, 239.5000000000000/2.0f, 0, 0, 1  }};
00196 
00197   //cam_info_msg.distortion_model = "plumb_bob";
00198   //cam_info_msg.D = boost::assign::list_of(-0.0688388724945936)(0.0697453843669642)(0.00309518737071049)(-0.00570486993696543)(0);
00199 
00200   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00201 
00202   cam_info_msg.P = boost::array<double, 12>{{ 525/2.0f, 0, 319.500000/2.0f, 0, 0, 525/2.0f, 239.5000000000/2.0f, 0, 0, 0, 1, 0 }};
00203 
00204   return cam_info_msg;
00205 }
00206 
00207 inline sensor_msgs::CameraInfo createCameraInfoDEPTHQQVGA()
00208 {
00209   sensor_msgs::CameraInfo cam_info_msg;
00210 
00211   cam_info_msg.header.frame_id = "CameraDepth_optical_frame";
00212 
00213   cam_info_msg.width = 160;
00214   cam_info_msg.height = 120;
00215   cam_info_msg.K = boost::array<double, 9>{{ 525/4.0f, 0, 319.5000000/4.0f, 0, 525/4.0f, 239.5000000000000/4.0f, 0, 0, 1  }};
00216 
00217   //cam_info_msg.distortion_model = "plumb_bob";
00218   //cam_info_msg.D = boost::assign::list_of(-0.0688388724945936)(0.0697453843669642)(0.00309518737071049)(-0.00570486993696543)(0);
00219 
00220   cam_info_msg.R = boost::array<double, 9>{{ 1, 0, 0, 0, 1, 0, 0, 0, 1 }};
00221 
00222   cam_info_msg.P = boost::array<double, 12>{{ 525/4.0f, 0, 319.500000/4.0f, 0, 0, 525/4.0f, 239.5000000000/4.0f, 0, 0, 0, 1, 0 }};
00223 
00224   return cam_info_msg;
00225 }
00226 } // camera_info_definitions
00227 } //publisher
00228 } //naoqi
00229 
00230 
00231 #endif


naoqi_driver
Author(s): Karsten Knese
autogenerated on Sun Sep 17 2017 02:57:14