36#ifndef vpRobotWireFrameSimulator_HH
37#define vpRobotWireFrameSimulator_HH
44#include <visp3/core/vpConfig.h>
46#if defined(VISP_HAVE_MODULE_GUI) && ((defined(_WIN32) && !defined(WINRT_8_0)) || defined(VISP_HAVE_PTHREAD))
55#elif defined(VISP_HAVE_PTHREAD)
59#include <visp3/core/vpMutex.h>
60#include <visp3/gui/vpDisplayD3D.h>
61#include <visp3/gui/vpDisplayGDI.h>
62#include <visp3/gui/vpDisplayGTK.h>
63#include <visp3/gui/vpDisplayOpenCV.h>
64#include <visp3/gui/vpDisplayX.h>
65#include <visp3/robot/vpRobot.h>
66#include <visp3/robot/vpRobotSimulator.h>
67#include <visp3/robot/vpWireFrameSimulator.h>
91 typedef enum { MODEL_3D, MODEL_DH } vpDisplayRobotType;
121#elif defined(VISP_HAVE_PTHREAD)
151#if defined(VISP_HAVE_X11)
153#elif defined(VISP_HAVE_GDI)
155#elif defined(HAVE_OPENCV_HIGHGUI)
157#elif defined(VISP_HAVE_D3D9)
159#elif defined(VISP_HAVE_GTK)
194 if ((std::fabs(px_ext - 1.) >
vpMath::maximum(px_ext, 1.) * std::numeric_limits<double>::epsilon()) &&
195 (std::fabs(py_ext - 1) >
vpMath::maximum(py_ext, 1.) * std::numeric_limits<double>::epsilon()))
226 void initScene(
const vpSceneObject &obj,
const vpSceneDesiredObject &desiredObject);
227 void initScene(
const char *obj,
const char *desiredObject);
228 void initScene(
const vpSceneObject &obj);
249 constantSamplingTimeMode = _constantSamplingTimeMode;
316 this->delta_t_ = delta_t;
343 static DWORD WINAPI launcher(LPVOID lpParam)
348#elif defined(VISP_HAVE_PTHREAD)
374 m_mutex_artCoord.
lock();
376 artCoordTmp = artCoord;
377 m_mutex_artCoord.
unlock();
382 m_mutex_artCoord.
lock();
384 m_mutex_artCoord.
unlock();
389 m_mutex_artVel.
lock();
396 m_mutex_artVel.
lock();
403 m_mutex_velocity.
lock();
405 m_mutex_velocity.
unlock();
410 m_mutex_velocity.
lock();
412 m_mutex_velocity.
unlock();
417 m_mutex_display.
lock();
418 displayBusy = status;
423 m_mutex_display.
lock();
424 bool status = displayBusy;
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.
Definition of the vpImage class member functions.
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.
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)
void set_displayBusy(const bool &status)
vpHomogeneousMatrix * fMi
vpCameraParameters cameraParam
void setDesiredViewColor(const vpColor &col)
vpHomogeneousMatrix getExternalCameraPosition() const
void setVerbose(bool verbose)
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
vpCameraParameters getExternalCameraParameters() const
vpMutex m_mutex_setVelocityCalled
bool constantSamplingTimeMode
virtual void updateArticularPosition()=0
static void * launcher(void *arg)
void setDesiredCameraPosition(const vpHomogeneousMatrix &cdMo_)
virtual void get_fMi(vpHomogeneousMatrix *fMit)=0
void set_fMo(const vpHomogeneousMatrix &fMo_)
vpMutex m_mutex_robotStop
void setSamplingTime(const double &delta_t)
void setExternalCameraPosition(const vpHomogeneousMatrix &camMf_)
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()