48 static const char rcsid[] =
"$Id: control_select.cpp,v 1.7 2006/05/16 19:24:26 gourdeau Exp $";
57 using namespace NEWMAT;
74 set_control(filename);
87 ifstream inconffile(filename.c_str(), std::ios::in);
90 cerr <<
"Control_Select::set_control: unable to read input config file." << endl;
129 for(
int i = 1; i <= dof; i++)
131 ostringstream Kp_ostr, Kd_ostr;
132 Kp_ostr <<
"Kp_" << i;
133 Kd_ostr <<
"Kd_" << i;
134 conf.
select(
"GAINS", Kp_ostr.str(), Kp(i));
135 conf.
select(
"GAINS", Kd_ostr.str(), Kd(i));
146 for(
int i = 1; i <= dof; i++)
148 ostringstream Kp_ostr, Kd_ostr;
149 Kp_ostr <<
"Kp_" << i;
150 Kd_ostr <<
"Kd_" << i;
151 conf.
select(
"GAINS", Kp_ostr.str(), Kp(i));
152 conf.
select(
"GAINS", Kd_ostr.str(), Kd(i));
162 Real Kvp, Kpp, Kvo, Kpo;
163 conf.
select(
"GAINS",
"Kvp", Kvp);
164 conf.
select(
"GAINS",
"Kpp", Kpp);
165 conf.
select(
"GAINS",
"Kvo", Kvo);
166 conf.
select(
"GAINS",
"Kpo", Kpo);
Computer torque method controller class.
void set_control(const std::string &filename)
Select the proper controller from filename.
short read_conf(std::ifstream &inconffile)
Read a configuration file.
Header file for trajectory generation class.
Header file for Control_Select class definitions.
Resolved rate acceleration controller class.
Header file for Config class definitions.
bool select(const std::string §ion, const std::string ¶meter, T &value) const
Get a parameter data, of a certain section, into the string value.
Handle configuration files.
static const char rcsid[]
RCS/CVS version.
#define RESOLVED_RATE_ACCELERATION
Control_Select()
Constructor.
#define PROPORTIONAL_DERIVATIVE
int get_dof()
Return the degree of freedom.
Proportional derivative controller class.
#define COMPUTED_TORQUE_METHOD