39 #include <visp3/core/vpConfig.h>
41 #if defined(VISP_HAVE_MODULE_GUI) && ((defined(_WIN32) && !defined(WINRT_8_0)) || defined(VISP_HAVE_PTHREAD))
42 #include <visp3/robot/vpRobotWireFrameSimulator.h>
43 #include <visp3/robot/vpSimulatorViper850.h>
45 #include "../wireframe-simulator/vpBound.h"
46 #include "../wireframe-simulator/vpScene.h"
47 #include "../wireframe-simulator/vpVwstack.h"
54 artCoord(), artVel(), velocity(),
56 #elif defined(VISP_HAVE_PTHREAD)
59 m_mutex_fMi(), m_mutex_eMc(), m_mutex_artVel(), m_mutex_artCoord(), m_mutex_velocity(), m_mutex_display(), m_mutex_robotStop(), m_mutex_frame(), m_mutex_setVelocityCalled(), m_mutex_scene(),
61 robotStop(false), jointLimit(false), jointLimitArt(false), singularityManagement(true), cameraParam(),
62 #if defined(VISP_HAVE_DISPLAY)
65 displayType(MODEL_3D), displayAllowed(true), constantSamplingTimeMode(false), setVelocityCalled(false),
72 #if defined(VISP_HAVE_DISPLAY)
83 artCoord(), artVel(), velocity(),
85 #elif defined(VISP_HAVE_PTHREAD)
88 m_mutex_fMi(), m_mutex_eMc(), m_mutex_artVel(), m_mutex_artCoord(), m_mutex_velocity(), m_mutex_display(), m_mutex_robotStop(), m_mutex_frame(), m_mutex_setVelocityCalled(), m_mutex_scene(),
89 displayBusy(false), robotStop(false), jointLimit(false), jointLimitArt(false), singularityManagement(true),
91 #if defined(VISP_HAVE_DISPLAY)
94 displayType(MODEL_3D), displayAllowed(do_display), constantSamplingTimeMode(false), setVelocityCalled(false),
102 #if defined(VISP_HAVE_DISPLAY)
133 free_Bound_scene(&(this->
camera));
137 free_Bound_scene(&(this->
camera));
157 free_Bound_scene(&(this->
camera));
161 free_Bound_scene(&(this->
camera));
181 free_Bound_scene(&(this->
camera));
185 free_Bound_scene(&(this->
camera));
203 free_Bound_scene(&(this->
camera));
207 free_Bound_scene(&(this->
camera));
242 float o44c[4][4], o44cd[4][4], x, y, z;
243 Matrix
id = IDENTITY_MATRIX;
256 add_vwstack(
"start",
"cop", o44c[3][0], o44c[3][1], o44c[3][2]);
257 x = o44c[2][0] + o44c[3][0];
258 y = o44c[2][1] + o44c[3][1];
259 z = o44c[2][2] + o44c[3][2];
260 add_vwstack(
"start",
"vrp", x, y, z);
261 add_vwstack(
"start",
"vpn", o44c[2][0], o44c[2][1], o44c[2][2]);
262 add_vwstack(
"start",
"vup", o44c[1][0], o44c[1][1], o44c[1][2]);
263 add_vwstack(
"start",
"window", -u, u, -v, v);
267 add_vwstack(
"start",
"cop", o44cd[3][0], o44cd[3][1], o44cd[3][2]);
268 x = o44cd[2][0] + o44cd[3][0];
269 y = o44cd[2][1] + o44cd[3][1];
270 z = o44cd[2][2] + o44cd[3][2];
271 add_vwstack(
"start",
"vrp", x, y, z);
272 add_vwstack(
"start",
"vpn", o44cd[2][0], o44cd[2][1], o44cd[2][2]);
273 add_vwstack(
"start",
"vup", o44cd[1][0], o44cd[1][1], o44cd[1][2]);
274 add_vwstack(
"start",
"window", -u, u, -v, v);
315 float o44c[4][4], o44cd[4][4], x, y, z;
316 Matrix
id = IDENTITY_MATRIX;
329 add_vwstack(
"start",
"cop", o44c[3][0], o44c[3][1], o44c[3][2]);
330 x = o44c[2][0] + o44c[3][0];
331 y = o44c[2][1] + o44c[3][1];
332 z = o44c[2][2] + o44c[3][2];
333 add_vwstack(
"start",
"vrp", x, y, z);
334 add_vwstack(
"start",
"vpn", o44c[2][0], o44c[2][1], o44c[2][2]);
335 add_vwstack(
"start",
"vup", o44c[1][0], o44c[1][1], o44c[1][2]);
336 add_vwstack(
"start",
"window", -u, u, -v, v);
341 add_vwstack(
"start",
"cop", o44cd[3][0], o44cd[3][1], o44cd[3][2]);
342 x = o44cd[2][0] + o44cd[3][0];
343 y = o44cd[2][1] + o44cd[3][1];
344 z = o44cd[2][2] + o44cd[3][2];
345 add_vwstack(
"start",
"vrp", x, y, z);
346 add_vwstack(
"start",
"vpn", o44cd[2][0], o44cd[2][1], o44cd[2][2]);
347 add_vwstack(
"start",
"vup", o44cd[1][0], o44cd[1][1], o44cd[1][2]);
348 add_vwstack(
"start",
"window", -u, u, -v, v);
374 #elif !defined(VISP_BUILD_SHARED_LIBS)
377 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="")
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 ~vpRobotWireFrameSimulator()
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)