39 #ifndef vpRobotWireFrameSimulator_HH
40 #define vpRobotWireFrameSimulator_HH
42 #include <visp3/core/vpConfig.h>
44 #if defined(VISP_HAVE_MODULE_GUI) && defined(VISP_HAVE_THREADS)
52 #include <visp3/gui/vpDisplayD3D.h>
53 #include <visp3/gui/vpDisplayGDI.h>
54 #include <visp3/gui/vpDisplayGTK.h>
55 #include <visp3/gui/vpDisplayOpenCV.h>
56 #include <visp3/gui/vpDisplayX.h>
57 #include <visp3/robot/vpRobot.h>
58 #include <visp3/robot/vpRobotSimulator.h>
59 #include <visp3/robot/vpWireFrameSimulator.h>
84 typedef enum { MODEL_3D, MODEL_DH } vpDisplayRobotType;
139 #if defined(VISP_HAVE_X11)
141 #elif defined(VISP_HAVE_GDI)
143 #elif defined(HAVE_OPENCV_HIGHGUI)
145 #elif defined(VISP_HAVE_D3D9)
147 #elif defined(VISP_HAVE_GTK)
181 if ((std::fabs(px_ext - 1.) >
vpMath::maximum(px_ext, 1.) * std::numeric_limits<double>::epsilon()) &&
182 (std::fabs(py_ext - 1) >
vpMath::maximum(py_ext, 1.) * std::numeric_limits<double>::epsilon()))
213 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject);
214 void initScene(
const char *obj,
const char *desiredObject);
215 void initScene(
const vpSceneObject &obj);
236 constantSamplingTimeMode = _constantSamplingTimeMode;
303 this->delta_t_ = delta_t;
353 m_mutex_artCoord.lock();
355 artCoordTmp = artCoord;
356 m_mutex_artCoord.unlock();
361 m_mutex_artCoord.lock();
363 m_mutex_artCoord.unlock();
368 m_mutex_artVel.lock();
370 m_mutex_artVel.unlock();
375 m_mutex_artVel.lock();
377 m_mutex_artVel.unlock();
382 m_mutex_velocity.lock();
384 m_mutex_velocity.unlock();
389 m_mutex_velocity.lock();
391 m_mutex_velocity.unlock();
396 m_mutex_display.lock();
397 displayBusy = status;
398 m_mutex_display.unlock();
402 m_mutex_display.lock();
403 bool status = displayBusy;
406 m_mutex_display.unlock();
Generic class defining intrinsic camera parameters.
Implementation of column vector and the associated operations.
Class to define RGB colors available for display functionalities.
Display for windows using Direct3D 3rd party. Thus to enable this class Direct3D should be installed....
Display for windows using GDI (available on any windows 32 platform).
The vpDisplayGTK allows to display image using the GTK 3rd party library. Thus to enable this class G...
The vpDisplayOpenCV allows to display image using the OpenCV library. Thus to enable this class OpenC...
Use the X11 console to display images on unix-like OS. Thus to enable this class X11 should be instal...
Implementation of an homogeneous matrix and operations on such kind of matrices.
unsigned int getWidth() const
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.
This class aims to be a basis used to create all the simulators of robots.
std::mutex m_mutex_velocity
virtual void computeArticularVelocity()=0
vpColVector get_velocity()
vpColVector get_artCoord()
void setDisplayRobotType(const vpDisplayRobotType dispType)
virtual int isInJointLimit()=0
void setGraphicsThickness(unsigned int thickness)
void set_velocity(const vpColVector &vel)
void setCurrentViewColor(const vpColor &col)
static void launcher(vpRobotWireFrameSimulator &simulator)
void set_displayBusy(const bool &status)
std::mutex m_mutex_artVel
vpHomogeneousMatrix * fMi
vpCameraParameters cameraParam
void setDesiredViewColor(const vpColor &col)
vpHomogeneousMatrix getExternalCameraPosition() const
std::mutex m_mutex_robotStop
void setVerbose(bool verbose)
std::mutex m_mutex_display
vpHomogeneousMatrix get_fMo() const
vpDisplayRobotType displayType
void setConstantSamplingTimeMode(const bool _constantSamplingTimeMode)
void set_artCoord(const vpColVector &coord)
void setSingularityManagement(bool sm)
void setCameraColor(const vpColor &col)
unsigned int jointLimitArt
virtual void initArms()=0
std::mutex m_mutex_artCoord
vpCameraParameters getExternalCameraParameters() const
bool constantSamplingTimeMode
virtual void updateArticularPosition()=0
void setDesiredCameraPosition(const vpHomogeneousMatrix &cdMo_)
virtual void get_fMi(vpHomogeneousMatrix *fMit)=0
void set_fMo(const vpHomogeneousMatrix &fMo_)
void setSamplingTime(const double &delta_t)
void setExternalCameraPosition(const vpHomogeneousMatrix &camMf_)
std::mutex m_mutex_setVelocityCalled
void set_artVel(const vpColVector &vel)
bool singularityManagement
Implementation of a wire frame simulator. Compared to the vpSimulator class, it does not require thir...
vpHomogeneousMatrix getExternalCameraPosition() const
void initScene(const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject)
vpHomogeneousMatrix get_cMo() const
void setExternalCameraPosition(const vpHomogeneousMatrix &cam_Mf)
void setDesiredCameraPosition(const vpHomogeneousMatrix &cdMo_)
VISP_EXPORT double getMinTimeForUsleepCall()