NormalBrake.hpp
Go to the documentation of this file.
00001 /*
00002  * NormalBrake.hpp
00003  *
00004  *  Created on: Nov 11, 2011
00005  *      Author: mriedel
00006  */
00007 
00008 #ifndef NORMALBRAKE_HPP_
00009 #define NORMALBRAKE_HPP_
00010 
00011 #include <telekyb_defines/telekyb_defines.hpp>
00012 
00013 #include <tk_behavior/Behavior.hpp>
00014 
00015 // plugin stuff
00016 //#include <pluginlib/class_list_macros.h>
00017 
00018 using namespace TELEKYB_NAMESPACE;
00019 
00020 namespace telekyb_behavior {
00021 
00022 class NormalBrake : public Behavior {
00023 private:
00024         double yawAngle;
00025 
00026         //** Option **//
00027         //** Important this Parameter must be smaller then Initial Condition for Hover. **//
00028         Option<double>* tBrakeMinVelocity;
00029 
00030 public:
00031         NormalBrake();
00032 
00033         // BehaviorInterface
00034         virtual void initialize();
00035         virtual void destroy();
00036 
00037         // Called directly after Change Event is registered.
00038         virtual bool willBecomeActive(const TKState& currentState, const Behavior& previousBehavior);
00039         // Called after actual Switch. Note: During execution trajectoryStepCreation is used
00040         virtual void didBecomeActive(const TKState& currentState, const Behavior& previousBehavior);
00041         // Called directly after Change Event is registered: During execution trajectoryStepTermination is used
00042         virtual void willBecomeInActive(const TKState& currentState, const Behavior& nextBehavior);
00043         // Called after actual Switch. Runs in seperate Thread.
00044         virtual void didBecomeInActive(const TKState& currentState, const Behavior& nextBehavior);
00045 
00046         // called everytime a new TKState is available AND it is the NEW Behavior of an active Switch
00047         virtual void trajectoryStepCreation(const TKState& currentState, TKTrajectory& generatedTrajInput);
00048 
00049         // called everytime a new TKState is available. Should return false if invalid (swtich to next behavior, or Hover if undef).
00050         virtual void trajectoryStepActive(const TKState& currentState, TKTrajectory& generatedTrajInput);
00051 
00052         // called everytime a new TKState is available AND it is the OLD Behavior of an active Switch
00053         virtual void trajectoryStepTermination(const TKState& currentState, TKTrajectory& generatedTrajInput);
00054 
00055         // Return true if the active Behavior is (still) valid. Initiate Switch otherwise
00056         virtual bool isValid(const TKState& currentState) const;
00057 
00058 };
00059 
00060 }
00061 
00062 #endif /* NORMALBRAKE_HPP_ */
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Defines


tk_behavior
Author(s): Dr. Antonio Franchi and Martin Riedel
autogenerated on Mon Nov 11 2013 11:13:36