20 #include <visp/vpFeatureBuilder.h>
21 #include <visp/vpFeatureDepth.h>
22 #include <visp/vpFeaturePoint.h>
23 #include <visp/vpHomogeneousMatrix.h>
24 #include <visp/vpPlot.h>
25 #include <visp/vpServo.h>
26 #include <visp/vpSimulatorPioneer.h>
27 #include <visp/vpVelocityTwistMatrix.h>
38 cMo[1][3] = cdMo[1][3];
71 double Z = point.
get_Z();
72 double Zd = cdMo[2][3];
77 #ifdef VISP_HAVE_DISPLAY
79 vpPlot graph(3, 800, 500, 400, 10,
"Curves...");
85 graph.setTitle(0,
"Velocities");
86 graph.setTitle(1,
"Error s-s*");
87 graph.setTitle(2,
"Depth");
88 graph.setLegend(0, 0,
"vx");
89 graph.setLegend(0, 1,
"wz");
90 graph.setLegend(1, 0,
"x");
91 graph.setLegend(1, 1,
"log(Z/Z*)");
92 graph.setLegend(2, 0,
"Z");
116 #ifdef VISP_HAVE_DISPLAY
117 graph.plot(0, iter, v);
118 graph.plot(1, iter, task.
getError());
119 graph.plot(2, 0, iter, Z);
125 std::cout <<
"Reached a small error. We stop the loop... " << std::endl;
129 #ifdef VISP_HAVE_DISPLAY
130 graph.saveData(0,
"./v2.dat");
131 graph.saveData(1,
"./error2.dat");
133 const char *legend =
"Click to quit...";
146 std::cout <<
"Catch an exception: " << e << std::endl;
Definition of the vpMatrix class.
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
void set_eJe(const vpMatrix &eJe_)
vpVelocityTwistMatrix get_cVe() const
void buildFrom(const double x, const double y, const double Z, const double LogZoverZstar)
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, const unsigned int select=vpBasicFeature::FEATURE_ALL)
Class that defines a 3D point visual feature which is composed by one parameters that is that defin...
Class that defines the Pioneer mobile robot simulator equipped with a static camera.
error that can be emited by ViSP classes.
void track(const vpHomogeneousMatrix &cMo)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void getPosition(vpHomogeneousMatrix &wMc) const
double sumSquare() const
return sum of the Aij^2 (for all i, for all j)
static void flush(const vpImage< unsigned char > &I)
Class that defines what is a point.
The vpRotationMatrix considers the particular case of a rotation matrix.
virtual void setSamplingTime(const double &delta_t)
void insert(const vpRotationMatrix &R)
vpColVector getError() const
vpColVector computeControlLaw()
Class that consider the particular case of twist transformation matrix that allows to transform a vel...
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
void buildFrom(const double x, const double y, const double Z)
double get_Z() const
Get the point Z coordinate in the camera frame.
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void set_cVe(const vpVelocityTwistMatrix &cVe_)
virtual void displayCharString(const vpImagePoint &ip, const char *text, const vpColor &color=vpColor::green)=0
vpHomogeneousMatrix inverse() const
void print(const vpServo::vpServoPrintType display_level=ALL, std::ostream &os=std::cout)
This class enables real time drawing of 2D or 3D graphics. An instance of the class open a window whi...
virtual bool getClick(bool blocking=true)=0
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
static unsigned int selectX()
void get_eJe(vpMatrix &eJe)
void setServo(const vpServoType &servo_type)
void setWorldCoordinates(const double ox, const double oy, const double oz)
Set the point world coordinates. We mean here the coordinates of the point in the object frame...