INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
hydrodrivers/hydrolaserfeatureextractorcombined/driver.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 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 <memory> 00015 #include <hydrointerfaces/laserfeatureextractor.h> 00016 #include <hydrolaserfeatureextract/hydrolaserfeatureextract.h> 00017 00018 namespace lfecombined 00019 { 00020 00021 class Driver: public hydrointerfaces::LaserFeatureExtractor 00022 { 00023 00024 public: 00025 00026 Driver( const hydroscanutil::ScannerConfig &scannerConfig, 00027 const hydroutil::Context &context ); 00028 00029 std::vector<hydrofeatureobs::FeatureObs*> 00030 extractFeatures( const std::vector<float> &ranges, 00031 const std::vector<unsigned char> &intensities ); 00032 00033 private: 00034 00035 std::auto_ptr<hydrolfextract::ReflectorExtractor> reflectorExtractor_; 00036 std::auto_ptr<hydrolfextract::ReflectorFeatureExtractor> reflectorFeatureExtractor_; 00037 00038 std::auto_ptr<hydrolfextract::ForegroundExtractor> foregroundExtractor_; 00039 std::auto_ptr<hydrolfextract::ForegroundFeatureExtractor> foregroundFeatureExtractor_; 00040 00041 std::auto_ptr<hydrolfextract::DoorExtractor> doorExtractor_; 00042 std::auto_ptr<hydrolfextract::DoorFeatureExtractor> doorFeatureExtractor_; 00043 00044 std::auto_ptr<hydrolfextract::LineExtractor> lineExtractor_; 00045 std::auto_ptr<hydrolfextract::LineFeatureExtractor> lineFeatureExtractor_; 00046 std::auto_ptr<hydrolfextract::CornerFeatureExtractor> cornerFeatureExtractor_; 00047 }; 00048 00050 00051 hydrolfextract::ReflectorExtractor * 00052 getReflectorExtractor( const hydroscanutil::ScannerConfig &scannerConfig, 00053 const hydroutil::Context &context ); 00054 hydrolfextract::ReflectorFeatureExtractor * 00055 getReflectorFeatureExtractor( const hydrolfextract::ReflectorExtractor::Config &cfg, 00056 double rangeSd, 00057 double bearingSd, 00058 const hydroutil::Context &context ); 00059 00060 hydrolfextract::ForegroundExtractor * 00061 getForegroundExtractor( const hydroscanutil::ScannerConfig &scannerConfig, 00062 const hydroutil::Context &context ); 00063 hydrolfextract::ForegroundFeatureExtractor * 00064 getForegroundFeatureExtractor( const hydrolfextract::ForegroundExtractor::Config &cfg, 00065 double rangeSd, 00066 double bearingSd, 00067 const hydroutil::Context &context ); 00068 00069 hydrolfextract::DoorExtractor * 00070 getDoorExtractor( const hydroscanutil::ScannerConfig &scannerConfig, 00071 const hydroutil::Context &context ); 00072 hydrolfextract::DoorFeatureExtractor * 00073 getDoorFeatureExtractor( const hydrolfextract::DoorExtractor::Config &cfg, 00074 double rangeSd, 00075 double bearingSd, 00076 const hydroutil::Context &context ); 00077 00078 hydrolfextract::LineExtractor * 00079 getLineExtractor( const hydroscanutil::ScannerConfig &scannerConfig, 00080 const hydroutil::Context &context ); 00081 hydrolfextract::LineFeatureExtractor * 00082 getLineFeatureExtractor( const hydrolfextract::LineExtractor::Config &cfg, 00083 double rangeSd, 00084 double bearingSd, 00085 const hydroutil::Context &context ); 00086 hydrolfextract::CornerFeatureExtractor * 00087 getCornerFeatureExtractor( const hydrolfextract::LineExtractor::Config &cfg, 00088 double rangeSd, 00089 double bearingSd, 00090 const hydroutil::Context &context ); 00091 00093 00094 // Used for dynamically loading driver 00095 class Factory : public hydrointerfaces::LaserFeatureExtractorFactory 00096 { 00097 public: 00098 hydrointerfaces::LaserFeatureExtractor* 00099 createDriver( double laserMaxRange, 00100 double laserStartAngle, 00101 double laserAngleIncrement, 00102 int laserNumReturns, 00103 const hydroutil::Context &context ) const 00104 { 00105 hydroscanutil::ScannerConfig scannerConfig( laserMaxRange, laserStartAngle, laserAngleIncrement, laserNumReturns ); 00106 return new Driver( scannerConfig, context ); 00107 } 00108 }; 00109 00110 } // namespace 00111 00112 // Used for dynamically loading driver 00113 extern "C" { 00114 hydrointerfaces::LaserFeatureExtractorFactory *createLaserFeatureExtractorDriverFactory(); 00115 } 00116 00117 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)