39 #include <visp3/core/vpDebug.h>
40 #include <visp3/core/vpIoException.h>
41 #include <visp3/core/vpIoTools.h>
42 #include <visp3/vs/vpServo.h>
43 #include <visp3/vs/vpServoData.h>
53 s = directory +
"/vel.dat";
54 velocityFile.open(s.c_str());
55 s = directory +
"/error.dat";
56 errorFile.open(s.c_str());
58 s = directory +
"/errornorm.dat";
59 errorNormFile.open(s.c_str());
60 s = directory +
"/s.dat";
61 sFile.open(s.c_str());
62 s = directory +
"/sStar.dat";
63 sStarFile.open(s.c_str());
67 vpERROR_TRACE(
"Error caught");
77 velocityFile << task.
q_dot.
t();
79 for (
unsigned int i = 0; i < 3; i++)
80 velocityFile << task.
q_dot[i] * 100 <<
" ";
81 for (
unsigned int i = 4; i < 6; i++)
83 velocityFile << std::endl;
86 errorNormFile << (task.
getError()).sumSquare() << std::endl;
90 sStarFile << task.
sStar.
t();
95 if (velocityFile.is_open()) {
98 if (errorFile.is_open()) {
101 if (errorNormFile.is_open()) {
102 errorNormFile.close();
104 if (sFile.is_open()) {
107 if (sStarFile.is_open()) {
static double deg(double rad)
void open(const std::string &directory)
void save(const vpServo &task)
Save visual-servoing control law data.
void setMeterRad()
Velocity output are set in meter and deg (default).
void setCmDeg()
Velocity output are set in cm and deg.
vpColVector q_dot
Articular velocity.
vpColVector getError() const