2#include <visp3/core/vpConfig.h>
3#include <visp3/gui/vpPlot.h>
4#include <visp3/robot/vpSimulatorCamera.h>
5#include <visp3/visual_features/vpFeatureBuilder.h>
6#include <visp3/vs/vpServo.h>
10#ifdef ENABLE_VISP_NAMESPACE
30 for (
unsigned int i = 0;
i < 4;
i++) {
35 task.addFeature(p[i], pd[i]);
41 robot.getPosition(wMc);
44#ifdef VISP_HAVE_DISPLAY
45 vpPlot plotter(2, 250 * 2, 500, 100, 200,
"Real time curves plotter");
46 plotter.setTitle(0,
"Visual features error");
47 plotter.setTitle(1,
"Camera velocities");
69 unsigned int iter = 0;
71 robot.getPosition(wMc);
73 for (
unsigned int i = 0;
i < 4;
i++) {
80#ifdef VISP_HAVE_DISPLAY
84 if ((
task.getError()).sumSquare() < 0.0001)
91 std::cout <<
"Convergence in " <<
iter <<
" iterations" << std::endl;
93#ifdef VISP_HAVE_DISPLAY
94 plotter.saveData(0,
"error.dat");
101 std::cout <<
"Catch an exception: " <<
e << std::endl;
Implementation of column vector and the associated operations.
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
error that can be emitted by ViSP classes.
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void track(const vpHomogeneousMatrix &cMo)
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix inverse() const
static double rad(double deg)
This class enables real time drawing of 2D or 3D graphics. An instance of the class open a window whi...
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
void setWorldCoordinates(double oX, double oY, double oZ)
virtual void setSamplingTime(const double &delta_t)
Class that defines the simplest robot: a free flying camera.
VISP_EXPORT int wait(double t0, double t)