Tekkotsu Homepage
Demos
Overview
Downloads
Dev. Resources
Reference
Credits

XWalkEdit.h

Go to the documentation of this file.
00001 #include "Shared/RobotInfo.h"
00002 #if defined(TGT_HAS_LEGS) && !defined(TGT_IS_AIBO)
00003 
00004 #include "ConfigurationEditor.h"
00005 #include "Behaviors/Mon/WalkController.h"
00006 #include "Motion/XWalkMC.h"
00007 
00008 class XWalkEdit : public ConfigurationEditor {
00009 public:
00010   XWalkEdit() : ConfigurationEditor("XWalk Edit","Provides editing of an XWalkMC instance"), ctrl() {
00011     ctrl.setAutoDelete(false);
00012     setRootCollection(ctrl.getWalkMC());
00013     load.setRoot(::config->motion.root);
00014     save.setRoot(::config->motion.root);
00015   }
00016   
00017   ~XWalkEdit() {
00018     if(ctrl.isActive()) {
00019       ctrl.setKeepGUI(true);
00020       ctrl.stop();
00021     }
00022   }
00023   
00024   virtual ControlBase * activate(MC_ID disp_id, Socket * gui) {
00025     if(!ctrl.isActive())
00026       ctrl.start();
00027     return ConfigurationEditor::activate(disp_id,gui);
00028   }
00029   virtual void deactivate() {
00030     ConfigurationEditor::deactivate();
00031   }
00032   
00033 protected:
00034   WalkController ctrl;
00035 };
00036 
00037 #endif

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