Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
00001 //-*-c++-*- 00002 #ifndef INCLUDED_StartupBehavior_h_ 00003 #define INCLUDED_StartupBehavior_h_ 00004 #include "Behaviors/BehaviorBase.h" 00005 #include "Motion/MotionManager.h" 00006 #include <vector> 00007 00008 class Controller; // defined in Controller.h, don't actually need header file yet 00009 class ControlBase; // defined in ControlBase.h, don't actually need header file yet 00010 00011 //! This Behavior is the only hardcoded behavior by the framework to start up once all the data structures and such are set up 00012 /*! Similar in idea to the init process in unix/linux. */ 00013 class StartupBehavior : public BehaviorBase { 00014 public: 00015 //! Constructor 00016 StartupBehavior(); 00017 //! Destructor 00018 virtual ~StartupBehavior(); 00019 00020 //!Inherited 00021 //@{ 00022 virtual void DoStart(); 00023 virtual void DoStop(); 00024 virtual void processEvent(const EventBase&); 00025 virtual std::string getName() const { return "StartupBehavior"; } 00026 static std::string getClassDescription() { return "The initial behavior, when run, sets up everything else"; } 00027 //@} 00028 protected: 00029 //! Initializes the Controller menu structure 00030 virtual ControlBase* SetupMenus(); 00031 00032 std::vector<BehaviorBase*> spawned; //!< Behaviors spawned from DoStart, so they can automatically be stopped on DoStop 00033 MotionManager::MC_ID stop_id; //!< the main EmergencyStopMC 00034 MotionManager::MC_ID pid_id; //!< used to fade in the PIDs up to full strength (from initial zero) This is so the joints don't jerk on startup. 00035 }; 00036 00037 extern BehaviorBase& startupBehavior; 00038 00039 #endif
Tekkotsu v1.4 |
Generated Sat Jul 19 00:06:31 2003 by Doxygen 1.3.2 |