ViSP  2.6.2
vpRobotSimulator Class Referenceabstract

#include <vpRobotSimulator.h>

+ Inheritance diagram for vpRobotSimulator:

Public Types

enum  vpDisplayRobotType { MODEL_3D, MODEL_DH }
 
enum  vpRobotStateType { STATE_STOP, STATE_VELOCITY_CONTROL, STATE_POSITION_CONTROL, STATE_ACCELERATION_CONTROL }
 
enum  vpControlFrameType { REFERENCE_FRAME, ARTICULAR_FRAME, CAMERA_FRAME, MIXT_FRAME }
 

Public Member Functions

 vpRobotSimulator ()
 
 vpRobotSimulator (bool display)
 
virtual ~vpRobotSimulator ()
 
virtual void setVelocity (const vpRobot::vpControlFrameType, const vpColVector &)=0
 
virtual void getVelocity (const vpRobot::vpControlFrameType frame, vpColVector &q)=0
 
virtual void get_eJe (vpMatrix &_eJe)=0
 
virtual void get_fJe (vpMatrix &_fJe)=0
 
virtual void getCameraDisplacement (vpColVector &v)=0
 
virtual void getArticularDisplacement (vpColVector &qdot)=0
 
virtual void getDisplacement (const vpRobot::vpControlFrameType frame, vpColVector &q)=0
 
void setSingularityManagement (const bool sm)
 
void initScene (vpSceneObject obj, vpSceneDesiredObject desiredObject)
 
void initScene (const char *obj, const char *desiredObject)
 
void initScene (vpSceneObject obj)
 
void initScene (const char *obj)
 
void setDesiredCameraPosition (const vpHomogeneousMatrix cdMo)
 
void setExternalCameraPosition (const vpHomogeneousMatrix camMf)
 
vpHomogeneousMatrix getExternalCameraPosition () const
 
void setCameraColor (const vpColor col)
 
void setCurrentViewColor (const vpColor col)
 
void setDesiredViewColor (const vpColor col)
 
vpCameraParameters getExternalCameraParameters () const
 
void set_fMo (const vpHomogeneousMatrix &fMo)
 
vpHomogeneousMatrix get_fMo () const
 
void setDisplayRobotType (const vpDisplayRobotType dispType)
 
vpHomogeneousMatrix get_cMo ()
 
void getInternalView (vpImage< vpRGBa > &I)
 
void getInternalView (vpImage< unsigned char > &I)
 
void setConstantSamplingTimeMode (const bool _constantSamplingTimeMode)
 
void setSamplingTime (const float _samplingTime)
 
double getMaxTranslationVelocity (void) const
 
double getMaxRotationVelocity (void) const
 
virtual void getPosition (const vpRobot::vpControlFrameType frame, vpColVector &q)=0
 
vpColVector getPosition (const vpRobot::vpControlFrameType frame)
 
vpControlFrameType getRobotFrame (void)
 
virtual vpRobotStateType getRobotState (void)
 
void setMaxRotationVelocity (const double maxVr)
 
void setMaxTranslationVelocity (const double maxVt)
 
virtual void setPosition (const vpRobot::vpControlFrameType frame, const vpColVector &q)=0
 
vpControlFrameType setRobotFrame (vpRobot::vpControlFrameType newFrame)
 
virtual vpRobotStateType setRobotState (const vpRobot::vpRobotStateType newState)
 

Static Public Member Functions

static vpColVector saturateVelocities (const vpColVector &v_in, const vpColVector &v_max, bool verbose=false)
 

Public Attributes

vpImage< vpRGBaI
 

Static Public Attributes

static const vpRobot::vpRobotStateType defaultEtatRobot = vpRobot::STATE_STOP
 
static const vpRobot::vpControlFrameType defaultFrameRobot = vpRobot::CAMERA_FRAME
 

Protected Types

enum  vpSceneObject {
  THREE_PTS, CUBE, PLATE, SMALL_PLATE,
  RECTANGLE, SQUARE_10CM, DIAMOND, TRAPEZOID,
  THREE_LINES, ROAD, TIRE, PIPE,
  CIRCLE, SPHERE, CYLINDER, PLAN,
  POINT_CLOUD
}
 
enum  vpSceneDesiredObject { D_STANDARD, D_CIRCLE, D_TOOL }
 
enum  vpCameraTrajectoryDisplayType { CT_LINE, CT_POINT }
 

Protected Member Functions

void init ()
 
virtual void updateArticularPosition ()=0
 
virtual int isInJointLimit ()=0
 
virtual void computeArticularVelocity ()=0
 
void initDisplay ()
 
virtual void initArms ()=0
 
vpColVector get_artCoord ()
 
void set_artCoord (const vpColVector &coord)
 
vpColVector get_artVel ()
 
void set_artVel (const vpColVector &vel)
 
vpColVector get_velocity ()
 
void set_velocity (const vpColVector &vel)
 
void set_displayBusy (const bool &status)
 
bool get_displayBusy ()
 
virtual void get_fMi (vpHomogeneousMatrix *fMit)=0
 
void initScene (vpSceneObject obj, vpSceneDesiredObject desiredObject, const std::list< vpImageSimulator > &imObj)
 
void initScene (const char *obj, const char *desiredObject, const std::list< vpImageSimulator > &imObj)
 
void initScene (vpSceneObject obj, const std::list< vpImageSimulator > &imObj)
 
void initScene (const char *obj, const std::list< vpImageSimulator > &imObj)
 
void setCameraPositionRelObj (const vpHomogeneousMatrix cMo)
 
void setCameraPositionRelWorld (const vpHomogeneousMatrix fMc)
 
void setCameraTrajectoryColor (const vpColor col)
 
void setDisplayCameraTrajectory (const bool displayCameraTrajectory)
 
vpCameraParameters getInternalCameraParameters (const vpImage< vpRGBa > &I) const
 
vpCameraParameters getInternalCameraParameters (const vpImage< unsigned char > &I) const
 
vpCameraParameters getExternalCameraParameters (const vpImage< vpRGBa > &I) const
 
vpCameraParameters getExternalCameraParameters (const vpImage< unsigned char > &I) const
 
vpHomogeneousMatrix get_cMo () const
 
void setInternalCameraParameters (const vpCameraParameters cam)
 
void setExternalCameraParameters (const vpCameraParameters cam)
 
void setNbPtTrajectory (const unsigned int nbPt)
 
void setCameraSizeFactor (const float factor)
 
void deleteCameraPositionHistory ()
 
void setCameraTrajectoryDisplayType (const vpCameraTrajectoryDisplayType camTrajType)
 
void get_cMo_History (std::list< vpHomogeneousMatrix > &cMo_history)
 
void get_fMo_History (std::list< vpHomogeneousMatrix > &fMo_history)
 
void displayTrajectory (vpImage< unsigned char > &I, const std::list< vpHomogeneousMatrix > &list_cMo, const std::list< vpHomogeneousMatrix > &list_fMo, const vpHomogeneousMatrix &camMf)
 
void displayTrajectory (vpImage< vpRGBa > &I, const std::list< vpHomogeneousMatrix > &list_cMo, const std::list< vpHomogeneousMatrix > &list_fMo, const vpHomogeneousMatrix &camMf)
 
void getInternalImage (vpImage< vpRGBa > &I)
 
void getInternalImage (vpImage< unsigned char > &I)
 
void getExternalImage (vpImage< vpRGBa > &I)
 
void getExternalImage (vpImage< vpRGBa > &I, vpHomogeneousMatrix camMf)
 
void getExternalImage (vpImage< unsigned char > &I)
 
void getExternalImage (vpImage< unsigned char > &I, vpHomogeneousMatrix camMf)
 
void display_scene (Matrix mat, Bound_scene &sc, vpImage< vpRGBa > &I, vpColor color)
 
void display_scene (Matrix mat, Bound_scene &sc, vpImage< unsigned char > &I, vpColor color)
 
vpHomogeneousMatrix navigation (vpImage< vpRGBa > &I, bool &changed)
 
vpHomogeneousMatrix navigation (vpImage< unsigned char > &I, bool &changed)
 
vpImagePoint projectCameraTrajectory (vpImage< vpRGBa > &I, vpHomogeneousMatrix cMo, vpHomogeneousMatrix fMo)
 
vpImagePoint projectCameraTrajectory (vpImage< unsigned char > &I, vpHomogeneousMatrix cMo, vpHomogeneousMatrix fMo)
 
vpImagePoint projectCameraTrajectory (vpImage< vpRGBa > &I, vpHomogeneousMatrix cMo, vpHomogeneousMatrix fMo, vpHomogeneousMatrix cMf)
 
vpImagePoint projectCameraTrajectory (vpImage< unsigned char > &I, vpHomogeneousMatrix cMo, vpHomogeneousMatrix fMo, vpHomogeneousMatrix cMf)
 
Deprecated functions
vp_deprecated void initScene (vpSceneObject obj, vpSceneDesiredObject desiredObject, vpList< vpImageSimulator > &imObj)
 
vp_deprecated void initScene (const char *obj, const char *desiredObject, vpList< vpImageSimulator > &imObj)
 
vp_deprecated void initScene (vpSceneObject obj, vpList< vpImageSimulator > &imObj)
 
vp_deprecated void initScene (const char *obj, vpList< vpImageSimulator > &imObj)
 
vp_deprecated vpList< vpHomogeneousMatrixget_cMo_History ()
 
vp_deprecated vpList< vpHomogeneousMatrixget_fMo_History ()
 
vp_deprecated void displayTrajectory (vpImage< unsigned char > &I, vpList< vpHomogeneousMatrix > &list_cMo, vpList< vpHomogeneousMatrix > &list_fMo, vpHomogeneousMatrix camMf)
 
vp_deprecated void displayTrajectory (vpImage< vpRGBa > &I, vpList< vpHomogeneousMatrix > &list_cMo, vpList< vpHomogeneousMatrix > &list_fMo, vpHomogeneousMatrix camMf)
 

Static Protected Member Functions

static DWORD WINAPI launcher (LPVOID lpParam)
 

Protected Attributes

float samplingTime
 
double tcur
 
double tprev
 
Bound_scene * robotArms
 
unsigned int size_fMi
 
vpHomogeneousMatrixfMi
 
vpColVector artCoord
 
vpColVector artVel
 
vpColVector velocity
 
HANDLE hThread
 
HANDLE mutex_fMi
 
HANDLE mutex_artVel
 
HANDLE mutex_artCoord
 
HANDLE mutex_velocity
 
HANDLE mutex_display
 
bool displayBusy
 
bool robotStop
 
bool jointLimit
 
unsigned int jointLimitArt
 
bool singularityManagement
 
vpCameraParameters cameraParam
 
vpDisplayX display
 
vpDisplayRobotType displayType
 
bool displayAllowed
 
bool constantSamplingTimeMode
 
bool setVelocityCalled
 
Bound_scene scene
 
Bound_scene desiredScene
 
Bound_scene camera
 
std::list< vpImageSimulatorobjectImage
 
vpHomogeneousMatrix fMo
 
vpHomogeneousMatrix fMc
 
vpHomogeneousMatrix camMf
 
vpHomogeneousMatrix refMo
 
vpHomogeneousMatrix cMo
 
vpHomogeneousMatrix cdMo
 
vpSceneObject object
 
vpSceneDesiredObject desiredObject
 
vpColor camColor
 
vpColor camTrajColor
 
vpColor curColor
 
vpColor desColor
 
bool sceneInitialized
 
bool displayCameraTrajectory
 
std::list< vpImagePointcameraTrajectory
 
std::list< vpHomogeneousMatrixposeList
 
std::list< vpHomogeneousMatrixfMoList
 
unsigned int nbrPtLimit
 
vpImagePoint old_iPr
 
vpImagePoint old_iPz
 
vpImagePoint old_iPt
 
bool blockedr
 
bool blockedz
 
bool blockedt
 
bool blocked
 
vpHomogeneousMatrix camMf2
 
vpHomogeneousMatrix f2Mf
 
double px_int
 
double py_int
 
double px_ext
 
double py_ext
 
bool displayObject
 
bool displayDesiredObject
 
bool displayCamera
 
bool displayImageSimulator
 
float cameraFactor
 
vpCameraTrajectoryDisplayType camTrajType
 
bool extCamChanged
 
vpHomogeneousMatrix rotz
 
double maxTranslationVelocity
 
double maxRotationVelocity
 
int nDof
 
vpMatrix eJe
 
int eJeAvailable
 
vpMatrix fJe
 
int fJeAvailable
 

Static Protected Attributes

static const double maxTranslationVelocityDefault = 0.2
 
static const double maxRotationVelocityDefault = 0.7
 

Detailed Description

This class aims to be a basis used to create all the simulators of robots.

Thus in this class you will find all the parameters and methods which are necessary to create a simulator. Several methods are pure virtual. In this case it means that they are specific to the each robot, for example the computation of the geometrical model.

Warning
This class uses threading capabilities. Thus on Unix-like platforms, the libpthread third-party library need to be installed. On Windows, we use the native threading capabilities.

Definition at line 88 of file vpRobotSimulator.h.

Member Enumeration Documentation

Enumerator
CT_LINE 
CT_POINT 

Definition at line 227 of file vpWireFrameSimulator.h.

Robot control frames.

Enumerator
REFERENCE_FRAME 

Corresponds to a fixed reference frame attached to the robot structure.

ARTICULAR_FRAME 

Corresponds to the joint space.

CAMERA_FRAME 

Corresponds to a frame attached to the camera mounted on the robot end-effector.

MIXT_FRAME 

Corresponds to a "virtual" frame where translations are expressed in the reference frame, and rotations in the camera frame.

Definition at line 83 of file vpRobot.h.

Enumerator
MODEL_3D 
MODEL_DH 

Definition at line 93 of file vpRobotSimulator.h.

enum vpRobot::vpRobotStateType
inherited

Robot control states.

Enumerator
STATE_STOP 

Stops robot motion especially in velocity and acceleration control.

STATE_VELOCITY_CONTROL 

Initialize the velocity controller.

STATE_POSITION_CONTROL 

Initialize the position controller.

STATE_ACCELERATION_CONTROL 

Initialize the acceleration controller.

Definition at line 66 of file vpRobot.h.

Type of scene used to display the object at the desired pose (in the internal view).

  • D_STANDARD will use the vpSceneObject used to be the object at the current position.
  • D_OUTIL will display a tool which is attached to the camera.
Enumerator
D_STANDARD 
D_CIRCLE 
D_TOOL 

Definition at line 220 of file vpWireFrameSimulator.h.

Type of scene used to display the object at the current position.

Enumerator
THREE_PTS 
CUBE 
PLATE 
SMALL_PLATE 
RECTANGLE 
SQUARE_10CM 
DIAMOND 
TRAPEZOID 
THREE_LINES 
ROAD 
TIRE 
PIPE 
CIRCLE 
SPHERE 
CYLINDER 
PLAN 
POINT_CLOUD 

Definition at line 193 of file vpWireFrameSimulator.h.

Constructor & Destructor Documentation

vpRobotSimulator::~vpRobotSimulator ( )
virtual

Basic destructor

Definition at line 109 of file vpRobotSimulator.cpp.

Member Function Documentation

virtual void vpRobotSimulator::computeArticularVelocity ( )
protectedpure virtual

Compute the articular velocity relative to the velocity in another frame.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

void vpWireFrameSimulator::deleteCameraPositionHistory ( )
inlineinherited

Delete the history of the main camera position which are displayed in the external views.

Definition at line 529 of file vpWireFrameSimulator.h.

void vpWireFrameSimulator::display_scene ( Matrix  mat,
Bound_scene &  sc,
vpImage< vpRGBa > &  I,
vpColor  color 
)
protectedinherited
void vpWireFrameSimulator::display_scene ( Matrix  mat,
Bound_scene &  sc,
vpImage< unsigned char > &  I,
vpColor  color 
)
protectedinherited
void vpWireFrameSimulator::displayTrajectory ( vpImage< unsigned char > &  I,
const std::list< vpHomogeneousMatrix > &  list_cMo,
const std::list< vpHomogeneousMatrix > &  list_fMo,
const vpHomogeneousMatrix cMf 
)
inherited

Display a trajectory thanks to a list of homogeneous matrices which give the position of the camera relative to the object and the position of the object relative to the world refrence frame. The trajectory is projected into the view of an external camera whose position is given in parameter.

The two lists must have the same size of homogeneous matrices must have the same size.

Parameters
I: The image where the trajectory is displayed.
list_cMo: The homogeneous matrices list containing the position of the camera relative to the object.
list_fMo: The homogeneous matrices list containing the position of the object relative to the world reference frame.
cMf: A homogeneous matrix which gives the position of the external camera (used to project the trajectory) relative to the world refrence frame.

Definition at line 1689 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::camTrajColor, vpWireFrameSimulator::camTrajType, vpWireFrameSimulator::CT_LINE, vpWireFrameSimulator::CT_POINT, vpException::dimensionError, vpDisplay::displayLine(), vpDisplay::displayPoint(), vpWireFrameSimulator::projectCameraTrajectory(), and vpWireFrameSimulator::rotz.

void vpWireFrameSimulator::displayTrajectory ( vpImage< vpRGBa > &  I,
const std::list< vpHomogeneousMatrix > &  list_cMo,
const std::list< vpHomogeneousMatrix > &  list_fMo,
const vpHomogeneousMatrix cMf 
)
inherited

Display a trajectory thanks to a list of homogeneous matrices which give the position of the camera relative to the object and the position of the object relative to the world refrence frame. The trajectory is projected into the view of an external camera whose position is given in parameter.

The two lists must have the same size of homogeneous matrices must have the same size.

Parameters
I: The image where the trajectory is displayed.
list_cMo: The homogeneous matrices list containing the position of the camera relative to the object.
list_fMo: The homogeneous matrices list containing the position of the object relative to the world reference frame.
cMf: A homogeneous matrix which gives the position of the external camera (used to project the trajectory) relative to the world refrence frame.

Definition at line 1729 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::camTrajColor, vpWireFrameSimulator::camTrajType, vpWireFrameSimulator::CT_LINE, vpWireFrameSimulator::CT_POINT, vpException::dimensionError, vpDisplay::displayLine(), vpDisplay::displayPoint(), vpWireFrameSimulator::projectCameraTrajectory(), and vpWireFrameSimulator::rotz.

void vpWireFrameSimulator::displayTrajectory ( vpImage< unsigned char > &  I,
vpList< vpHomogeneousMatrix > &  list_cMo,
vpList< vpHomogeneousMatrix > &  list_fMo,
vpHomogeneousMatrix  cMf 
)
inherited
Deprecated:
This method is deprecated. You should use displayTrajectory(vpImage<unsigned char> &, const std::list<vpHomogeneousMatrix> &, const std::list<vpHomogeneousMatrix> &, const vpHomogeneousMatrix &); instead.

Display a trajectory thanks to a list of homogeneous matrices which give the position of the camera relative to the object and the position of the object relative to the world refrence frame. The trajectory is projected into the view of an external camera whose position is given in parameter.

The two lists must have the same size of homogeneous matrices must have the same size.

Parameters
I: The image where the trajectory is displayed.
list_cMo: The homogeneous matrices list containing the position of the camera relative to the object.
list_fMo: The homogeneous matrices list containing the position of the object relative to the world reference frame.
cMf: A homogeneous matrix which gives the position of the external camera (used to project the trajectory) relative to the world refrence frame.

Definition at line 1607 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::camTrajColor, vpWireFrameSimulator::camTrajType, vpWireFrameSimulator::CT_LINE, vpWireFrameSimulator::CT_POINT, vpException::dimensionError, vpDisplay::displayLine(), vpDisplay::displayPoint(), vpList< type >::front(), vpList< type >::nbElements(), vpList< type >::next(), vpList< type >::outside(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::rotz, and vpList< type >::value().

void vpWireFrameSimulator::displayTrajectory ( vpImage< vpRGBa > &  I,
vpList< vpHomogeneousMatrix > &  list_cMo,
vpList< vpHomogeneousMatrix > &  list_fMo,
vpHomogeneousMatrix  cMf 
)
inherited
Deprecated:
This method is deprecated. You should use displayTrajectory (vpImage<vpRGBa> &, const std::list<vpHomogeneousMatrix> &, const std::list<vpHomogeneousMatrix> &, const vpHomogeneousMatrix &); instead.

Display a trajectory thanks to a list of homogeneous matrices which give the position of the camera relative to the object and the position of the object relative to the world refrence frame. The trajectory is projected into the view of an external camera whose position is given in parameter.

The two lists must have the same size of homogeneous matrices must have the same size.

Parameters
I: The image where the trajectory is displayed.
list_cMo: The homogeneous matrices list containing the position of the camera relative to the object.
list_fMo: The homogeneous matrices list containing the position of the object relative to the world reference frame.
cMf: A homogeneous matrix which gives the position of the external camera (used to project the trajectory) relative to the world refrence frame.

Definition at line 1649 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::camTrajColor, vpWireFrameSimulator::camTrajType, vpWireFrameSimulator::CT_LINE, vpWireFrameSimulator::CT_POINT, vpException::dimensionError, vpDisplay::displayLine(), vpDisplay::displayPoint(), vpList< type >::front(), vpList< type >::nbElements(), vpList< type >::next(), vpList< type >::outside(), vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::rotz, and vpList< type >::value().

vpHomogeneousMatrix vpRobotSimulator::get_cMo ( )

Get the pose between the object and the robot's camera.

Returns
The pose between the object and the fixed world frame.

Definition at line 354 of file vpRobotSimulator.cpp.

References vpWireFrameSimulator::fMo, get_fMi(), vpHomogeneousMatrix::inverse(), and size_fMi.

Referenced by vpSimulatorAfma6::setPosition().

vpHomogeneousMatrix vpWireFrameSimulator::get_cMo ( ) const
inlineinherited

Get the pose between the object and the camera.

Returns
The pose between between the object and the camera.
Examples:
servoSimu4Points.cpp, and servoSimuCylinder.cpp.

Definition at line 490 of file vpWireFrameSimulator.h.

void vpWireFrameSimulator::get_cMo_History ( std::list< vpHomogeneousMatrix > &  cMo_history)
inlineinherited

Get the homogeneous matrices cMo stored to display the camera trajectory.

Parameters
cMo_history: The list of the homogeneous matrices cMo.

Definition at line 546 of file vpWireFrameSimulator.h.

vp_deprecated vpList<vpHomogeneousMatrix> vpWireFrameSimulator::get_cMo_History ( )
inlineinherited
Deprecated:
This method is deprecated. You should use get_cMo_History(std::list<vpHomogeneousMatrix> &) instead.

Get the homogeneous matrices cMo stored to display the camera trajectory.

Returns
Returns the list of the homogeneous matrices cMo.

Definition at line 612 of file vpWireFrameSimulator.h.

References vpList< type >::addRight().

bool vpRobotSimulator::get_displayBusy ( )
inlineprotected
virtual void vpRobotSimulator::get_eJe ( vpMatrix _eJe)
pure virtual

Get the robot Jacobian expressed in the end-effector frame

Implements vpRobot.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

virtual void vpRobotSimulator::get_fJe ( vpMatrix _fJe)
pure virtual

Get the robot Jacobian expressed in the robot reference frame

Implements vpRobot.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

virtual void vpRobotSimulator::get_fMi ( vpHomogeneousMatrix fMit)
protectedpure virtual

Get a table of poses between the reference frame and the frames you used to compute the Denavit-Hartenberg representation

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

Referenced by get_cMo(), and getInternalView().

vpHomogeneousMatrix vpRobotSimulator::get_fMo ( ) const
inline

Get the pose between the object and the fixed world frame.

Returns
The pose between the object and the fixed world frame.

Definition at line 290 of file vpRobotSimulator.h.

References vpWireFrameSimulator::fMo.

void vpWireFrameSimulator::get_fMo_History ( std::list< vpHomogeneousMatrix > &  fMo_history)
inlineinherited

Get the homogeneous matrices fMo stored to display the camera trajectory.

Parameters
fMo_history: The list of the homogeneous matrices fMo.

Definition at line 558 of file vpWireFrameSimulator.h.

vp_deprecated vpList<vpHomogeneousMatrix> vpWireFrameSimulator::get_fMo_History ( )
inlineinherited
Deprecated:
This method is deprecated. You should use get_fMo_History(std::list<vpHomogeneousMatrix> &) instead.

Get the homogeneous matrices fMo stored to display the camera trajectory.

Returns
Returns the list of the homogeneous matrices fMo.

Definition at line 597 of file vpWireFrameSimulator.h.

References vpList< type >::addRight().

vpColVector vpRobotSimulator::get_velocity ( )
inlineprotected
virtual void vpRobotSimulator::getArticularDisplacement ( vpColVector qdot)
pure virtual

Get the displacement expressed in the articular frame

Implements vpRobot.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

virtual void vpRobotSimulator::getCameraDisplacement ( vpColVector v)
pure virtual

Get the displacement expressed in the camera frame

Implements vpRobot.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

virtual void vpRobotSimulator::getDisplacement ( const vpRobot::vpControlFrameType  frame,
vpColVector q 
)
pure virtual

Get the displacement expressed in a frame you have to specified

Implements vpRobot.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

vpCameraParameters vpRobotSimulator::getExternalCameraParameters ( ) const
inline

Get the parameters of the virtual external camera.

Returns
It returns the camera parameters.

Definition at line 265 of file vpRobotSimulator.h.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpMath::maximum(), and vpMath::minimum().

vpCameraParameters vpWireFrameSimulator::getExternalCameraParameters ( const vpImage< vpRGBa > &  I) const
inlineinherited

Get the parameters of the virtual external camera.

Parameters
I: The image used to display the view of the camera.
Returns
It returns the camera parameters.

Definition at line 438 of file vpWireFrameSimulator.h.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpMath::maximum(), and vpMath::minimum().

Referenced by vpWireFrameSimulator::projectCameraTrajectory().

vpCameraParameters vpWireFrameSimulator::getExternalCameraParameters ( const vpImage< unsigned char > &  I) const
inlineinherited

Get the parameters of the virtual external camera.

Parameters
I: The image used to display the view of the camera.
Returns
It returns the camera parameters.

Definition at line 458 of file vpWireFrameSimulator.h.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpMath::maximum(), and vpMath::minimum().

vpHomogeneousMatrix vpRobotSimulator::getExternalCameraPosition ( ) const
inline

Get the external camera's position relative to the the world reference frame.

Returns
the main external camera position relative to the the world reference frame.

Definition at line 234 of file vpRobotSimulator.h.

References vpWireFrameSimulator::getExternalCameraPosition().

Referenced by vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

void vpWireFrameSimulator::getExternalImage ( vpImage< vpRGBa > &  I)
inherited

Get the external view. It corresponds to the view of the scene from a reference frame you have to set.

Parameters
I: The image where the external view is displayed.
Warning
: The objects are displayed thanks to overlays. The image I is not modified.
Examples:
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, and wireframeSimulator.cpp.

Definition at line 1112 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::camColor, vpWireFrameSimulator::camera, vpWireFrameSimulator::cameraTrajectory, vpWireFrameSimulator::camMf, vpWireFrameSimulator::camMf2, vpWireFrameSimulator::camTrajColor, vpWireFrameSimulator::camTrajType, vpWireFrameSimulator::cMo, vpWireFrameSimulator::CT_LINE, vpWireFrameSimulator::CT_POINT, vpWireFrameSimulator::CUBE, vpWireFrameSimulator::curColor, vpImage< Type >::display, vpDisplay::display(), vpWireFrameSimulator::display_scene(), vpWireFrameSimulator::displayCamera, vpWireFrameSimulator::displayCameraTrajectory, vpWireFrameSimulator::displayImageSimulator, vpDisplay::displayLine(), vpWireFrameSimulator::displayObject, vpDisplay::displayPoint(), vpWireFrameSimulator::extCamChanged, vpWireFrameSimulator::f2Mf, vpWireFrameSimulator::fMc, vpWireFrameSimulator::fMo, vpWireFrameSimulator::fMoList, vpImage< Type >::getHeight(), vpImageSimulator::getImage(), vpWireFrameSimulator::getInternalCameraParameters(), vpImage< Type >::getWidth(), vpHomogeneousMatrix::inverse(), vpMath::maximum(), vpMath::minimum(), vpWireFrameSimulator::navigation(), vpWireFrameSimulator::nbrPtLimit, vpWireFrameSimulator::objectImage, vpWireFrameSimulator::poseList, vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::px_ext, vpWireFrameSimulator::py_ext, vpWireFrameSimulator::rotz, vpWireFrameSimulator::scene, vpImageSimulator::setCameraPosition(), and vpWireFrameSimulator::SPHERE.

void vpWireFrameSimulator::getExternalImage ( vpImage< unsigned char > &  I)
inherited

Get the external view. It corresponds to the view of the scene from a reference frame you have to set.

Parameters
I: The image where the external view is displayed.
Warning
: The objects are displayed thanks to overlays. The image I is not modified.

Definition at line 1397 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::camColor, vpWireFrameSimulator::camera, vpWireFrameSimulator::cameraTrajectory, vpWireFrameSimulator::camMf, vpWireFrameSimulator::camMf2, vpWireFrameSimulator::camTrajColor, vpWireFrameSimulator::camTrajType, vpWireFrameSimulator::cMo, vpWireFrameSimulator::CT_LINE, vpWireFrameSimulator::CT_POINT, vpWireFrameSimulator::CUBE, vpWireFrameSimulator::curColor, vpImage< Type >::display, vpDisplay::display(), vpWireFrameSimulator::display_scene(), vpWireFrameSimulator::displayCamera, vpWireFrameSimulator::displayCameraTrajectory, vpWireFrameSimulator::displayImageSimulator, vpDisplay::displayLine(), vpWireFrameSimulator::displayObject, vpDisplay::displayPoint(), vpWireFrameSimulator::extCamChanged, vpWireFrameSimulator::f2Mf, vpWireFrameSimulator::fMc, vpWireFrameSimulator::fMo, vpWireFrameSimulator::fMoList, vpImage< Type >::getHeight(), vpImageSimulator::getImage(), vpWireFrameSimulator::getInternalCameraParameters(), vpImage< Type >::getWidth(), vpHomogeneousMatrix::inverse(), vpMath::maximum(), vpMath::minimum(), vpWireFrameSimulator::navigation(), vpWireFrameSimulator::nbrPtLimit, vpWireFrameSimulator::objectImage, vpWireFrameSimulator::poseList, vpWireFrameSimulator::projectCameraTrajectory(), vpWireFrameSimulator::px_ext, vpWireFrameSimulator::py_ext, vpWireFrameSimulator::rotz, vpWireFrameSimulator::scene, vpImageSimulator::setCameraPosition(), and vpWireFrameSimulator::SPHERE.

vpCameraParameters vpWireFrameSimulator::getInternalCameraParameters ( const vpImage< vpRGBa > &  I) const
inlineinherited

Get the parameters of the virtual internal camera.

Parameters
I: The image used to display the view of the camera.
Returns
It returns the camera parameters.

Definition at line 398 of file vpWireFrameSimulator.h.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpMath::maximum(), and vpMath::minimum().

Referenced by vpWireFrameSimulator::getExternalImage(), and vpWireFrameSimulator::getInternalImage().

vpCameraParameters vpWireFrameSimulator::getInternalCameraParameters ( const vpImage< unsigned char > &  I) const
inlineinherited

Get the parameters of the virtual internal camera.

Parameters
I: The image used to display the view of the camera.
Returns
It returns the camera parameters.

Definition at line 418 of file vpWireFrameSimulator.h.

References vpImage< Type >::getHeight(), vpImage< Type >::getWidth(), vpMath::maximum(), and vpMath::minimum().

double vpRobot::getMaxRotationVelocity ( void  ) const
inherited
double vpRobot::getMaxTranslationVelocity ( void  ) const
inherited

Get the maximal translation velocity that can be sent to the robot during a velocity control.

Returns
Maximum translation velocity expressed in m/s.

Definition at line 208 of file vpRobot.cpp.

Referenced by vpSimulatorAfma6::setPosition(), vpRobotPioneer::setVelocity(), vpSimulatorAfma6::setVelocity(), vpSimulatorViper850::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), and vpRobotViper850::setVelocity().

virtual void vpRobot::getPosition ( const vpRobot::vpControlFrameType  frame,
vpColVector q 
)
pure virtualinherited

Get the robot position (frame has to be specified).

Implemented in vpRobotViper850, vpRobotAfma6, vpSimulatorViper850, vpRobotAfma4, vpSimulatorAfma6, vpRobotBiclops, vpRobotPtu46, vpRobotCamera, and vpRobotTemplate.

vpColVector vpRobot::getPosition ( const vpRobot::vpControlFrameType  frame)
inherited

Return the robot position (frame has to be specified).

Recupere la position actuelle du robot. Recupere la position actuelle du robot et renvoie le resultat Le repere de travail dans lequel est exprime le resultat est celui donne par la variable repere. INPUT:

  • repere: repere de travail dans lequel est exprime le resultat. OUTPUT:
  • Position actuelle du robot.

Definition at line 176 of file vpRobot.cpp.

vpControlFrameType vpRobot::getRobotFrame ( void  )
inlineinherited
virtual void vpRobotSimulator::getVelocity ( const vpRobot::vpControlFrameType  frame,
vpColVector q 
)
pure virtual

Get the velocity of the robot. The velocity is given relative to a frame you have to choose.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

void vpRobotSimulator::init ( void  )
inlineprotectedvirtual

Implements vpRobot.

Reimplemented in vpSimulatorViper850, and vpSimulatorAfma6.

Definition at line 354 of file vpRobotSimulator.h.

virtual void vpRobotSimulator::initArms ( )
protectedpure virtual

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

void vpRobotSimulator::initDisplay ( )
inlineprotected

Definition at line 363 of file vpRobotSimulator.h.

void vpRobotSimulator::initScene ( vpSceneObject  obj,
vpSceneDesiredObject  desiredObject 
)

Initialize the display. It enables to choose the type of scene which will be used to display the object at the current position and at the desired position.

It exists several default scenes you can use. Use the vpSceneObject and the vpSceneDesiredObject attributes to use them in this method. The corresponding files are stored in the "data" folder which is in the ViSP build directory.

Parameters
obj: Type of scene used to display the object at the current position.
desiredObject: Type of scene used to display the object at the desired pose (in the internal view).
Examples:
servoMomentPoints.cpp, and servoMomentPolygon.cpp.

Definition at line 123 of file vpRobotSimulator.cpp.

References vpWireFrameSimulator::camera, vpWireFrameSimulator::displayCamera, and vpWireFrameSimulator::initScene().

void vpRobotSimulator::initScene ( const char *  obj,
const char *  desiredObject 
)

Initialize the display. It enables to choose the type of scene which will be used to display the object at the current position and at the desired position.

Here you can use the scene you want. You have to set the path to the .bnd file which is a scene file. It is also possible to use a vrml (.wrl) file.

Parameters
obj: Path to the scene file you want to use.
desiredObject: Path to the scene file you want to use.

Definition at line 146 of file vpRobotSimulator.cpp.

References vpWireFrameSimulator::camera, vpWireFrameSimulator::displayCamera, and vpWireFrameSimulator::initScene().

void vpRobotSimulator::initScene ( vpSceneObject  obj)

Initialize the display. It enables to choose the type of object which will be used to display the object at the current position. The object at the desired position is not displayed.

It exists several default scenes you can use. Use the vpSceneObject attributes to use them in this method. The corresponding files are stored in the "data" folder which is in the ViSP build directory.

Parameters
obj: Type of scene used to display the object at the current position.

Definition at line 167 of file vpRobotSimulator.cpp.

References vpWireFrameSimulator::camera, vpWireFrameSimulator::displayCamera, and vpWireFrameSimulator::initScene().

void vpRobotSimulator::initScene ( const char *  obj)

Initialize the display. It enables to choose the type of scene which will be used to display the object at the current position. The object at the desired position is not displayed.

Here you can use the scene you want. You have to set the path to the .bnd file which is a scene file, or the vrml file.

Parameters
obj: Path to the scene file you want to use.

Definition at line 188 of file vpRobotSimulator.cpp.

References vpWireFrameSimulator::camera, vpWireFrameSimulator::displayCamera, and vpWireFrameSimulator::initScene().

void vpWireFrameSimulator::initScene ( vpSceneObject  obj,
vpSceneDesiredObject  desiredObject,
const std::list< vpImageSimulator > &  imObj 
)
inherited

Initialize the simulator. It enables to choose the type of scene which will be used to display the object at the current position and at the desired position.

It exists several default scenes you can use. Use the vpSceneObject and the vpSceneDesiredObject attributes to use them in this method. The corresponding files are stored in the "data" folder which is in the ViSP build directory.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Type of scene used to display the object at the current position.
desiredObject: Type of scene used to display the object at the desired pose (in the internal view).
imObj: A list of vpImageSimulator instances.

Definition at line 725 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpWireFrameSimulator::initScene(), and vpWireFrameSimulator::objectImage.

void vpWireFrameSimulator::initScene ( const char *  obj,
const char *  desiredObject,
const std::list< vpImageSimulator > &  imObj 
)
inherited

Initialize the simulator. It enables to choose the type of scene which will be used to display the object at the current position and at the desired position.

Here you can use the scene you want. You have to set the path to a .bnd or a .wrl file which is a 3D model file.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Path to the scene file you want to use.
desiredObject: Path to the scene file you want to use.
imObj: A list of vpImageSimulator instances.

Definition at line 831 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpWireFrameSimulator::initScene(), and vpWireFrameSimulator::objectImage.

void vpWireFrameSimulator::initScene ( vpSceneObject  obj,
const std::list< vpImageSimulator > &  imObj 
)
inherited

Initialize the simulator. It enables to choose the type of object which will be used to display the object at the current position. The object at the desired position is not displayed.

It exists several default scenes you can use. Use the vpSceneObject attributes to use them in this method. The corresponding files are stored in the "data" folder which is in the ViSP build directory.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Type of scene used to display the object at the current position.
imObj: A list of vpImageSimulator instances.

Definition at line 930 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpWireFrameSimulator::initScene(), and vpWireFrameSimulator::objectImage.

void vpWireFrameSimulator::initScene ( const char *  obj,
const std::list< vpImageSimulator > &  imObj 
)
inherited

Initialize the simulator. It enables to choose the type of scene which will be used to display the object at the current position. The object at the desired position is not displayed.

Here you can use the scene you want. You have to set the path to a .bnd or a .wrl file which is a 3D model file.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Path to the scene file you want to use.
imObj: A list of vpImageSimulator instances.

Definition at line 1019 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpWireFrameSimulator::initScene(), and vpWireFrameSimulator::objectImage.

void vpWireFrameSimulator::initScene ( vpSceneObject  obj,
vpSceneDesiredObject  desiredObject,
vpList< vpImageSimulator > &  imObj 
)
inherited
Deprecated:
This method is deprecated. You should use initScene(vpSceneObject, vpSceneDesiredObject, const std::list<vpImageSimulator> &) instead.

Initialize the simulator. It enables to choose the type of scene which will be used to display the object at the current position and at the desired position.

It exists several default scenes you can use. Use the vpSceneObject and the vpSceneDesiredObject attributes to use them in this method. The corresponding files are stored in the "data" folder which is in the ViSP build directory.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Type of scene used to display the object at the current position.
desiredObject: Type of scene used to display the object at the desired pose (in the internal view).
imObj: A list of vpImageSimulator instances.

Definition at line 701 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpList< type >::front(), vpWireFrameSimulator::initScene(), vpList< type >::next(), vpWireFrameSimulator::objectImage, vpList< type >::outside(), and vpList< type >::value().

void vpWireFrameSimulator::initScene ( const char *  obj,
const char *  desiredObject,
vpList< vpImageSimulator > &  imObj 
)
inherited
Deprecated:
This method is deprecated. You should use initScene(const char*, const char*, const std::list<vpImageSimulator> &) instead.

Initialize the simulator. It enables to choose the type of scene which will be used to display the object at the current position and at the desired position.

Here you can use the scene you want. You have to set the path to a .bnd or a .wrl file which is a 3D model file.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Path to the scene file you want to use.
desiredObject: Path to the scene file you want to use.
imObj: A list of vpImageSimulator instances.

Definition at line 807 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpList< type >::front(), vpWireFrameSimulator::initScene(), vpList< type >::next(), vpWireFrameSimulator::objectImage, vpList< type >::outside(), and vpList< type >::value().

void vpWireFrameSimulator::initScene ( vpSceneObject  obj,
vpList< vpImageSimulator > &  imObj 
)
inherited
Deprecated:
This method is deprecated. You should use initScene(vpSceneObject, const std::list<vpImageSimulator> &) instead.

Initialize the simulator. It enables to choose the type of object which will be used to display the object at the current position. The object at the desired position is not displayed.

It exists several default scenes you can use. Use the vpSceneObject attributes to use them in this method. The corresponding files are stored in the "data" folder which is in the ViSP build directory.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Type of scene used to display the object at the current position.
imObj: A list of vpImageSimulator instances.

Definition at line 907 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpList< type >::front(), vpWireFrameSimulator::initScene(), vpList< type >::next(), vpWireFrameSimulator::objectImage, vpList< type >::outside(), and vpList< type >::value().

void vpWireFrameSimulator::initScene ( const char *  obj,
vpList< vpImageSimulator > &  imObj 
)
inherited
Deprecated:
This method is deprecated. You should use initScene(const char*, const std::list<vpImageSimulator> &) instead.

Initialize the simulator. It enables to choose the type of scene which will be used to display the object at the current position. The object at the desired position is not displayed.

Here you can use the scene you want. You have to set the path to a .bnd or a .wrl file which is a 3D model file.

It is also possible to add a list of vpImageSimulator instances. They will be automatically projected into the image. The position of the four corners have to be given in the object frame.

Parameters
obj: Path to the scene file you want to use.
imObj: A list of vpImageSimulator instances.

Definition at line 996 of file vpWireFrameSimulator.cpp.

References vpWireFrameSimulator::displayImageSimulator, vpList< type >::front(), vpWireFrameSimulator::initScene(), vpList< type >::next(), vpWireFrameSimulator::objectImage, vpList< type >::outside(), and vpList< type >::value().

virtual int vpRobotSimulator::isInJointLimit ( )
protectedpure virtual

Method used to check if the robot reached a joint limit.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

static DWORD WINAPI vpRobotSimulator::launcher ( LPVOID  lpParam)
inlinestaticprotected

Function used to launch the thread which moves the robot.

Definition at line 339 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::vpSimulatorAfma6(), and vpSimulatorViper850::vpSimulatorViper850().

vpImagePoint vpWireFrameSimulator::projectCameraTrajectory ( vpImage< unsigned char > &  I,
vpHomogeneousMatrix  cMo,
vpHomogeneousMatrix  fMo 
)
protectedinherited
vpImagePoint vpWireFrameSimulator::projectCameraTrajectory ( vpImage< vpRGBa > &  I,
vpHomogeneousMatrix  cMo,
vpHomogeneousMatrix  fMo,
vpHomogeneousMatrix  cMf 
)
protectedinherited
vpImagePoint vpWireFrameSimulator::projectCameraTrajectory ( vpImage< unsigned char > &  I,
vpHomogeneousMatrix  cMo,
vpHomogeneousMatrix  fMo,
vpHomogeneousMatrix  cMf 
)
protectedinherited
vpColVector vpRobot::saturateVelocities ( const vpColVector v_in,
const vpColVector v_max,
bool  verbose = false 
)
staticinherited

Saturate velocities.

Parameters
v_in: Vector of input velocities to saturate. Translation velocities should be expressed in m/s while rotation velocities in rad/s.
v_max: Vector of maximal allowed velocities. Maximal translation velocities should be expressed in m/s while maximal rotation velocities in rad/s.
verbose: Print a message indicating which axis causes the saturation.
Returns
Saturated velocities.
Exceptions
vpRobotException::dimensionError: If the input vectors have different dimensions.

The code below shows how to use this static method in order to saturate a velocity skew vector.

#include <iostream>
#include <visp/vpRobot.h>
int main()
{
// Set a velocity skew vector
v[0] = 0.1; // vx in m/s
v[1] = 0.2; // vy
v[2] = 0.3; // vz
v[3] = vpMath::rad(10); // wx in rad/s
v[4] = vpMath::rad(-10); // wy
v[5] = vpMath::rad(20); // wz
// Set the maximal allowed velocities
vpColVector v_max(6);
for (int i=0; i<3; i++)
v_max[i] = 0.3; // in translation (m/s)
for (int i=3; i<6; i++)
v_max[i] = vpMath::rad(10); // in rotation (rad/s)
// Compute the saturated velocity skew vector
vpColVector v_sat = vpRobot::saturateVelocities(v, v_max, true);
std::cout << "v : " << v.t() << std::endl;
std::cout << "v max: " << v_max.t() << std::endl;
std::cout << "v sat: " << v_sat.t() << std::endl;
return 0;
}

Definition at line 114 of file vpRobot.cpp.

References vpException::dimensionError, and vpColVector::size().

Referenced by vpRobotPioneer::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), and vpRobotViper850::setVelocity().

void vpRobotSimulator::set_displayBusy ( const bool &  status)
inlineprotected
void vpRobotSimulator::set_fMo ( const vpHomogeneousMatrix fMo)
inline

Set the pose between the object and the fixed world frame.

Parameters
fMo: The pose between the object and the fixed world frame.

Definition at line 283 of file vpRobotSimulator.h.

References vpWireFrameSimulator::fMo.

void vpRobotSimulator::setCameraColor ( const vpColor  col)
inline

Set the color used to display the camera in the external view.

Parameters
col: The desired color.

Definition at line 244 of file vpRobotSimulator.h.

void vpWireFrameSimulator::setCameraPositionRelObj ( const vpHomogeneousMatrix  cMo)
inlineinherited

Set the position of the camera relative to the object.

Parameters
cMo: The pose of the camera.
Examples:
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, and wireframeSimulator.cpp.

Definition at line 316 of file vpWireFrameSimulator.h.

References vpHomogeneousMatrix::inverse().

void vpWireFrameSimulator::setCameraPositionRelWorld ( const vpHomogeneousMatrix  fMc)
inlineinherited

Set the position of the the world reference frame relative to the camera.

Parameters
fMc: The pose of the camera.

Definition at line 323 of file vpWireFrameSimulator.h.

References vpHomogeneousMatrix::inverse().

void vpWireFrameSimulator::setCameraSizeFactor ( const float  factor)
inlineinherited

Set the parameter which enables to choose the size of the main camera in the external camera views. By default this parameter is set to 1.

Parameters
factor: The ration for the camera size.

Definition at line 524 of file vpWireFrameSimulator.h.

void vpWireFrameSimulator::setCameraTrajectoryColor ( const vpColor  col)
inlineinherited

Set the color used to display the camera trajectory in the external view.

Parameters
col: The desired color.

Definition at line 366 of file vpWireFrameSimulator.h.

void vpWireFrameSimulator::setCameraTrajectoryDisplayType ( const vpCameraTrajectoryDisplayType  camTrajType)
inlineinherited

Set the way to display the history of the main camera trajectory in the main external view. The choice is given between displaying lines and points.

Parameters
camTrajType: The chosen way to display the camera trajectory.

Definition at line 539 of file vpWireFrameSimulator.h.

void vpRobotSimulator::setConstantSamplingTimeMode ( const bool  _constantSamplingTimeMode)
inline

Set the flag used to force the sampling time in the thread computing the robot's displacement to a constant value (samplingTime). It may be useful if the main thread (computing the features) is very time consuming. False by default.

Parameters
_constantSamplingTimeMode: The new value of the constantSamplingTimeMode flag.
Examples:
servoMomentPoints.cpp.

Definition at line 313 of file vpRobotSimulator.h.

void vpRobotSimulator::setCurrentViewColor ( const vpColor  col)
inline

Set the color used to display the object at the current position in the robot's camera view.

Parameters
col: The desired color.
Examples:
servoMomentPoints.cpp, and servoMomentPolygon.cpp.

Definition at line 251 of file vpRobotSimulator.h.

void vpRobotSimulator::setDesiredCameraPosition ( const vpHomogeneousMatrix  cdMo)
inline

Set the desired position of the robot's camera relative to the object.

Parameters
cdMo: The desired pose of the camera.
Examples:
servoMomentPoints.cpp, and servoMomentPolygon.cpp.

Definition at line 214 of file vpRobotSimulator.h.

References vpWireFrameSimulator::setDesiredCameraPosition().

void vpRobotSimulator::setDesiredViewColor ( const vpColor  col)
inline

Set the color used to display the object at the desired position in the robot's camera view.

Parameters
col: The desired color.
Examples:
servoMomentPoints.cpp, and servoMomentPolygon.cpp.

Definition at line 258 of file vpRobotSimulator.h.

void vpWireFrameSimulator::setDisplayCameraTrajectory ( const bool  displayCameraTrajectory)
inlineinherited

Enable or disable the displaying of the camera trajectory in the main external camera view.

By default the trajectory is displayed.

Parameters
displayCameraTrajectory: Set to true to display the camera trajectory.

Definition at line 389 of file vpWireFrameSimulator.h.

void vpRobotSimulator::setDisplayRobotType ( const vpDisplayRobotType  dispType)
inline

Set the way to draw the robot. Depending on what you choose you can display a 3D wireframe model or a set of lines linking the frames used to compute the geometrical model.

Parameters
dispType: Type of display. Can be MODEL_3D or MODEL_DH.

Definition at line 297 of file vpRobotSimulator.h.

void vpWireFrameSimulator::setExternalCameraParameters ( const vpCameraParameters  cam)
inlineinherited

Set the internal camera parameters.

Parameters
cam: The desired camera parameters.
Examples:
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, and wireframeSimulator.cpp.

Definition at line 507 of file vpWireFrameSimulator.h.

References vpCameraParameters::get_px(), and vpCameraParameters::get_py().

Referenced by vpSimulatorAfma6::initDisplay(), and vpSimulatorViper850::initDisplay().

void vpRobotSimulator::setExternalCameraPosition ( const vpHomogeneousMatrix  camMf)
inline

Set the external camera point of view.

Parameters
camMf: The pose of the external camera relative to the world reference frame.

Definition at line 224 of file vpRobotSimulator.h.

References vpWireFrameSimulator::setExternalCameraPosition().

Referenced by vpSimulatorAfma6::initDisplay(), and vpSimulatorViper850::initDisplay().

void vpWireFrameSimulator::setInternalCameraParameters ( const vpCameraParameters  cam)
inlineinherited

Set the internal camera parameters.

Parameters
cam: The desired camera parameters.
Examples:
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, and wireframeSimulator.cpp.

Definition at line 497 of file vpWireFrameSimulator.h.

References vpCameraParameters::get_px(), and vpCameraParameters::get_py().

void vpRobot::setMaxRotationVelocity ( const double  maxVr)
inherited

Set the maximal rotation velocity that can be sent to the robot during a velocity control.

Parameters
maxVr: Maximum rotation velocity expressed in rad/s.
Examples:
servoMomentPoints.cpp.

Definition at line 220 of file vpRobot.cpp.

Referenced by vpSimulatorAfma6::setPosition().

void vpRobot::setMaxTranslationVelocity ( const double  maxVt)
inherited

Set the maximal translation velocity that can be sent to the robot during a velocity control.

Parameters
maxVt: Maximum translation velocity expressed in m/s.
Examples:
servoMomentPoints.cpp.

Definition at line 196 of file vpRobot.cpp.

Referenced by vpSimulatorAfma6::setPosition().

void vpWireFrameSimulator::setNbPtTrajectory ( const unsigned int  nbPt)
inlineinherited

Set the maximum number of main camera's positions which are stored. Those position can be displayed in the external camera field of view. By default this parameter is set to 1000.

Parameters
nbPt: The desired number of position which are saved.

Definition at line 517 of file vpWireFrameSimulator.h.

virtual void vpRobot::setPosition ( const vpRobot::vpControlFrameType  frame,
const vpColVector q 
)
pure virtualinherited

Set a displacement (frame has to be specified) in position control.

Implemented in vpRobotViper850, vpRobotAfma6, vpRobotAfma4, vpSimulatorViper850, vpSimulatorAfma6, vpRobotBiclops, vpRobotPtu46, vpRobotCamera, and vpRobotTemplate.

void vpRobotSimulator::setSamplingTime ( const float  _samplingTime)
inline

Set the sampling time for the thread which compute the robot displacements

Warning
Due to hardware limitation, it is not possible to have a very small sampling time (see vpTime::minTimeForUsleepCall)
Parameters
_samplingTime: The new value of the sampling time in ms.

Definition at line 325 of file vpRobotSimulator.h.

References vpTime::minTimeForUsleepCall.

void vpRobotSimulator::setSingularityManagement ( const bool  sm)
inline

Set the parameter which enable or disable the singularity mangement

Definition at line 200 of file vpRobotSimulator.h.

virtual void vpRobotSimulator::setVelocity ( const vpRobot::vpControlFrameType  ,
const vpColVector  
)
pure virtual

Set the velocity of the robot. The velocity is given relative to a frame you have to choose.

Implements vpRobot.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

virtual void vpRobotSimulator::updateArticularPosition ( )
protectedpure virtual

Method lauched by the thread to compute the position of the robot in the articular frame.

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

Member Data Documentation

vpColVector vpRobotSimulator::artCoord
protected

The articular coordinates

Definition at line 119 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::init(), and vpSimulatorViper850::init().

vpColVector vpRobotSimulator::artVel
protected

The articular velocity

Definition at line 121 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::init(), and vpSimulatorViper850::init().

bool vpWireFrameSimulator::blocked
protectedinherited
bool vpWireFrameSimulator::blockedr
protectedinherited
bool vpWireFrameSimulator::blockedt
protectedinherited
bool vpWireFrameSimulator::blockedz
protectedinherited
float vpWireFrameSimulator::cameraFactor
protectedinherited
std::list<vpImagePoint> vpWireFrameSimulator::cameraTrajectory
protectedinherited
vpColor vpWireFrameSimulator::camTrajColor
protectedinherited
vpHomogeneousMatrix vpWireFrameSimulator::cdMo
protectedinherited
bool vpRobotSimulator::constantSamplingTimeMode
protected

Flag used to force the sampling time in the thread computing the robot's displacement to a constant value (samplingTime). It may be useful if the main thread (computing the features) is very time consumming. False by default.

Definition at line 172 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), and vpRobotSimulator().

const vpRobot::vpRobotStateType vpRobot::defaultEtatRobot = vpRobot::STATE_STOP
staticinherited

valeur utilisee par default pour l'etat du robot a la construction.

Definition at line 78 of file vpRobot.h.

const vpRobot::vpControlFrameType vpRobot::defaultFrameRobot = vpRobot::CAMERA_FRAME
staticinherited

Definition at line 97 of file vpRobot.h.

vpColor vpWireFrameSimulator::desColor
protectedinherited
vpSceneDesiredObject vpWireFrameSimulator::desiredObject
protectedinherited
Bound_scene vpWireFrameSimulator::desiredScene
protectedinherited
vpDisplayX vpRobotSimulator::display
protected

Definition at line 157 of file vpRobotSimulator.h.

Referenced by vpRobotSimulator().

bool vpRobotSimulator::displayAllowed
protected
bool vpRobotSimulator::displayBusy
protected

Definition at line 142 of file vpRobotSimulator.h.

Referenced by vpRobotSimulator().

bool vpWireFrameSimulator::displayCameraTrajectory
protectedinherited
bool vpWireFrameSimulator::displayImageSimulator
protectedinherited
int vpRobot::eJeAvailable
protectedinherited

is the robot Jacobian expressed in the end-effector frame available

Definition at line 115 of file vpRobot.h.

bool vpWireFrameSimulator::extCamChanged
protectedinherited
vpMatrix vpRobot::fJe
protectedinherited

robot Jacobian expressed in the robot reference frame available

Definition at line 117 of file vpRobot.h.

Referenced by vpSimulatorAfma6::computeArticularVelocity(), vpSimulatorViper850::computeArticularVelocity(), vpSimulatorAfma6::getVelocity(), and vpSimulatorViper850::getVelocity().

int vpRobot::fJeAvailable
protectedinherited

is the robot Jacobian expressed in the robot reference frame available

Definition at line 119 of file vpRobot.h.

vpHomogeneousMatrix* vpRobotSimulator::fMi
protected

Table containing all the homogeneous matrices between the reference frame of the robot and the frames you used to compute the Denavit-Hartenberg representation

If you use a camera at the end of the effector, the last homogeneous matrix has to be the one between the reference frame and the camera frame (fMc)

Definition at line 116 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::compute_fMi(), vpSimulatorViper850::compute_fMi(), vpSimulatorAfma6::init(), vpSimulatorViper850::init(), vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), vpSimulatorAfma6::~vpSimulatorAfma6(), and vpSimulatorViper850::~vpSimulatorViper850().

std::list<vpHomogeneousMatrix> vpWireFrameSimulator::fMoList
protectedinherited
unsigned int vpRobotSimulator::jointLimitArt
protected

Index of the joint which is in limit

Definition at line 149 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

double vpRobot::maxRotationVelocity
protectedinherited

Definition at line 107 of file vpRobot.h.

const double vpRobot::maxRotationVelocityDefault = 0.7
staticprotectedinherited

Definition at line 108 of file vpRobot.h.

double vpRobot::maxTranslationVelocity
protectedinherited

Definition at line 105 of file vpRobot.h.

const double vpRobot::maxTranslationVelocityDefault = 0.2
staticprotectedinherited

Definition at line 106 of file vpRobot.h.

unsigned int vpWireFrameSimulator::nbrPtLimit
protectedinherited
int vpRobot::nDof
protectedinherited

number of degrees of freedom

Definition at line 111 of file vpRobot.h.

vpSceneObject vpWireFrameSimulator::object
protectedinherited

Definition at line 248 of file vpWireFrameSimulator.h.

vpImagePoint vpWireFrameSimulator::old_iPr
protectedinherited
vpImagePoint vpWireFrameSimulator::old_iPt
protectedinherited
vpImagePoint vpWireFrameSimulator::old_iPz
protectedinherited
std::list<vpHomogeneousMatrix> vpWireFrameSimulator::poseList
protectedinherited
vpHomogeneousMatrix vpWireFrameSimulator::refMo
protectedinherited

Definition at line 244 of file vpWireFrameSimulator.h.

float vpRobotSimulator::samplingTime
protected

sampling time for the thread which manages the movement of the robot

Definition at line 102 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::updateArticularPosition(), vpSimulatorViper850::updateArticularPosition(), and vpRobotSimulator().

bool vpRobotSimulator::setVelocityCalled
protected
bool vpRobotSimulator::singularityManagement
protected

True if the singularity are automatically managed

Definition at line 151 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::computeArticularVelocity(), vpSimulatorViper850::computeArticularVelocity(), and vpRobotSimulator().

unsigned int vpRobotSimulator::size_fMi
protected

Size of the fMi table

Definition at line 112 of file vpRobotSimulator.h.

Referenced by get_cMo(), getInternalView(), vpSimulatorAfma6::init(), and vpSimulatorViper850::init().

double vpRobotSimulator::tcur
protected
double vpRobotSimulator::tprev
protected

cpu time at the end of the last robot's movement

Definition at line 106 of file vpRobotSimulator.h.

Referenced by vpSimulatorAfma6::updateArticularPosition(), and vpSimulatorViper850::updateArticularPosition().

vpColVector vpRobotSimulator::velocity
protected