36 #include <visp3/core/vpConfig.h>
38 #if defined(VISP_HAVE_MODULE_GUI) && defined(VISP_HAVE_THREADS)
39 #include <visp3/robot/vpRobotWireFrameSimulator.h>
40 #include <visp3/robot/vpSimulatorViper850.h>
42 #include "../wireframe-simulator/vpBound.h"
43 #include "../wireframe-simulator/vpScene.h"
44 #include "../wireframe-simulator/vpVwstack.h"
51 artCoord(), artVel(), velocity(), m_thread(), m_mutex_fMi(), m_mutex_eMc(), m_mutex_artVel(), m_mutex_artCoord(),
52 m_mutex_velocity(), m_mutex_display(), m_mutex_robotStop(), m_mutex_frame(), m_mutex_setVelocityCalled(),
53 m_mutex_scene(), displayBusy(false), robotStop(false), jointLimit(false), jointLimitArt(false),
54 singularityManagement(true), cameraParam(),
55 #if defined(VISP_HAVE_DISPLAY)
58 displayType(MODEL_3D), displayAllowed(true), constantSamplingTimeMode(false), setVelocityCalled(false),
65 #if defined(VISP_HAVE_DISPLAY)
76 artCoord(), artVel(), velocity(), m_thread(), m_mutex_fMi(), m_mutex_eMc(), m_mutex_artVel(), m_mutex_artCoord(),
77 m_mutex_velocity(), m_mutex_display(), m_mutex_robotStop(), m_mutex_frame(), m_mutex_setVelocityCalled(), m_mutex_scene(),
78 displayBusy(false), robotStop(false), jointLimit(false), jointLimitArt(false), singularityManagement(true),
80 #if defined(VISP_HAVE_DISPLAY)
83 displayType(MODEL_3D), displayAllowed(do_display), constantSamplingTimeMode(false), setVelocityCalled(false),
91 #if defined(VISP_HAVE_DISPLAY)
115 free_Bound_scene(&(this->
camera));
119 free_Bound_scene(&(this->
camera));
139 free_Bound_scene(&(this->
camera));
143 free_Bound_scene(&(this->
camera));
163 free_Bound_scene(&(this->
camera));
167 free_Bound_scene(&(this->
camera));
185 free_Bound_scene(&(this->
camera));
189 free_Bound_scene(&(this->
camera));
225 float o44c[4][4], o44cd[4][4], x, y, z;
226 Matrix
id = IDENTITY_MATRIX;
239 add_vwstack(
"start",
"cop", o44c[3][0], o44c[3][1], o44c[3][2]);
240 x = o44c[2][0] + o44c[3][0];
241 y = o44c[2][1] + o44c[3][1];
242 z = o44c[2][2] + o44c[3][2];
243 add_vwstack(
"start",
"vrp", x, y, z);
244 add_vwstack(
"start",
"vpn", o44c[2][0], o44c[2][1], o44c[2][2]);
245 add_vwstack(
"start",
"vup", o44c[1][0], o44c[1][1], o44c[1][2]);
246 add_vwstack(
"start",
"window", -u, u, -v, v);
250 add_vwstack(
"start",
"cop", o44cd[3][0], o44cd[3][1], o44cd[3][2]);
251 x = o44cd[2][0] + o44cd[3][0];
252 y = o44cd[2][1] + o44cd[3][1];
253 z = o44cd[2][2] + o44cd[3][2];
254 add_vwstack(
"start",
"vrp", x, y, z);
255 add_vwstack(
"start",
"vpn", o44cd[2][0], o44cd[2][1], o44cd[2][2]);
256 add_vwstack(
"start",
"vup", o44cd[1][0], o44cd[1][1], o44cd[1][2]);
257 add_vwstack(
"start",
"window", -u, u, -v, v);
299 float o44c[4][4], o44cd[4][4], x, y, z;
300 Matrix
id = IDENTITY_MATRIX;
313 add_vwstack(
"start",
"cop", o44c[3][0], o44c[3][1], o44c[3][2]);
314 x = o44c[2][0] + o44c[3][0];
315 y = o44c[2][1] + o44c[3][1];
316 z = o44c[2][2] + o44c[3][2];
317 add_vwstack(
"start",
"vrp", x, y, z);
318 add_vwstack(
"start",
"vpn", o44c[2][0], o44c[2][1], o44c[2][2]);
319 add_vwstack(
"start",
"vup", o44c[1][0], o44c[1][1], o44c[1][2]);
320 add_vwstack(
"start",
"window", -u, u, -v, v);
325 add_vwstack(
"start",
"cop", o44cd[3][0], o44cd[3][1], o44cd[3][2]);
326 x = o44cd[2][0] + o44cd[3][0];
327 y = o44cd[2][1] + o44cd[3][1];
328 z = o44cd[2][2] + o44cd[3][2];
329 add_vwstack(
"start",
"vrp", x, y, z);
330 add_vwstack(
"start",
"vpn", o44cd[2][0], o44cd[2][1], o44cd[2][2]);
331 add_vwstack(
"start",
"vup", o44cd[1][0], o44cd[1][1], o44cd[1][2]);
332 add_vwstack(
"start",
"window", -u, u, -v, v);
358 #elif !defined(VISP_BUILD_SHARED_LIBS)
361 void dummy_vpRobotWireFrameSimulator() { };
void resize(unsigned int i, bool flagNullify=true)
void init(vpImage< unsigned char > &I, int win_x=-1, int win_y=-1, const std::string &win_title="") vp_override
Implementation of an homogeneous matrix and operations on such kind of matrices.
vpHomogeneousMatrix inverse() const
unsigned int getWidth() const
void resize(unsigned int h, unsigned int w)
resize the image : Image initialization
unsigned int getHeight() const
static Type maximum(const Type &a, const Type &b)
static Type minimum(const Type &a, const Type &b)
This class aims to be a basis used to create all the robot simulators.
vpHomogeneousMatrix get_cMo()
void initScene(const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject)
vpRobotWireFrameSimulator()
void set_displayBusy(const bool &status)
void getInternalView(vpImage< vpRGBa > &I)
virtual void get_fMi(vpHomogeneousMatrix *fMit)=0
void setSamplingTime(const double &delta_t)
Implementation of a wire frame simulator. Compared to the vpSimulator class, it does not require thir...
vpSceneDesiredObject desiredObject
@ D_TOOL
A cylindrical tool is attached to the camera.
void initScene(const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject)
void display_scene(Matrix mat, Bound_scene &sc, const vpImage< vpRGBa > &I, const vpColor &color)
bool displayDesiredObject
VISP_EXPORT int wait(double t0, double t)