TrajectoryModule.hpp
Go to the documentation of this file.
00001 /*
00002  * TrajectoryModule.hpp
00003  *
00004  *  Created on: Dec 13, 2011
00005  *      Author: mriedel
00006  */
00007 
00008 #ifndef TRAJECTORYMODULE_HPP_
00009 #define TRAJECTORYMODULE_HPP_
00010 
00011 #include <telekyb_defines/telekyb_defines.hpp>
00012 #include <tk_trajprocessor/TrajectoryProcessorDefines.hpp>
00013 
00014 // plugin stuff
00015 #include <pluginlib/class_list_macros.h>
00016 
00017 #include <telekyb_base/Messages.hpp>
00018 
00019 namespace TELEKYB_NAMESPACE {
00020 
00021 class TrajectoryProcessorController;
00022 
00023 class TrajectoryModule {
00024 private:
00025         // set individual Module active or inactive
00026         bool active;
00027 
00028 protected:
00029         TrajectoryProcessorController& tpController;
00030 
00031         // pluginName
00032         std::string name;
00033         // type
00034         TrajModulePosType type;
00035         // priority 0-> you don't care-> will be added in the middle
00036         // priority < 0 the more negative it will be placed in the beginning
00037         // priority > 0 the more positive it will be placed in the end.
00038         // PRIORITIES SHOULD BE UNIQUE! OTHERWISE LOADING ORDER DETERMINES POSITION!
00039         int priority;
00040 
00041 
00042         TrajectoryModule(const std::string& name_, TrajModulePosType type_, int priority_);
00043 
00044 public:
00045         virtual ~TrajectoryModule();
00046         TrajModulePosType getType() const;
00047         std::string getName() const;
00048         int getPriority() const;
00049 
00050         bool isActive() const;
00051         void setActive();
00052         void setInactive();
00053 
00054 
00055         // called directly after Creation
00056         virtual void initialize() = 0;
00057 
00058         // called right before destruction
00059         virtual void destroy() = 0;
00060 
00061         // set back to intial conditions
00062         virtual void willTurnActive() = 0;
00063 
00064         // called after turning inactive
00065         virtual void didTurnInactive() = 0;
00066 
00067         // Interface Functions
00068         // true -> proceed normally
00069         // false -> do not check other Trajectory Modules in List. (e.g. BehaviorChange etc...)
00070         virtual bool trajectoryStep(const TKState& currentState, TKTrajectory& trajInput) = 0;
00071 };
00072 
00073 } /* namespace telekyb */
00074 #endif /* TRAJECTORYMODULE_HPP_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


tk_trajprocessor
Author(s): Martin Riedel
autogenerated on Mon Nov 11 2013 11:13:29