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)
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;
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)
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.
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, unsigned int select=vpBasicFeature::FEATURE_ALL)
Implementation of a simulator based on Coin3d (www.coin3d.org).
void set_eJe(const vpMatrix &eJe_)
void closeMainApplication()
error that can be emited by ViSP classes.
vpHomogeneousMatrix inverse() const
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
vpHomogeneousMatrix getPosition() const
virtual void mainLoop()
activate the mainloop
VISP_EXPORT double measureTimeMs()
Class that defines what is a point.
virtual void setSamplingTime(const double &delta_t)
void initApplication(void *(*start_routine)(void *))
begin the main program
vpColVector computeControlLaw()
void setInternalCameraParameters(vpCameraParameters &cam)
set internal camera parameters
Generic class defining intrinsic camera parameters.
virtual void initInternalViewer(unsigned int nlig, unsigned int ncol)
initialize the camera view
void load(const char *file_name)
load an iv file
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
static double rad(double deg)
void initMainApplication()
perform some initialization in the main program thread
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 initExternalViewer(unsigned int nlig, unsigned int ncol)
initialize the external view
void setServo(const vpServoType &servo_type)