13 void outputLine(
double,
double,
double,
double,
double,
double,
double);
16 int main(
int argc ,
char** argv){
35 std::cout<<
"pose: \n"<<T<<std::endl;
36 std::cout<<
"tau: "<<tau<<std::endl;
39 std::ofstream outPoseFile(
"poseResultaat.dat",std::ios::app);
42 std::cerr <<
"File poseResultaat could not be opened" <<std::endl;
45 outPoseFile <<
"linenumber=experimentnr= "<< linenum <<
"\n";
46 outPoseFile << T <<
"\n \n";
49 std::ofstream outTauFile(
"tauResultaat.dat",std::ios::app);
52 std::cerr <<
"File tauResultaat could not be opened" <<std::endl;
55 outTauFile << setiosflags( std::ios::left) << setw(10) << linenum;
56 outTauFile << tau <<
"\n";
74 std::cout <<
"Give experiment number= line number in files \n ?";
83 std::ifstream inQfile(
"interpreteerbaar/q", std::ios::in);
87 std::cerr <<
"File q could not be opened \n";
92 std::cout << setiosflags( std::ios::left) << setw(15) <<
"_q(0)" << setw(15) <<
"_q(1)" << setw(15) <<
"_q(2)" << setw(15) <<
"_q(3)" << setw(15) <<
"_q(4)" << setw(15) <<
"_q(5)" << setw(15) <<
"_q(6)" <<
" \n" ;
97 inQfile >> _q(0) >> _q(1) >> _q(2) >> _q(3) >> _q(4) >> _q(5) >> _q(6);
101 outputLine( _q(0), _q(1), _q(2), _q(3), _q(4), _q(5), _q(6));
112 std::ifstream inQdotfile(
"interpreteerbaar/qdot", std::ios::in);
116 std::cerr <<
"File qdot could not be opened \n";
121 std::cout << setiosflags( std::ios::left) << setw(15) <<
"_qdot(0)" << setw(15) <<
"_qdot(1)" << setw(15) <<
"_qdot(2)" << setw(15) <<
"_qdot(3)" << setw(15) <<
"_qdot(4)" << setw(15) <<
"_qdot(5)" << setw(15) <<
"_qdot(6)" <<
" \n" ;
123 while(!inQdotfile.eof())
126 inQdotfile >> _qdot(0) >> _qdot(1) >> _qdot(2) >> _qdot(3) >> _qdot(4) >> _qdot(5) >> _qdot(6) ;
130 outputLine( _qdot(0), _qdot(1), _qdot(2), _qdot(3), _qdot(4), _qdot(5), _qdot(6));
141 std::ifstream inQdotdotfile(
"interpreteerbaar/qddot", std::ios::in);
145 std::cerr <<
"File qdotdot could not be opened \n";
150 std::cout << setiosflags( std::ios::left) << setw(15) <<
"_qdotdot(0)" << setw(15) <<
"_qdotdot(1)" << setw(15) <<
"_qdotdot(2)" << setw(15) <<
"_qdotdot(3)" << setw(15) <<
"_qdotdot(4)" << setw(15) <<
"_qdotdot(5)" << setw(15) <<
"_qdotdot(6)" <<
" \n" ;
152 while(!inQdotdotfile.eof())
155 inQdotdotfile >> _qdotdot(0) >> _qdotdot(1) >> _qdotdot(2) >> _qdotdot(3) >> _qdotdot(4) >> _qdotdot(5) >> _qdotdot(6);
159 outputLine(_qdotdot(0), _qdotdot(1), _qdotdot(2), _qdotdot(3), _qdotdot(4), _qdotdot(5), _qdotdot(6) );
164 inQdotdotfile.close();
170 void outputLine(
double x1,
double x2,
double x3,
double x4,
double x5,
double x6,
double x7)
172 std::cout << setiosflags(std::ios::left) << setiosflags(std::ios::fixed | std::ios::showpoint) <<setw(15)
173 << x1 << setw(15) << x2 <<setw(15) <<setw(15) << x3 <<setw(15) << x4 <<setw(15) << x5 <<setw(15) << x6 <<setw(15) << x7 <<
"\n";
virtual int JntToCart(const JntArray &q_in, Frame &p_out, int segmentNr=-1)
This class encapsulates a serial kinematic interconnection structure. It is built out of segments...
unsigned int getNrOfSegments() const
This class represents an fixed size array containing joint values of a KDL::Chain.
int getInputs(JntArray &, JntArray &, JntArray &, int &)
unsigned int getNrOfJoints() const
A concrete implementation of a 3 dimensional vector class.
Recursive newton euler inverse dynamics solver.
int CartToJnt(const JntArray &q, const JntArray &q_dot, const JntArray &q_dotdot, const Wrenches &f_ext, JntArray &torques)
std::vector< Wrench > Wrenches
represents a frame transformation in 3D space (rotation + translation)
void outputLine(double, double, double, double, double, double, double)
int main(int argc, char **argv)