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

 

         

hydrolibs/hydropublish/odometry2dpublisher.h

00001 #ifndef HYDROPUBLISH_ODOMETRY2DPUBLISHER_H
00002 #define HYDROPUBLISH_ODOMETRY2DPUBLISHER_H
00003 
00004 #include <boost/shared_ptr.hpp>
00005 #include <hydronavutil/hydronavutil.h>
00006 #include <hydrotime/time.h>
00007 #include <hydronavutil/vehicledescription.h>
00008 
00009 namespace hydropublish {
00010 
00011 //
00012 // @brief Knows how to inform the world of Odometry2d information.
00013 //
00014 // @author Alex Brooks
00015 //
00016 class Odometry2dPublisher
00017 {
00018 public: 
00019 
00020     virtual ~Odometry2dPublisher() {}
00021 
00022     virtual void init()=0;
00023     virtual void localSetAndSend( const hydronavutil::Pose     &pose,
00024                                   const hydronavutil::Velocity &velocity,
00025                                   const hydrotime::Time        &time = hydrotime::Time(0,0),
00026                                   bool                          odometryWasReset=false )=0;
00027 
00028 private:
00029 
00030 };
00031 typedef boost::shared_ptr<Odometry2dPublisher> Odometry2dPublisherPtr;
00032 
00033 //
00034 // Does nothing
00035 //
00036 class DummyOdometry2dPublisher : public Odometry2dPublisher {
00037 public:
00038     void init() {}
00039     void localSetAndSend( const hydronavutil::Pose     &pose,
00040                           const hydronavutil::Velocity &velocity,
00041                           const hydrotime::Time        &time = hydrotime::Time(0,0),
00042                           bool                          odometryWasReset=false ) {}
00043 };
00044 
00045 //
00046 // @brief Knows how to create Odometry2dPublisher's
00047 //
00048 // @author Alex Brooks
00049 //
00050 class Odometry2dPublisherFactory
00051 {
00052 public:
00053     virtual ~Odometry2dPublisherFactory() {}
00054 
00055     virtual Odometry2dPublisherPtr createPublisher( const hydronavutil::DiffDriveControlDescription    &controlDescription,
00056                                                     const hydronavutil::CylindricalGeometryDescription &cylindricalDescription,
00057                                                     const std::string                                  &name ) = 0;
00058 
00059 private:
00060 };
00061 typedef boost::shared_ptr<Odometry2dPublisherFactory> Odometry2dPublisherFactoryPtr;
00062 
00063 //
00064 // Produces dummy publishers
00065 //
00066 class DummyOdometry2dPublisherFactory : public Odometry2dPublisherFactory {
00067 public:
00068 
00069     Odometry2dPublisherPtr createPublisher( const hydronavutil::DiffDriveControlDescription            &controlDescription,
00070                                                     const hydronavutil::CylindricalGeometryDescription &cylindricalDescription,
00071                                             const std::string                                          &name )
00072         { return Odometry2dPublisherPtr( new DummyOdometry2dPublisher ); }
00073 
00074 };
00075 
00076 }
00077 
00078 #endif
 

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


Generated for Orca Robotics by  doxygen 1.4.5