50 #include <visp3/core/vpConfig.h> 51 #include <visp3/core/vpDebug.h> 53 #if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GTK) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) 55 #include <visp3/core/vpCameraParameters.h> 56 #include <visp3/core/vpImage.h> 57 #include <visp3/core/vpImageConvert.h> 58 #include <visp3/core/vpTime.h> 59 #include <visp3/gui/vpDisplayGDI.h> 60 #include <visp3/gui/vpDisplayGTK.h> 61 #include <visp3/gui/vpDisplayOpenCV.h> 62 #include <visp3/gui/vpDisplayX.h> 64 #include <visp3/core/vpHomogeneousMatrix.h> 65 #include <visp3/core/vpIoTools.h> 66 #include <visp3/core/vpMath.h> 67 #include <visp3/robot/vpSimulatorCamera.h> 68 #include <visp3/vision/vpPose.h> 69 #include <visp3/visual_features/vpFeatureBuilder.h> 70 #include <visp3/visual_features/vpFeaturePoint.h> 71 #include <visp3/vs/vpServo.h> 72 #include <visp3/vs/vpServoDisplay.h> 94 unsigned int height = 360;
95 unsigned int width = 480;
99 #if defined(VISP_HAVE_X11) 101 #elif defined(VISP_HAVE_GTK) 103 #elif defined(VISP_HAVE_GDI) 105 #elif defined(VISP_HAVE_OPENCV) 109 #if defined(VISP_HAVE_X11) || defined(VISP_HAVE_GTK) || defined(VISP_HAVE_GDI) || defined(VISP_HAVE_OPENCV) 110 disp.
init(I, 100, 100,
"Simulation display");
128 for (
int i = 0; i < 4; i++)
129 point[i].project(cMo_d);
133 for (
int i = 0; i < 4; i++)
141 for (
int i = 0; i < 4; i++)
142 point[i].project(cMo);
146 for (
int i = 0; i < 4; i++)
166 for (
int i = 0; i < 4; i++)
183 for (
int i = 0; i < 4; i++) {
214 std::cout <<
"Catch an exception: " << e << std::endl;
222 std::cout <<
"You do not have X11, GTK, or OpenCV, or GDI (Graphical Device Interface) functionalities to display images..." << std::endl;
223 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
224 std::cout <<
"- Install X11, configure again ViSP using cmake and build again this example" << std::endl;
225 std::cout <<
"Tip if you are on a windows-like system:" << std::endl;
226 std::cout <<
"- Install GDI, configure again ViSP using cmake and build again this example" << std::endl;
void setPosition(const vpHomogeneousMatrix &wMc)
Implementation of a matrix and operations on matrices.
VISP_EXPORT int wait(double t0, double t)
void setWorldCoordinates(double oX, double oY, double oZ)
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)
Display for windows using GDI (available on any windows 32 platform).
void set_eJe(const vpMatrix &eJe_)
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.
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const std::string &title="")
vpHomogeneousMatrix inverse() const
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
vpHomogeneousMatrix getPosition() const
static void flush(const vpImage< unsigned char > &I)
VISP_EXPORT double measureTimeMs()
Class that defines what is a point.
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.
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
static double rad(double deg)
Implementation of column vector and the associated operations.
void set_cVe(const vpVelocityTwistMatrix &cVe_)
void print(const vpServo::vpServoPrintType display_level=ALL, std::ostream &os=std::cout)
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
void get_eJe(vpMatrix &eJe)
void setServo(const vpServoType &servo_type)
static void display(const vpServo &s, const vpCameraParameters &cam, const vpImage< unsigned char > &I, vpColor currentColor=vpColor::green, vpColor desiredColor=vpColor::red, unsigned int thickness=1)