54 #include <visp/vpImage.h>
55 #include <visp/vpDisplayX.h>
56 #include <visp/vpDisplayOpenCV.h>
57 #include <visp/vpDisplayGTK.h>
58 #include <visp/vpRobotAfma6.h>
59 #include <visp/vpCameraParameters.h>
60 #include <visp/vpPixelMeterConversion.h>
61 #include <visp/vp1394TwoGrabber.h>
62 #include <visp/vpPoint.h>
63 #include <visp/vpDot.h>
64 #include <visp/vpPose.h>
65 #include <visp/vpDebug.h>
67 #if defined(VISP_HAVE_AFMA6) && defined(VISP_HAVE_DC1394_2)
83 vpDisplayX display(I,100,100,
"Current image") ;
84 #elif defined(VISP_HAVE_OPENCV)
86 #elif defined(VISP_HAVE_GTK)
114 for (
int i=0; i < 4; i ++) {
116 std::cout <<
"Click on dot " << i << std::endl;
124 std::cout <<
" Coordinates: " << dot[i].
getCog() << std::endl;
146 for (
int i=0; i < 4; i ++) {
165 for (
int i=0; i < 4; i ++) {
178 std::cout <<
"Pose cMo: " << std::endl << cMo;
181 std::cout <<
" rotation: "
184 <<
vpMath::deg(r[2]) <<
" deg" << std::endl << std::endl;
190 std::cout <<
"Robot pose in reference frame: " << p << std::endl;
192 t[0] = p[0]; t[1] = p[1]; t[2] = p[2];
193 r[0] = p[3]; r[1] = p[4]; r[2] = p[5];
196 std::cout <<
"Pose rMc: " << std::endl << rMc;
199 std::cout <<
" rotation: "
202 <<
vpMath::deg(r[2]) <<
" deg" << std::endl << std::endl;
205 std::cout <<
"Robot pose in articular: " << p << std::endl;
208 std::cout <<
"Pose rMc from MGD: " << std::endl << rMc;
211 std::cout <<
" rotation: "
214 <<
vpMath::deg(r[2]) <<
" deg" << std::endl << std::endl;
218 std::cout <<
"Pose rMo = rMc * cMo: " << std::endl << rMo;
221 std::cout <<
" rotation: "
224 <<
vpMath::deg(r[2]) <<
" deg" << std::endl << std::endl;
228 std::cout <<
"Catch an exception: " << e << std::endl;
235 std::cout <<
"Sorry, test not valid. You should have an Afma6 robot..."
void getCameraParameters(vpCameraParameters &cam, const unsigned int &image_width, const unsigned int &image_height) const
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
vpHomogeneousMatrix get_fMc(const vpColVector &q) const
Define the X11 console to display images.
error that can be emited by ViSP classes.
void set_x(const double x)
Set the point x coordinate in the image plane.
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
Point coordinates conversion from pixel coordinates to normalized coordinates in meter...
void acquire(vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &position)
Control of Irisa's gantry robot named Afma6.
Class that defines what is a point.
The vpRotationMatrix considers the particular case of a rotation matrix.
vpRotationMatrix buildFrom(const vpThetaUVector &v)
Transform a vector vpThetaUVector into an rotation matrix.
vpImagePoint getCog() const
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the opencv library.
Class used for pose computation from N points (pose from point only).
Generic class defining intrinsic camera parameters.
void set_y(const double y)
Set the point y coordinate in the image plane.
The vpDisplayGTK allows to display image using the GTK+ library version 1.2.
void extract(vpRotationMatrix &R) const
Perspective projection with distortion model.
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
Construction from translation vector and rotation matrix.
static double deg(double rad)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
void setGraphics(const bool activate)
This tracker is meant to track a dot (connected pixels with same gray level) on a vpImage...
Class that consider the case of the Euler angle using the x-y-z convention, where are respectively ...
Class for firewire ieee1394 video devices using libdc1394-2.x api.
void computePose(vpPoseMethodType methode, vpHomogeneousMatrix &cMo)
compute the pose for a given method
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void addPoint(const vpPoint &P)
Add a new point in this array.
void buildFrom(const double phi, const double theta, const double psi)
void initTracking(const vpImage< unsigned char > &I)
Class that consider the case of a translation vector.
void setWorldCoordinates(const double ox, const double oy, const double oz)
Set the point world coordinates. We mean here the coordinates of the point in the object frame...