51 #include <visp3/core/vpConfig.h> 52 #include <visp3/core/vpDebug.h> 55 #if (defined(VISP_HAVE_COIN3D_AND_GUI) && (defined(VISP_HAVE_GTK) || defined(VISP_HAVE_X11) || defined(VISP_HAVE_GDI))) 57 #include <visp3/core/vpImage.h> 58 #include <visp3/core/vpCameraParameters.h> 59 #include <visp3/core/vpTime.h> 60 #include <visp3/core/vpImage.h> 61 #include <visp3/core/vpImageConvert.h> 62 #include <visp3/ar/vpSimulator.h> 64 #if defined(VISP_HAVE_X11) 65 # include <visp3/gui/vpDisplayX.h> 66 #elif defined(VISP_HAVE_GDI) 67 # include <visp3/gui/vpDisplayGDI.h> 68 #elif defined(VISP_HAVE_GTK) 69 # include <visp3/gui/vpDisplayGTK.h> 74 #include <visp3/core/vpMath.h> 75 #include <visp3/core/vpHomogeneousMatrix.h> 76 #include <visp3/vision/vpPose.h> 77 #include <visp3/visual_features/vpFeaturePoint.h> 78 #include <visp3/blob/vpDot2.h> 79 #include <visp3/vs/vpServo.h> 80 #include <visp3/vs/vpServoDisplay.h> 81 #include <visp3/robot/vpSimulatorCamera.h> 82 #include <visp3/visual_features/vpFeatureBuilder.h> 83 #include <visp3/core/vpIoTools.h> 86 void *mainLoop (
void *_simu)
127 for (
int i = 0 ; i < 4 ; i++)
128 point[i].project(cMo_d) ;
132 for (
int i = 0 ; i < 4 ; i++)
144 #if defined(VISP_HAVE_X11) 146 #elif defined(VISP_HAVE_GDI) 148 #elif defined(VISP_HAVE_GTK) 151 disp.
init(I,100,100,
"Simulation display");
162 std::cout <<
"A click in the four dots clockwise. " << std::endl;
165 for (
int i = 0 ; i < 4 ; i++)
169 std::cout <<
"A click in the dot " << i << std::endl;
195 for (
int i = 0 ; i < 4 ; i++)
215 for (
int i = 0 ; i < 4 ; i++)
273 std::string filename =
"./4points.iv";
279 std::cout <<
"Load : " << filename << std::endl
280 <<
"This file should be in the working directory" << std::endl;
282 simu.
load(filename.c_str());
291 std::cout <<
"Catch an exception: " << e << std::endl;
299 {
vpTRACE(
"You should install Coin3D and SoQT or SoWin or SoXt") ;
void setPosition(const vpHomogeneousMatrix &wMc)
Implementation of a matrix and operations on matrices.
virtual void initInternalViewer(const unsigned int nlig, const unsigned int ncol)
initialize the camera view
VISP_EXPORT int wait(double t0, double t)
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
void setCameraPosition(vpHomogeneousMatrix &cMf)
set the camera position (from an homogeneous matrix)
Implementation of an homogeneous matrix and operations on such kind of matrices.
Class that defines the simplest robot: a free flying camera.
Implementation of a simulator based on Coin3d (www.coin3d.org).
Display for windows using GDI (available on any windows 32 platform).
void set_eJe(const vpMatrix &eJe_)
unsigned int getInternalHeight() const
void closeMainApplication()
Define the X11 console to display images.
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, const unsigned int select=vpBasicFeature::FEATURE_ALL)
error that can be emited by ViSP classes.
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const char *title=NULL)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void getCameraParameters(vpCameraParameters &cam)
get the intrinsic parameters of the camera
virtual void mainLoop()
activate the mainloop
This tracker is meant to track a blob (connex pixels with same gray level) on a vpImage.
void track(const vpImage< unsigned char > &I)
static void flush(const vpImage< unsigned char > &I)
Class that defines what is a point.
void getInternalImage(vpImage< unsigned char > &I)
get an Image of the internal view
virtual void setSamplingTime(const double &delta_t)
void initApplication(void *(*start_routine)(void *))
begin the main program
vpColVector computeControlLaw()
static void display(const vpImage< unsigned char > &I)
void setInternalCameraParameters(vpCameraParameters &cam)
set internal camera parameters
Generic class defining intrinsic camera parameters.
The vpDisplayGTK allows to display image using the GTK+ library version 1.2.
void load(const char *file_name)
load an iv file
vpHomogeneousMatrix getPosition() const
Implementation of a velocity twist matrix and operations on such kind of matrices.
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
static double rad(double deg)
VISP_EXPORT double measureTimeMs()
void initMainApplication()
perform some initialization in the main program thread
void setWorldCoordinates(const double oX, const double oY, const double oZ)
Implementation of column vector and the associated operations.
void set_cVe(const vpVelocityTwistMatrix &cVe_)
vpHomogeneousMatrix inverse() const
void initTracking(const vpImage< unsigned char > &I, unsigned int size=0)
void print(const vpServo::vpServoPrintType display_level=ALL, std::ostream &os=std::cout)
unsigned int getInternalWidth() const
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
void get_eJe(vpMatrix &eJe)
void initExternalViewer(const unsigned int nlig, const unsigned int ncol)
initialize the external view
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)
void setGraphics(const bool activate)