Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
StareAtBallBehavior.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_StareAtBallBehavior_h_ 00003 #define INCLUDED_StareAtBallBehavior_h_ 00004 00005 #include "Behaviors/BehaviorBase.h" 00006 #include "Motion/MotionManager.h" 00007 00008 //! A simple behavior to chase after any objects seen by the vision system 00009 class StareAtBallBehavior : public BehaviorBase { 00010 public: 00011 //!constructor 00012 StareAtBallBehavior() 00013 : BehaviorBase("StareAtBallBehavior"), headpointer_id(MotionManager::invalid_MC_ID) 00014 {} 00015 //!destructor 00016 virtual ~StareAtBallBehavior() {} 00017 00018 //! adds a headpointer and a listens for vision events 00019 virtual void DoStart(); 00020 00021 //! removes motion commands and stops listening 00022 virtual void DoStop(); 00023 00024 //! sets the head to point at the object and sets the body to move where the head points 00025 virtual void processEvent(const EventBase& event); 00026 00027 static std::string getClassDescription() { return "Tracks any pink objects seen by the vision system"; } 00028 virtual std::string getDescription() const { return getClassDescription(); } 00029 00030 protected: 00031 MotionManager::MC_ID headpointer_id; //!< a HeadPointerMC object 00032 }; 00033 00034 /*! @file 00035 * @brief Describes StareAtBallBehavior, which runs around after whatever the dog sees 00036 * @author tss (Creator) 00037 * 00038 * $Author: ejt $ 00039 * $Name: tekkotsu-2_4_1 $ 00040 * $Revision: 1.6 $ 00041 * $State: Exp $ 00042 * $Date: 2004/11/12 00:05:03 $ 00043 */ 00044 00045 #endif |
Tekkotsu v2.4.1 |
Generated Tue Aug 16 16:32:49 2005 by Doxygen 1.4.4 |