21 #include <visp/vpFeatureBuilder.h>
22 #include <visp/vpFeatureDepth.h>
23 #include <visp/vpFeaturePoint.h>
24 #include <visp/vpHomogeneousMatrix.h>
25 #include <visp/vpPlot.h>
26 #include <visp/vpServo.h>
27 #include <visp/vpSimulatorPioneerPan.h>
28 #include <visp/vpVelocityTwistMatrix.h>
40 cMo[1][3] = cdMo[1][3];
88 double Z = point.
get_Z();
90 double Zd = cdMo[2][3];
97 #ifdef VISP_HAVE_DISPLAY
99 vpPlot graph(3, 800, 500, 400, 10,
"Curves...");
102 graph.initGraph(0,3);
103 graph.initGraph(1,2);
104 graph.initGraph(2,1);
105 graph.setTitle(0,
"Velocities");
106 graph.setTitle(1,
"Error s-s*");
107 graph.setTitle(2,
"Depth");
108 graph.setLegend(0, 0,
"vx");
109 graph.setLegend(0, 1,
"wz");
110 graph.setLegend(0, 2,
"qdot_pan");
111 graph.setLegend(1, 0,
"x");
112 graph.setLegend(1, 1,
"log(Z/Z*)");
113 graph.setLegend(2, 0,
"Z");
144 #ifdef VISP_HAVE_DISPLAY
145 graph.plot(0, iter, v);
146 graph.plot(1, iter, task.
getError());
147 graph.plot(2, 0, iter, Z);
152 std::cout <<
"Reached a small error. We stop the loop... " << std::endl;
156 #ifdef VISP_HAVE_DISPLAY
157 const char *legend =
"Click to quit...";
Definition of the vpMatrix class.
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
vpVelocityTwistMatrix get_cVe() const
void buildFrom(const double x, const double y, const double Z, const double LogZoverZstar)
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, const unsigned int select=vpBasicFeature::FEATURE_ALL)
create a new ste of two visual features
Class that defines a 3D point visual feature which is composed by one parameters that is that defin...
void setLambda(double _lambda)
set the gain lambda
void track(const vpHomogeneousMatrix &cMo)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
double sumSquare() const
return sum of the Aij^2 (for all i, for all j)
void set_cVe(vpVelocityTwistMatrix &_cVe)
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)
void kill()
destruction (memory deallocation if required)
vpColVector getError() const
vpColVector computeControlLaw()
compute the desired control law
void set_eJe(vpMatrix &_eJe)
Class that consider the particular case of twist transformation matrix that allows to transform a vel...
void get_eJe(vpMatrix &eJe)
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
Set the type of the interaction matrix (current, mean, desired, user).
void buildFrom(const double x, const double y, const double Z)
double get_Z() const
Get the point Z coordinate in the camera frame.
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
virtual void displayCharString(const vpImagePoint &ip, const char *text, const vpColor &color=vpColor::green)=0
vpHomogeneousMatrix inverse() const
Class that defines the Pioneer mobile robot simulator equipped with a camera able to move in pan...
void getPosition(vpHomogeneousMatrix &wMc) 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)
Class required to compute the visual servoing control law descbribed in and .
static unsigned int selectX()
void setServo(vpServoType _servo_type)
Choice of the visual servoing control law.
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...