Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
WaypointWalkControl.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_WaypointWalkControl_h_ 00003 #define INCLUDED_WaypointWalkControl_h_ 00004 00005 #include "ControlBase.h" 00006 #include "IPC/SharedObject.h" 00007 00008 class NullControl; 00009 class ToggleControl; 00010 class FileInputControl; 00011 class StringInputControl; 00012 00013 //! Allows interactive control and execution of a set of waypoints 00014 class WaypointWalkControl : public ControlBase { 00015 public: 00016 //!constructor 00017 WaypointWalkControl(); 00018 00019 //! add #walk_id to ::motman 00020 virtual ControlBase * activate(MotionManager::MC_ID disp_id, Socket * gui); 00021 00022 //!will be called after each waypoint is reached so we can update the menu 00023 virtual void refresh(); 00024 00025 //! remove the #walk_id from ::motman 00026 virtual void deactivate(); 00027 00028 //!handles selection of menu items 00029 virtual ControlBase* doSelect(); 00030 00031 // sends all events received to stdout and/or logfile 00032 //virtual void processEvent(const EventBase& event); 00033 00034 //! handles editing of individual waypoints 00035 class WaypointEditControl : public ControlBase { 00036 public: 00037 //!constructor 00038 WaypointEditControl(const std::string& n, const std::string& d, MotionManager::MC_ID walkid, unsigned int waypointid); 00039 //!handles selection of menu items 00040 virtual ControlBase* doSelect(); 00041 protected: 00042 MotionManager::MC_ID walk_id; //!< id number of the WaypointWalk 00043 unsigned int waypoint_id; //!< id of the waypoint this is editing 00044 NullControl * up; //!< command to move up in list 00045 NullControl * down;//!< command to move down in list 00046 NullControl * del; //!< command to delete from list 00047 NullControl * set; //!< command to start targeting this location 00048 private: 00049 WaypointEditControl(const WaypointEditControl&); //!< don't call 00050 WaypointEditControl operator=(const WaypointEditControl&); //!< don't call 00051 }; 00052 00053 protected: 00054 bool isRunning; //!< true if #walk_id is currently running 00055 NullControl * startstopCtl; //!< start and stop waypoint running 00056 ToggleControl * loopCtl; //!< repeat waypoints 00057 NullControl * addEgoWPCtl; //!< start and stop waypoint running 00058 NullControl * addOffWPCtl; //!< start and stop waypoint running 00059 NullControl * addAbsWPCtl; //!< start and stop waypoint running 00060 FileInputControl * loadCtl; //!< allows loading of a path 00061 StringInputControl * saveCtl; //!< save a path to a file 00062 StringInputControl * localizationCtl; //!< enter localization updates manually 00063 00064 unsigned int listOffset; //!< the index of the first waypoint in the menu 00065 00066 MotionManager::MC_ID walk_id; //!< id number of the walk we're using, so we can check it out before modifying it 00067 00068 private: 00069 WaypointWalkControl(const WaypointWalkControl&); //!< don't call 00070 WaypointWalkControl operator=(const WaypointWalkControl&); //!< don't call 00071 }; 00072 00073 /*! @file 00074 * @brief Describes WaypointWalkControl, which allows interactive control and execution of a set of waypoints 00075 * @author ejt (Creator) 00076 * 00077 * $Author: ejt $ 00078 * $Name: tekkotsu-2_4_1 $ 00079 * $Revision: 1.6 $ 00080 * $State: Exp $ 00081 * $Date: 2005/08/07 04:11:03 $ 00082 */ 00083 00084 #endif |
Tekkotsu v2.4.1 |
Generated Tue Aug 16 16:32:50 2005 by Doxygen 1.4.4 |