Robot Simulator of the Robotics Group for Self-Organization of Control  0.8.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
odeconfig.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005-2011 LpzRobots development team *
3  * Georg Martius <georg dot martius at web dot de> *
4  * Frank Guettler <guettler at informatik dot uni-leipzig dot de *
5  * Frank Hesse <frank at nld dot ds dot mpg dot de> *
6  * Ralf Der <ralfder at mis dot mpg dot de> *
7  * *
8  * This program is free software; you can redistribute it and/or modify *
9  * it under the terms of the GNU General Public License as published by *
10  * the Free Software Foundation; either version 2 of the License, or *
11  * (at your option) any later version. *
12  * *
13  * This program is distributed in the hope that it will be useful, *
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16  * GNU General Public License for more details. *
17  * *
18  * You should have received a copy of the GNU General Public License *
19  * along with this program; if not, write to the *
20  * Free Software Foundation, Inc., *
21  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
22  * *
23  ***************************************************************************/
24 #ifndef __ODECONFIG_H
25 #define __ODECONFIG_H
26 
27 #include <selforg/configurable.h>
28 #include "odehandle.h"
29 
30 namespace lpzrobots {
31 
32  /**
33  The class $name holds the configurable parameters of the simulation environment.
34  */
35  class OdeConfig : public Configurable {
36  public:
37 
38  // creates new instance of OdeConfig with default values
39  OdeConfig();
40 
41  virtual ~OdeConfig() {}
42 
43  virtual long int getRandomSeed() const { return randomSeed; }
44 
45  virtual void setRandomSeed(long int randomSeed){
46  this->randomSeed=randomSeed;
48  }
49 
50  virtual void setOdeHandle(const OdeHandle& odeHandle);
51 
52  virtual void setVideoRecordingMode(bool mode);
53 
54  virtual void calcAndSetDrawInterval(double Hz, double rtf);
55 
56  /******** CONFIGURABLE ***********/
57  virtual void notifyOnChange(const paramkey& key);
58 
59 
60  private:
61  /// calculates the draw interval with simStepSize and realTimeFactor so that we have the Hz frames/sec
62  int calcDrawInterval(double Hz, double rtf);
63 
64  public:
67  double simStepSize;
70  double noise;
71  double gravity;
72  double cameraSpeed;
74 
76  double fps;
77  protected:
78  long randomSeed;
80  };
81 
82 }
83 
84 #endif
Data structure for accessing the ODE.
Definition: odehandle.h:44
charArray paramkey
Definition: avrtypes.h:36
OdeConfig()
Definition: odeconfig.cpp:30
virtual void setOdeHandle(const OdeHandle &odeHandle)
Definition: odeconfig.cpp:82
virtual ~OdeConfig()
Definition: odeconfig.h:41
long randomSeed
Definition: odeconfig.h:78
virtual void setVideoRecordingMode(bool mode)
Definition: odeconfig.cpp:86
double cameraSpeed
Definition: odeconfig.h:72
The class $name holds the configurable parameters of the simulation environment.
Definition: odeconfig.h:35
double fps
Definition: odeconfig.h:76
bool videoRecordingMode
Definition: odeconfig.h:65
OdeHandle odeHandle
Definition: odeconfig.h:73
double realTimeFactor
Definition: odeconfig.h:75
bool logWhileRecording
Definition: odeconfig.h:66
int drawInterval
Definition: odeconfig.h:68
Abstact class for configurable objects.
Definition: configurable.h:81
virtual void setRandomSeed(long int randomSeed)
Definition: odeconfig.h:45
double noise
Definition: odeconfig.h:70
double gravity
Definition: odeconfig.h:71
int controlInterval
Definition: odeconfig.h:69
virtual void calcAndSetDrawInterval(double Hz, double rtf)
Definition: odeconfig.cpp:94
virtual void notifyOnChange(const paramkey &key)
Is called when a parameter was changes via setParam().
Definition: odeconfig.cpp:56
double simStepSize
Definition: odeconfig.h:67
virtual long int getRandomSeed() const
Definition: odeconfig.h:43
double randomSeedCopy
Definition: odeconfig.h:79