49 #include <visp/vpServo.h>
51 #include <visp/vpServoData.h>
52 #include <visp/vpIoException.h>
53 #include <visp/vpIoTools.h>
63 char s[FILENAME_MAX] ;
65 sprintf(s,
"%s/vel.dat",directory) ;
66 velocityFile.open(s) ;
67 sprintf(s,
"%s/error.dat",directory) ;
69 sprintf(s,
"%s/errornorm.dat",directory) ;
70 errorNormFile.open(s) ;
71 sprintf(s,
"%s/s.dat",directory) ;
73 sprintf(s,
"%s/sStar.dat",directory) ;
94 if (cmDeg==
false) velocityFile << task.
q_dot.
t() ;
97 for (
unsigned int i=0 ; i < 3 ; i++)
98 velocityFile << task.
q_dot[i]*100 <<
" " ;
99 for (
unsigned int i=4 ; i < 6 ; i++)
101 velocityFile << std::endl ;
103 errorFile << ( task.
getError() ).t() ;
104 errorNormFile << ( task.
getError() ).sumSquare() << std::endl ;
108 sStarFile << task.
sStar.
t();
115 velocityFile.close() ;
117 errorNormFile.close() ;
void open(const char *baseDirectory)
void save(const vpServo &task)
void setCmDeg()
velocity output in cm and deg
vpColVector q_dot
Articular velocity.
vpColVector getError() const
vpRowVector t() const
Transpose of a vector.
static double deg(double rad)
void setMeterRad()
velocity output in meter and deg (default)