 |
Visual Servoing Platform
version 3.3.0
|
2 #include <visp3/core/vpConfig.h>
3 #ifdef VISP_HAVE_MODULE_AR
4 #include <visp3/ar/vpAROgre.h>
6 #include <visp3/robot/vpSimulatorCamera.h>
7 #include <visp3/visual_features/vpFeatureBuilder.h>
8 #include <visp3/vs/vpServo.h>
23 #if defined(VISP_HAVE_OGRE)
28 vpCameraParameters cam(840, 840, background.getWidth() / 2, background.getHeight() / 2);
37 ogre.
init(background,
false,
true);
41 std::vector<std::string> name(4);
42 for (
unsigned int i = 0; i < 4; i++) {
46 ogre.
load(name[i],
"Sphere.mesh");
55 light->setDiffuseColour(1, 1, 1);
56 light->setSpecularColour(1, 1, 1);
57 light->setPosition((Ogre::Real)cdMo[0][3], (Ogre::Real)cdMo[1][3], (Ogre::Real)(-cdMo[2][3]));
58 light->setType(Ogre::Light::LT_POINT);
67 for (
int i = 0; i < 4; i++) {
81 for (
unsigned int iter = 0; iter < 150; iter++) {
84 for (
int i = 0; i < 4; i++) {
88 #if defined(VISP_HAVE_OGRE)
98 std::cout <<
"Catch an exception: " << e << std::endl;
100 std::cout <<
"Catch an exception " << std::endl;
Ogre::SceneManager * getSceneManager()
VISP_EXPORT int wait(double t0, double t)
void load(const std::string &entityName, const std::string &model)
static double rad(double deg)
Generic class defining intrinsic camera parameters.
double getSamplingTime() const
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMw)
Class that consider the case of a translation vector.
Class that defines the simplest robot: a free flying camera.
Implementation of column vector and the associated operations.
void setServo(const vpServoType &servo_type)
vpHomogeneousMatrix getPosition() const
void setWorldCoordinates(double oX, double oY, double oZ)
void setScale(const std::string &sceneName, float factorx, float factory, float factorz)
void setCameraParameters(const vpCameraParameters &cameraP)
void setShowConfigDialog(bool showConfigDialog)
Implementation of an augmented reality viewer using Ogre3D 3rd party.
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, unsigned int select=vpBasicFeature::FEATURE_ALL)
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)
vpColVector computeControlLaw()
virtual void setSamplingTime(const double &delta_t)
vpHomogeneousMatrix inverse() const
Class that defines what is a point.
void addResource(const std::string &resourceLocation)
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 setPosition(const std::string &sceneName, const vpTranslationVector &wTo)
void track(const vpHomogeneousMatrix &cMo)
virtual void init(vpImage< unsigned char > &I, bool bufferedKeys=false, bool hidden=false)