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/pathfollower2dImpl.h> 00005 #include "clock.h" 00006 00007 namespace localnav { 00008 00012 class PathFollowerInterface : public orcaifaceimpl::PathFollowerCallback 00013 { 00014 00015 public: 00016 00017 PathFollowerInterface( const Clock &clock, 00018 const std::string &interfaceTag, 00019 const orcaice::Context &context ); 00020 00021 void initInterface() { pathFollower2dImpl_->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 void setData( const orca::PathFollower2dData &pathData, bool activateImmediately ); 00033 void activateNow(); 00034 int getWaypointIndex() const; 00035 bool getAbsoluteActivationTime( orca::Time &activationTime ) const; 00036 bool getRelativeActivationTime( double &secondsSinceActivation ) const; 00037 void setEnabled( bool enabled ); 00038 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 gbxsickacfr::gbxiceutilacfr::Store<orca::PathFollower2dData> pendingPathRequestStore_; 00048 00049 // Time of Activation from the outside world goes in here 00050 gbxsickacfr::gbxiceutilacfr::Store<orca::Time> pendingActivationRequestStore_; 00051 00052 // Progress info from the component goes in here 00053 gbxsickacfr::gbxiceutilacfr::Store<int> wpIndexStore_; 00054 gbxsickacfr::gbxiceutilacfr::Store<orca::Time> activationTimeStore_; 00055 00056 // Allow external en/dis-able 00057 gbxsickacfr::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)