 |
Visual Servoing Platform
version 3.3.0
|
#include <visp3/gui/vpPlot.h>
#include <visp3/robot/vpSimulatorCamera.h>
#include <visp3/visual_features/vpFeatureBuilder.h>
#include <visp3/vs/vpServo.h>
int main()
{
try {
for (unsigned int i = 0; i < 4; i++) {
}
wMo = wMc * cMo;
#ifdef VISP_HAVE_DISPLAY
vpPlot plotter(2, 250 * 2, 500, 100, 200,
"Real time curves plotter");
plotter.
setTitle(0,
"Visual features error");
plotter.
setTitle(1,
"Camera velocities");
#endif
unsigned int iter = 0;
while (1) {
for (unsigned int i = 0; i < 4; i++) {
}
#ifdef VISP_HAVE_DISPLAY
plotter.
plot(1, iter, v);
#endif
if ((task.
getError()).sumSquare() < 0.0001)
break;
iter++;
}
std::cout << "Convergence in " << iter << " iterations" << std::endl;
#ifdef VISP_HAVE_DISPLAY
#endif
std::cout << "Catch an exception: " << e << std::endl;
}
}
static double rad(double deg)
vpImage< unsigned char > I
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
Class that defines the simplest robot: a free flying camera.
Implementation of column vector and the associated operations.
void setServo(const vpServoType &servo_type)
vpHomogeneousMatrix getPosition() const
void setLegend(unsigned int graphNum, unsigned int curveNum, const std::string &legend)
void setWorldCoordinates(double oX, double oY, double oZ)
Adaptive gain computation.
void saveData(unsigned int graphNum, const std::string &dataFile, const std::string &title_prefix="")
vpColVector getError() const
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, unsigned int select=vpBasicFeature::FEATURE_ALL)
void setTitle(unsigned int graphNum, const std::string &title)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
void plot(unsigned int graphNum, unsigned int curveNum, double x, double y)
vpColVector computeControlLaw()
virtual void setSamplingTime(const double &delta_t)
vpHomogeneousMatrix inverse() const
void initGraph(unsigned int graphNum, unsigned int curveNbr)
Class that defines what is a point.
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
Implementation of an homogeneous matrix and operations on such kind of matrices.
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
error that can be emited by ViSP classes.
This class enables real time drawing of 2D or 3D graphics. An instance of the class open a window whi...
void track(const vpHomogeneousMatrix &cMo)