Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

PostureEditor.h

Go to the documentation of this file.
00001 //-*-c++-*-
00002 #ifndef INCLUDED_PostureEditor_h_
00003 #define INCLUDED_PostureEditor_h_
00004 
00005 #include "ControlBase.h"
00006 #include "Motion/PostureEngine.h"
00007 #include "Events/EventListener.h"
00008 
00009 //! allows logging of events to the console or a file
00010 class PostureEditor : public ControlBase, public EventListener {
00011 public:
00012   //! constructor
00013   explicit PostureEditor();
00014 
00015   //! destructor
00016   virtual ~PostureEditor();
00017 
00018   virtual ControlBase * activate(MC_ID disp_id, Socket * gui);
00019   virtual void refresh(); //!< if we're back from a child slot, it's either load or save, so we need to handle it
00020   virtual void pause();
00021   virtual void deactivate();
00022 
00023   //! listens for the EStop to be turned off before moving
00024   virtual void processEvent(const EventBase& e);
00025   
00026 protected:
00027   PostureEngine pose; //!< the current target posture
00028   MC_ID reachID; //!< id of motion sequence used to slow "snapping" to positions
00029 
00030   class FileInputControl* loadPose; //!< the control for loading postures
00031   class NullControl* disabledLoadPose; //!< a message to display instead of loadPose when EStop is on
00032   class StringInputControl* savePose; //!< the control for saving postures
00033   bool pauseCalled; //!< true if refresh hasn't been called since pause
00034   
00035   static const unsigned int moveTime=1500; //!< number of milliseconds to take to load a posture - individual joint changes will be done in half the time
00036   
00037   bool isEStopped(); //!< called to check status of estop
00038   void updatePose(unsigned int delay); //!< called anytime pose is modified; uses #reachID to move to #pose if estop is off
00039 
00040 private:
00041   PostureEditor(const PostureEditor& ); //!< don't call
00042   PostureEditor& operator=(const PostureEditor& ); //!< don't call
00043 };
00044 
00045 /*! @file
00046  * @brief Describes PostureEditor, which allows numeric control of joints and LEDs
00047  * @author ejt (Creator)
00048  */
00049 
00050 #endif

Tekkotsu v5.1CVS
Generated Mon May 9 04:58:49 2016 by Doxygen 1.6.3