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 OBSERVATION_SCENE_H_ 00020 #define OBSERVATION_SCENE_H_ 00021 00022 #include <industrial_extrinsic_cal/basic_types.h> 00023 #include <industrial_extrinsic_cal/camera_definition.h> 00024 #include <ros/console.h> 00025 #include <boost/foreach.hpp> 00026 #include <boost/shared_ptr.hpp> 00027 00028 namespace industrial_extrinsic_cal 00029 { 00030 00032 class ObservationScene 00033 { 00034 public: 00038 ObservationScene(Trigger trig, int scene_id) : 00039 trig_(trig), scene_id_(scene_id) 00040 { 00041 } 00042 ; 00043 00045 ObservationScene() 00046 { 00047 observation_command_list_.clear(); 00048 cameras_in_scene_.clear(); 00049 } 00050 ; 00051 00053 void clear(); 00054 00060 void addObservationToScene(ObservationCmd observation_command); 00065 void addCameraToScene(boost::shared_ptr<Camera> cameras_in_scene); 00066 00073 void populateObsCmdList(boost::shared_ptr<Camera> camera, boost::shared_ptr<Target> target, Roi roi); 00075 int get_id() 00076 { 00077 return (scene_id_); 00078 } 00079 ; 00080 00082 Trigger get_trigger() 00083 { 00084 return (trig_); 00085 } 00086 ; 00091 void setSceneId(int sceneId) 00092 { 00093 scene_id_ = sceneId; 00094 }; 00099 void setTrig(const Trigger& trig) 00100 { 00101 trig_ = trig; 00102 }; 00103 00104 std::vector<ObservationCmd> observation_command_list_; 00105 std::vector<boost::shared_ptr<Camera> > cameras_in_scene_; 00107 private: 00108 Trigger trig_; 00109 int scene_id_; 00110 }; 00111 // end of class ObservationScene 00112 00113 }//end namespace industrial_extrinsic_cal 00114 00115 #endif /* OBSERVATION_SCENE_H_ */