|
orca-robotics INTRODUCTION Overview Download and Install Quick Start Documentation Publications REPOSITORY Interfaces Components Libraries Utilities Software Map DEVELOPER Tutorials Examples Dev Guide Dashboard Wiki login/pass: orca/orca PEOPLE Contributors Users Project Download Mailing lists
|
pathfollowerinterface.h00001 #ifndef LOCALNAV_PATHFOLLOWERINTERFACE_H 00002 #define LOCALNAV_PATHFOLLOWERINTERFACE_H 00003 00004 #include <orcaifaceimpl/pathfollower2d.h> 00005 #include "clock.h" 00006 00007 namespace localnav { 00008 00009 // 00010 // @author Alex Brooks 00011 // 00012 class PathFollowerInterface : public orcaifaceimpl::AbstractPathFollowerCallback 00013 { 00014 00015 public: 00016 00017 PathFollowerInterface( const Clock &clock, 00018 const std::string &interfaceTag, 00019 const orcaice::Context &context ); 00020 00021 void initInterface(); 00022 00023 // Allow localnav's internals to increment the waypoint index 00024 void updateWaypointIndex( int index ); 00025 // Allow component internals to check for pending requests 00026 void serviceRequests( bool &gotNewPath, 00027 orca::PathFollower2dData &pathData, 00028 bool &gotActivation, 00029 orca::Time &pathStartTime ); 00030 00031 // From orcaifaceimpl::PathFollowerCallback 00032 virtual void setData( const orca::PathFollower2dData &pathData, bool activateImmediately ); 00033 virtual void activateNow(); 00034 virtual int getWaypointIndex() const; 00035 virtual bool getAbsoluteActivationTime( orca::Time &activationTime ) const; 00036 virtual bool getRelativeActivationTime( double &secondsSinceActivation ) const; 00037 virtual void setEnabled( bool enabled ); 00038 virtual bool enabled() const; 00039 00040 private: 00041 00042 double timeSinceActivate( const orca::Time &activationTime ); 00043 00044 orcaifaceimpl::PathFollower2dImplPtr pathFollower2dImpl_; 00045 00046 // New paths from the outside world go in here 00047 gbxiceutilacfr::Store<orca::PathFollower2dData> pendingPathRequestStore_; 00048 00049 // Time of Activation from the outside world goes in here 00050 gbxiceutilacfr::Store<orca::Time> pendingActivationRequestStore_; 00051 00052 // Progress info from the component goes in here 00053 gbxiceutilacfr::Store<int> wpIndexStore_; 00054 gbxiceutilacfr::Store<orca::Time> activationTimeStore_; 00055 00056 // Allow external en/dis-able 00057 gbxiceutilacfr::Store<bool> enabledStore_; 00058 00059 const Clock &clock_; 00060 00061 orcaice::Context context_; 00062 }; 00063 00064 } 00065 00066 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)
1.4.5