#include <visp/vpDisplayGDI.h>
#include <visp/vpDisplayOpenCV.h>
#include <visp/vpDisplayX.h>
#include <visp/vpFeatureBuilder.h>
#include <visp/vpServo.h>
#include <visp/vpSimulatorAfma6.h>
{
unsigned int thickness = 3;
static std::vector<vpImagePoint> traj[4];
for (unsigned int i=0; i<4; i++) {
point[i].project(cMo);
traj[i].push_back(cog);
}
for (unsigned int i=0; i<4; i++) {
for (unsigned int j=1; j<traj[i].size(); j++) {
}
}
}
int main()
{
#if defined(VISP_HAVE_PTHREAD)
try {
std::vector<vpPoint> point(4) ;
point[0].setWorldCoordinates(-0.1,-0.1, 0);
point[1].setWorldCoordinates( 0.1,-0.1, 0);
point[2].setWorldCoordinates( 0.1, 0.1, 0);
point[3].setWorldCoordinates(-0.1, 0.1, 0);
for (unsigned int i = 0 ; i < 4 ; i++) {
point[i].track(cdMo);
point[i].track(cMo);
}
std::cout << "Robot joint limits: " << std::endl;
for (unsigned int i=0; i< 3; i ++)
std::cout << "Joint " << i << ": min " << qmin[i] << " max " << qmax[i] << " (m)" << std::endl;
for (
unsigned int i=3; i< qmin.
size(); i ++)
std::cout <<
"Joint " << i <<
": min " <<
vpMath::deg(qmin[i]) <<
" max " <<
vpMath::deg(qmax[i]) <<
" (deg)" << std::endl;
robot.set_fMo(wMo);
bool ret = true;
#if VISP_VERSION_INT > VP_VERSION_INT(2,7,0)
ret =
#endif
robot.initialiseCameraRelativeToObject(cMo);
if (ret == false)
return 0;
robot.setDesiredCameraPosition(cdMo);
#if defined(VISP_HAVE_X11)
vpDisplayX displayInt(Iint, 700, 0,
"Internal view");
#elif defined(VISP_HAVE_GDI)
#elif defined(VISP_HAVE_OPENCV)
#else
std::cout << "No image viewer is available..." << std::endl;
#endif
robot.setCameraParameters(cam);
bool start = true;
for ( ; ; )
{
cMo = robot.get_cMo();
for (unsigned int i = 0 ; i < 4 ; i++) {
point[i].track(cMo);
}
robot.getInternalView(Iint);
if (!start) {
display_trajectory(Iint, point, cMo, cam);
}
break;
if (start) {
start = false;
v = 0;
}
}
}
std::cout << "Catch an exception: " << e << std::endl;
}
#endif
}