50 #include <visp3/blob/vpDot.h> 51 #include <visp3/core/vpCameraParameters.h> 52 #include <visp3/core/vpConfig.h> 53 #include <visp3/core/vpDebug.h> 54 #include <visp3/core/vpImage.h> 55 #include <visp3/core/vpPixelMeterConversion.h> 56 #include <visp3/core/vpPoint.h> 57 #include <visp3/gui/vpDisplayGTK.h> 58 #include <visp3/gui/vpDisplayOpenCV.h> 59 #include <visp3/gui/vpDisplayX.h> 60 #include <visp3/robot/vpRobotViper850.h> 61 #include <visp3/sensor/vp1394TwoGrabber.h> 62 #include <visp3/vision/vpPose.h> 63 #if defined(VISP_HAVE_VIPER850) && defined(VISP_HAVE_DC1394) 80 vpDisplayX display(I, 100, 100,
"Current image");
81 #elif defined(VISP_HAVE_OPENCV) 83 #elif defined(VISP_HAVE_GTK) 111 for (
int i = 0; i < 4; i++) {
113 std::cout <<
"Click on dot " << i << std::endl;
121 std::cout <<
" Coordinates: " << dot[i].
getCog() << std::endl;
142 for (
int i = 0; i < 4; i++) {
161 for (
int i = 0; i < 4; i++) {
174 std::cout <<
"Pose cMo: " << std::endl << cMo;
185 std::cout <<
"Robot pose in reference frame: " << p << std::endl;
195 std::cout <<
"Pose rMc: " << std::endl << rMc;
203 std::cout <<
"Robot pose in articular: " << p << std::endl;
206 std::cout <<
"Pose rMc from MGD: " << std::endl << rMc;
215 std::cout <<
"Pose rMo = rMc * cMo: " << std::endl << rMo;
223 std::cout <<
"Catch an exception: " << e << std::endl;
230 std::cout <<
"Sorry, test not valid. You should have an Viper850 robot..." << std::endl;
void getPosition(const vpRobot::vpControlFrameType frame, vpColVector &position)
vpRxyzVector buildFrom(const vpRotationMatrix &R)
bool computePose(vpPoseMethodType method, vpHomogeneousMatrix &cMo, bool(*func)(const vpHomogeneousMatrix &)=NULL)
void setWorldCoordinates(double oX, double oY, double oZ)
static const vpToolType defaultTool
Default tool attached to the robot end effector.
Implementation of an homogeneous matrix and operations on such kind of matrices.
void getCameraParameters(vpCameraParameters &cam, const unsigned int &image_width, const unsigned int &image_height) const
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
error that can be emited by ViSP classes.
static void convertPoint(const vpCameraParameters &cam, const double &u, const double &v, double &x, double &y)
static void flush(const vpImage< unsigned char > &I)
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
void set_x(double x)
Set the point x coordinate in the image plane.
Implementation of a rotation matrix and operations on such kind of matrices.
void set_y(double y)
Set the point y coordinate in the image plane.
vpImagePoint getCog() const
vpRotationMatrix buildFrom(const vpHomogeneousMatrix &M)
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Class used for pose computation from N points (pose from point only). Some of the algorithms implemen...
Generic class defining intrinsic camera parameters.
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
void extract(vpRotationMatrix &R) const
vpHomogeneousMatrix get_fMc(const vpColVector &q) const
void buildFrom(const vpTranslationVector &t, const vpRotationMatrix &R)
static double deg(double rad)
Implementation of column vector and the associated operations.
This tracker is meant to track a dot (connected pixels with same gray level) on a vpImage...
Implementation of a rotation vector as Euler angle minimal representation.
Class for firewire ieee1394 video devices using libdc1394-2.x api.
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
void setGraphics(bool activate)
void addPoint(const vpPoint &P)
void initTracking(const vpImage< unsigned char > &I)
Class that consider the case of a translation vector.