iCub-main
RobotConfig.h
Go to the documentation of this file.
1 // -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*-
2 
3 /*
4 * Copyright (C) 2010 RobotCub Consortium, European Commission FP6 Project IST-004370
5 * Author: Vadim Tikhanoff, Paul Fitzpatrick
6 * email: vadim.tikhanoff@iit.it, paulfitz@alum.mit.edu
7 * website: www.robotcub.org
8 * Permission is granted to copy, distribute, and/or modify this program
9 * under the terms of the GNU General Public License, version 2 or any
10 * later version published by the Free Software Foundation.
11 *
12 * A copy of the license can be found at
13 * http://www.robotcub.org/icub/license/gpl.txt
14 *
15 * This program is distributed in the hope that it will be useful, but
16 * WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
18 * Public License for more details
19 */
20 
21 
22 #ifndef ICUBSIMULATION_ROBOTCONFIG_INC
23 #define ICUBSIMULATION_ROBOTCONFIG_INC
24 
25 #include <string>
26 #include <yarp/os/ResourceFinder.h>
27 
28 class RobotFlags {
29 public:
30  bool valid;
33  valid = false;
34  }
35 };
36 
37 class OdeParams
38 {
39 public:
40  double fudgeFactor;
41  double stopCFM;
42  double jointCFM;
43  double worldCFM;
45  double stopERP;
46  double worldERP;
53 };
54 
55 class RobotConfig {
56 public:
57  virtual std::string getModuleName() = 0;
58  virtual int getVerbosity() = 0;
59  virtual yarp::os::ResourceFinder& getFinder() = 0;
60  virtual RobotFlags& getFlags() = 0;
61 
62  void setFlags();
63  //bool stopConfig(std::string error, bool proceed);
65 
66  virtual int getWorldTimestep() = 0;
67  virtual double getWorldCFM() = 0;
68  virtual double getWorldERP() = 0;
69 
70  virtual double getFudgeFactor() = 0;
71  virtual double getStopCFM() = 0;
72  virtual double getJointCFM() = 0;
73  virtual double getStopERP() = 0;
74 
75  virtual double getMaxContactCorrectingVel() = 0;
76  virtual double getContactFrictionCoefficient() = 0;
77  virtual double getContactSurfaceLayer() = 0;
78 
79  virtual double getMotorMaxTorque() = 0;
80  virtual double getMotorDryFriction() = 0;
81  virtual double getJointStopBouncyness() = 0;
82 
83  virtual OdeParams getOdeParameters() = 0;
84 };
85 
86 #endif
RobotFlags::actLHand
bool actLHand
Definition: RobotConfig.h:31
RobotConfig::getContactSurfaceLayer
virtual double getContactSurfaceLayer()=0
RobotConfig::getStopERP
virtual double getStopERP()=0
RobotConfig::getJointCFM
virtual double getJointCFM()=0
RobotFlags::actfixedHip
bool actfixedHip
Definition: RobotConfig.h:31
RobotFlags::actHeadCover
bool actHeadCover
Definition: RobotConfig.h:31
RobotFlags::RobotFlags
RobotFlags()
Definition: RobotConfig.h:32
RobotConfig
Definition: RobotConfig.h:55
OdeParams::worldCFM
double worldCFM
Definition: RobotConfig.h:43
RobotFlags::actLegsCovers
bool actLegsCovers
Definition: RobotConfig.h:31
RobotFlags::actHead
bool actHead
Definition: RobotConfig.h:31
RobotFlags::actWorld
bool actWorld
Definition: RobotConfig.h:31
RobotConfig::getFinder
virtual yarp::os::ResourceFinder & getFinder()=0
RobotFlags::valid
bool valid
Definition: RobotConfig.h:30
RobotConfig::getJointStopBouncyness
virtual double getJointStopBouncyness()=0
RobotFlags::actRArm
bool actRArm
Definition: RobotConfig.h:31
RobotFlags::actPressure
bool actPressure
Definition: RobotConfig.h:31
RobotConfig::stopConfig
void stopConfig(std::string error)
Definition: RobotConfig.cpp:170
RobotConfig::setFlags
void setFlags()
Definition: RobotConfig.cpp:37
RobotConfig::getStopCFM
virtual double getStopCFM()=0
OdeParams::jointStopBouncyness
double jointStopBouncyness
Definition: RobotConfig.h:52
RobotConfig::getWorldCFM
virtual double getWorldCFM()=0
OdeParams
Definition: RobotConfig.h:37
state::error
@ error
RobotFlags::actTorso
bool actTorso
Definition: RobotConfig.h:31
RobotConfig::getModuleName
virtual std::string getModuleName()=0
OdeParams::stopCFM
double stopCFM
Definition: RobotConfig.h:41
RobotConfig::getFlags
virtual RobotFlags & getFlags()=0
OdeParams::contactSurfaceLayer
double contactSurfaceLayer
Definition: RobotConfig.h:49
RobotConfig::getMotorMaxTorque
virtual double getMotorMaxTorque()=0
RobotFlags::actElevation
bool actElevation
Definition: RobotConfig.h:31
RobotFlags::actScreen
bool actScreen
Definition: RobotConfig.h:31
RobotConfig::getContactFrictionCoefficient
virtual double getContactFrictionCoefficient()=0
RobotConfig::getOdeParameters
virtual OdeParams getOdeParameters()=0
RobotFlags::actVision
bool actVision
Definition: RobotConfig.h:31
RobotConfig::getVerbosity
virtual int getVerbosity()=0
OdeParams::maxContactCorrectingVel
double maxContactCorrectingVel
Definition: RobotConfig.h:47
RobotConfig::getMotorDryFriction
virtual double getMotorDryFriction()=0
RobotFlags::actStartHomePos
bool actStartHomePos
Definition: RobotConfig.h:31
RobotConfig::getWorldTimestep
virtual int getWorldTimestep()=0
string
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}") include_directories($
Definition: CMakeLists.txt:9
RobotConfig::getMaxContactCorrectingVel
virtual double getMaxContactCorrectingVel()=0
OdeParams::jointCFM
double jointCFM
Definition: RobotConfig.h:42
RobotFlags::actLegs
bool actLegs
Definition: RobotConfig.h:31
RobotConfig::getWorldERP
virtual double getWorldERP()=0
OdeParams::motorDryFriction
double motorDryFriction
Definition: RobotConfig.h:51
RobotFlags::actLArm
bool actLArm
Definition: RobotConfig.h:31
RobotFlags::actRHand
bool actRHand
Definition: RobotConfig.h:31
RobotFlags::actSkinEmul
bool actSkinEmul
Definition: RobotConfig.h:31
RobotFlags::actRightArmCovers
bool actRightArmCovers
Definition: RobotConfig.h:31
RobotConfig::getFudgeFactor
virtual double getFudgeFactor()=0
OdeParams::stopERP
double stopERP
Definition: RobotConfig.h:45
RobotFlags
Definition: RobotConfig.h:28
RobotFlags::actLeftArmCovers
bool actLeftArmCovers
Definition: RobotConfig.h:31
OdeParams::worldERP
double worldERP
Definition: RobotConfig.h:46
RobotFlags::actCoversCol
bool actCoversCol
Definition: RobotConfig.h:31
RobotFlags::actSelfCol
bool actSelfCol
Definition: RobotConfig.h:31
OdeParams::contactFrictionCoefficient
double contactFrictionCoefficient
Definition: RobotConfig.h:48
RobotFlags::actTorsoCovers
bool actTorsoCovers
Definition: RobotConfig.h:31
OdeParams::worldTimestep
int worldTimestep
Definition: RobotConfig.h:44
OdeParams::motorMaxTorque
double motorMaxTorque
Definition: RobotConfig.h:50
OdeParams::fudgeFactor
double fudgeFactor
Definition: RobotConfig.h:40