Robotsystem of the Robot Group Leipzig: odeconfig.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories
- Examples

- Search for |

- File List
- File Members

# odeconfig.h

Go to the documentation of this file.

    00001 /***************************************************************************
    00002  *   Copyright (C) 2005 by Robot Group Leipzig                             *
    00003  *    martius@informatik.uni-leipzig.de                                    *
    00004  *    fhesse@informatik.uni-leipzig.de                                     *
    00005  *    der@informatik.uni-leipzig.de                                        *
    00006  *                                                                         *
    00007  *   This program is free software; you can redistribute it and/or modify  *
    00008  *   it under the terms of the GNU General Public License as published by  *
    00009  *   the Free Software Foundation; either version 2 of the License, or     *
    00010  *   (at your option) any later version.                                   *
    00011  *                                                                         *
    00012  *   This program is distributed in the hope that it will be useful,       *
    00013  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
    00014  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
    00015  *   GNU General Public License for more details.                          *
    00016  *                                                                         *
    00017  *   You should have received a copy of the GNU General Public License     *
    00018  *   along with this program; if not, write to the                         *
    00019  *   Free Software Foundation, Inc.,                                       *
    00020  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
    00021  *                                                                         *
    00022  *   $Log: odeconfig.h,v $
    00023  *   Revision 1.14  2006/08/04 15:07:46  martius
    00024  *   documentation
    00025  *
    00026  *   Revision 1.13  2006/07/14 11:57:23  martius
    00027  *   selforg becomes HEAD
    00028  *
    00029  *   Revision 1.12.4.8  2006/06/29 16:32:44  robot3
    00030  *   implementation of odeconfig moved to odeconfig.cpp
    00031  *
    00032  *   Revision 1.12.4.7  2006/05/08 12:12:36  robot3
    00033  *   changes from Revision 1.40.4.27 reverted
    00034  *
    00035  *   Revision 1.12.4.6  2006/04/27 16:17:38  robot3
    00036  *   implemented some functions for motionblurcallback
    00037  *
    00038  *   Revision 1.12.4.5  2006/03/28 09:55:12  robot3
    00039  *   -main: fixed snake explosion bug
    00040  *   -odeconfig.h: inserted cameraspeed
    00041  *   -camermanipulator.cpp: fixed setbyMatrix,
    00042  *    updateFactor
    00043  *
    00044  *   Revision 1.12.4.4  2006/02/08 16:14:28  martius
    00045  *   no namespace using
    00046  *
    00047  *   Revision 1.12.4.3  2006/01/10 15:08:15  martius
    00048  *   controlinterval is 1 by default
    00049  *
    00050  *   Revision 1.12.4.2  2005/12/06 10:13:23  martius
    00051  *   openscenegraph integration started
    00052  *
    00053  *   Revision 1.12.4.1  2005/11/14 17:37:00  martius
    00054  *   changed makefile structure to have and include directory
    00055  *   mode to selforg
    00056  *
    00057  *   Revision 1.12  2005/11/09 13:29:19  martius
    00058  *   GPL'ised
    00059  *
    00060  ***************************************************************************/
    00061 #ifndef __ODECONFIG_H
    00062 #define __ODECONFIG_H
    00063
    00064 #include <selforg/configurable.h>
    00065 #include "odehandle.h"
    00066
    00067 namespace lpzrobots {
    00068
    00069   /**
    00070      The class $name holds the configurable parameters of the simulation environment.
    00071   */
    00072   class OdeConfig : public Configurable {
    00073   public:
    00074
    00075     // creates new instance of OdeConfig with default values
    00076     OdeConfig();
    00077
    00078     ~OdeConfig() {}
    00079
    00080     virtual paramkey getName() const;
    00081
    00082     virtual paramlist getParamList() const;
    00083
    00084     virtual paramval getParam(const paramkey& key) const;
    00085
    00086     virtual bool setParam(const paramkey& key, paramval val);
    00087
    00088     virtual void setOdeHandle(const OdeHandle& odeHandle);
    00089
    00090     virtual void setVideoRecordingMode(bool mode);
    00091
    00092   private:
    00093     /// calculates the draw interval with simStepSize and realTimeFactor so that we have 25 frames/sec
    00094     virtual int calcDrawInterval25();
    00095
    00096     /// calculates the draw interval with simStepSize and realTimeFactor so that we have 50 frames/sec
    00097     /// this is much better for graphical visualization (smoother)
    00098     virtual int calcDrawInterval50();
    00099
    00100
    00101   public:
    00102     bool videoRecordingMode;
    00103     double simStepSize;
    00104     double realTimeFactor;
    00105     int drawInterval;
    00106     int controlInterval;
    00107     double motionPersistence;
    00108     double noise;
    00109     double gravity;
    00110     double cameraSpeed;
    00111     bool drawBoundings;
    00112     std::string name;
    00113     OdeHandle odeHandle;
    00114   };
    00115
    00116 }
    00117
    00118 #endif