odeconfig.h

Go to the documentation of this file.
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 __ODECONFIG_H
00025 #define __ODECONFIG_H
00026 
00027 #include <selforg/configurable.h>
00028 #include "odehandle.h"
00029 
00030 namespace lpzrobots {
00031 
00032   /**
00033      The class $name holds the configurable parameters of the simulation environment.
00034   */
00035   class OdeConfig : public Configurable {
00036   public:
00037     
00038     // creates new instance of OdeConfig with default values
00039     OdeConfig();
00040     
00041     virtual ~OdeConfig() {}
00042         
00043     virtual long int getRandomSeed() const { return randomSeed; }
00044         
00045     virtual void setRandomSeed(long int randomSeed){
00046       this->randomSeed=randomSeed;
00047       randomSeedCopy = randomSeed;
00048     }
00049 
00050     virtual void setOdeHandle(const OdeHandle& odeHandle);
00051 
00052     virtual void setVideoRecordingMode(bool mode);
00053 
00054     virtual void calcAndSetDrawInterval(double Hz, double rtf);
00055     
00056     /******** CONFIGURABLE ***********/
00057     virtual void notifyOnChange(const paramkey& key);
00058     
00059 
00060   private:
00061     /// calculates the draw interval with simStepSize and realTimeFactor so that we have the Hz frames/sec
00062     int calcDrawInterval(double Hz, double rtf);
00063 
00064   public:
00065     bool videoRecordingMode;
00066     double simStepSize;
00067     double motionPersistence;
00068     int drawInterval;
00069     int controlInterval;
00070     double noise;
00071     double gravity;
00072     double cameraSpeed;
00073     OdeHandle odeHandle;
00074 
00075     double realTimeFactor;
00076     double fps;
00077   protected:
00078     long randomSeed;
00079     double randomSeedCopy;
00080   };
00081 
00082 }
00083 
00084 #endif
Generated on Thu Jun 28 14:45:36 2012 for Robot Simulator of the Robotics Group for Self-Organization of Control by  doxygen 1.6.3