2 #include <visp/vpAROgre.h>
3 #include <visp/vpFeatureBuilder.h>
4 #include <visp/vpServo.h>
5 #include <visp/vpSimulatorCamera.h>
19 #if defined(VISP_HAVE_OGRE)
31 ogre.setCameraParameters(cam);
32 ogre.addResource(
"./");
33 ogre.init(background,
false,
true);
37 std::vector<std::string> name(4);
38 for (
int i=0; i<4; i++) {
39 std::ostringstream s; s <<
"Sphere" << i; name[i] = s.str();
40 ogre.load(name[i],
"Sphere.mesh");
41 ogre.setScale(name[i], 0.02f, 0.02f, 0.02f);
43 ogre.setPosition(name[i],
vpTranslationVector(point[i].get_oX(), point[i].get_oY(), point[i].get_oZ()));
47 Ogre::Light * light = ogre.getSceneManager()->createLight();
48 light->setDiffuseColour(1, 1, 1);
49 light->setSpecularColour(1, 1, 1);
50 light->setPosition((Ogre::Real)cdMo[0][3], (Ogre::Real)cdMo[1][3], (Ogre::Real)(-cdMo[2][3]));
51 light->setType(Ogre::Light::LT_POINT);
60 for (
int i = 0 ; i < 4 ; i++) {
74 for (
unsigned int iter=0; iter < 150; iter ++) {
77 for (
int i = 0 ; i < 4 ; i++) {
81 #if defined(VISP_HAVE_OGRE)
83 ogre.display(background, cMo);
void setVelocity(const vpRobot::vpControlFrameType frame, const vpColVector &vel)
double getSamplingTime() const
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
Class that defines the simplest robot: a free flying camera.
void setShowConfigDialog(const bool showConfigDialog)
void addFeature(vpBasicFeature &s, vpBasicFeature &s_star, const unsigned int select=vpBasicFeature::FEATURE_ALL)
create a new ste of two visual features
void setLambda(double _lambda)
set the gain lambda
void track(const vpHomogeneousMatrix &cMo)
Class that defines a 2D point visual feature which is composed by two parameters that are the cartes...
Implementation of an augmented reality viewer.
static int wait(double t0, double t)
Class that defines what is a point.
virtual void setSamplingTime(const double &delta_t)
void kill()
destruction (memory deallocation if required)
vpColVector computeControlLaw()
compute the desired control law
Generic class defining intrinsic camera parameters.
void getPosition(vpHomogeneousMatrix &wMc) const
void setInteractionMatrixType(const vpServoIteractionMatrixType &interactionMatrixType, const vpServoInversionType &interactionMatrixInversion=PSEUDO_INVERSE)
Set the type of the interaction matrix (current, mean, desired, user).
static double rad(double deg)
Class that provides a data structure for the column vectors as well as a set of operations on these v...
vpHomogeneousMatrix inverse() const
static void create(vpFeaturePoint &s, const vpCameraParameters &cam, const vpDot &d)
Class required to compute the visual servoing control law descbribed in and .
Class that consider the case of a translation vector.
void setServo(vpServoType _servo_type)
Choice of the visual servoing control law.
void setWorldCoordinates(const double ox, const double oy, const double oz)
Set the point world coordinates. We mean here the coordinates of the point in the object frame...