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);
64  void stopConfig(std::string error);
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
bool actVision
Definition: RobotConfig.h:31
bool actStartHomePos
Definition: RobotConfig.h:31
double maxContactCorrectingVel
Definition: RobotConfig.h:47
bool actLegs
Definition: RobotConfig.h:31
double contactFrictionCoefficient
Definition: RobotConfig.h:48
bool actLArm
Definition: RobotConfig.h:31
bool actSkinEmul
Definition: RobotConfig.h:31
bool actRightArmCovers
Definition: RobotConfig.h:31
double fudgeFactor
Definition: RobotConfig.h:40
bool actLeftArmCovers
Definition: RobotConfig.h:31
bool actRHand
Definition: RobotConfig.h:31
bool actCoversCol
Definition: RobotConfig.h:31
bool actSelfCol
Definition: RobotConfig.h:31
double motorDryFriction
Definition: RobotConfig.h:51
double motorMaxTorque
Definition: RobotConfig.h:50
double worldCFM
Definition: RobotConfig.h:43
double stopCFM
Definition: RobotConfig.h:41
bool actTorsoCovers
Definition: RobotConfig.h:31
bool actHeadCover
Definition: RobotConfig.h:31
double worldERP
Definition: RobotConfig.h:46
double stopERP
Definition: RobotConfig.h:45
bool actLHand
Definition: RobotConfig.h:31
bool actLegsCovers
Definition: RobotConfig.h:31
bool actfixedHip
Definition: RobotConfig.h:31
double jointStopBouncyness
Definition: RobotConfig.h:52
bool actWorld
Definition: RobotConfig.h:31
int worldTimestep
Definition: RobotConfig.h:44
bool actRArm
Definition: RobotConfig.h:31
bool actPressure
Definition: RobotConfig.h:31
bool actHead
Definition: RobotConfig.h:31
double contactSurfaceLayer
Definition: RobotConfig.h:49
double jointCFM
Definition: RobotConfig.h:42
bool valid
Definition: RobotConfig.h:30
bool actTorso
Definition: RobotConfig.h:31
bool actScreen
Definition: RobotConfig.h:31
bool actElevation
Definition: RobotConfig.h:31