ladybug2_driver.h
Go to the documentation of this file.
00001 // Copyright (C) 2010-2011 Institut de Robotica i Informatica Industrial, CSIC-UPC.
00002 // Author 
00003 // All rights reserved.
00004 //
00005 // This file is part of iri-ros-pkg
00006 // iri-ros-pkg is free software: you can redistribute it and/or modify
00007 // it under the terms of the GNU Lesser General Public License as published by
00008 // the Free Software Foundation, either version 3 of the License, or
00009 // at your option) any later version.
00010 //
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public License
00017 // along with this program.  If not, see <http://www.gnu.org/licenses/>.
00018 // 
00019 // IMPORTANT NOTE: This code has been generated through a script from the 
00020 // iri_ros_scripts. Please do NOT delete any comments to guarantee the correctness
00021 // of the scripts. ROS topics can be easly add by using those scripts. Please
00022 // refer to the IRI wiki page for more information:
00023 // http://wikiri.upc.es/index.php/Robotics_Lab
00024 
00025 #ifndef _ladybug2_driver_h_
00026 #define _ladybug2_driver_h_
00027 
00028 #include <iri_base_driver/iri_base_driver.h>
00029 #include <iri_ladybug2/Ladybug2Config.h>
00030 
00031 //include ladybug2_driver main library
00032 #include "ladybug.h"
00033 #include "firewireserver.h"
00034 #include <camera_common.h>
00035 
00036 enum
00037 {
00038   FRONT=0,
00039   FRONT_RIGHT=1,
00040   REAR_RIGHT=2,
00041   REAR_LEFT=3,
00042   FRONT_LEFT=4,
00043   TOP=5
00044 };
00045 
00046 #define NUM_CAM 6
00047 
00048 
00068 class Ladybug2Driver : public iri_base_driver::IriBaseDriver
00069 {
00070   private:
00071     // private attributes and methods
00072     CLadyBug *camera;
00073     CFirewireServer *server;
00074     // reconfigure attributes
00075     uint64_t camera_id;
00076     // default_configuration
00077     TCameraConfig default_conf;
00078     // current configuration
00079     TCameraConfig current_conf;
00080     // default_configuration
00081     TCameraConfig desired_conf;
00082     // calibration file
00083     std::vector<std::string> calibration_files;
00084     // frame identifier
00085     std::vector<std::string> frame_ids;
00086   protected:
00091     void change_config(TCameraConfig *new_conf);
00092   public:
00099     typedef iri_ladybug2::Ladybug2Config Config;
00100 
00107     Config config_;
00108 
00117     Ladybug2Driver(void);
00118 
00129     bool openDriver(void);
00130 
00141     bool closeDriver(void);
00142 
00153     bool startDriver(void);
00154 
00165     bool stopDriver(void);
00166 
00178     void config_update(Config& new_cfg, uint32_t level=0);
00179 
00180     // here define all ladybug2_driver interface methods to retrieve and set
00181     // the driver parameters
00186     void get_current_config(TCameraConfig *current_conf);
00191     void get_images(char **front,char **front_right,char **rear_right, char **rear_left,char **front_left,char **top);
00196     std::string get_new_frame_event(void);
00201     void get_calibration_files(std::vector<std::string> &calibration_files);
00206     void get_frame_ids(std::vector<std::string> &frame_ids);
00207 
00214     ~Ladybug2Driver(void);
00215 };
00216 
00217 #endif


iri_ladybug2
Author(s): Sergi Hernandez Juan
autogenerated on Fri Dec 6 2013 22:35:11