orca-robotics


INTRODUCTION
Overview
Download and Install
Documentation

REPOSITORY
Interfaces
Drivers
Libraries
Utilities
Software Map

DEVELOPER
Dashboard

PEOPLE
Contributors
Users

SourceForge.net Logo
Project
Download
Mailing lists

 

         

laserscanner2durgnz/driver.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2008 Alex Brooks, Alexei Makarenko, Tobias Kaupp
00005  *
00006  * This distribution is licensed to you under the terms described in
00007  * the LICENSE file included in this distribution.
00008  *
00009  */
00010 
00011 #ifndef HYDRO_LASERSCANNER2D_URG_NZ_H
00012 #define HYDRO_LASERSCANNER2D_URG_NZ_H
00013 
00014 #include <memory>
00015 #include <hydrointerfaces/laserscanner2d.h>
00016 
00017 // forward declaration of data type
00018 namespace urg_nz {
00019     class urg_laser;
00020 }
00021 
00022 namespace laserscanner2durgnz {
00023 
00024 class Driver : public hydrointerfaces::LaserScanner2d
00025 {
00026 
00027 public: 
00028 
00029     Driver( const Config & cfg, const hydroutil::Context & context );
00030     ~Driver();
00031 
00032     // Blocks till new data is available
00033     virtual void read( hydrointerfaces::LaserScanner2d::Data &data );
00034 
00035 private: 
00036 
00037     Config config_;
00038 
00039     // carmen core object
00040     std::auto_ptr<urg_nz::urg_laser> laser_;
00041 
00042     // lib configs
00043     // are these counts?
00044     int min_i_, max_i_;
00045 
00046     void init();
00047 
00048     hydroutil::Context context_;
00049 };
00050 
00051 // Used for dynamically loading driver
00052 class Factory : public hydrointerfaces::LaserScanner2dFactory
00053 {
00054 public:
00055     hydrointerfaces::LaserScanner2d*
00056     createDriver( const hydrointerfaces::LaserScanner2d::Config &config,
00057                   const hydroutil::Context &context ) const
00058     {
00059         return new Driver( config, context );
00060     }
00061 };
00062 
00063 } // namespace
00064 
00065 // Used for dynamically loading driver
00066 extern "C" {
00067     hydrointerfaces::LaserScanner2dFactory *createDriverFactory();
00068 }
00069 
00070 #endif
 

Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)


Generated for Orca Robotics by  doxygen 1.4.5