2 #include <visp3/gui/vpDisplayGDI.h> 3 #include <visp3/gui/vpDisplayOpenCV.h> 4 #include <visp3/gui/vpDisplayX.h> 5 #include <visp3/gui/vpProjectionDisplay.h> 6 #include <visp3/robot/vpSimulatorCamera.h> 7 #include <visp3/robot/vpWireFrameSimulator.h> 8 #include <visp3/visual_features/vpFeatureBuilder.h> 9 #include <visp3/vs/vpServo.h> 10 #include <visp3/vs/vpServoDisplay.h> 18 static std::vector<vpImagePoint> traj[4];
20 for (
unsigned int i = 0; i < 4; i++) {
22 point[i].project(cMo);
24 traj[i].push_back(cog);
26 for (
unsigned int i = 0; i < 4; i++) {
27 for (
unsigned int j = 1; j < traj[i].size(); j++) {
39 std::vector<vpPoint> point(4);
40 point[0].setWorldCoordinates(-0.1, -0.1, 0);
41 point[1].setWorldCoordinates(0.1, -0.1, 0);
42 point[2].setWorldCoordinates(0.1, 0.1, 0);
43 point[3].setWorldCoordinates(-0.1, 0.1, 0);
51 for (
unsigned int i = 0; i < 4; i++) {
67 #if defined VISP_HAVE_X11 68 vpDisplayX displayInt(Iint, 0, 0,
"Internal view");
69 vpDisplayX displayExt(Iext, 670, 0,
"External view");
70 #elif defined VISP_HAVE_GDI 73 #elif defined VISP_HAVE_OPENCV 77 std::cout <<
"No image viewer is available..." << std::endl;
94 for (
unsigned int i = 0; i < 4; i++) {
109 display_trajectory(Iint, point, cMo, cam);
120 std::cout <<
"Catch an exception: " << e << std::endl;
VISP_EXPORT int wait(double t0, double t)
static bool getClick(const vpImage< unsigned char > &I, bool blocking=true)
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class that defines the simplest robot: a free flying camera.
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, unsigned int select=vpBasicFeature::FEATURE_ALL)
static void convertPoint(const vpCameraParameters &cam, const double &x, const double &y, double &u, double &v)
Display for windows using GDI (available on any windows 32 platform).
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.
vpHomogeneousMatrix inverse() const
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void setExternalCameraPosition(const vpHomogeneousMatrix &cam_Mf)
vpHomogeneousMatrix getPosition() const
void setDesiredCameraPosition(const vpHomogeneousMatrix &cdMo_)
static const vpColor green
static void flush(const vpImage< unsigned char > &I)
virtual void setSamplingTime(const double &delta_t)
vpColVector computeControlLaw()
static void display(const vpImage< unsigned char > &I)
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Generic class defining intrinsic camera parameters.
void initScene(const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject)
double getSamplingTime() const
void getExternalImage(vpImage< unsigned char > &I)
Implementation of a wire frame simulator. Compared to the vpSimulator class, it does not require thir...
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
static double rad(double deg)
void setExternalCameraParameters(const vpCameraParameters &cam)
void setCameraPositionRelObj(const vpHomogeneousMatrix &cMo_)
void getInternalImage(vpImage< unsigned char > &I)
unsigned int getHeight() const
Implementation of column vector and the associated operations.
void setInternalCameraParameters(const vpCameraParameters &cam)
Class that defines a 2D point in an image. This class is useful for image processing and stores only ...
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
unsigned int getWidth() const
void setServo(const vpServoType &servo_type)
static void displayLine(const vpImage< unsigned char > &I, const vpImagePoint &ip1, const vpImagePoint &ip2, const vpColor &color, unsigned int thickness=1, bool segment=true)