orca-robotics INTRODUCTION Overview Download and Install Documentation REPOSITORY Interfaces Drivers Libraries Utilities Software Map DEVELOPER Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
laserfeatureextractorcombined/driver.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2008 Alex Brooks 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef LFECOMBINED_DRIVER_H 00012 #define LFECOMBINED_DRIVER_H 00013 00014 #include <hydrointerfaces/laserfeatureextractor.h> 00015 #include <hydrolaserfeatureextract/hydrolaserfeatureextract.h> 00016 00017 namespace lfecombined 00018 { 00019 00020 class Driver: public hydrointerfaces::LaserFeatureExtractor 00021 { 00022 00023 public: 00024 00025 Driver( const hydrolfextract::ScannerConfig &scannerConfig, 00026 const hydroutil::Context &context ); 00027 00028 std::vector<hydrofeatureobs::FeatureObs*> 00029 extractFeatures( const std::vector<float> &ranges, 00030 const std::vector<unsigned char> &intensities ); 00031 00032 private: 00033 00034 std::auto_ptr<hydrolfextract::ReflectorExtractor> reflectorExtractor_; 00035 std::auto_ptr<hydrolfextract::ReflectorFeatureExtractor> reflectorFeatureExtractor_; 00036 00037 std::auto_ptr<hydrolfextract::ForegroundExtractor> foregroundExtractor_; 00038 std::auto_ptr<hydrolfextract::ForegroundFeatureExtractor> foregroundFeatureExtractor_; 00039 00040 std::auto_ptr<hydrolfextract::DoorExtractor> doorExtractor_; 00041 std::auto_ptr<hydrolfextract::DoorFeatureExtractor> doorFeatureExtractor_; 00042 00043 std::auto_ptr<hydrolfextract::LineExtractor> lineExtractor_; 00044 std::auto_ptr<hydrolfextract::LineFeatureExtractor> lineFeatureExtractor_; 00045 std::auto_ptr<hydrolfextract::CornerFeatureExtractor> cornerFeatureExtractor_; 00046 }; 00047 00049 00050 hydrolfextract::ReflectorExtractor * 00051 getReflectorExtractor( const hydrolfextract::ScannerConfig &scannerConfig, 00052 const hydroutil::Context &context ); 00053 hydrolfextract::ReflectorFeatureExtractor * 00054 getReflectorFeatureExtractor( const hydrolfextract::ReflectorExtractor::Config &cfg, 00055 double rangeSd, 00056 double bearingSd, 00057 const hydroutil::Context &context ); 00058 00059 hydrolfextract::ForegroundExtractor * 00060 getForegroundExtractor( const hydrolfextract::ScannerConfig &scannerConfig, 00061 const hydroutil::Context &context ); 00062 hydrolfextract::ForegroundFeatureExtractor * 00063 getForegroundFeatureExtractor( const hydrolfextract::ForegroundExtractor::Config &cfg, 00064 double rangeSd, 00065 double bearingSd, 00066 const hydroutil::Context &context ); 00067 00068 hydrolfextract::DoorExtractor * 00069 getDoorExtractor( const hydrolfextract::ScannerConfig &scannerConfig, 00070 const hydroutil::Context &context ); 00071 hydrolfextract::DoorFeatureExtractor * 00072 getDoorFeatureExtractor( const hydrolfextract::DoorExtractor::Config &cfg, 00073 double rangeSd, 00074 double bearingSd, 00075 const hydroutil::Context &context ); 00076 00077 hydrolfextract::LineExtractor * 00078 getLineExtractor( const hydrolfextract::ScannerConfig &scannerConfig, 00079 const hydroutil::Context &context ); 00080 hydrolfextract::LineFeatureExtractor * 00081 getLineFeatureExtractor( const hydrolfextract::LineExtractor::Config &cfg, 00082 double rangeSd, 00083 double bearingSd, 00084 const hydroutil::Context &context ); 00085 hydrolfextract::CornerFeatureExtractor * 00086 getCornerFeatureExtractor( const hydrolfextract::LineExtractor::Config &cfg, 00087 double rangeSd, 00088 double bearingSd, 00089 const hydroutil::Context &context ); 00090 00092 00093 // Used for dynamically loading driver 00094 class Factory : public hydrointerfaces::LaserFeatureExtractorFactory 00095 { 00096 public: 00097 hydrointerfaces::LaserFeatureExtractor* 00098 createDriver( double laserMaxRange, 00099 double laserStartAngle, 00100 double laserAngleIncrement, 00101 const hydroutil::Context &context ) const 00102 { 00103 hydrolfextract::ScannerConfig scannerConfig( laserMaxRange, laserStartAngle, laserAngleIncrement ); 00104 return new Driver( scannerConfig, context ); 00105 } 00106 }; 00107 00108 } // namespace 00109 00110 // Used for dynamically loading driver 00111 extern "C" { 00112 hydrointerfaces::LaserFeatureExtractorFactory *createDriverFactory(); 00113 } 00114 00115 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)