46#include <visp3/core/vpConfig.h>
47#include <visp3/core/vpDebug.h>
49#if (defined(VISP_HAVE_COIN3D_AND_GUI))
51#include <visp3/ar/vpSimulator.h>
52#include <visp3/core/vpCameraParameters.h>
53#include <visp3/core/vpImage.h>
54#include <visp3/core/vpTime.h>
56#include <visp3/core/vpHomogeneousMatrix.h>
57#include <visp3/core/vpIoTools.h>
58#include <visp3/core/vpMath.h>
59#include <visp3/io/vpParseArgv.h>
60#include <visp3/robot/vpSimulatorCamera.h>
61#include <visp3/visual_features/vpFeatureBuilder.h>
62#include <visp3/visual_features/vpFeaturePoint.h>
63#include <visp3/vs/vpServo.h>
65#ifdef ENABLE_VISP_NAMESPACE
69static void *mainLoop(
void *_simu)
87 wMc = wMo *
cMo.inverse();
88 robot.setPosition(wMc);
110 for (
int i = 0;
i < 4;
i++)
111 point[i].project(cMo_d);
115 for (
int i = 0;
i < 4;
i++)
123 for (
int i = 0;
i < 4;
i++)
124 point[i].project(cMo);
128 for (
int i = 0;
i < 4;
i++)
148 for (
int i = 0;
i < 4;
i++)
149 task.addFeature(p[i], pd[i]);
163 for (
int i = 0;
i < 4;
i++) {
178 wMc = robot.getPosition();
215 std::string
filename =
"./4points.iv";
221 std::cout <<
"Load : " <<
filename << std::endl <<
"This file should be in the working directory" << std::endl;
232 std::cout <<
"Catch an exception: " <<
e << std::endl;
240 std::cout <<
"You do not have Coin3D and SoQT or SoWin or SoXt functionalities enabled..." << std::endl;
241 std::cout <<
"Tip:" << std::endl;
243 <<
"- Install Coin3D and SoQT or SoWin or SoXt, configure ViSP again using cmake and build again this example"
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
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
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)
Class that defines the simplest robot: a free flying camera.
Implementation of a simulator based on Coin3d (www.coin3d.org).
void load(const char *file_name)
load an iv file
void setInternalCameraParameters(vpCameraParameters &cam)
set internal camera parameters
virtual void mainLoop()
activate the mainloop
void getCameraParameters(vpCameraParameters &cam)
get the intrinsic parameters of the camera
void initMainApplication()
perform some initialization in the main program thread
void initApplication(void *(*start_routine)(void *))
begin the main program
void setCameraPosition(vpHomogeneousMatrix &cMf)
set the camera position (from an homogeneous matrix)
void initExternalViewer(unsigned int nlig, unsigned int ncol)
initialize the external view
virtual void initInternalViewer(unsigned int nlig, unsigned int ncol)
initialize the camera view
void closeMainApplication()
VISP_EXPORT double measureTimeMs()
VISP_EXPORT int wait(double t0, double t)