Visual Servoing Platform  version 3.6.1 under development (2024-10-01)

#include <visp3/robot/vpRobotWireFrameSimulator.h>

+ Inheritance diagram for vpRobotWireFrameSimulator:

Public Types

enum  vpDisplayRobotType { MODEL_3D , MODEL_DH }
 
enum  vpRobotStateType {
  STATE_STOP , STATE_VELOCITY_CONTROL , STATE_POSITION_CONTROL , STATE_ACCELERATION_CONTROL ,
  STATE_FORCE_TORQUE_CONTROL
}
 
enum  vpControlFrameType {
  REFERENCE_FRAME , ARTICULAR_FRAME , JOINT_STATE = ARTICULAR_FRAME , END_EFFECTOR_FRAME ,
  CAMERA_FRAME , TOOL_FRAME = CAMERA_FRAME , MIXT_FRAME
}
 

Public Member Functions

 vpRobotWireFrameSimulator ()
 
VP_EXPLICIT vpRobotWireFrameSimulator (bool display)
 
Inherited functionalities from vpRobotWireFrameSimulator
vpCameraParameters getExternalCameraParameters () const
 
vpHomogeneousMatrix getExternalCameraPosition () const
 
void getInternalView (vpImage< vpRGBa > &I)
 
void getInternalView (vpImage< unsigned char > &I)
 
vpHomogeneousMatrix get_cMo ()
 
vpHomogeneousMatrix get_fMo () const
 
void initScene (const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject)
 
void initScene (const char *obj, const char *desiredObject)
 
void initScene (const vpSceneObject &obj)
 
void initScene (const char *obj)
 
void setCameraColor (const vpColor &col)
 
void setConstantSamplingTimeMode (const bool _constantSamplingTimeMode)
 
void setCurrentViewColor (const vpColor &col)
 
void setDesiredViewColor (const vpColor &col)
 
void setDesiredCameraPosition (const vpHomogeneousMatrix &cdMo_)
 
void setDisplayRobotType (const vpDisplayRobotType dispType)
 
void setExternalCameraPosition (const vpHomogeneousMatrix &camMf_)
 
void setGraphicsThickness (unsigned int thickness)
 
void setSamplingTime (const double &delta_t)
 
void setSingularityManagement (bool sm)
 
void setVerbose (bool verbose)
 
void set_fMo (const vpHomogeneousMatrix &fMo_)
 
Inherited functionalities from vpRobotSimulator
double getSamplingTime () const
 
Inherited functionalities from vpRobot
virtual void get_eJe (vpMatrix &_eJe)=0
 
virtual void get_fJe (vpMatrix &_fJe)=0
 
virtual void getDisplacement (const vpRobot::vpControlFrameType frame, vpColVector &q)=0
 
double getMaxTranslationVelocity (void) const
 
double getMaxRotationVelocity (void) const
 
int getNDof () const
 
virtual void getPosition (const vpRobot::vpControlFrameType frame, vpColVector &position)=0
 
vpColVector getPosition (const vpRobot::vpControlFrameType frame)
 
virtual vpRobotStateType getRobotState (void) const
 
virtual void init ()=0
 
void setMaxRotationVelocity (double maxVr)
 
void setMaxTranslationVelocity (double maxVt)
 
virtual void setPosition (const vpRobot::vpControlFrameType frame, const vpColVector &q)=0
 
virtual vpRobotStateType setRobotState (const vpRobot::vpRobotStateType newState)
 
virtual void setVelocity (const vpRobot::vpControlFrameType frame, const vpColVector &vel)=0
 

Static Public Member Functions

Static Public Member Functions inherited from vpRobot
static vpColVector saturateVelocities (const vpColVector &v_in, const vpColVector &v_max, bool verbose=false)
 

Public Attributes

vpImage< vpRGBaI
 

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

Inherited functionalities from vpWireFrameSimulator
void deleteCameraPositionHistory ()
 
void displayTrajectory (const vpImage< unsigned char > &I, const std::list< vpHomogeneousMatrix > &list_cMo, const std::list< vpHomogeneousMatrix > &list_fMo, const vpHomogeneousMatrix &camMf)
 
void displayTrajectory (const vpImage< vpRGBa > &I, const std::list< vpHomogeneousMatrix > &list_cMo, const std::list< vpHomogeneousMatrix > &list_fMo, const vpHomogeneousMatrix &camMf)
 
vpCameraParameters getExternalCameraParameters (const vpImage< unsigned char > &I) const
 
vpCameraParameters getExternalCameraParameters (const vpImage< vpRGBa > &I) const
 
void getExternalImage (vpImage< unsigned char > &I)
 
void getExternalImage (vpImage< unsigned char > &I, const vpHomogeneousMatrix &camMf)
 
void getExternalImage (vpImage< vpRGBa > &I)
 
void getExternalImage (vpImage< vpRGBa > &I, const vpHomogeneousMatrix &camMf)
 
vpCameraParameters getInternalCameraParameters (const vpImage< unsigned char > &I) const
 
vpCameraParameters getInternalCameraParameters (const vpImage< vpRGBa > &I) const
 
void getInternalImage (vpImage< unsigned char > &I)
 
void getInternalImage (vpImage< vpRGBa > &I)
 
vpHomogeneousMatrix get_cMo () const
 
void get_cMo_History (std::list< vpHomogeneousMatrix > &cMo_history)
 
void get_fMo_History (std::list< vpHomogeneousMatrix > &fMo_history)
 
void initScene (const vpSceneObject &obj, const vpSceneDesiredObject &desiredObject, const std::list< vpImageSimulator > &imObj)
 
void initScene (const char *obj, const char *desiredObject, const std::list< vpImageSimulator > &imObj)
 
void initScene (const 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 setCameraSizeFactor (float factor)
 
void setCameraTrajectoryColor (const vpColor &col)
 
void setCameraTrajectoryDisplayType (const vpCameraTrajectoryDisplayType &camTraj_type)
 
void setDisplayCameraTrajectory (const bool &do_display)
 
void setExternalCameraParameters (const vpCameraParameters &cam)
 
void setInternalCameraParameters (const vpCameraParameters &cam)
 
void setNbPtTrajectory (unsigned int nbPt)
 
Protected Member Functions Inherited from vpWireFrameSimulator
void display_scene (Matrix mat, Bound_scene &sc, const vpImage< vpRGBa > &I, const vpColor &color)
 
void display_scene (Matrix mat, Bound_scene &sc, const vpImage< unsigned char > &I, const vpColor &color)
 
vpHomogeneousMatrix navigation (const vpImage< vpRGBa > &I, bool &changed)
 
vpHomogeneousMatrix navigation (const vpImage< unsigned char > &I, bool &changed)
 
vpImagePoint projectCameraTrajectory (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpHomogeneousMatrix &fMo)
 
vpImagePoint projectCameraTrajectory (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpHomogeneousMatrix &fMo)
 
vpImagePoint projectCameraTrajectory (const vpImage< vpRGBa > &I, const vpHomogeneousMatrix &cMo, const vpHomogeneousMatrix &fMo, const vpHomogeneousMatrix &cMf)
 
vpImagePoint projectCameraTrajectory (const vpImage< unsigned char > &I, const vpHomogeneousMatrix &cMo, const vpHomogeneousMatrix &fMo, const vpHomogeneousMatrix &cMf)
 
Protected Member Functions Inherited from vpRobot
vpControlFrameType setRobotFrame (vpRobot::vpControlFrameType newFrame)
 
vpControlFrameType getRobotFrame (void) const
 

Protected Attributes

double tcur
 
double tprev
 
Bound_scene * robotArms
 
unsigned int size_fMi
 
vpHomogeneousMatrixfMi
 
vpColVector artCoord
 
vpColVector artVel
 
vpColVector velocity
 
std::thread * m_thread
 
std::mutex m_mutex_fMi
 
std::mutex m_mutex_eMc
 
std::mutex m_mutex_artVel
 
std::mutex m_mutex_artCoord
 
std::mutex m_mutex_velocity
 
std::mutex m_mutex_display
 
std::mutex m_mutex_robotStop
 
std::mutex m_mutex_frame
 
std::mutex m_mutex_setVelocityCalled
 
std::mutex m_mutex_scene
 
bool displayBusy
 
bool robotStop
 
bool jointLimit
 
unsigned int jointLimitArt
 
bool singularityManagement
 
vpCameraParameters cameraParam
 
vpDisplayX display
 
vpDisplayRobotType displayType
 
bool displayAllowed
 
bool constantSamplingTimeMode
 
bool setVelocityCalled
 
bool verbose_
 
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
 
unsigned int thickness_
 
double delta_t_
 
double maxTranslationVelocity
 
double maxRotationVelocity
 
int nDof
 
vpMatrix eJe
 
int eJeAvailable
 
vpMatrix fJe
 
int fJeAvailable
 
int areJointLimitsAvailable
 
double * qmin
 
double * qmax
 

Static Protected Attributes

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

Protected Member Functions Inherited from vpRobotWireFrameSimulator

static void launcher (vpRobotWireFrameSimulator &simulator)
 
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
 

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 79 of file vpRobotWireFrameSimulator.h.

Member Enumeration Documentation

◆ vpCameraTrajectoryDisplayType

Enumerator
CT_LINE 
CT_POINT 

Definition at line 222 of file vpWireFrameSimulator.h.

◆ vpControlFrameType

Robot control frames.

Enumerator
REFERENCE_FRAME 

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

ARTICULAR_FRAME 

Corresponds to the joint state. This value is deprecated. You should rather use vpRobot::JOINT_STATE.

JOINT_STATE 

Corresponds to the joint state.

END_EFFECTOR_FRAME 

Corresponds to robot end-effector frame.

CAMERA_FRAME 

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

TOOL_FRAME 

Corresponds to a frame attached to the tool (camera, gripper...) mounted on the robot end-effector. This value is equal to vpRobot::CAMERA_FRAME.

MIXT_FRAME 

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

Definition at line 76 of file vpRobot.h.

◆ vpDisplayRobotType

Enumerator
MODEL_3D 
MODEL_DH 

Definition at line 84 of file vpRobotWireFrameSimulator.h.

◆ vpRobotStateType

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.

STATE_FORCE_TORQUE_CONTROL 

Initialize the force/torque controller.

Definition at line 64 of file vpRobot.h.

◆ vpSceneDesiredObject

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 

The object displayed at the desired position is the same than the scene object defined in vpSceneObject.

D_CIRCLE 

The object displayed at the desired position is a circle.

D_TOOL 

A cylindrical tool is attached to the camera.

Definition at line 214 of file vpWireFrameSimulator.h.

◆ vpSceneObject

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

Enumerator
THREE_PTS 

A 40cm by 40cm plate with 3 points at coordinates (0,0,0), (0.1,0,0), (0,0.1,0). Each point is represented by a circle with 2cm radius.

CUBE 

A 12.5cm size cube.

PLATE 

A 40cm by 40cm plate with 4 points at coordinates (-0.1,-0.1,0), (0.1,-0.1,0), (0.1,0.1,0), (0.1,0.1,0). Each point is represented by a circle with 2cm radius.

SMALL_PLATE 

4 points at coordinates (-0.03,-0.03,0), (0.03,-0.03,0), (0.03,0.03,0), (0.03,0.03,0). Each point is represented by a circle with 1cm radius.

RECTANGLE 

A 40cm by 40cm plate with 4 points at coordinates (-0.07,-0.05,0), (0.07,0.05,0), (0.07,-0.05,0), (-0.07,-0.05,0). Each point is represented by a circle with 2cm radius.

SQUARE_10CM 

A 40cm by 40cm plate with 4 points at coordinates (-0.05,0.05,0), (0.05,0.05,0), (0.05,-0.05,0), (-0.05,-0.05,0). Each point is represented by a circle with 2cm radius.

DIAMOND 

A 40cm by 40cm plate with 4 points at coordinates (0,-0.1,0), (0.1,0,0), (0,0.1,0), (-0.1,0,0). Each point is represented by a circle with 2cm radius.

TRAPEZOID 

A 40cm by 40cm plate with 4 points at coordinates (-0.025,-0.05,0), (-0.075,0.05,0), (0.075,0.05,0), (0.025,-0.05,0). Each point is represented by a circle with 2cm radius.

THREE_LINES 

Three parallel lines with equation y=-5, y=0, y=5.

ROAD 

Three parallel lines representing a road.

TIRE 

A tire represented by 2 circles with radius 10cm and 15cm.

PIPE 

A pipe represented by a cylinder of 25 cm length and 15cm radius.

CIRCLE 

A 10cm radius circle.

SPHERE 

A 15cm radius sphere.

CYLINDER 

A cylinder of 80cm length and 10cm radius.

PLAN 

A plane represented by a 56cm by 56cm plate with a grid of 49 squares inside.

POINT_CLOUD 

A plate with 8 points at coordinates (0.05,0,0), (0.15,0.05,0), (0.2,0.2,0), (-0.05,0.2,0), (-0.15,-0.1,0), (-0.1,-0.1,0), (-0.05,0.05,0) and (0.5,0,0). ach point is represented by a circle with 2cm radius.

Definition at line 162 of file vpWireFrameSimulator.h.

Constructor & Destructor Documentation

◆ vpRobotWireFrameSimulator() [1/2]

BEGIN_VISP_NAMESPACE vpRobotWireFrameSimulator::vpRobotWireFrameSimulator ( )

◆ vpRobotWireFrameSimulator() [2/2]

vpRobotWireFrameSimulator::vpRobotWireFrameSimulator ( bool  do_display)

Default constructor.

Parameters
do_display: When true, enables the display of the external view.

Definition at line 75 of file vpRobotWireFrameSimulator.cpp.

References display, I, vpDisplayX::init(), vpImage< Type >::resize(), vpColVector::resize(), setSamplingTime(), and velocity.

Member Function Documentation

◆ computeArticularVelocity()

virtual void vpRobotWireFrameSimulator::computeArticularVelocity ( )
protectedpure virtual

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

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

◆ deleteCameraPositionHistory()

void vpWireFrameSimulator::deleteCameraPositionHistory ( )
inlineinherited

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

Definition at line 297 of file vpWireFrameSimulator.h.

◆ display_scene() [1/2]

void vpWireFrameSimulator::display_scene ( Matrix  mat,
Bound_scene &  sc,
const vpImage< unsigned char > &  I,
const vpColor color 
)
protectedinherited

◆ display_scene() [2/2]

◆ displayTrajectory() [1/2]

void vpWireFrameSimulator::displayTrajectory ( const 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 reference 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 reference frame.

Definition at line 1282 of file vpWireFrameSimulator.cpp.

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

◆ displayTrajectory() [2/2]

void vpWireFrameSimulator::displayTrajectory ( const 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 reference 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 reference frame.

Definition at line 1329 of file vpWireFrameSimulator.cpp.

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

◆ get_artCoord()

◆ get_artVel()

◆ get_cMo() [1/2]

vpHomogeneousMatrix vpRobotWireFrameSimulator::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 349 of file vpRobotWireFrameSimulator.cpp.

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

Referenced by vpSimulatorAfma6::setPosition().

◆ get_cMo() [2/2]

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.

Definition at line 408 of file vpWireFrameSimulator.h.

◆ get_cMo_History()

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 416 of file vpWireFrameSimulator.h.

◆ get_displayBusy()

bool vpRobotWireFrameSimulator::get_displayBusy ( )
inlineprotected

◆ get_eJe()

◆ get_fJe()

virtual void vpRobot::get_fJe ( vpMatrix _fJe)
pure virtualinherited

◆ get_fMi()

virtual void vpRobotWireFrameSimulator::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().

◆ get_fMo()

vpHomogeneousMatrix vpRobotWireFrameSimulator::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 210 of file vpRobotWireFrameSimulator.h.

References vpWireFrameSimulator::fMo.

◆ get_fMo_History()

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 437 of file vpWireFrameSimulator.h.

◆ get_velocity()

vpColVector vpRobotWireFrameSimulator::get_velocity ( )
inlineprotected

◆ getDisplacement()

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

Get a displacement (frame as to ve specified) between two successive position control.

Implemented in vpRobotPtu46, vpRobotViper850, vpRobotViper650, vpRobotAfma6, vpRobotAfma4, vpRobotTemplate, vpRobotKinova, vpRobotFlirPtu, vpSimulatorViper850, vpSimulatorAfma6, and vpRobotBiclops.

◆ getExternalCameraParameters() [1/3]

vpCameraParameters vpRobotWireFrameSimulator::getExternalCameraParameters ( ) const
inline

Get the parameters of the virtual external camera.

Returns
It returns the camera parameters.

Definition at line 177 of file vpRobotWireFrameSimulator.h.

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

◆ getExternalCameraParameters() [2/3]

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 316 of file vpWireFrameSimulator.h.

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

Referenced by vpWireFrameSimulator::projectCameraTrajectory().

◆ getExternalCameraParameters() [3/3]

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 335 of file vpWireFrameSimulator.h.

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

◆ getExternalCameraPosition()

vpHomogeneousMatrix vpRobotWireFrameSimulator::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 196 of file vpRobotWireFrameSimulator.h.

References vpWireFrameSimulator::getExternalCameraPosition().

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

◆ getExternalImage() [1/4]

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.
Examples
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, and wireframeSimulator.cpp.

Definition at line 1082 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, vpDisplay::display(), vpImage< Type >::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(), vpWireFrameSimulator::SPHERE, and vpWireFrameSimulator::thickness_.

◆ getExternalImage() [2/4]

void vpWireFrameSimulator::getExternalImage ( vpImage< unsigned char > &  I,
const vpHomogeneousMatrix cam_Mf 
)
inherited

◆ getExternalImage() [3/4]

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.

Definition at line 813 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, vpDisplay::display(), vpImage< Type >::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(), vpWireFrameSimulator::SPHERE, and vpWireFrameSimulator::thickness_.

◆ getExternalImage() [4/4]

void vpWireFrameSimulator::getExternalImage ( vpImage< vpRGBa > &  I,
const vpHomogeneousMatrix cam_Mf 
)
inherited

◆ getInternalCameraParameters() [1/2]

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 368 of file vpWireFrameSimulator.h.

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

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

◆ getInternalCameraParameters() [2/2]

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 387 of file vpWireFrameSimulator.h.

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

◆ getInternalImage() [1/2]

◆ getInternalImage() [2/2]

◆ getInternalView() [1/2]

void vpRobotWireFrameSimulator::getInternalView ( vpImage< unsigned char > &  I_)

◆ getInternalView() [2/2]

◆ getMaxRotationVelocity()

◆ getMaxTranslationVelocity()

◆ getNDof()

int vpRobot::getNDof ( ) const
inlineinherited

Return robot degrees of freedom number.

Examples
servoPololuPtuPoint2DJointVelocity.cpp.

Definition at line 145 of file vpRobot.h.

◆ getPosition() [1/2]

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

Return the current robot position in the specified frame.

Definition at line 217 of file vpRobot.cpp.

References vpRobot::getPosition().

◆ getPosition() [2/2]

◆ getRobotFrame()

vpControlFrameType vpRobot::getRobotFrame ( void  ) const
inlineprotectedinherited

◆ getRobotState()

virtual vpRobotStateType vpRobot::getRobotState ( void  ) const
inlinevirtualinherited

Definition at line 155 of file vpRobot.h.

Referenced by vpRobotBiclops::getPosition(), vpRobotBiclops::getVelocity(), vpRobotCamera::setPosition(), vpSimulatorCamera::setPosition(), vpRobotAfma4::setPosition(), vpRobotAfma6::setPosition(), vpRobotFranka::setPosition(), vpRobotUniversalRobots::setPosition(), vpRobotViper650::setPosition(), vpRobotViper850::setPosition(), vpRobotBiclops::setPosition(), vpRobotPololuPtu::setPosition(), vpRobotPtu46::setPosition(), vpSimulatorAfma6::setPosition(), vpSimulatorViper850::setPosition(), vpRobotBiclops::setRobotState(), vpRobotPololuPtu::setRobotState(), vpSimulatorAfma6::setRobotState(), vpSimulatorViper850::setRobotState(), vpRobotAfma4::setRobotState(), vpRobotAfma6::setRobotState(), vpRobotFlirPtu::setRobotState(), vpRobotFranka::setRobotState(), vpRobotPtu46::setRobotState(), vpRobotUniversalRobots::setRobotState(), vpRobotViper650::setRobotState(), vpRobotViper850::setRobotState(), vpRobotBiclops::setVelocity(), vpRobotPololuPtu::setVelocity(), vpRobotPtu46::setVelocity(), vpRobotCamera::setVelocity(), vpRobotFlirPtu::setVelocity(), vpRobotFranka::setVelocity(), vpRobotKinova::setVelocity(), vpRobotTemplate::setVelocity(), vpRobotUniversalRobots::setVelocity(), vpSimulatorCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), vpRobotViper650::setVelocity(), vpRobotViper850::setVelocity(), vpSimulatorAfma6::setVelocity(), vpSimulatorViper850::setVelocity(), vpRobotFlirPtu::stopMotion(), vpRobotFranka::stopMotion(), vpRobotViper650::stopMotion(), vpRobotViper850::stopMotion(), vpSimulatorAfma6::stopMotion(), and vpSimulatorViper850::stopMotion().

◆ getSamplingTime()

double vpRobotSimulator::getSamplingTime ( ) const
inlineinherited

Return the sampling time.

Returns
Sampling time in second used to compute the robot displacement from the velocity applied to the robot during this time.

Definition at line 73 of file vpRobotSimulator.h.

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

◆ init()

◆ initArms()

virtual void vpRobotWireFrameSimulator::initArms ( )
protectedpure virtual

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

◆ initDisplay()

void vpRobotWireFrameSimulator::initDisplay ( )
inlineprotected

Definition at line 348 of file vpRobotWireFrameSimulator.h.

◆ initScene() [1/8]

void vpRobotWireFrameSimulator::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 183 of file vpRobotWireFrameSimulator.cpp.

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

◆ initScene() [2/8]

void vpRobotWireFrameSimulator::initScene ( const char *  obj,
const char *  desired_object 
)

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.
desired_object: Path to the scene file you want to use.

Definition at line 137 of file vpRobotWireFrameSimulator.cpp.

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

◆ initScene() [3/8]

void vpWireFrameSimulator::initScene ( const char *  obj,
const char *  desired_object,
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.
desired_object: Path to the scene file you want to use.
imObj: A list of vpImageSimulator instances.

Definition at line 507 of file vpWireFrameSimulator.cpp.

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

◆ initScene() [4/8]

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 723 of file vpWireFrameSimulator.cpp.

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

◆ initScene() [5/8]

void vpRobotWireFrameSimulator::initScene ( const 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 161 of file vpRobotWireFrameSimulator.cpp.

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

◆ initScene() [6/8]

void vpWireFrameSimulator::initScene ( const 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 649 of file vpWireFrameSimulator.cpp.

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

◆ initScene() [7/8]

void vpRobotWireFrameSimulator::initScene ( const vpSceneObject obj,
const vpSceneDesiredObject desired_object 
)

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.
desired_object: Type of scene used to display the object at the desired pose (in the internal view).

Definition at line 112 of file vpRobotWireFrameSimulator.cpp.

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

◆ initScene() [8/8]

void vpWireFrameSimulator::initScene ( const vpSceneObject obj,
const vpSceneDesiredObject desired_object,
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.
desired_object: 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 414 of file vpWireFrameSimulator.cpp.

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

◆ isInJointLimit()

virtual int vpRobotWireFrameSimulator::isInJointLimit ( )
protectedpure virtual

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

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

◆ launcher()

static void vpRobotWireFrameSimulator::launcher ( vpRobotWireFrameSimulator simulator)
inlinestaticprotected

Function used to launch the thread which moves the robot.

Definition at line 331 of file vpRobotWireFrameSimulator.h.

References updateArticularPosition().

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

◆ navigation() [1/2]

◆ navigation() [2/2]

◆ projectCameraTrajectory() [1/4]

vpImagePoint vpWireFrameSimulator::projectCameraTrajectory ( const vpImage< unsigned char > &  I,
const vpHomogeneousMatrix cMo_,
const vpHomogeneousMatrix fMo_ 
)
protectedinherited

◆ projectCameraTrajectory() [2/4]

vpImagePoint vpWireFrameSimulator::projectCameraTrajectory ( const vpImage< unsigned char > &  I,
const vpHomogeneousMatrix cMo_,
const vpHomogeneousMatrix fMo_,
const vpHomogeneousMatrix cMf 
)
protectedinherited

◆ projectCameraTrajectory() [3/4]

◆ projectCameraTrajectory() [4/4]

vpImagePoint vpWireFrameSimulator::projectCameraTrajectory ( const vpImage< vpRGBa > &  I,
const vpHomogeneousMatrix cMo_,
const vpHomogeneousMatrix fMo_,
const vpHomogeneousMatrix cMf 
)
protectedinherited

◆ saturateVelocities()

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 <visp3/robot/vpRobot.h>
#ifdef ENABLE_VISP_NAMESPACE
using namespace VISP_NAMESPACE_NAME;
#endif
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;
}
Implementation of column vector and the associated operations.
Definition: vpColVector.h:191
vpRowVector t() const
static double rad(double deg)
Definition: vpMath.h:129
static vpColVector saturateVelocities(const vpColVector &v_in, const vpColVector &v_max, bool verbose=false)
Definition: vpRobot.cpp:164

Definition at line 164 of file vpRobot.cpp.

References vpException::dimensionError, and vpArray2D< Type >::size().

Referenced by vpRobotCamera::setVelocity(), vpRobotFlirPtu::setVelocity(), vpRobotFranka::setVelocity(), vpRobotKinova::setVelocity(), vpRobotPioneer::setVelocity(), vpRobotTemplate::setVelocity(), vpRobotUniversalRobots::setVelocity(), vpSimulatorCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), vpRobotViper650::setVelocity(), and vpRobotViper850::setVelocity().

◆ set_artCoord()

◆ set_artVel()

◆ set_displayBusy()

void vpRobotWireFrameSimulator::set_displayBusy ( const bool &  status)
inlineprotected

◆ set_fMo()

void vpRobotWireFrameSimulator::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 321 of file vpRobotWireFrameSimulator.h.

◆ set_velocity()

◆ setCameraColor()

void vpRobotWireFrameSimulator::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 223 of file vpRobotWireFrameSimulator.h.

◆ setCameraPositionRelObj()

void vpWireFrameSimulator::setCameraPositionRelObj ( const vpHomogeneousMatrix cMo_)
inlineinherited

Set the transformation between the camera frame and the object frame.

Parameters
cMo_: The pose of the object in the camera frame.
Examples
servoSimu4Points.cpp, servoSimuCylinder.cpp, servoSimuSphere.cpp, tutorial-ibvs-4pts-wireframe-camera.cpp, and wireframeSimulator.cpp.

Definition at line 461 of file vpWireFrameSimulator.h.

References vpHomogeneousMatrix::inverse().

◆ setCameraPositionRelWorld()

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 473 of file vpWireFrameSimulator.h.

References vpHomogeneousMatrix::inverse().

◆ setCameraSizeFactor()

void vpWireFrameSimulator::setCameraSizeFactor ( 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 485 of file vpWireFrameSimulator.h.

◆ setCameraTrajectoryColor()

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 493 of file vpWireFrameSimulator.h.

◆ setCameraTrajectoryDisplayType()

void vpWireFrameSimulator::setCameraTrajectoryDisplayType ( const vpCameraTrajectoryDisplayType camTraj_type)
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
camTraj_type: The chosen way to display the camera trajectory.

Definition at line 502 of file vpWireFrameSimulator.h.

◆ setConstantSamplingTimeMode()

void vpRobotWireFrameSimulator::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; see setSamplingTime(). 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.

Definition at line 234 of file vpRobotWireFrameSimulator.h.

◆ setCurrentViewColor()

void vpRobotWireFrameSimulator::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.

Definition at line 245 of file vpRobotWireFrameSimulator.h.

◆ setDesiredCameraPosition()

void vpRobotWireFrameSimulator::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.

Definition at line 260 of file vpRobotWireFrameSimulator.h.

References vpWireFrameSimulator::setDesiredCameraPosition().

◆ setDesiredViewColor()

void vpRobotWireFrameSimulator::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.

Definition at line 253 of file vpRobotWireFrameSimulator.h.

◆ setDisplayCameraTrajectory()

void vpWireFrameSimulator::setDisplayCameraTrajectory ( const bool &  do_display)
inlineinherited

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

By default the trajectory is displayed.

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

Definition at line 533 of file vpWireFrameSimulator.h.

◆ setDisplayRobotType()

void vpRobotWireFrameSimulator::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 272 of file vpRobotWireFrameSimulator.h.

◆ setExternalCameraParameters()

void vpWireFrameSimulator::setExternalCameraParameters ( const vpCameraParameters cam)
inlineinherited

◆ setExternalCameraPosition()

void vpRobotWireFrameSimulator::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 279 of file vpRobotWireFrameSimulator.h.

References vpWireFrameSimulator::setExternalCameraPosition().

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

◆ setGraphicsThickness()

void vpRobotWireFrameSimulator::setGraphicsThickness ( unsigned int  thickness)
inline

Specify the thickness of the graphics drawings.

Definition at line 286 of file vpRobotWireFrameSimulator.h.

◆ setInternalCameraParameters()

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, tutorial-ibvs-4pts-wireframe-camera.cpp, and wireframeSimulator.cpp.

Definition at line 571 of file vpWireFrameSimulator.h.

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

◆ setMaxRotationVelocity()

void vpRobot::setMaxRotationVelocity ( double  w_max)
inherited

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

Parameters
w_max: Maximum rotational velocity expressed in rad/s.
Examples
servoMomentPoints.cpp, servoSimu4Points.cpp, servoSimuSphere.cpp, testFeatureSegment.cpp, testFrankaJointVelocityLimits.cpp, and testRobotFlirPtu.cpp.

Definition at line 261 of file vpRobot.cpp.

References vpRobot::maxRotationVelocity.

Referenced by vpRobotViper650::setMaxRotationVelocity(), vpRobotViper850::setMaxRotationVelocity(), and vpSimulatorAfma6::setPosition().

◆ setMaxTranslationVelocity()

void vpRobot::setMaxTranslationVelocity ( double  v_max)
inherited

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

Parameters
v_max: Maximum translation velocity expressed in m/s.
Examples
servoMomentPoints.cpp, servoSimu4Points.cpp, servoSimuSphere.cpp, simulateCircle2DCamVelocity.cpp, simulateFourPoints2DCartesianCamVelocity.cpp, simulateFourPoints2DPolarCamVelocity.cpp, and testFeatureSegment.cpp.

Definition at line 240 of file vpRobot.cpp.

References vpRobot::maxTranslationVelocity.

Referenced by vpSimulatorAfma6::setPosition().

◆ setNbPtTrajectory()

void vpWireFrameSimulator::setNbPtTrajectory ( 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 584 of file vpWireFrameSimulator.h.

◆ setPosition()

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

◆ setRobotFrame()

◆ setRobotState()

vpRobot::vpRobotStateType vpRobot::setRobotState ( const vpRobot::vpRobotStateType  newState)
virtualinherited

Reimplemented in vpRobotViper850, vpRobotViper650, vpRobotUniversalRobots, vpRobotPtu46, vpRobotFranka, vpRobotFlirPtu, vpRobotAfma6, vpRobotAfma4, vpSimulatorViper850, vpSimulatorAfma6, vpRobotPololuPtu, and vpRobotBiclops.

Examples
UniversalRobotsMoveToPosition.cpp, UniversalRobotsSavePosition.cpp, frankaMoveToPosition.cpp, frankaSavePosition.cpp, moveAfma4.cpp, moveBiclops.cpp, movePtu46.cpp, photometricMappingVisualServoing.cpp, photometricVisualServoing.cpp, photometricVisualServoingWithoutVpServo.cpp, servoAfma4Point2DArtVelocity.cpp, servoAfma4Point2DCamVelocity.cpp, servoAfma4Point2DCamVelocityKalman.cpp, servoAfma62DhalfCamVelocity.cpp, servoAfma6AprilTagIBVS.cpp, servoAfma6AprilTagPBVS.cpp, servoAfma6Cylinder2DCamVelocity.cpp, servoAfma6Cylinder2DCamVelocitySecondaryTask.cpp, servoAfma6Ellipse2DCamVelocity.cpp, servoAfma6FourPoints2DArtVelocity.cpp, servoAfma6FourPoints2DCamVelocityLs_cur.cpp, servoAfma6FourPoints2DCamVelocityLs_cur_integrator.cpp, servoAfma6FourPoints2DCamVelocityLs_des.cpp, servoAfma6Line2DCamVelocity.cpp, servoAfma6MegaposePBVS.cpp, servoAfma6Point2DArtVelocity.cpp, servoAfma6Point2DCamVelocity.cpp, servoAfma6Points2DCamVelocityEyeToHand.cpp, servoAfma6Segment2DCamVelocity.cpp, servoAfma6SquareLines2DCamVelocity.cpp, servoAfma6TwoLines2DCamVelocity.cpp, servoBiclopsPoint2DArtVelocity.cpp, servoFlirPtuIBVS.cpp, servoFrankaIBVS.cpp, servoFrankaPBVS.cpp, servoKinovaJacoCart.cpp, servoKinovaJacoJoint.cpp, servoPololuPtuPoint2DJointVelocity.cpp, servoPtu46Point2DArtVelocity.cpp, servoSimuAfma6FourPoints2DCamVelocity.cpp, servoSimuViper850FourPoints2DCamVelocity.cpp, servoUniversalRobotsIBVS.cpp, servoUniversalRobotsPBVS.cpp, servoViper650FourPoints2DArtVelocityLs_cur.cpp, servoViper650FourPoints2DCamVelocityLs_cur-SR300.cpp, servoViper650FourPoints2DCamVelocityLs_cur.cpp, servoViper650Point2DCamVelocity.cpp, servoViper850FourPoints2DArtVelocityLs_cur.cpp, servoViper850FourPoints2DArtVelocityLs_des.cpp, servoViper850FourPoints2DCamVelocityLs_cur.cpp, servoViper850FourPointsKinect.cpp, servoViper850Point2DArtVelocity-jointAvoidance-basic.cpp, servoViper850Point2DArtVelocity-jointAvoidance-gpa.cpp, servoViper850Point2DArtVelocity-jointAvoidance-large.cpp, servoViper850Point2DArtVelocity.cpp, servoViper850Point2DCamVelocity.cpp, servoViper850Point2DCamVelocityKalman.cpp, testFrankaCartForceTorque-2.cpp, testFrankaCartForceTorque.cpp, testFrankaCartVelocity-2.cpp, testFrankaCartVelocity-3.cpp, testFrankaCartVelocity.cpp, testFrankaJointPosition.cpp, testFrankaJointTorque.cpp, testFrankaJointVelocity-2.cpp, testFrankaJointVelocity-3.cpp, testFrankaJointVelocity.cpp, testFrankaJointVelocityLimits.cpp, testRobotFlirPtu.cpp, testRobotViper650-frames.cpp, testRobotViper850-frames.cpp, testUniversalRobotsCartPosition.cpp, testUniversalRobotsCartVelocity.cpp, testUniversalRobotsJointPosition.cpp, testUniversalRobotsJointVelocity.cpp, testVirtuoseAfma6.cpp, tutorial-flir-ptu-ibvs.cpp, tutorial-ibvs-4pts-wireframe-robot-afma6.cpp, and tutorial-ibvs-4pts-wireframe-robot-viper.cpp.

Definition at line 202 of file vpRobot.cpp.

Referenced by vpRobotCamera::setPosition(), vpSimulatorCamera::setPosition(), vpRobotBiclops::setRobotState(), vpRobotPololuPtu::setRobotState(), vpSimulatorAfma6::setRobotState(), vpSimulatorViper850::setRobotState(), vpRobotAfma4::setRobotState(), vpRobotAfma6::setRobotState(), vpRobotFlirPtu::setRobotState(), vpRobotFranka::setRobotState(), vpRobotPtu46::setRobotState(), vpRobotUniversalRobots::setRobotState(), vpRobotViper650::setRobotState(), vpRobotViper850::setRobotState(), vpRobotCamera::setVelocity(), vpSimulatorCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpSimulatorAfma6::stopMotion(), and vpSimulatorViper850::stopMotion().

◆ setSamplingTime()

void vpRobotWireFrameSimulator::setSamplingTime ( const double &  delta_t)
inlinevirtual

Set the sampling time.

Parameters
delta_t: Sampling time in second used to compute the robot displacement from the velocity applied to the robot during this time.

Since the wireframe simulator is threaded, the sampling time is set to vpTime::getMinTimeForUsleepCall() / 1000 seconds.

Reimplemented from vpRobotSimulator.

Definition at line 297 of file vpRobotWireFrameSimulator.h.

References vpTime::getMinTimeForUsleepCall().

Referenced by vpRobotWireFrameSimulator().

◆ setSingularityManagement()

void vpRobotWireFrameSimulator::setSingularityManagement ( bool  sm)
inline

Set the parameter which enable or disable the singularity management.

Definition at line 309 of file vpRobotWireFrameSimulator.h.

◆ setVelocity()

virtual void vpRobot::setVelocity ( const vpRobot::vpControlFrameType  frame,
const vpColVector vel 
)
pure virtualinherited

◆ setVerbose()

void vpRobotWireFrameSimulator::setVerbose ( bool  verbose)
inline

Activates extra printings when the robot reaches joint limits...

Definition at line 314 of file vpRobotWireFrameSimulator.h.

◆ updateArticularPosition()

virtual void vpRobotWireFrameSimulator::updateArticularPosition ( )
protectedpure virtual

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

Implemented in vpSimulatorViper850, and vpSimulatorAfma6.

Referenced by launcher().

Member Data Documentation

◆ areJointLimitsAvailable

int vpRobot::areJointLimitsAvailable
protectedinherited

Definition at line 114 of file vpRobot.h.

Referenced by vpRobot::operator=().

◆ artCoord

vpColVector vpRobotWireFrameSimulator::artCoord
protected

The articular coordinates

Definition at line 106 of file vpRobotWireFrameSimulator.h.

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

◆ artVel

vpColVector vpRobotWireFrameSimulator::artVel
protected

The articular velocity

Definition at line 108 of file vpRobotWireFrameSimulator.h.

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

◆ blocked

bool vpWireFrameSimulator::blocked
protectedinherited

Definition at line 259 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::navigation().

◆ blockedr

bool vpWireFrameSimulator::blockedr
protectedinherited

Definition at line 256 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::navigation().

◆ blockedt

bool vpWireFrameSimulator::blockedt
protectedinherited

Definition at line 258 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::navigation().

◆ blockedz

bool vpWireFrameSimulator::blockedz
protectedinherited

Definition at line 257 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::navigation().

◆ camColor

vpColor vpWireFrameSimulator::camColor
protectedinherited

◆ camera

◆ cameraFactor

float vpWireFrameSimulator::cameraFactor
protectedinherited

◆ cameraParam

◆ cameraTrajectory

std::list<vpImagePoint> vpWireFrameSimulator::cameraTrajectory
protectedinherited

◆ camMf

◆ camMf2

◆ camTrajColor

vpColor vpWireFrameSimulator::camTrajColor
protectedinherited

◆ camTrajType

vpCameraTrajectoryDisplayType vpWireFrameSimulator::camTrajType
protectedinherited

◆ cdMo

vpHomogeneousMatrix vpWireFrameSimulator::cdMo
protectedinherited

◆ cMo

vpHomogeneousMatrix vpWireFrameSimulator::cMo
protectedinherited

◆ constantSamplingTimeMode

bool vpRobotWireFrameSimulator::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 consuming. False by default.

Definition at line 158 of file vpRobotWireFrameSimulator.h.

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

◆ curColor

◆ delta_t_

double vpRobotSimulator::delta_t_
protectedinherited

◆ desColor

vpColor vpWireFrameSimulator::desColor
protectedinherited

◆ desiredObject

vpSceneDesiredObject vpWireFrameSimulator::desiredObject
protectedinherited

◆ desiredScene

◆ display

vpDisplayX vpRobotWireFrameSimulator::display
protected

Definition at line 140 of file vpRobotWireFrameSimulator.h.

Referenced by vpRobotWireFrameSimulator().

◆ displayAllowed

bool vpRobotWireFrameSimulator::displayAllowed
protected

◆ displayBusy

bool vpRobotWireFrameSimulator::displayBusy
protected

Definition at line 125 of file vpRobotWireFrameSimulator.h.

◆ displayCamera

◆ displayCameraTrajectory

bool vpWireFrameSimulator::displayCameraTrajectory
protectedinherited

Definition at line 247 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::getExternalImage().

◆ displayDesiredObject

bool vpWireFrameSimulator::displayDesiredObject
protectedinherited

◆ displayImageSimulator

bool vpWireFrameSimulator::displayImageSimulator
protectedinherited

◆ displayObject

◆ displayType

vpDisplayRobotType vpRobotWireFrameSimulator::displayType
protected

◆ eJe

◆ eJeAvailable

int vpRobot::eJeAvailable
protectedinherited

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

Definition at line 108 of file vpRobot.h.

Referenced by vpRobot::operator=().

◆ extCamChanged

bool vpWireFrameSimulator::extCamChanged
protectedinherited

Definition at line 278 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::getExternalImage().

◆ f2Mf

◆ fJe

◆ fJeAvailable

int vpRobot::fJeAvailable
protectedinherited

is the robot Jacobian expressed in the robot reference frame available

Definition at line 112 of file vpRobot.h.

Referenced by vpRobot::operator=().

◆ fMc

vpHomogeneousMatrix vpWireFrameSimulator::fMc
protectedinherited

Definition at line 231 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::getExternalImage().

◆ fMi

vpHomogeneousMatrix* vpRobotWireFrameSimulator::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 103 of file vpRobotWireFrameSimulator.h.

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

◆ fMo

◆ fMoList

std::list<vpHomogeneousMatrix> vpWireFrameSimulator::fMoList
protectedinherited

◆ I

◆ jointLimit

◆ jointLimitArt

unsigned int vpRobotWireFrameSimulator::jointLimitArt
protected

Index of the joint which is in limit

Definition at line 132 of file vpRobotWireFrameSimulator.h.

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

◆ m_mutex_artCoord

std::mutex vpRobotWireFrameSimulator::m_mutex_artCoord
protected

Definition at line 117 of file vpRobotWireFrameSimulator.h.

◆ m_mutex_artVel

std::mutex vpRobotWireFrameSimulator::m_mutex_artVel
protected

Definition at line 116 of file vpRobotWireFrameSimulator.h.

◆ m_mutex_display

std::mutex vpRobotWireFrameSimulator::m_mutex_display
protected

Definition at line 119 of file vpRobotWireFrameSimulator.h.

◆ m_mutex_eMc

std::mutex vpRobotWireFrameSimulator::m_mutex_eMc
protected

◆ m_mutex_fMi

std::mutex vpRobotWireFrameSimulator::m_mutex_fMi
protected

◆ m_mutex_frame

◆ m_mutex_robotStop

◆ m_mutex_scene

◆ m_mutex_setVelocityCalled

◆ m_mutex_velocity

std::mutex vpRobotWireFrameSimulator::m_mutex_velocity
protected

Definition at line 118 of file vpRobotWireFrameSimulator.h.

◆ m_thread

◆ maxRotationVelocity

◆ maxRotationVelocityDefault

const double vpRobot::maxRotationVelocityDefault = 0.7
staticprotectedinherited

Definition at line 101 of file vpRobot.h.

Referenced by vpRobotFlirPtu::init(), vpRobotKinova::init(), and vpRobotTemplate::init().

◆ maxTranslationVelocity

double vpRobot::maxTranslationVelocity
protectedinherited

◆ maxTranslationVelocityDefault

BEGIN_VISP_NAMESPACE const double vpRobot::maxTranslationVelocityDefault = 0.2
staticprotectedinherited

Definition at line 99 of file vpRobot.h.

Referenced by vpRobotFlirPtu::init(), vpRobotKinova::init(), and vpRobotTemplate::init().

◆ nbrPtLimit

unsigned int vpWireFrameSimulator::nbrPtLimit
protectedinherited

Definition at line 251 of file vpWireFrameSimulator.h.

Referenced by vpWireFrameSimulator::getExternalImage().

◆ nDof

◆ object

vpSceneObject vpWireFrameSimulator::object
protectedinherited

Definition at line 237 of file vpWireFrameSimulator.h.

◆ objectImage

std::list<vpImageSimulator> vpWireFrameSimulator::objectImage
protectedinherited

◆ old_iPr

vpImagePoint vpWireFrameSimulator::old_iPr
protectedinherited

◆ old_iPt

vpImagePoint vpWireFrameSimulator::old_iPt
protectedinherited

◆ old_iPz

vpImagePoint vpWireFrameSimulator::old_iPz
protectedinherited

◆ poseList

std::list<vpHomogeneousMatrix> vpWireFrameSimulator::poseList
protectedinherited

◆ px_ext

double vpWireFrameSimulator::px_ext
protectedinherited

◆ px_int

◆ py_ext

double vpWireFrameSimulator::py_ext
protectedinherited

◆ py_int

◆ qmax

double* vpRobot::qmax
protectedinherited

Definition at line 116 of file vpRobot.h.

Referenced by vpRobot::operator=(), and vpRobot::~vpRobot().

◆ qmin

double* vpRobot::qmin
protectedinherited

Definition at line 115 of file vpRobot.h.

Referenced by vpRobot::operator=(), and vpRobot::~vpRobot().

◆ refMo

vpHomogeneousMatrix vpWireFrameSimulator::refMo
protectedinherited

Definition at line 233 of file vpWireFrameSimulator.h.

◆ robotArms

◆ robotStop

bool vpRobotWireFrameSimulator::robotStop
protected

◆ rotz

◆ scene

◆ sceneInitialized

◆ setVelocityCalled

bool vpRobotWireFrameSimulator::setVelocityCalled
protected

◆ singularityManagement

bool vpRobotWireFrameSimulator::singularityManagement
protected

True if the singularity are automatically managed

Definition at line 134 of file vpRobotWireFrameSimulator.h.

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

◆ size_fMi

unsigned int vpRobotWireFrameSimulator::size_fMi
protected

Size of the fMi table

Definition at line 96 of file vpRobotWireFrameSimulator.h.

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

◆ tcur

double vpRobotWireFrameSimulator::tcur
protected

◆ thickness_

◆ tprev

double vpRobotWireFrameSimulator::tprev
protected

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

Definition at line 90 of file vpRobotWireFrameSimulator.h.

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

◆ velocity

vpColVector vpRobotWireFrameSimulator::velocity
protected

The velocity in the current frame (articular, camera or reference)

Definition at line 110 of file vpRobotWireFrameSimulator.h.

Referenced by vpRobotWireFrameSimulator().

◆ verbose_