00001
00002 #ifndef INCLUDED_WalkToTargetMachine_h_
00003 #define INCLUDED_WalkToTargetMachine_h_
00004
00005 #include "Behaviors/StateNode.h"
00006 #include "Behaviors/Transitions/TimeOutTrans.h"
00007 #include "Behaviors/Transitions/VisualTargetCloseTrans.h"
00008 #include "Motion/MotionManager.h"
00009
00010
00011 class WalkToTargetMachine : public StateNode {
00012 public:
00013
00014 WalkToTargetMachine(VisionEventNS::VisionSourceID_t obj,StateNode* c=NULL, StateNode* l=NULL,StateNode* p=NULL)
00015 : StateNode("WalkToTarget",p),tracking(obj),timeout(NULL),close(c),lost(l),
00016 walker_id(MotionManager::invalid_MC_ID), headpointer_id(MotionManager::invalid_MC_ID)
00017 {}
00018
00019 void setup();
00020
00021 virtual void DoStart();
00022 virtual void DoStop();
00023
00024 static std::string getClassDescription() { return "INCOMPLETE: walks towards a visual target until it gets \"close\""; }
00025
00026
00027 virtual void processEvent(const EventBase&);
00028
00029
00030 protected:
00031 VisionEventNS::VisionSourceID_t tracking;
00032 TimeOutTrans* timeout;
00033 StateNode* close;
00034 StateNode* lost;
00035 MotionManager::MC_ID walker_id;
00036 MotionManager::MC_ID headpointer_id;
00037
00038 private:
00039 WalkToTargetMachine(const WalkToTargetMachine&);
00040 WalkToTargetMachine operator=(const WalkToTargetMachine&);
00041 };
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 #endif