#include <visp3/core/vpConfig.h>
#ifdef VISP_HAVE_MODULE_AR
#include <visp3/ar/vpAROgre.h>
#endif
#include <visp3/robot/vpSimulatorCamera.h>
#include <visp3/visual_features/vpFeatureBuilder.h>
#include <visp3/vs/vpServo.h>
int main()
{
#if defined(ENABLE_VISP_NAMESPACE)
#endif
try {
#if defined(VISP_HAVE_OGRE)
ogre.
init(background,
false,
true);
std::vector<std::string> name(4);
for (unsigned int i = 0; i < 4; i++) {
std::ostringstream s;
s << "Sphere" << i;
name[i] = s.str();
ogre.
load(name[i],
"Sphere.mesh");
0.02f);
}
light->setDiffuseColour(1, 1, 1);
light->setSpecularColour(1, 1, 1);
light->setPosition((Ogre::Real)cdMo[0][3], (Ogre::Real)cdMo[1][3], (Ogre::Real)(-cdMo[2][3]));
light->setType(Ogre::Light::LT_POINT);
#endif
for (int i = 0; i < 4; i++) {
}
robot.setSamplingTime(0.040);
wMo = wMc * cMo;
for (unsigned int iter = 0; iter < 150; iter++) {
robot.getPosition(wMc);
for (int i = 0; i < 4; i++) {
}
#if defined(VISP_HAVE_OGRE)
#endif
}
}
std::cout << "Catch an exception: " << e << std::endl;
}
catch (...) {
std::cout << "Catch an exception " << std::endl;
}
}
Implementation of an augmented reality viewer using Ogre3D 3rd party.
void setCameraParameters(const vpCameraParameters &cameraP)
void setShowConfigDialog(bool showConfigDialog)
void addResource(const std::string &resourceLocation)
Ogre::SceneManager * getSceneManager()
virtual void init(vpImage< unsigned char > &I, bool bufferedKeys=false, bool hidden=false)
virtual void display(const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMw)
void load(const std::string &entityName, const std::string &model)
void setPosition(const std::string &sceneName, const vpTranslationVector &wTo)
void setScale(const std::string &sceneName, float factorx, float factory, float factorz)
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 vpImagePoint &t)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
void track(const vpHomogeneousMatrix &cMo)
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix inverse() const
unsigned int getWidth() const
unsigned int getHeight() const
static double rad(double deg)
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)
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel) VP_OVERRIDE
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
void addFeature(vpBasicFeature &s_cur, vpBasicFeature &s_star, unsigned int select=vpBasicFeature::FEATURE_ALL)
void setServo(const vpServoType &servo_type)
vpColVector computeControlLaw()
Class that defines the simplest robot: a free flying camera.
Class that consider the case of a translation vector.
VISP_EXPORT int wait(double t0, double t)