00001 /*************************************************************************** 00002 * Copyright (C) 2005-2011 LpzRobots development team * 00003 * Georg Martius <georg dot martius at web dot de> * 00004 * Frank Guettler <guettler at informatik dot uni-leipzig dot de * 00005 * Frank Hesse <frank at nld dot ds dot mpg dot de> * 00006 * Ralf Der <ralfder at mis dot mpg dot de> * 00007 * * 00008 * This program is free software; you can redistribute it and/or modify * 00009 * it under the terms of the GNU General Public License as published by * 00010 * the Free Software Foundation; either version 2 of the License, or * 00011 * (at your option) any later version. * 00012 * * 00013 * This program is distributed in the hope that it will be useful, * 00014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00016 * GNU General Public License for more details. * 00017 * * 00018 * You should have received a copy of the GNU General Public License * 00019 * along with this program; if not, write to the * 00020 * Free Software Foundation, Inc., * 00021 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 00022 * * 00023 ***************************************************************************/ 00024 #ifndef __TEACHABLE_H 00025 #define __TEACHABLE_H 00026 00027 #include <selforg/matrix.h> 00028 00029 /** 00030 Interface for teachable controller. 00031 */ 00032 class Teachable { 00033 public: 00034 00035 virtual ~Teachable() {} 00036 00037 /** The given motor teaching signal is used for this timestep. 00038 It is used as a feed forward teaching signal for the controller. 00039 Please note, that the teaching signal has to be given each timestep 00040 for a continuous teaching process. 00041 @param teaching: matrix with dimensions (motornumber,1) 00042 */ 00043 virtual void setMotorTeaching(const matrix::Matrix& teaching) = 0; 00044 00045 /** The given sensor teaching signal (distal learning) is used for this timestep. 00046 The belonging motor teachung signal is calculated by the inverse model. 00047 See setMotorTeaching 00048 @param teaching: matrix with dimensions (motorsensors,1) 00049 */ 00050 virtual void setSensorTeaching(const matrix::Matrix& teaching) = 0; 00051 00052 /// returns the last motor values (useful for cross motor coupling) 00053 virtual matrix::Matrix getLastMotorValues() = 0; 00054 00055 /// returns the last sensor values (useful for cross sensor coupling) 00056 virtual matrix::Matrix getLastSensorValues() = 0; 00057 }; 00058 00059 00060 #endif