Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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
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
00072 CLadyBug *camera;
00073 CFirewireServer *server;
00074
00075 uint64_t camera_id;
00076
00077 TCameraConfig default_conf;
00078
00079 TCameraConfig current_conf;
00080
00081 TCameraConfig desired_conf;
00082
00083 std::vector<std::string> calibration_files;
00084
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
00181
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