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

SourceForge.net Logo
Project
Download
Mailing lists

 

         

hydrointerfaces/laserscanner2d.h

00001 /*
00002  * Orca-Robotics Project: Components for robotics 
00003  *               http://orca-robotics.sf.net/
00004  * Copyright (c) 2004-2009 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 #ifndef HYDRO_INTERFACES_LASERSCANNER2D_H
00011 #define HYDRO_INTERFACES_LASERSCANNER2D_H
00012 
00013 #include <string>
00014 #include <vector>
00015 #include <hydroutil/context.h>
00016 
00017 namespace hydrointerfaces 
00018 {
00019 
00033 
00034 
00035 
00036 
00037 
00038 
00039 
00040 
00041 
00042 
00043 class SOEXPORT LaserScanner2d 
00044 {
00045 
00046 public:
00047 
00049     class Config
00050     {   
00051     public:
00052         Config();
00053         bool validate() const;
00054         std::string toString() const;
00055         bool operator==( const Config & other );
00056         bool operator!=( const Config & other );
00057 
00059         double minRange;
00061         double maxRange;
00063         double fieldOfView;
00065         double startAngle;
00067         int    numberOfSamples;
00068     };
00069 
00071     class Data
00072     {
00073     public:
00074         Data()
00075             : haveWarnings(false)
00076             {}
00077 
00078         float         *ranges;
00079         unsigned char *intensities;
00080         int            timeStampSec;
00081         int            timeStampUsec;
00082         bool           haveWarnings;
00084         std::string    warnings;
00085     };
00086 
00087     virtual ~LaserScanner2d() {};
00088 
00092     virtual void read( Data &data )=0;
00093 
00094 private:
00095 
00096 };
00097 
00099 class SOEXPORT LaserScanner2dFactory {
00100 public:
00101     virtual ~LaserScanner2dFactory() {};
00103     virtual LaserScanner2d *createDriver( const LaserScanner2d::Config &config,
00104                                           const hydroutil::Context     &context ) const=0;
00105 };
00106 
00108 } // namespace
00109 
00110 // Function for dynamically instantiating drivers.
00111 // A driver must have a function like so:
00112 // extern "C" {
00113 //     hydrointerfaces::LaserScanner2dFactory *createLaserScanner2dDriverFactory();
00114 // }
00115 typedef hydrointerfaces::LaserScanner2dFactory *LaserScanner2dDriverFactoryMakerFunc();
00116 
00117 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5