 |
Visual Servoing Platform
version 3.2.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;
}
}
void setWorldCoordinates(const double oX, const double oY, const double oZ)
void plot(const unsigned int graphNum, const unsigned int curveNum, const double x, const double y)
static double rad(double deg)
vpImage< unsigned char > I
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
void saveData(const unsigned int graphNum, const std::string &dataFile, const std::string &title_prefix="")
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 setTitle(const unsigned int graphNum, const std::string &title)
vpColVector getError() const
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)
vpColVector computeControlLaw()
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, const unsigned int select=vpBasicFeature::FEATURE_ALL)
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 setLegend(const unsigned int graphNum, const unsigned int curveNum, const std::string &legend)
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)