00001 /* 00002 * Software License Agreement (Apache License) 00003 * 00004 * Copyright (c) 2014, Southwest Research Institute 00005 * 00006 * Licensed under the Apache License, Version 2.0 (the "License"); 00007 * you may not use this file except in compliance with the License. 00008 * You may obtain a copy of the License at 00009 * 00010 * http://www.apache.org/licenses/LICENSE-2.0 00011 * 00012 * Unless required by applicable law or agreed to in writing, software 00013 * distributed under the License is distributed on an "AS IS" BASIS, 00014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00015 * See the License for the specific language governing permissions and 00016 * limitations under the License. 00017 */ 00018 00019 #ifndef CAMERA_CLASS_H_ 00020 #define CAMERA_CLASS_H_ 00021 00022 #include <industrial_extrinsic_cal/basic_types.h> 00023 #include <ros/console.h> 00024 #include <industrial_extrinsic_cal/camera_observer.hpp> 00025 #include <industrial_extrinsic_cal/ros_camera_observer.h> 00026 #include <boost/shared_ptr.hpp> 00027 #include <boost/foreach.hpp> 00028 #include "ceres/ceres.h" 00029 00030 namespace industrial_extrinsic_cal 00031 { 00032 00034 class Camera 00035 { 00036 public: 00038 Camera(); 00039 00045 Camera(std::string name, CameraParameters camera_parameters, bool is_moving); 00046 00048 ~Camera(); 00049 00054 bool isMoving(); 00055 boost::shared_ptr<ROSCameraObserver> camera_observer_; 00056 CameraParameters camera_parameters_; 00057 // ::std::ostream& operator<<(::std::ostream& os, const Camera& C){ return os<< "TODO";}; 00058 00059 std::string camera_name_; 00061 bool fixed_intrinsics_; 00062 bool fixed_extrinsics_; 00064 private: 00065 bool is_moving_; 00066 }; 00067 // end of class Camera 00068 00070 typedef struct 00071 { 00072 boost::shared_ptr<Camera> camera; 00073 boost::shared_ptr<Target> target; 00074 Roi roi; 00075 } ObservationCmd; 00076 00079 typedef struct MovingCamera 00080 { 00081 boost::shared_ptr<Camera> cam; // must hold a copy of the camera extrinsic parameters 00082 int scene_id; // but copy of intrinsics may be and unused duplicate 00083 } MovingCamera; 00084 00085 }//end namespace industrial_extrinsic_cal 00086 00087 00088 #endif /* CAMERA_CLASS_H_ */