Tekkotsu Homepage | Demos | Overview | Downloads | Dev. Resources | Reference | Credits |
RemoteControllerMC.hGo to the documentation of this file.00001 //-*-c++-*- 00002 #ifndef INCLUDED_RemoteControllerMC_h 00003 #define INCLUDED_RemoteControllerMC_h 00004 00005 #include "MotionCommand.h" 00006 #include "OutputCmd.h" 00007 #include "Shared/RobotInfo.h" 00008 00009 //! This class is used for setting all outputs to a certain set of values (not the gains, just the joint positions) 00010 /*! This is PostureMC's little brother. Not quite so full of features, but straightforward and easy to understand. (hopefully) 00011 * This is about as simple of a motion command as you'll find, so it might make for good sample code. */ 00012 class RemoteControllerMC : public MotionCommand { 00013 public: 00014 //! constructor, defaults all joints at 0 00015 RemoteControllerMC() : MotionCommand() {} 00016 //! destructor 00017 virtual ~RemoteControllerMC() {} 00018 00019 //! Updates all of the outputs to their current positions, every time 00020 /*! Any outputs which we don't set would be marked unused and be moved by a lower-priority motion command */ 00021 virtual int updateOutputs() { 00022 for (unsigned int i=0; i<NumOutputs; i++) 00023 motman->setOutput(this, i, cmds[i]); 00024 return NumOutputs; 00025 } 00026 00027 virtual int isAlive() { return true; } //!< always true 00028 00029 OutputCmd cmds[NumOutputs]; //!< current vector of positions 00030 }; 00031 00032 /*! @file 00033 * @brief Describes RemoteControllerMC, a class used for setting all outputs to a certain set of values (not the gains, just the joint positions) 00034 * @author alokl (Creator) 00035 */ 00036 00037 #endif 00038 |
Tekkotsu v5.1CVS |
Generated Mon May 9 04:58:50 2016 by Doxygen 1.6.3 |