Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
ExploreMachine.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_ExploreMachine_h_ 00003 #define INCLUDED_ExploreMachine_h_ 00004 00005 #include "Behaviors/StateNode.h" 00006 #include "Motion/MotionManager.h" 00007 00008 //! A state machine for exploring an environment (or searching for an object) 00009 class ExploreMachine : public StateNode { 00010 public: 00011 //!constructor 00012 ExploreMachine() 00013 : StateNode("ExploreMachine","ExploreMachine"), start(NULL), turn(NULL), walkid(MotionManager::invalid_MC_ID) 00014 {} 00015 00016 //!constructor 00017 ExploreMachine(const std::string& nm) 00018 : StateNode("ExploreMachine",nm), start(NULL), turn(NULL), walkid(MotionManager::invalid_MC_ID) 00019 {} 00020 00021 virtual void setup(); 00022 virtual void DoStart(); 00023 virtual void DoStop(); 00024 virtual void teardown(); 00025 00026 //! called each time the turn node is activated, sets a new random turn direction and speed 00027 virtual void processEvent(const EventBase& /*e*/); 00028 00029 protected: 00030 StateNode * start; //!< the node to begin within on DoStart() (turn) 00031 class WalkNode * turn; //!< walk node to use when turning 00032 MotionManager::MC_ID walkid; //!< we want to share a walk between turning and walking nodes 00033 00034 private: 00035 ExploreMachine(const ExploreMachine&); //!< don't use 00036 ExploreMachine operator=(const ExploreMachine&); //!< don't use 00037 }; 00038 00039 /*! @file 00040 * @brief Describes ExploreMachine, a state machine for exploring an environment (or searching for an object) 00041 * @author ejt (Creator) 00042 * 00043 * $Author: ejt $ 00044 * $Name: tekkotsu-2_2_2 $ 00045 * $Revision: 1.22 $ 00046 * $State: Exp $ 00047 * $Date: 2004/12/04 00:10:38 $ 00048 */ 00049 00050 #endif |
Tekkotsu v2.2.2 |
Generated Tue Jan 4 15:43:13 2005 by Doxygen 1.4.0 |