Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Modules/MotionControl/DebugMotionControl.h

Go to the documentation of this file.
00001 /**
00002 * @file DebugMotionControl.h
00003 *
00004 * Definition of class DebugMotionControl.
00005 * 
00006 * @author Max Risler
00007 */
00008 
00009 #ifndef __DebugMotionControl_h_
00010 #define __DebugMotionControl_h_
00011 
00012 #include "MotionStabilizer.h"
00013 #include "MotionControl.h"
00014 #include "Tools/Actorics/JointDataSequencer.h"
00015 
00016 /**
00017 * @class DebugMotionControl
00018 *
00019 * A MotionControl module for debugging purposes.
00020 *
00021 * It ignores MotionRequest but processes and executes
00022 * JointDataSequence debug messages.
00023 * 
00024 * @author Max Risler
00025 */
00026 class DebugMotionControl : public MotionControl, public MotionStabilizer
00027 {
00028 public:
00029 /** 
00030 * Constructor 
00031 * @param interfaces The paramters of the MotionControl module.
00032   */
00033   DebugMotionControl(const MotionControlInterfaces& interfaces)
00034     : MotionControl(interfaces)
00035   {}
00036   
00037   /** Executes the module */
00038   virtual void execute();
00039   
00040   /** 
00041   * Called from a MessageQueue to distribute messages.
00042   * Use message.getMessageID to decide if the message is relavant for 
00043   * the MesssageHandler derivate.
00044   * Use message.bin, message.text or message.config as In streams to get the data from.
00045   * @param message The message that can be read.
00046   * @return true if the message was read (handled).
00047   */
00048   virtual bool handleMessage(InMessage& message);
00049   
00050 protected:
00051   
00052   /** the JointDataSequencer */
00053   JointDataSequencer sequencer;
00054   
00055   /** write sensorData back to jointData for joints with invalidValue
00056   * to disable any motion (=stay as forced)
00057   */
00058   void executeStayAsForced(
00059     const SensorData& sensorData,
00060     JointData& jointData
00061     );
00062   
00063   void setStayAsForcedValue(
00064     const SensorData& sensorData,
00065     JointData& jointData,
00066     SensorData::sensors sensor,
00067     JointData::JointID joint,
00068     long tolerance
00069     );
00070   
00071   /** old values for stay as forced mode */
00072   JointData stayAsForcedOldValue;
00073 
00074   /** Clips the set joint values to allowed values */
00075   void clip();
00076 };
00077 
00078 #endif// __DebugMotionControl_h_
00079 
00080 /*
00081 * Change log :
00082 * 
00083 * $Log: DebugMotionControl.h,v $
00084 * Revision 1.3  2004/06/14 17:17:44  juengel
00085 * Removed breathe.
00086 *
00087 * Revision 1.2  2004/06/14 17:17:05  juengel
00088 * Removed breathe.
00089 *
00090 * Revision 1.1.1.1  2004/05/22 17:20:35  cvsadm
00091 * created new repository GT2004_WM
00092 *
00093 * Revision 1.3  2004/03/08 01:39:02  roefer
00094 * Interfaces should be const
00095 *
00096 * Revision 1.2  2004/01/07 16:59:19  loetzsch
00097 * added a clipping function
00098 *
00099 * Revision 1.1  2003/10/06 14:10:13  cvsadm
00100 * Created GT2004 (M.J.)
00101 *
00102 * Revision 1.2  2003/09/26 11:38:52  juengel
00103 * - sorted tools
00104 * - clean-up in DataTypes
00105 *
00106 * Revision 1.1.1.1  2003/07/02 09:40:24  cvsadm
00107 * created new repository for the competitions in Padova from the 
00108 * tamara CVS (Tuesday 2:00 pm)
00109 *
00110 * removed unused solutions
00111 *
00112 * Revision 1.6  2002/11/26 13:08:05  jhoffman
00113 * no message
00114 *
00115 * Revision 1.5  2002/11/25 14:49:07  jhoffman
00116 * added "breathing" motion
00117 *
00118 * Revision 1.4  2002/11/19 17:14:14  risler
00119 * coding conventions: renamed JointData::joint to JointID, GetName to getName
00120 *
00121 * Revision 1.3  2002/11/19 15:43:03  dueffert
00122 * doxygen comments corrected
00123 *
00124 * Revision 1.2  2002/09/11 00:06:58  loetzsch
00125 * continued change of module/solution mechanisms
00126 *
00127 * Revision 1.1  2002/09/10 15:36:15  cvsadm
00128 * Created new project GT2003 (M.L.)
00129 * - Cleaned up the /Src/DataTypes directory
00130 * - Removed challenge related source code
00131 * - Removed processing of incoming audio data
00132 * - Renamed AcousticMessage to SoundRequest
00133 *
00134 * Revision 1.3  2002/08/22 14:41:04  risler
00135 * added some doxygen comments
00136 *
00137 * Revision 1.2  2002/07/23 13:33:41  loetzsch
00138 * new streaming classes
00139 *
00140 * removed many #include statements
00141 *
00142 * Revision 1.1.1.1  2002/05/10 12:40:15  cvsadm
00143 * Moved GT2002 Project from ute to tamara.
00144 *
00145 * Revision 1.5  2002/04/05 14:08:43  jhoffman
00146 * stabilizer stuff
00147 *
00148 * Revision 1.4  2002/02/21 16:29:21  risler
00149 * added JointDataSequencer
00150 *
00151 * Revision 1.3  2002/02/08 22:31:46  risler
00152 * added JointDataSequence, finished DebugMotionControl
00153 *
00154 * Revision 1.2  2002/02/08 20:22:26  risler
00155 * added DebugMotionControl
00156 *
00157 * Revision 1.1  2002/02/08 20:00:01  risler
00158 * added DebugMotionControl
00159 *
00160 */

Generated on Thu Sep 23 19:57:31 2004 for GT2004 by doxygen 1.3.6