42 #include <visp/vpConfig.h>
46 #if defined(WIN32) || defined(VISP_HAVE_PTHREAD)
47 #include <visp/vpRobotWireFrameSimulator.h>
48 #include <visp/vpSimulatorViper850.h>
59 #if defined(VISP_HAVE_DISPLAY)
90 #if defined(VISP_HAVE_DISPLAY)
92 this->display.
init(
I, 0, 0,
"The External view");
130 free_Bound_scene (&(this->
camera));
134 free_Bound_scene (&(this->
camera));
153 free_Bound_scene (&(this->
camera));
157 free_Bound_scene (&(this->
camera));
174 free_Bound_scene (&(this->
camera));
178 free_Bound_scene (&(this->
camera));
195 free_Bound_scene (&(this->
camera));
199 free_Bound_scene (&(this->
camera));
236 float o44c[4][4],o44cd[4][4],x,y,z;
237 Matrix
id = IDENTITY_MATRIX;
244 vp2jlc_matrix(cMo.inverse(),o44c);
249 add_vwstack (
"start",
"cop", o44c[3][0],o44c[3][1],o44c[3][2]);
250 x = o44c[2][0] + o44c[3][0];
251 y = o44c[2][1] + o44c[3][1];
252 z = o44c[2][2] + o44c[3][2];
253 add_vwstack (
"start",
"vrp", x,y,z);
254 add_vwstack (
"start",
"vpn", o44c[2][0],o44c[2][1],o44c[2][2]);
255 add_vwstack (
"start",
"vup", o44c[1][0],o44c[1][1],o44c[1][2]);
256 add_vwstack (
"start",
"window", -u, u, -v, v);
260 add_vwstack (
"start",
"cop", o44cd[3][0],o44cd[3][1],o44cd[3][2]);
261 x = o44cd[2][0] + o44cd[3][0];
262 y = o44cd[2][1] + o44cd[3][1];
263 z = o44cd[2][2] + o44cd[3][2];
264 add_vwstack (
"start",
"vrp", x,y,z);
265 add_vwstack (
"start",
"vpn", o44cd[2][0],o44cd[2][1],o44cd[2][2]);
266 add_vwstack (
"start",
"vup", o44cd[1][0],o44cd[1][1],o44cd[1][2]);
267 add_vwstack (
"start",
"window", -u, u, -v, v);
309 float o44c[4][4],o44cd[4][4],x,y,z;
310 Matrix
id = IDENTITY_MATRIX;
317 vp2jlc_matrix(cMo.inverse(),o44c);
322 add_vwstack (
"start",
"cop", o44c[3][0],o44c[3][1],o44c[3][2]);
323 x = o44c[2][0] + o44c[3][0];
324 y = o44c[2][1] + o44c[3][1];
325 z = o44c[2][2] + o44c[3][2];
326 add_vwstack (
"start",
"vrp", x,y,z);
327 add_vwstack (
"start",
"vpn", o44c[2][0],o44c[2][1],o44c[2][2]);
328 add_vwstack (
"start",
"vup", o44c[1][0],o44c[1][1],o44c[1][2]);
329 add_vwstack (
"start",
"window", -u, u, -v, v);
335 add_vwstack (
"start",
"cop", o44cd[3][0],o44cd[3][1],o44cd[3][2]);
336 x = o44cd[2][0] + o44cd[3][0];
337 y = o44cd[2][1] + o44cd[3][1];
338 z = o44cd[2][2] + o44cd[3][2];
339 add_vwstack (
"start",
"vrp", x,y,z);
340 add_vwstack (
"start",
"vpn", o44cd[2][0],o44cd[2][1],o44cd[2][2]);
341 add_vwstack (
"start",
"vup", o44cd[1][0],o44cd[1][1],o44cd[1][2]);
342 add_vwstack (
"start",
"window", -u, u, -v, v);
virtual void get_fMi(vpHomogeneousMatrix *fMit)=0
void initScene(const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject)
unsigned int getWidth() const
The class provides a data structure for the homogeneous matrices as well as a set of operations on th...
A cylindrical tool is attached to the camera.
bool constantSamplingTimeMode
Flag used to force the sampling time in the thread computing the robot's displacement to a constant v...
bool singularityManagement
void resize(const unsigned int height, const unsigned int width)
set the size of the image
vpRobotWireFrameSimulator()
static int wait(double t0, double t)
static Type maximum(const Type &a, const Type &b)
vpDisplayRobotType displayType
This class aims to be a basis used to create all the robot simulators.
void set_displayBusy(const bool &status)
void setSamplingTime(const double &delta_t)
void getInternalView(vpImage< vpRGBa > &I)
vpHomogeneousMatrix get_cMo()
void initScene(const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject)
bool displayDesiredObject
static Type minimum(const Type &a, const Type &b)
Implementation of a wire frame simulator. Compared to the vpSimulator class, it does not require thir...
virtual ~vpRobotWireFrameSimulator()
vpSceneDesiredObject desiredObject
bool setVelocityCalled
Flag used to specify to the thread managing the robot displacements that the setVelocity() method has...
void display_scene(Matrix mat, Bound_scene &sc, const vpImage< vpRGBa > &I, const vpColor &color)
vpHomogeneousMatrix inverse() const
unsigned int getHeight() const
void init(vpImage< unsigned char > &I, int winx=-1, int winy=-1, const char *title=NULL)
void resize(const unsigned int i, const bool flagNullify=true)