 |
Visual Servoing Platform
version 3.3.0
|
52 #include <visp3/core/vpConfig.h>
53 #include <visp3/core/vpDebug.h>
55 #if (defined(VISP_HAVE_COIN3D_AND_GUI))
57 #include <visp3/ar/vpSimulator.h>
58 #include <visp3/core/vpCameraParameters.h>
59 #include <visp3/core/vpImage.h>
60 #include <visp3/core/vpTime.h>
62 #include <visp3/core/vpHomogeneousMatrix.h>
63 #include <visp3/core/vpIoTools.h>
64 #include <visp3/core/vpMath.h>
65 #include <visp3/io/vpParseArgv.h>
66 #include <visp3/robot/vpSimulatorCamera.h>
67 #include <visp3/visual_features/vpFeatureBuilder.h>
68 #include <visp3/visual_features/vpFeaturePoint.h>
69 #include <visp3/vs/vpServo.h>
71 static void *mainLoop(
void *_simu)
74 vpSimulator *simu = static_cast<vpSimulator *>(_simu);
112 for (
int i = 0; i < 4; i++)
113 point[i].project(cMo_d);
117 for (
int i = 0; i < 4; i++)
125 for (
int i = 0; i < 4; i++)
126 point[i].project(cMo);
130 for (
int i = 0; i < 4; i++)
150 for (
int i = 0; i < 4; i++)
165 for (
int i = 0; i < 4; i++) {
218 std::string filename =
"./4points.iv";
224 std::cout <<
"Load : " << filename << std::endl <<
"This file should be in the working directory" << std::endl;
226 simu.
load(filename.c_str());
234 std::cout <<
"Catch an exception: " << e << std::endl;
242 std::cout <<
"You do not have Coin3D and SoQT or SoWin or SoXt functionalities enabled..." << std::endl;
243 std::cout <<
"Tip:" << std::endl;
244 std::cout <<
"- Install Coin3D and SoQT or SoWin or SoXt, configure ViSP again using cmake and build again this example" << std::endl;
virtual void mainLoop()
activate the mainloop
void initExternalViewer(unsigned int nlig, unsigned int ncol)
initialize the external view
VISP_EXPORT int wait(double t0, double t)
static double rad(double deg)
Generic class defining intrinsic camera parameters.
void set_eJe(const vpMatrix &eJe_)
void setPosition(const vpHomogeneousMatrix &wMc)
void initApplication(void *(*start_routine)(void *))
begin the main program
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
void load(const char *file_name)
load an iv file
void set_cVe(const vpVelocityTwistMatrix &cVe_)
Class that defines the simplest robot: a free flying camera.
Implementation of column vector and the associated operations.
void initMainApplication()
perform some initialization in the main program thread
Implementation of a matrix and operations on matrices.
void setServo(const vpServoType &servo_type)
VISP_EXPORT double measureTimeMs()
void getCameraParameters(vpCameraParameters &cam)
get the intrinsic parameters of the camera
vpHomogeneousMatrix getPosition() const
void print(const vpServo::vpServoPrintType display_level=ALL, std::ostream &os=std::cout)
void setWorldCoordinates(double oX, double oY, double oZ)
void get_eJe(vpMatrix &eJe)
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, unsigned int select=vpBasicFeature::FEATURE_ALL)
void setInternalCameraParameters(vpCameraParameters &cam)
set internal camera parameters
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
virtual void initInternalViewer(unsigned int nlig, unsigned int ncol)
initialize the camera view
vpColVector computeControlLaw()
virtual void setSamplingTime(const double &delta_t)
vpHomogeneousMatrix inverse() const
Class that defines what is a point.
void setCameraPosition(vpHomogeneousMatrix &cMf)
set the camera position (from an homogeneous matrix)
Implementation of a simulator based on Coin3d (www.coin3d.org).
Implementation of an homogeneous matrix and operations on such kind of matrices.
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
error that can be emited by ViSP classes.
void closeMainApplication()