Example of robot pose usage.
Show how to compute rMo = rMc * cMo with cMo obtained by pose computation and rMc from the robot position.
#include <iostream>
#include <visp3/blob/vpDot.h>
#include <visp3/core/vpCameraParameters.h>
#include <visp3/core/vpDebug.h>
#include <visp3/core/vpImage.h>
#include <visp3/core/vpPixelMeterConversion.h>
#include <visp3/core/vpPoint.h>
#include <visp3/gui/vpDisplayGTK.h>
#include <visp3/gui/vpDisplayOpenCV.h>
#include <visp3/gui/vpDisplayX.h>
#include <visp3/robot/vpRobotAfma6.h>
#include <visp3/sensor/vp1394TwoGrabber.h>
#include <visp3/vision/vpPose.h>
#if defined(VISP_HAVE_AFMA6) && defined(VISP_HAVE_DC1394)
int main()
{
try {
#ifdef VISP_HAVE_X11
#elif defined(VISP_HAVE_OPENCV)
#elif defined(VISP_HAVE_GTK)
#endif
double sdim = 0.077;
for (int i = 0; i < 4; i++) {
std::cout << "Click on dot " << i << std::endl;
std::cout <<
" Coordinates: " << dot[i].
getCog() << std::endl;
}
for (int i = 0; i < 4; i++) {
double x = 0, y = 0;
}
for (int i = 0; i < 4; i++) {
}
std::cout << "Pose cMo: " << std::endl << cMo;
<< std::endl
<< std::endl;
std::cout << "Robot pose in reference frame: " << p << std::endl;
t[0] = p[0];
t[1] = p[1];
t[2] = p[2];
r[0] = p[3];
r[1] = p[4];
r[2] = p[5];
std::cout << "Pose rMc: " << std::endl << rMc;
<< std::endl
<< std::endl;
std::cout << "Robot pose in articular: " << p << std::endl;
std::cout << "Pose rMc from MGD: " << std::endl << rMc;
<< std::endl
<< std::endl;
rMo = rMc * cMo;
std::cout << "Pose rMo = rMc * cMo: " << std::endl << rMo;
<< std::endl
<< std::endl;
std::cout << "Catch an exception: " << e << std::endl;
}
return 0;
}
#else
int main()
{
std::cout << "Sorry, test not valid. You should have an Afma6 robot..." << std::endl;
return 0;
}
#endif