#include <visp3/gui/vpDisplayGDI.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/robot/vpSimulatorViper850.h>
#include <visp3/visual_features/vpFeatureBuilder.h>
#include <visp3/vs/vpServo.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;
point.push_back(
vpPoint(-0.1, -0.1, 0));
point.push_back(
vpPoint(0.1, -0.1, 0));
point.push_back(
vpPoint(0.1, 0.1, 0));
point.push_back(
vpPoint(-0.1, 0.1, 0));
for (unsigned int i = 0; i < 4; i++) {
point[i].track(cdMo);
point[i].track(cMo);
}
robot.setJointLimit(qmin, qmax);
std::cout << "Robot joint limits: " << std::endl;
for (
unsigned int i = 0; i < qmin.
size(); i++)
<< std::endl;
robot.set_fMo(wMo);
bool ret = robot.initialiseCameraRelativeToObject(cMo);
if (ret == false)
return 0;
robot.setDesiredCameraPosition(cdMo);
robot.setExternalCameraPosition(
#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 (int iter = 0; iter < 275; iter++) {
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
}