![]() |
Visual Servoing Platform
version 3.2.0
|
#include <vpSimulatorPioneerPan.h>
Public Types | |
enum | vpRobotStateType { STATE_STOP, STATE_VELOCITY_CONTROL, STATE_POSITION_CONTROL, STATE_ACCELERATION_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 | |
vpSimulatorPioneerPan () | |
virtual | ~vpSimulatorPioneerPan () |
Inherited functionalities from vpPioneerPan | |
void | set_eJe (double q_pan) |
Inherited functionalities from vpRobotSimulator | |
double | getSamplingTime () const |
virtual void | setSamplingTime (const double &delta_t) |
Inherited functionalities from vpRobot | |
double | getMaxTranslationVelocity (void) const |
double | getMaxRotationVelocity (void) const |
vpColVector | getPosition (const vpRobot::vpControlFrameType frame) |
virtual vpRobotStateType | getRobotState (void) const |
void | setMaxRotationVelocity (const double maxVr) |
void | setMaxTranslationVelocity (const double maxVt) |
virtual vpRobotStateType | setRobotState (const vpRobot::vpRobotStateType newState) |
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 | |
vpHomogeneousMatrix | wMc_ |
vpHomogeneousMatrix | wMm_ |
double | xm_ |
double | ym_ |
double | theta_ |
double | q_pan_ |
double | delta_t_ |
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 |
Protected Member Functions Inherited from vpPioneerPan | |
vpHomogeneousMatrix | mMp_ |
vpHomogeneousMatrix | pMe_ |
void | set_cMe () |
void | set_mMp () |
void | set_pMe (const double q) |
Inherited functionalities from vpSimulatorPioneerPan | |
void | get_eJe (vpMatrix &eJe) |
void | getPosition (vpHomogeneousMatrix &wMc) const |
void | getPosition (const vpRobot::vpControlFrameType frame, vpColVector &q) |
void | setVelocity (const vpRobot::vpControlFrameType frame, const vpColVector &vel) |
Inherited functionalities from vpUnicycle | |
vpHomogeneousMatrix | cMe_ |
vpMatrix | eJe_ |
void | set_eJe (const vpMatrix &eJe) |
void | set_cMe (const vpHomogeneousMatrix &cMe) |
vpHomogeneousMatrix | get_cMe () const |
vpVelocityTwistMatrix | get_cVe () const |
void | get_cVe (vpVelocityTwistMatrix &cVe) const |
vpMatrix | get_eJe () const |
Class that defines the Pioneer mobile robot simulator equipped with a camera able to move in pan.
It intends to simulate the mobile robot described in vpPioneerPan class. This robot has 3 dof: , the translational and rotational velocities of the mobile platform, the pan head velocity respectively.
The robot position evolves with respect to a world frame; wMc. When a new joint velocity is applied to the robot using setVelocity(), the position of the camera wrt the world frame is updated.
The following code shows how to control this robot in position and velocity.
The usage of this class is also highlighted in Tutorial: Visual servo simulation on a pioneer-like unicycle robot.
Definition at line 103 of file vpSimulatorPioneerPan.h.
|
inherited |
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. |
|
inherited |
vpSimulatorPioneerPan::vpSimulatorPioneerPan | ( | ) |
Constructor.
Initialise the robot by a call to init().
Sampling time is set to 40 ms. To change it you should call setSamplingTime().
Definition at line 59 of file vpSimulatorPioneerPan.cpp.
|
virtual |
Destructor.
Definition at line 92 of file vpSimulatorPioneerPan.cpp.
|
inlineinherited |
Return the tranformation between the camera frame and the mobile robot end effector frame.
Definition at line 73 of file vpUnicycle.h.
|
inlineinherited |
Return the twist transformation from camera frame to the mobile robot end effector frame. This transformation allows to compute a velocity expressed in the end effector frame into the camera frame.
Definition at line 81 of file vpUnicycle.h.
|
inlineinherited |
Return the twist transformation from camera frame to the mobile robot end effector frame. This transformation allows to compute a velocity expressed in the end effector frame into the camera frame.
Definition at line 96 of file vpUnicycle.h.
|
inlineinherited |
Return the robot jacobian expressed in the end effector frame.
Definition at line 106 of file vpUnicycle.h.
|
virtual |
Get the robot jacobian expressed in the end-effector frame. The jacobian expression is given in vpPioneerPan class.
_eJe | : A 6 by 3 matrix representing the robot jacobian ![]() |
Implements vpRobot.
Definition at line 101 of file vpSimulatorPioneerPan.cpp.
|
inherited |
Get the maximal rotation velocity that can be sent to the robot during a velocity control.
Definition at line 272 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::computeArticularVelocity(), vpSimulatorAfma6::findHighestPositioningSpeed(), vpSimulatorViper850::findHighestPositioningSpeed(), vpSimulatorAfma6::setPosition(), and vpSimulatorAfma6::setVelocity().
|
inherited |
Get the maximal translation velocity that can be sent to the robot during a velocity control.
Definition at line 250 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::setPosition(), and vpSimulatorAfma6::setVelocity().
|
inherited |
Return the current robot position in the specified frame.
Definition at line 215 of file vpRobot.cpp.
|
virtual |
Get the robot position (frame has to be specified).
Implements vpRobot.
Definition at line 205 of file vpSimulatorPioneerPan.cpp.
References vpRobot::ARTICULAR_FRAME, vpRxyzVector::buildFrom(), vpRobot::CAMERA_FRAME, vpRobot::END_EFFECTOR_FRAME, vpHomogeneousMatrix::extract(), vpRobot::MIXT_FRAME, vpRobot::REFERENCE_FRAME, vpColVector::resize(), and wMc_.
void vpSimulatorPioneerPan::getPosition | ( | vpHomogeneousMatrix & | wMc | ) | const |
Get the robot position in the world frame.
Definition at line 184 of file vpSimulatorPioneerPan.cpp.
|
inlineprotectedinherited |
Definition at line 171 of file vpRobot.h.
Referenced by vpSimulatorAfma6::computeArticularVelocity().
|
inlinevirtualinherited |
Definition at line 143 of file vpRobot.h.
Referenced by vpSimulatorAfma6::setPosition(), vpSimulatorAfma6::setRobotState(), vpSimulatorAfma6::setVelocity(), and vpSimulatorAfma6::stopMotion().
|
inlineinherited |
Return the sampling time.
Definition at line 81 of file vpRobotSimulator.h.
Referenced by vpSimulatorAfma6::updateArticularPosition().
|
staticinherited |
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 162 of file vpRobot.cpp.
|
inlineprotectedinherited |
Set the transformation between the camera frame and the pan head end effector frame.
Definition at line 174 of file vpPioneerPan.h.
|
inlineinherited |
Set the transformation between the camera frame and the end effector frame.
Definition at line 112 of file vpUnicycle.h.
|
inlineinherited |
Set the robot jacobian expressed in the end effector frame.
eJe | : The robot jacobian to set such as ![]() ![]() ![]() |
Definition at line 122 of file vpUnicycle.h.
|
inlineinherited |
Set the robot jacobian expressed at point E the end effector frame located on the pan head.
Considering with
respectively the translational and rotational control velocities of the mobile platform,
the joint velocity of the pan head and
the six dimention velocity skew expressed at point E in frame E, the robot jacobian is given by:
with the position of the head base frame in the mobile platform frame located at the middle point between the two weels.
Definition at line 145 of file vpPioneerPan.h.
|
inlineprotectedinherited |
Set the transformation between the mobile platform frame located at the middle point between the two weels and the base frame of the pan head.
Definition at line 198 of file vpPioneerPan.h.
|
inlineprotectedinherited |
Set the transformation between the pan head reference frame and the end-effector frame.
q | : Position in rad of the pan axis. |
Definition at line 221 of file vpPioneerPan.h.
|
inherited |
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 259 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::setPosition().
|
inherited |
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 238 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::setPosition().
|
protectedinherited |
Definition at line 206 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::init(), and vpSimulatorAfma6::setVelocity().
|
virtualinherited |
Reimplemented in vpRobotViper850, vpRobotViper650, vpRobotFranka, vpRobotAfma6, vpRobotAfma4, vpRobotPtu46, vpSimulatorViper850, and vpSimulatorAfma6.
Definition at line 200 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::setRobotState(), and vpSimulatorAfma6::stopMotion().
|
inlinevirtualinherited |
Set the sampling time.
delta_t | : Sampling time in second used to compute the robot displacement from the velocity applied to the robot during this time. |
Reimplemented in vpRobotWireFrameSimulator.
Definition at line 90 of file vpRobotSimulator.h.
|
virtual |
Send to the controller a velocity.
frame | : Control frame type. Only vpRobot::ARTICULAR_FRAME is implemented. |
v | : Velocity vector ![]() ![]() ![]() ![]() |
Depending on the velocity specified as input, the robot position is updated using the sampling time that can be modified using setSamplingTime().
Implements vpRobot.
Definition at line 121 of file vpSimulatorPioneerPan.cpp.
|
inlineinherited |
|
protectedinherited |
Definition at line 126 of file vpUnicycle.h.
|
protectedinherited |
Definition at line 64 of file vpRobotSimulator.h.
|
protectedinherited |
|
protectedinherited |
Definition at line 127 of file vpUnicycle.h.
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
protectedinherited |
Definition at line 235 of file vpPioneerPan.h.
|
protectedinherited |
|
protectedinherited |
Definition at line 236 of file vpPioneerPan.h.
|
protected |
Definition at line 117 of file vpSimulatorPioneerPan.h.
|
protected |
Definition at line 116 of file vpSimulatorPioneerPan.h.
|
protected |
robot / camera location in the world frame
Definition at line 108 of file vpSimulatorPioneerPan.h.
Referenced by getPosition().
|
protected |
Definition at line 109 of file vpSimulatorPioneerPan.h.
|
protected |
Definition at line 114 of file vpSimulatorPioneerPan.h.
|
protected |
Definition at line 115 of file vpSimulatorPioneerPan.h.