Visual servoing experiment on 4 points with a display.
#include <visp3/core/vpConfig.h>
#include <visp3/core/vpDebug.h>
#if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GTK) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV)
#include <visp3/core/vpImage.h>
#include <visp3/core/vpCameraParameters.h>
#include <visp3/core/vpTime.h>
#include <visp3/core/vpImage.h>
#include <visp3/core/vpImageConvert.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/core/vpMath.h>
#include <visp3/core/vpHomogeneousMatrix.h>
#include <visp3/vision/vpPose.h>
#include <visp3/visual_features/vpFeaturePoint.h>
#include <visp3/vs/vpServo.h>
#include <visp3/vs/vpServoDisplay.h>
#include <visp3/robot/vpSimulatorCamera.h>
#include <visp3/visual_features/vpFeatureBuilder.h>
#include <visp3/core/vpIoTools.h>
int main()
{
try {
unsigned int height = 360 ;
unsigned int width = 480 ;
#if defined(VISP_HAVE_X11)
#elif defined(VISP_HAVE_GTK)
#elif defined(VISP_HAVE_GDI)
#elif defined(VISP_HAVE_OPENCV)
#endif
disp.
init(I,100,100,
"Simulation display");
for (int i = 0 ; i < 4 ; i++)
point[i].project(cMo_d) ;
for (int i = 0 ; i < 4 ; i++)
for (int i = 0 ; i < 4 ; i++)
point[i].project(cMo) ;
for (int i = 0 ; i < 4 ; i++)
for (int i = 0 ; i < 4 ; i++)
int k = 0;
while(k++ < 200){
for (int i = 0 ; i < 4 ; i++)
{
}
}
return 0;
}
std::cout << "Catch an exception: " << e << std::endl;
return 1;
}
}
#else
int
main()
{
vpTRACE(
"You should install GTK") ;
}
#endif