MIRA
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Protected Attributes | List of all members
Objective Class Referenceabstract

#include <pilot/Objective.h>

Inheritance diagram for Objective:
Inheritance graph
[legend]

Classes

struct  Vote
 

Public Types

enum  Permit { ADMISSIBLE = 0, NOT_ADMISSIBLE = 1, NOT_REACHABLE = 2 }
 
enum  Satisfaction { INTOLERABLE = 0, DISSATISFIED = 1, DONT_CARE = 2, SATISFIED = 3 }
 
enum  Flags
 
typedef std::multimap< std::string, std::string > ChannelNameMapping
 
typedef std::map< std::string, StatusChannelStatusMap
 
typedef std::map< std::string, StatusStatusMap
 

Public Member Functions

 Objective ()
 
virtual ~Objective ()
 
template<typename Reflector >
void reflect (Reflector &r)
 
bool hasWork () const
 
virtual Satisfaction getSatisfaction ()
 Returns satisfaction for this Objective. More...
 
virtual void resetDissatisfaction ()
 Reset any kind of dissatisfaction. More...
 
virtual DissatisfactionReason getDissatisfactionReason ()
 Returns the reason for dissatisfaction. More...
 
virtual void prepareVote (float lookAheadTime)
 Is called before the vote() calls and gives the objective a change to prepare itself, e.g. More...
 
virtual Vote vote (const Velocity2 &v, float lookAheadTime)
 DEPRECATED - Please implement vote(const Trajectory& trajectory, float lookAheadTime) Is called multiple times after prepareVote() to compute a cost value for the given velocity. More...
 
virtual Vote vote (const Velocity2 &v, const robot::PoseVelocityTrajectory &trajectory, float lookAheadTime)
 DEPRECATED - Please implement vote(const Trajectory& trajectory, float lookAheadTime) Is called multiple times after prepareVote() to compute a cost value for the given velocity. More...
 
virtual Vote vote (const robot::PoseVelocityTrajectory &trajectory, float lookAheadTime)
 Is called multiple times after prepareVote() to compute a cost value for the given trajectory. More...
 
virtual void informDecision (const Velocity2 &chosen, float dt)
 DEPRECATED - Please implement informDecision(const Trajectory& trajectory, float dt) Is called after the decision was made by the local motion planner to inform each objective about the decision that was made. More...
 
virtual void informDecision (const robot::PoseVelocityTrajectory &trajectory, float dt)
 Is called after the decision was made by the local motion planner to inform each objective about the decision that was made. More...
 
virtual void setTask (navigation::TaskPtr task)
 
virtual bool reachedTask ()
 
virtual void update ()
 
virtual void plan (Duration plantime)
 
virtual void updateRobotModel ()
 
void pauseModule ()
 
void resumeModule ()
 
void initialize (Pilot *pilot)
 
virtual void initialize ()
 
virtual void pause ()
 
virtual void resume ()
 
PilotgetPilot ()
 
const std::string & getItemName () const
 
Class const & getClass () const
 
void enableSubscriberCallbacks (bool enable)
 
StatusManagergetStatusManager ()
 
void setHeartbeatInterval (const Duration &interval)
 
void setName (const std::string &name)
 
Duration getHeartbeatInterval () const
 
void heartbeat ()
 
bool hasHeartbeatTimeout () const
 
void bootup (const std::string &message, const std::string &trText="")
 
void bootupFinished ()
 
void recoverFinished ()
 
void recover (const std::string &message, const std::string &trText="")
 
void ok (const std::string &category="")
 
bool warning (const std::string &category, const std::string &message, const std::string &trText="")
 
bool error (const std::string &category, const std::string &message, const std::string &trText="")
 
bool setStatus (Status::StatusMode mode, const std::string &category, const std::string &message, const std::string &trText="")
 
Status::StatusMode getStatus () const
 
StatusMap getStatusMap () const
 
StatusManager::StatusMap getStatusMap () override
 
StatusManager::StatusMap getStatusMap () override
 
void checkin (const ResourceName &fullname, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (const ResourceName &ns, const std::string &name, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (Authority &iParent, const ResourceName &ns, const std::string &name)
 
void checkin (Authority &iParent, const std::string &name)
 
void checkin (const ResourceName &fullname, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (const ResourceName &ns, const std::string &name, AuthorityRuntimePtr runtime=AuthorityRuntimePtr())
 
void checkin (Authority &iParent, const ResourceName &ns, const std::string &name)
 
void checkin (Authority &iParent, const std::string &name)
 
void checkout ()
 
void checkout ()
 
bool isValid () const
 
bool isValid () const
 
void validate () const
 
void validate () const
 
void startWithParent (bool start)
 
void startWithParent (bool start)
 
AuthorityRuntimePtr getRuntime ()
 
AuthorityRuntimePtr getRuntime ()
 
std::set< Authority *> getChildren ()
 
std::set< Authority *> getChildren ()
 
void addImmediateHandler (DiagnosticRunnablePtr runnable)
 
void addImmediateHandler (DiagnosticRunnablePtr runnable)
 
void addImmediateHandlerFunction (F &&fn)
 
void addImmediateHandlerFunction (F &&fn)
 
void addFinalizeHandler (DiagnosticRunnablePtr runnable)
 
void addFinalizeHandler (DiagnosticRunnablePtr runnable)
 
void addFinalizeHandlerFunction (F &&fn)
 
void addFinalizeHandlerFunction (F &&fn)
 
TimerPtr createTimer (Duration period, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Time time, TimerCallback callback)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &), Class *obj)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &))
 
TimerPtr createTimer (Duration period, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, TimerCallback callback, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), Class *obj, bool oneshot=false)
 
TimerPtr createTimer (Duration period, Duration tolerance, void(Class::*f)(const Timer &), bool oneshot=false)
 
TimerPtr createTimer (Time time, TimerCallback callback)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &), Class *obj)
 
TimerPtr createTimer (Time time, void(Class::*f)(const Timer &))
 
void removeTimer (TimerPtr timer)
 
void removeTimer (TimerPtr timer)
 
void start () override
 
void start () override
 
void stop () override
 
void stop () override
 
bool spin (const Duration &maxWait=Duration::infinity())
 
bool spin (const Duration &maxWait=Duration::infinity())
 
bool hasWork (Time horizon=Time::now()) const
 
bool hasUnrecoverableFailure () const override
 
bool hasUnrecoverableFailure () const override
 
bool isStarted () const override
 
bool isStarted () const override
 
bool isRunning () const override
 
bool isRunning () const override
 
std::string resolveName (const std::string &name) const
 
std::string resolveName (const std::string &name) const
 
std::string resolveServiceName (const std::string &name) const
 
std::string resolveServiceName (const std::string &name) const
 
Channel< T > publish (const std::string &channelID)
 
Channel< T > publish (const std::string &channelID, const Typename &type)
 
Channel< T > publish (const std::string &channelID)
 
Channel< T > publish (const std::string &channelID, const Typename &type)
 
void unpublish (const std::string &channelID)
 
void unpublish (const std::string &channelID)
 
Channel< T > subscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > subscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, const Duration &storageDuration=Duration::seconds(0))
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, boost::function< void(ChannelRead< T >)> fn, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, bool independentThread)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false)
 
Channel< T > publishAndSubscribe (const std::string &channelID, void(Class::*f)(ChannelRead< T >), bool independentThread)
 
Channel< T > subscribeInterval (const std::string &channelID, boost::function< void(ChannelReadInterval< T >)> fn, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), Class *obj, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, boost::function< void(ChannelReadInterval< T >)> fn, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), Class *obj, const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeInterval (const std::string &channelID, void(Class::*f)(ChannelReadInterval< T >), const Duration &storageDuration, bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, boost::function< void(ChannelRead< T >)>, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), Class *obj, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, boost::function< void(ChannelRead< T >)>, const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
Channel< T > subscribeIntervalByElements (const std::string &channelID, void(Class::*f)(ChannelRead< T >), const Duration &storageDuration=Duration::seconds(0), bool independentThread=false, const Time &startAfter=Time::unixEpoch())
 
ChannelRead< T > waitForData (Channel< T > channel, Duration timeout=Duration::infinity()) const
 
ChannelRead< T > waitForData (Channel< T > channel, Duration timeout=Duration::infinity()) const
 
void unsubscribe (const std::string &channelID)
 
void unsubscribe (const std::string &channelID)
 
void unsubscribe (const std::string &channelID)
 
void unsubscribe (const std::string &channelID)
 
Channel< T > getChannel (const std::string &channelID)
 
Channel< T > getChannel (const std::string &channelID)
 
bool isSubscribedOn (const std::string &channelID) const
 
bool isSubscribedOn (const std::string &channelID) const
 
 MIRA_DEPRECATED ("Please use isSubscribedOn() instead", bool hasSubscribedOn(const std::string &channelID) const)
 
 MIRA_DEPRECATED ("Please use isSubscribedOn() instead", bool hasSubscribedOn(const std::string &channelID) const)
 
bool hasPublished (const std::string &channelID) const
 
bool hasPublished (const std::string &channelID) const
 
bool doesChannelExist (const std::string &channelID) const
 
bool doesChannelExist (const std::string &channelID) const
 
bool waitForChannel (const std::string &channelID, const Duration &timeout=Duration::infinity()) const
 
bool waitForChannel (const std::string &channelID, const Duration &timeout=Duration::infinity()) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID) const
 
bool isTransformAvailable (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, Duration timeout=Duration::invalid()) const
 
bool waitForTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID, Duration timeout=Duration::invalid()) const
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time))
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj, Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Filter &&filter)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, boost::function< void(Transform, Time)> fn)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time), Class *obj)
 
void subscribeTransform (const std::string &targetID, const std::string &sourceID, void(Class::*f)(Transform, Time))
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time=Time()) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID) const
 
Transform getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &time=Time()) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const std::string &sourceID, const Time &time=Time()) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID, Filter &&filter) const
 
Transform getTransform (const std::string &targetID, const Time &targetTime, const std::string &sourceID, const Time &sourceTime, const std::string &fixedID) const
 
Transform getTransform (const TransformDesc &desc, const Time &time, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &time=Time()) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime, Filter &&filter) const
 
Transform getTransform (const TransformDesc &desc, const Time &targetTime, const Time &sourceTime) const
 
FrameworkTransformerNodegetTransformNode (const std::string &frameID) const
 
FrameworkTransformerNodegetTransformNode (const std::string &frameID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID) const
 
TransformDesc prepareTransform (const std::string &targetID, const std::string &sourceID, const std::string &fixedID) const
 
void publishTransform (const std::string &frameID, const Transform &transform, const Time &time) const
 
void publishTransform (const std::string &frameID, const Transform &transform, const Time &time) const
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time, Filter &&filter=NearestNeighborInterpolator()) const
 
void publishTransformIndirect (const std::string &frameID, const std::string &targetID, const std::string &sourceID, const Transform &transform, const Time &time, Filter &&filter=NearestNeighborInterpolator()) const
 
void addTransformLink (const std::string &childID, const std::string &parentID) const
 
void addTransformLink (const std::string &childID, const std::string &parentID, FrameworkTransformerNode::Type type) const
 
void addTransformLink (const std::string &childID, const std::string &parentID) const
 
void addTransformLink (const std::string &childID, const std::string &parentID, FrameworkTransformerNode::Type type) const
 
void publishService (const std::string &name, Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (const std::string &name, Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void publishService (Service &iService, RPCHandlerPtr handler=RPCHandlerPtr())
 
void unpublishService ()
 
void unpublishService (const std::string &name)
 
void unpublishService ()
 
void unpublishService (const std::string &name)
 
RPCFuture< R > callService (const std::string &iService, const std::string &method, ARGS &&... args) const
 
RPCFuture< R > callService (const std::string &iService, const std::string &method, ARGS &&... args) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const json::Value &jsonRequest) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &jsonString) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const json::Value &params=json::Value()) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const std::string &params) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const RPCCallDefinition &rpc) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const json::Value &jsonRequest) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &jsonString) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const json::Value &params=json::Value()) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const std::string &service, const std::string &method, const std::string &params) const
 
RPCFuture< JSONRPCResponsecallServiceJSON (const RPCCallDefinition &rpc) const
 
ServiceCall< F > createServiceCall (const std::string &service, std::string method, bool waitTillExists=true, bool showBootupMsg=true)
 
ServiceCall< F > createServiceCall (const std::string &service, std::string method, bool waitTillExists=true, bool showBootupMsg=true)
 
bool existsService (const std::string &name) const
 
bool existsService (const std::string &name) const
 
bool implementsInterface (const std::string &name, const std::string &interface) const
 
bool implementsInterface (const std::string &name, const std::string &interface) const
 
bool waitForService (const std::string &name, Duration timeout=Duration::invalid()) const
 
bool waitForService (const std::string &name, Duration timeout=Duration::invalid()) const
 
std::string waitForServiceInterface (const std::string &interface, Duration timeout=Duration::invalid()) const
 
std::string waitForServiceInterface (const std::string &interface, Duration timeout=Duration::invalid()) const
 
std::list< std::string > queryServicesForInterface (const std::string &interface) const
 
std::list< std::string > queryServicesForInterface (const std::string &interface) const
 
void registerCallbackForInterface (const std::string &interface, ServiceInterfaceHandler::Callback cb)
 
void registerCallbackForInterface (const std::string &interface, void(Class::*f)(const std::string &, const std::string &), Class *obj)
 
void registerCallbackForInterface (const std::string &interface, ServiceInterfaceHandler::Callback cb)
 
void registerCallbackForInterface (const std::string &interface, void(Class::*f)(const std::string &, const std::string &), Class *obj)
 
boost::shared_ptr< PropertyNodegetProperties () override
 
boost::shared_ptr< PropertyNodegetProperties () override
 
std::set< std::string > getPublishedChannels () override
 
std::set< std::string > getPublishedChannels () override
 
std::set< std::string > getSubscribedChannels () override
 
std::set< std::string > getSubscribedChannels () override
 
std::set< std::string > getServiceInterfaces () override
 
std::set< std::string > getServiceInterfaces () override
 
ChannelNameMapping getPublishedChannelNames () override
 
ChannelNameMapping getPublishedChannelNames () override
 
ChannelNameMapping getSubscribedChannelNames () override
 
ChannelNameMapping getSubscribedChannelNames () override
 
ChannelStatusMap getSubscribedChannelStatus () override
 
ChannelStatusMap getSubscribedChannelStatus () override
 
std::string getNamespace () const
 
std::string getNamespace () const
 
std::string getGlobalName () const
 
std::string getGlobalName () const
 
std::string getGlobalID () const
 
std::string getGlobalID () const
 
std::string getID () const
 
std::string getID () const
 
std::string getName () const
 
std::string getName () const
 
const AuthorityDescriptiongetDescription () const
 
const AuthorityDescriptiongetDescription () const
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Public Attributes

 NORMAL
 
 ANONYMOUS
 
 HIDDEN
 
 INVISIBLE_PUBLISHER_SUBSCRIBER
 
 INTERNAL
 
 INDEPENDENT_SUBSCRIBER_THREAD
 
 INDEPENDENT_RPC_THREAD
 
 NO_MAIN_THREAD
 

Protected Types

typedef std::map< std::string, RWAccessFlagsRWAccessMap
 
typedef std::list< AbstractChannelSubscriberPtrSubscribePtrList
 

Protected Member Functions

void setHaveWork (bool haveWork)
 indicate whether this objective has work or not. If not, it will be skipped by the planner. More...
 
void setSatisfaction (Satisfaction satisfaction, DissatisfactionReason reason=DissatisfactionReason::NO_REASON)
 indicate whether this objective is satisfied, dissatisfied or doesn't care. More...
 
virtual Class const & internalGetClass () const=0
 
Channel< T > toProxy (ConcreteChannel< T > *channel)
 
void setChannelReadAccess (const std::string &channelID)
 
void setChannelWriteAccess (const std::string &channelID)
 
void removeChannelReadAccess (const std::string &channelID)
 
void removeChannelWriteAccess (const std::string &channelID)
 
void insertChannelNameMapping (AbstractAuthority::ChannelNameMapping &map, const std::string &local, const std::string &global)
 
void eraseChannelNameMapping (AbstractAuthority::ChannelNameMapping &map, const std::string &local, const std::string &global)
 
void remotePublishService (const std::string &service) const
 
PropertyTree getPropertiesRPC ()
 
void setProperty (const std::string &property, const std::string &value)
 
std::string getProperty (const std::string &property) const
 
void setPropertyJSON (const std::string &property, const json::Value &value)
 
json::Value getPropertyJSON (const std::string &property) const
 

Protected Attributes

AuthorityDescription mDescription
 
boost::optional< StatusmBootUpStatus
 
boost::optional< StatusmRecoverStatus
 
Duration mHeartbeatInterval
 
boost::optional< TimemLastHeartbeat
 
StatusMap mStatusMap
 
std::string mName
 

Member Enumeration Documentation

◆ Permit

enum Permit
Enumerator
ADMISSIBLE 
NOT_ADMISSIBLE 
NOT_REACHABLE 

◆ Satisfaction

Enumerator
INTOLERABLE 
DISSATISFIED 
DONT_CARE 
SATISFIED 

Constructor & Destructor Documentation

◆ Objective()

Objective ( )
inline

◆ ~Objective()

virtual ~Objective ( )
inlinevirtual

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ hasWork()

bool hasWork ( ) const
inline

◆ getSatisfaction()

virtual Satisfaction getSatisfaction ( )
inlinevirtual

Returns satisfaction for this Objective.

Is used to check if a recovery strategy is needed. If all objectives that do not return DONT_CARE return DISSATISFIED, it can be assumed that we are stuck and need to recover.

◆ resetDissatisfaction()

virtual void resetDissatisfaction ( )
inlinevirtual

Reset any kind of dissatisfaction.

◆ getDissatisfactionReason()

virtual DissatisfactionReason getDissatisfactionReason ( )
inlinevirtual

Returns the reason for dissatisfaction.

◆ prepareVote()

virtual void prepareVote ( float  lookAheadTime)
inlinevirtual

Is called before the vote() calls and gives the objective a change to prepare itself, e.g.

to perform computations. The given lookAheadTime in seconds specifies the time duration that should taken into account when computing the vote.

◆ vote() [1/3]

virtual Vote vote ( const Velocity2 v,
float  lookAheadTime 
)
inlinevirtual

DEPRECATED - Please implement vote(const Trajectory& trajectory, float lookAheadTime) Is called multiple times after prepareVote() to compute a cost value for the given velocity.

As second parameter the same look ahead time is specified that was previously passed to prepareVote. Use either overwrite this method or vote(const Velocity&, const Trajectory&, float) to compute a cost value for v.

◆ vote() [2/3]

virtual Vote vote ( const Velocity2 v,
const robot::PoseVelocityTrajectory trajectory,
float  lookAheadTime 
)
inlinevirtual

DEPRECATED - Please implement vote(const Trajectory& trajectory, float lookAheadTime) Is called multiple times after prepareVote() to compute a cost value for the given velocity.

The passed trajectory contains a list of poses and velocities (relative to the robot position before the movement) that will be reached if we drive with the given velocity for lookAheadTime. The poses of the trajectory also take the acceleration and deceleration limits of the current model into account.

◆ vote() [3/3]

virtual Vote vote ( const robot::PoseVelocityTrajectory trajectory,
float  lookAheadTime 
)
inlinevirtual

Is called multiple times after prepareVote() to compute a cost value for the given trajectory.

The passed trajectory contains a list of poses and velocities that will be reached when driving for a time as long as lookAheadTime. The poses of the trajectory also take the acceleration and deceleration limits of the current model into account.

◆ informDecision() [1/2]

virtual void informDecision ( const Velocity2 chosen,
float  dt 
)
inlinevirtual

DEPRECATED - Please implement informDecision(const Trajectory& trajectory, float dt) Is called after the decision was made by the local motion planner to inform each objective about the decision that was made.

The objective can use that information to implement some feedback, e.g. for using previous decisions for the computation of future cost values.

◆ informDecision() [2/2]

virtual void informDecision ( const robot::PoseVelocityTrajectory trajectory,
float  dt 
)
inlinevirtual

Is called after the decision was made by the local motion planner to inform each objective about the decision that was made.

The objective can use that information to implement some feedback, e.g. for using previous decisions for the computation of future cost values.

◆ setTask()

virtual void setTask ( navigation::TaskPtr  task)
inlinevirtual

◆ reachedTask()

virtual bool reachedTask ( )
inlinevirtual

◆ update()

virtual void update ( )
inlinevirtual

◆ plan()

virtual void plan ( Duration  plantime)
inlinevirtual

◆ updateRobotModel()

virtual void updateRobotModel ( )
inlinevirtual

◆ setHaveWork()

void setHaveWork ( bool  haveWork)
inlineprotected

indicate whether this objective has work or not. If not, it will be skipped by the planner.

◆ setSatisfaction()

void setSatisfaction ( Satisfaction  satisfaction,
DissatisfactionReason  reason = DissatisfactionReason::NO_REASON 
)
inlineprotected

indicate whether this objective is satisfied, dissatisfied or doesn't care.

◆ pauseModule()

void pauseModule ( )
inherited

◆ resumeModule()

void resumeModule ( )
inherited

◆ initialize() [1/2]

void initialize ( Pilot pilot)
inherited

◆ initialize() [2/2]

virtual void initialize ( )
inlinevirtualinherited

◆ pause()

virtual void pause ( )
inlinevirtualinherited

Reimplemented in AbstractObjectiveBasedPlanner.

◆ resume()

virtual void resume ( )
inlinevirtualinherited

Reimplemented in AbstractObjectiveBasedPlanner.

◆ getPilot()

Pilot* getPilot ( )
inlineinherited

◆ getItemName()

const std::string& getItemName ( ) const
inlineinherited

The documentation for this class was generated from the following file: