44#include <visp3/core/vpConfig.h>
45#include <visp3/core/vpDebug.h>
47#if defined(VISP_HAVE_DISPLAY)
49#include <visp3/core/vpCameraParameters.h>
50#include <visp3/core/vpImage.h>
51#include <visp3/core/vpImageConvert.h>
52#include <visp3/core/vpTime.h>
53#include <visp3/gui/vpDisplayFactory.h>
55#include <visp3/core/vpHomogeneousMatrix.h>
56#include <visp3/core/vpIoTools.h>
57#include <visp3/core/vpMath.h>
58#include <visp3/robot/vpSimulatorCamera.h>
59#include <visp3/vision/vpPose.h>
60#include <visp3/visual_features/vpFeatureBuilder.h>
61#include <visp3/visual_features/vpFeaturePoint.h>
62#include <visp3/vs/vpServo.h>
63#include <visp3/vs/vpServoDisplay.h>
67#ifdef ENABLE_VISP_NAMESPACE
71#if (VISP_CXX_STANDARD >= VISP_CXX_STANDARD_11)
87 wMc = wMo *
cMo.inverse();
88 robot.setPosition(wMc);
95 unsigned int width = 480;
99#if defined(VISP_HAVE_DISPLAY)
100 disp->init(I, 100, 100,
"Simulation display");
118 for (
int i = 0;
i < 4;
i++)
119 point[i].project(cMo_d);
123 for (
int i = 0;
i < 4;
i++)
131 for (
int i = 0;
i < 4;
i++)
132 point[i].project(cMo);
136 for (
int i = 0;
i < 4;
i++)
156 for (
int i = 0;
i < 4;
i++)
157 task.addFeature(p[i], pd[i]);
173 for (
int i = 0;
i < 4;
i++) {
192 wMc = robot.getPosition();
201#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
202 if (disp !=
nullptr) {
209 std::cout <<
"Catch an exception: " <<
e << std::endl;
210#if (VISP_CXX_STANDARD < VISP_CXX_STANDARD_11)
211 if (disp !=
nullptr) {
223 <<
"You do not have X11, GTK, or OpenCV, or GDI (Graphical Device Interface) functionalities to display images..."
225 std::cout <<
"Tip if you are on a unix-like system:" << std::endl;
226 std::cout <<
"- Install X11, configure again ViSP using cmake and build again this example" << std::endl;
227 std::cout <<
"Tip if you are on a windows-like system:" << std::endl;
228 std::cout <<
"- Install GDI, configure again ViSP using cmake and build again this example" << std::endl;
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class that defines generic functionalities for display.
static void display(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
error that can be emitted by ViSP classes.
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix inverse() const
Definition of the vpImage class member functions.
static double rad(double deg)
Implementation of a matrix and operations on matrices.
Class that defines a 3D point in the object frame and allows forward projection of a 3D point in the ...
void setWorldCoordinates(double oX, double oY, double oZ)
virtual void setSamplingTime(const double &delta_t)
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)
Class that defines the simplest robot: a free flying camera.
std::shared_ptr< vpDisplay > createDisplay()
Return a smart pointer vpDisplay specialization if a GUI library is available or nullptr otherwise.
vpDisplay * allocateDisplay()
Return a newly allocated vpDisplay specialization if a GUI library is available or nullptr otherwise.
VISP_EXPORT double measureTimeMs()
VISP_EXPORT int wait(double t0, double t)