Visual Servoing Platform
version 3.6.1 under development (2024-11-14)
|
#include <visp3/robot/vpRobot.h>
Public Types | |
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 | |
vpRobot (void) | |
vpRobot (const vpRobot &robot) | |
virtual | ~vpRobot () |
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 |
vpRobot & | operator= (const vpRobot &robot) |
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 |
void | setVerbose (bool verbose) |
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) |
Protected Member Functions | |
Protected Member Functions Inherited from vpRobot | |
vpControlFrameType | setRobotFrame (vpRobot::vpControlFrameType newFrame) |
vpControlFrameType | getRobotFrame (void) const |
Protected Attributes | |
double | maxTranslationVelocity |
double | maxRotationVelocity |
int | nDof |
vpMatrix | eJe |
int | eJeAvailable |
vpMatrix | fJe |
int | fJeAvailable |
int | areJointLimitsAvailable |
double * | qmin |
double * | qmax |
bool | verbose_ |
Static Protected Attributes | |
static const double | maxTranslationVelocityDefault = 0.2 |
static const double | maxRotationVelocityDefault = 0.7 |
Class that defines a generic virtual robot.
group_robot_real_arm group_robot_real_ptu group_robot_real_unicycle group_robot_real_template
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. |
Robot control states.
vpRobot::vpRobot | ( | void | ) |
Definition at line 51 of file vpRobot.cpp.
vpRobot::vpRobot | ( | const vpRobot & | robot | ) |
Definition at line 58 of file vpRobot.cpp.
|
virtual |
Destructor that free allocated memory.
Definition at line 70 of file vpRobot.cpp.
|
pure virtual |
Get the robot Jacobian expressed in the end-effector frame.
Implemented in vpRobotTemplate, vpSimulatorPioneerPan, vpSimulatorPioneer, vpSimulatorCamera, vpRobotViper850, vpRobotViper650, vpRobotPololuPtu, vpRobotPioneer, vpRobotKinova, vpRobotFranka, vpRobotFlirPtu, vpRobotBiclops, vpRobotAfma4, vpRobotPtu46, and vpRobotAfma6.
|
pure virtual |
Get the robot Jacobian expressed in the robot reference (or world) frame.
Implemented in vpRobotTemplate, vpRobotViper850, vpRobotViper650, vpRobotPololuPtu, vpRobotKinova, vpRobotFranka, vpRobotFlirPtu, vpRobotBiclops, vpRobotAfma4, vpRobotPtu46, and vpRobotAfma6.
|
pure virtual |
Get a displacement (frame as to ve specified) between two successive position control.
Implemented in vpRobotPtu46, vpRobotViper850, vpRobotViper650, vpRobotAfma6, vpRobotAfma4, vpRobotTemplate, vpRobotKinova, vpRobotFlirPtu, and vpRobotBiclops.
double vpRobot::getMaxRotationVelocity | ( | void | ) | const |
Get the maximal rotation velocity that can be sent to the robot during a velocity control.
Definition at line 274 of file vpRobot.cpp.
References maxRotationVelocity.
Referenced by vpRobotPololuPtu::setPosition(), vpRobotPololuPtu::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().
double vpRobot::getMaxTranslationVelocity | ( | void | ) | const |
Get the maximal translation velocity that can be sent to the robot during a velocity control.
Definition at line 252 of file vpRobot.cpp.
References maxTranslationVelocity.
Referenced by 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().
|
inline |
Return robot degrees of freedom number.
vpColVector vpRobot::getPosition | ( | const vpRobot::vpControlFrameType | frame | ) |
Return the current robot position in the specified frame.
Definition at line 217 of file vpRobot.cpp.
References getPosition().
|
pure virtual |
Get the robot position (frame has to be specified).
Implemented in vpSimulatorPioneerPan, vpSimulatorPioneer, vpSimulatorCamera, vpRobotTemplate, vpRobotPtu46, vpRobotPololuPtu, vpRobotFlirPtu, vpRobotBiclops, vpRobotViper850, vpRobotUniversalRobots, vpRobotKinova, vpRobotFranka, vpRobotAfma6, vpRobotAfma4, and vpRobotViper650.
Referenced by getPosition().
|
inlineprotected |
|
inlinevirtual |
Definition at line 155 of file vpRobot.h.
Referenced by vpRobotBiclops::getPosition(), vpRobotBiclops::getVelocity(), vpSimulatorCamera::setPosition(), vpRobotAfma4::setPosition(), vpRobotAfma6::setPosition(), vpRobotFranka::setPosition(), vpRobotUniversalRobots::setPosition(), vpRobotViper650::setPosition(), vpRobotViper850::setPosition(), vpRobotBiclops::setPosition(), vpRobotPololuPtu::setPosition(), vpRobotPtu46::setPosition(), vpRobotBiclops::setRobotState(), vpRobotPololuPtu::setRobotState(), vpRobotAfma4::setRobotState(), vpRobotAfma6::setRobotState(), vpRobotFlirPtu::setRobotState(), vpRobotFranka::setRobotState(), vpRobotPtu46::setRobotState(), vpRobotUniversalRobots::setRobotState(), vpRobotViper650::setRobotState(), vpRobotViper850::setRobotState(), vpRobotBiclops::setVelocity(), vpRobotPololuPtu::setVelocity(), vpRobotPtu46::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(), vpRobotFlirPtu::stopMotion(), vpRobotFranka::stopMotion(), vpRobotViper650::stopMotion(), and vpRobotViper850::stopMotion().
|
pure virtual |
Implemented in vpRobotViper850, vpRobotViper650, vpRobotPtu46, vpRobotAfma6, vpRobotAfma4, vpRobotTemplate, vpRobotBiclops, vpRobotUniversalRobots, vpRobotPioneer, vpRobotKinova, and vpRobotFlirPtu.
Copy operator.
Definition at line 83 of file vpRobot.cpp.
References areJointLimitsAvailable, eJe, eJeAvailable, fJe, fJeAvailable, maxRotationVelocity, maxTranslationVelocity, nDof, qmax, qmin, and verbose_.
|
static |
Saturate velocities.
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. |
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.
Definition at line 164 of file vpRobot.cpp.
References vpException::dimensionError, and vpArray2D< Type >::size().
Referenced by 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().
void vpRobot::setMaxRotationVelocity | ( | double | w_max | ) |
Set the maximal rotation velocity that can be sent to the robot during a velocity control.
w_max | : Maximum rotational velocity expressed in rad/s. |
Definition at line 261 of file vpRobot.cpp.
References maxRotationVelocity.
Referenced by vpRobotViper650::setMaxRotationVelocity(), and vpRobotViper850::setMaxRotationVelocity().
void vpRobot::setMaxTranslationVelocity | ( | double | v_max | ) |
Set the maximal translation velocity that can be sent to the robot during a velocity control.
v_max | : Maximum translation velocity expressed in m/s. |
Definition at line 240 of file vpRobot.cpp.
References maxTranslationVelocity.
|
pure virtual |
Set a displacement (frame has to be specified) in position control.
Implemented in vpRobotTemplate, vpRobotPtu46, vpRobotPololuPtu, vpRobotKinova, vpRobotFlirPtu, vpRobotBiclops, vpRobotViper850, vpRobotViper650, vpRobotUniversalRobots, vpRobotFranka, vpRobotAfma6, and vpRobotAfma4.
|
protected |
Definition at line 208 of file vpRobot.cpp.
Referenced by vpSimulatorCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), and vpSimulatorPioneerPan::setVelocity().
|
virtual |
Reimplemented in vpRobotViper850, vpRobotViper650, vpRobotUniversalRobots, vpRobotPtu46, vpRobotFranka, vpRobotFlirPtu, vpRobotAfma6, vpRobotAfma4, vpRobotPololuPtu, and vpRobotBiclops.
Definition at line 202 of file vpRobot.cpp.
Referenced by vpSimulatorCamera::setPosition(), vpRobotBiclops::setRobotState(), vpRobotPololuPtu::setRobotState(), vpRobotAfma4::setRobotState(), vpRobotAfma6::setRobotState(), vpRobotFlirPtu::setRobotState(), vpRobotFranka::setRobotState(), vpRobotPtu46::setRobotState(), vpRobotUniversalRobots::setRobotState(), vpRobotViper650::setRobotState(), vpRobotViper850::setRobotState(), vpSimulatorCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), and vpSimulatorPioneerPan::setVelocity().
|
pure virtual |
Set the velocity (frame has to be specified) that will be applied to the velocity controller.
Implemented in vpRobotViper850, vpRobotViper650, vpRobotAfma6, vpRobotAfma4, vpSimulatorPioneerPan, vpSimulatorPioneer, vpSimulatorCamera, vpRobotUniversalRobots, vpRobotTemplate, vpRobotPioneer, vpRobotKinova, vpRobotFranka, vpRobotFlirPtu, vpRobotPtu46, vpRobotPololuPtu, and vpRobotBiclops.
|
inline |
Definition at line 170 of file vpRobot.h.
Referenced by vpRobotAfma4::vpRobotAfma4(), vpRobotAfma6::vpRobotAfma6(), vpRobotViper650::vpRobotViper650(), and vpRobotViper850::vpRobotViper850().
|
protected |
Definition at line 114 of file vpRobot.h.
Referenced by operator=().
|
protected |
robot Jacobian expressed in the end-effector frame
Definition at line 106 of file vpRobot.h.
Referenced by vpRobotFlirPtu::get_eJe(), vpRobotAfma6::get_eJe(), vpRobotPtu46::get_eJe(), vpRobotAfma4::get_eJe(), vpRobotBiclops::get_eJe(), vpRobotKinova::get_eJe(), vpRobotPololuPtu::get_eJe(), vpRobotViper650::get_eJe(), vpRobotViper850::get_eJe(), vpSimulatorCamera::get_eJe(), operator=(), and vpRobotAfma4::setVelocity().
|
protected |
is the robot Jacobian expressed in the end-effector frame available
Definition at line 108 of file vpRobot.h.
Referenced by operator=().
|
protected |
robot Jacobian expressed in the robot reference frame available
Definition at line 110 of file vpRobot.h.
Referenced by vpRobotFlirPtu::get_fJe(), vpRobotAfma6::get_fJe(), vpRobotPtu46::get_fJe(), vpRobotAfma4::get_fJe(), vpRobotBiclops::get_fJe(), vpRobotKinova::get_fJe(), vpRobotPololuPtu::get_fJe(), vpRobotViper650::get_fJe(), vpRobotViper850::get_fJe(), and operator=().
|
protected |
is the robot Jacobian expressed in the robot reference frame available
Definition at line 112 of file vpRobot.h.
Referenced by operator=().
|
protected |
Definition at line 100 of file vpRobot.h.
Referenced by getMaxRotationVelocity(), vpRobotFlirPtu::init(), vpRobotKinova::init(), vpRobotTemplate::init(), operator=(), setMaxRotationVelocity(), vpRobotPtu46::setVelocity(), vpRobotViper650::vpRobotViper650(), and vpRobotViper850::vpRobotViper850().
|
staticprotected |
Definition at line 101 of file vpRobot.h.
Referenced by vpRobotFlirPtu::init(), vpRobotKinova::init(), and vpRobotTemplate::init().
|
protected |
Definition at line 98 of file vpRobot.h.
Referenced by getMaxTranslationVelocity(), vpRobotFlirPtu::init(), vpRobotKinova::init(), vpRobotTemplate::init(), operator=(), and setMaxTranslationVelocity().
|
staticprotected |
Definition at line 99 of file vpRobot.h.
Referenced by vpRobotFlirPtu::init(), vpRobotKinova::init(), and vpRobotTemplate::init().
|
protected |
number of degrees of freedom
Definition at line 104 of file vpRobot.h.
Referenced by vpRobotPololuPtu::get_eJe(), vpRobotPololuPtu::get_fJe(), vpRobotKinova::getJointPosition(), vpRobotPololuPtu::getPosition(), vpRobotFlirPtu::init(), vpRobotKinova::init(), vpRobotUniversalRobots::init(), vpRobotTemplate::init(), operator=(), vpRobotUniversalRobots::readPosFile(), vpRobotKinova::setDoF(), vpRobotKinova::setJointVelocity(), vpRobotKinova::setPosition(), vpRobotPololuPtu::setPosition(), vpRobotPololuPtu::setVelocity(), vpRobotFlirPtu::setVelocity(), vpRobotKinova::setVelocity(), vpRobotTemplate::setVelocity(), and vpRobotPololuPtu::vpRobotPololuPtu().
|
protected |
Definition at line 116 of file vpRobot.h.
Referenced by operator=(), and ~vpRobot().
|
protected |
Definition at line 115 of file vpRobot.h.
Referenced by operator=(), and ~vpRobot().
|
protected |
Definition at line 118 of file vpRobot.h.
Referenced by vpRobotAfma4::init(), vpRobotAfma6::init(), vpRobotViper650::init(), vpRobotViper850::init(), operator=(), vpRobotAfma4::vpRobotAfma4(), vpRobotAfma6::vpRobotAfma6(), vpRobotViper650::vpRobotViper650(), and vpRobotViper850::vpRobotViper850().