![]() |
Visual Servoing Platform
version 3.3.0
|
#include <vpRobotAfma6.h>
Public Types | |
enum | vpAfma6ToolType { TOOL_CCMOP, TOOL_GRIPPER, TOOL_VACUUM, TOOL_GENERIC_CAMERA, TOOL_CUSTOM } |
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 } |
Static Public Member Functions | |
static bool | readPosFile (const std::string &filename, vpColVector &q) |
static bool | savePosFile (const std::string &filename, const vpColVector &q) |
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 |
Protected Member Functions Inherited from vpAfma6 | |
static const unsigned int | njoint = 6 |
double | _coupl_56 |
double | _long_56 |
double | _joint_max [6] |
double | _joint_min [6] |
vpTranslationVector | _etc |
vpRxyzVector | _erc |
vpHomogeneousMatrix | _eMc |
vpAfma6ToolType | tool_current |
vpCameraParameters::vpCameraParametersProjType | projModel |
void | setToolType (vpAfma6::vpAfma6ToolType tool) |
Control of Irisa's gantry robot named Afma6.
Implementation of the vpRobot class in order to control Irisa's Afma6 robot. This robot is a gantry robot with six degrees of freedom manufactured in 1992 by the french Afma-Robots company. In 2008, the low level controller change for a more recent Adept technology based on the MotionBlox controller. A firewire camera is mounted on the end-effector to allow eye-in-hand visual servoing. The control of this camera is achieved by the vp1394TwoGrabber class. A ring light is attached around the camera. The control of this ring light is possible throw the vpRingLight class. A CCMOP gripper is also mounted on the end-effector. The pneumatic control of this gripper is possible throw the openGripper() or closeGripper() member functions.
This class allows to control the Afma6 gantry robot in position and velocity:
End-effector frame (vpRobot::END_EFFECTOR_FRAME) is not implemented.
All the translations are expressed in meters for positions and m/s for the velocities. Rotations are expressed in radians for the positions, and rad/s for the rotation velocities.
The direct and inverse kinematics models are implemented in the vpAfma6 class.
To communicate with the robot, you may first create an instance of this class by calling the default constructor:
This initialize the robot kinematics with the eMc extrinsic camera parameters obtained with a projection model without distortion. To set the robot kinematics with the eMc matrix obtained with a camera perspective model including distortion you need to initialize the robot with:
You can get the intrinsic camera parameters of the image I acquired with the camera, with:
To control the robot in position, you may set the controller to position control and than send the position to reach in a specific frame like here in the joint space:
The robot moves to the specified position with the default positioning velocity vpRobotAfma6::defaultPositioningVelocity. The setPositioningVelocity() method allows to change the maximal velocity used to reach the desired position.
To control the robot in velocity, you may set the controller to velocity control and than send the velocities. To end the velocity control and stop the robot you have to set the controller to the stop state. Here is an example of a velocity control in the joint space:
There is also possible to measure the robot current position with getPosition() method and the robot current velocities with the getVelocity() method.
For convenience, there is also the ability to read/write joint positions from a position file with readPosFile() and writePosFile() methods.
Definition at line 210 of file vpRobotAfma6.h.
|
inherited |
|
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 |
Robot control states.
|
explicit |
The only available constructor.
This contructor calls init() to initialise the connection with the MotionBox or low level controller, send the default eMc homogeneous matrix, power on the robot and wait 1 sec before returning to be sure the initialisation is done.
It also set the robot state to vpRobot::STATE_STOP.
To set the extrinsic camera parameters related to the eMc matrix obtained with a camera perspective projection model including the distorsion, use the code below:
Now, you can get the intrinsic camera parameters of the image I acquired with the camera, with:
Definition at line 158 of file vpRobotAfma6.cpp.
|
virtual |
bool vpRobotAfma6::checkJointLimits | ( | vpColVector & | jointsStatus | ) |
Test the joints of the robot to detect if one or more is at its limit.
jointsStatus | : A vector (size 6) of the status of the joints. For each joint, the value is equal to 1 if the joint is at its maximal limit, -1 if the joint is at its minimal value and 0 otherwise. |
Definition at line 2271 of file vpRobotAfma6.cpp.
void vpRobotAfma6::closeGripper | ( | ) |
Close the pneumatic CCMOP gripper.
Definition at line 2153 of file vpRobotAfma6.cpp.
void vpRobotAfma6::get_cMe | ( | vpHomogeneousMatrix & | cMe | ) | const |
Get the geometric transformation between the camera frame and the end-effector frame. This transformation is constant and correspond to the extrinsic camera parameters estimated by calibration.
cMe | : Transformation between the camera frame and the end-effector frame. |
Definition at line 812 of file vpRobotAfma6.cpp.
void vpRobotAfma6::get_cVe | ( | vpVelocityTwistMatrix & | cVe | ) | const |
Get the twist transformation from camera frame to end-effector frame. This transformation allows to compute a velocity expressed in the end-effector frame into the camera frame.
cVe | : Twist transformation. |
Definition at line 794 of file vpRobotAfma6.cpp.
|
inherited |
Get the robot jacobian expressed in the end-effector frame.
q | : Articular joint position of the robot. q[0], q[1], q[2] correspond to the first 3 translations expressed in meter, while q[3], q[4] and q[5] correspond to the 3 succesives rotations expressed in radians. |
eJe | : Robot jacobian expressed in the end-effector frame. |
Definition at line 862 of file vpAfma6.cpp.
Referenced by vpSimulatorAfma6::computeArticularVelocity(), vpSimulatorAfma6::get_eJe(), and vpSimulatorAfma6::getVelocity().
|
virtual |
Get the robot jacobian expressed in the end-effector frame.
To compute eJe, we communicate with the low level controller to get the articular joint position of the robot.
eJe | : Robot jacobian expressed in the end-effector frame. |
Implements vpRobot.
Definition at line 824 of file vpRobotAfma6.cpp.
|
inherited |
Get the geometric transformation between the end-effector frame and the camera or tool frame. This transformation is constant and correspond to the extrinsic camera parameters estimated by calibration.
Definition at line 829 of file vpAfma6.cpp.
|
inherited |
Get the robot jacobian expressed in the robot reference frame also called fix frame.
where is the coupling factor between join 5 and 6.
q | : Articular joint position of the robot. q[0], q[1], q[2] correspond to the first 3 translations expressed in meter, while q[3], q[4] and q[5] correspond to the 3 succesives rotations expressed in radians. |
fJe | : Robot jacobian expressed in the robot reference frame. |
Definition at line 932 of file vpAfma6.cpp.
Referenced by vpSimulatorAfma6::computeArticularVelocity(), vpSimulatorAfma6::get_fJe(), and vpSimulatorAfma6::getVelocity().
|
virtual |
Get the robot jacobian expressed in the robot reference frame also called fix frame.
To compute fJe, we communicate with the low level controller to get the articular joint position of the robot.
fJe | : Robot jacobian expressed in the reference frame. |
Implements vpRobot.
Definition at line 868 of file vpRobotAfma6.cpp.
|
inherited |
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
By forward kinematics we mean here the position and the orientation of the camera relative to the base frame given the articular positions of all the six joints.
This method is the same than getForwardKinematics(const vpColVector & q).
q | : Articular position of the six joints: q[0], q[1], q[2] correspond to the first 3 translations expressed in meter, while q[3], q[4] and q[5] correspond to the 3 succesives rotations expressed in radians. |
Definition at line 705 of file vpAfma6.cpp.
Referenced by vpSimulatorAfma6::compute_fMi(), vpSimulatorAfma6::getPosition(), and vpSimulatorAfma6::setPosition().
|
inherited |
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
By forward kinematics we mean here the position and the orientation of the camera relative to the base frame given the articular positions of all the six joints.
q | : Articular joint position of the robot. q[0], q[1], q[2] correspond to the first 3 translations expressed in meter, while q[3], q[4] and q[5] correspond to the 3 succesives rotations expressed in radians. |
fMc | The homogeneous matrix corresponding to the direct geometric model which expresses the transformation between the fix frame and the camera frame (fMc). |
Definition at line 732 of file vpAfma6.cpp.
|
inherited |
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
By forward kinematics we mean here the position and the orientation of the end effector with respect to the base frame given the articular positions of all the six joints.
q | : Articular joint position of the robot. q[0], q[1], q[2] correspond to the first 3 translations expressed in meter, while q[3], q[4] and q[5] correspond to the 3 succesives rotations expressed in radians. |
fMe | The homogeneous matrix corresponding to the direct geometric model which expresses the transformation between the fix frame and the end effector frame (fMe). |
Definition at line 765 of file vpAfma6.cpp.
|
inherited |
Get the current intrinsic camera parameters obtained by calibration.
cam | : In output, camera parameters to fill. |
image_width | : Image width used to compute camera calibration. |
image_height | : Image height used to compute camera calibration. |
The code below shows how to get the camera parameters of the camera attached to the robot.
vpRobotException::readingParametersError | : If the camera parameters are not found. |
Definition at line 1188 of file vpAfma6.cpp.
|
inherited |
Get the current intrinsic camera parameters obtained by calibration.
Camera parameters are read from /udd/fspindle/robot/Afma6/current/include/const_camera_Afma6.xml
cam | : In output, camera parameters to fill. |
I | : A B&W image send by the current camera in use. |
vpRobotException::readingParametersError | : If the camera parameters are not found. |
Definition at line 1376 of file vpAfma6.cpp.
|
inherited |
Get the current intrinsic camera parameters obtained by calibration.
Camera parameters are read from /udd/fspindle/robot/Afma6/current/include/const_camera_Afma6.xml
cam | : In output, camera parameters to fill. |
I | : A color image send by the current camera in use. |
vpRobotException::readingParametersError | : If the camera parameters are not found. |
Definition at line 1423 of file vpAfma6.cpp.
|
inlineinherited |
|
inherited |
Return the coupling factor between join 5 and 6.
Definition at line 1003 of file vpAfma6.cpp.
|
virtual |
Get the robot displacement since the last call of this method.
frame | : The frame in which the measured displacement is expressed. |
displacement | : The measured displacement since the last call of this method. The dimension of displacement is always
|
In camera or reference frame, rotations are expressed with the Euler Rxyz representation.
Implements vpRobot.
Definition at line 2183 of file vpRobotAfma6.cpp.
|
inherited |
Compute the forward kinematics (direct geometric model) as an homogeneous matrix.
By forward kinematics we mean here the position and the orientation of the camera relative to the base frame given the articular positions of all the six joints.
This method is the same than get_fMc(const vpColVector & q).
q | : Articular position of the six joints: q[0], q[1], q[2] correspond to the first 3 translations expressed in meter, while q[3], q[4] and q[5] correspond to the 3 succesives rotations expressed in radians. |
Definition at line 450 of file vpAfma6.cpp.
|
inherited |
Compute the inverse kinematics (inverse geometric model).
By inverse kinematics we mean here the six articular values of the joint positions given the position and the orientation of the camera frame relative to the base frame.
fMc | : Homogeneous matrix describing the transformation from base frame to the camera frame. |
q | : In input, the current articular joint position of the robot. In output, the solution of the inverse kinematics. Articular position of the six joints: q[0], q[1], q[2] correspond to the first 3 translations expressed in meter, while q[3], q[4] and q[5] correspond to the 3 succesives rotations expressed in radians. |
nearest | : true to return the nearest solution to q. false to return the farest. |
verbose | : Activates printings when no solution is found. |
The code below shows how to compute the inverse geometric model:
Definition at line 530 of file vpAfma6.cpp.
Referenced by vpSimulatorAfma6::initialiseCameraRelativeToObject(), and vpSimulatorAfma6::setPosition().
|
inherited |
Get max joint values.
Definition at line 989 of file vpAfma6.cpp.
|
inherited |
Get min joint values.
Definition at line 973 of file vpAfma6.cpp.
|
inherited |
Return the distance between join 5 and 6.
Definition at line 1011 of file vpAfma6.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 current position of the robot.
Similar as getPosition(const vpRobot::vpControlFrameType frame, vpColVector &, double &).
The difference is here that the timestamp is not used.
Implements vpRobot.
Definition at line 1502 of file vpRobotAfma6.cpp.
void vpRobotAfma6::getPosition | ( | const vpRobot::vpControlFrameType | frame, |
vpColVector & | position, | ||
double & | timestamp | ||
) |
Get the current position of the robot.
frame | : Control frame type in which to get the position, either :
|
position | : Measured position of the robot:
|
timestamp | : Time in second since last robot power on. |
vpRobotException::lowLevelError | : If the position cannot be get from the low level controller. |
Definition at line 1418 of file vpRobotAfma6.cpp.
void vpRobotAfma6::getPosition | ( | const vpRobot::vpControlFrameType | frame, |
vpPoseVector & | position | ||
) |
Get the current position of the robot.
Similar as getPosition(const vpRobot::vpControlFrameType frame, vpPoseVector &, double &).
The difference is here that the timestamp is not used.
Definition at line 1545 of file vpRobotAfma6.cpp.
void vpRobotAfma6::getPosition | ( | const vpRobot::vpControlFrameType | frame, |
vpPoseVector & | position, | ||
double & | timestamp | ||
) |
Get the current position of the robot. Similar as : void getPosition (const vpRobot::vpControlFrameType frame, vpColVector &position) as the difference the position is returned using a ThetaU representation.
Definition at line 1517 of file vpRobotAfma6.cpp.
double vpRobotAfma6::getPositioningVelocity | ( | void | ) |
Get the maximal velocity percentage used for a position control.
Definition at line 925 of file vpRobotAfma6.cpp.
bool vpRobotAfma6::getPowerState | ( | void | ) |
Get the robot power state indication if power is on or off.
vpRobotException::lowLevelError | : If the low level controller returns an error. |
Definition at line 764 of file vpRobotAfma6.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().
double vpRobotAfma6::getTime | ( | ) | const |
Returns the robot controller current time (in second) since last robot power on.
Definition at line 1485 of file vpRobotAfma6.cpp.
|
inlineinherited |
Get the current tool type.
Definition at line 159 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::getCameraParameters(), and vpSimulatorAfma6::initArms().
vpColVector vpRobotAfma6::getVelocity | ( | const vpRobot::vpControlFrameType | frame | ) |
Get robot velocities.
The behavior is the same than getVelocity(const vpRobot::vpControlFrameType, double &) except that the timestamp is not returned.
Definition at line 1919 of file vpRobotAfma6.cpp.
vpColVector vpRobotAfma6::getVelocity | ( | const vpRobot::vpControlFrameType | frame, |
double & | timestamp | ||
) |
Get the robot velocities.
frame | : Frame in wich velocities are mesured. |
timestamp | : Time in second since last robot power on. |
Definition at line 1903 of file vpRobotAfma6.cpp.
void vpRobotAfma6::getVelocity | ( | const vpRobot::vpControlFrameType | frame, |
vpColVector & | velocity | ||
) |
Get robot velocities.
The behavior is the same than getVelocity(const vpRobot::vpControlFrameType, vpColVector &, double &) except that the timestamp is not returned.
Definition at line 1856 of file vpRobotAfma6.cpp.
void vpRobotAfma6::getVelocity | ( | const vpRobot::vpControlFrameType | frame, |
vpColVector & | velocity, | ||
double & | timestamp | ||
) |
Get the robot velocities.
frame | : Frame in wich velocities are mesured. |
velocity | : Measured velocities. Translations are expressed in m/s and rotations in rad/s. |
timestamp | : Time in second since last robot power on. |
Definition at line 1746 of file vpRobotAfma6.cpp.
|
inherited |
Read files containing the constant parameters related to the robot tools in order to set the end-effector to tool transformation.
camera_extrinsic_parameters | : Filename containing the camera extrinsic parameters. |
Definition at line 222 of file vpAfma6.cpp.
|
inherited |
Read files containing the constant parameters related to the robot kinematics and to the end-effector to camera transformation.
camera_extrinsic_parameters | : Filename containing the constant parameters of the robot kinematics ![]() |
camera_intrinsic_parameters | : Filename containing the camera extrinsic parameters. |
Definition at line 170 of file vpAfma6.cpp.
|
virtual |
Initialise the connection with the MotionBox or low level controller, send the default eMc homogeneous matrix, power on the robot and wait 1 sec before returning to be sure the initialisation is done.
Implements vpRobot.
Definition at line 226 of file vpRobotAfma6.cpp.
void vpRobotAfma6::init | ( | vpAfma6::vpAfma6ToolType | tool, |
const std::string & | filename | ||
) |
Initialize the robot kinematics (set the eMc homogeneous parameters in the low level controller) from a file and also get the joint limits from the low-level controller.
tool | : Tool to use. |
filename | : Path of the configuration file containing the transformation between the end-effector frame and the tool frame. |
To set the transformation parameters related to the matrix, use the code below:
The configuration file should have the form below:
Definition at line 521 of file vpRobotAfma6.cpp.
void vpRobotAfma6::init | ( | vpAfma6::vpAfma6ToolType | tool, |
const vpHomogeneousMatrix & | eMc | ||
) |
Initialize the robot kinematics with user defined parameters (set the eMc homogeneous parameters in the low level controller) and also get the joint limits from the low-level controller.
tool | : Tool to use. |
eMc | : Transformation between the end-effector frame and the tool frame. |
To set the transformation parameters related to the matrix, use the code below:
Definition at line 443 of file vpRobotAfma6.cpp.
void vpRobotAfma6::init | ( | vpAfma6::vpAfma6ToolType | tool, |
vpCameraParameters::vpCameraParametersProjType | projModel = vpCameraParameters::perspectiveProjWithoutDistortion |
||
) |
Initialize the robot kinematics with the extrinsic calibration parameters associated to a specific camera (set the eMc homogeneous parameters in the low level controller) and also get the joint limits from the low-level controller.
The eMc parameters depend on the camera and the projection model in use.
tool | : Tool to use. |
projModel | : Projection model associated to the camera. |
To set the extrinsic camera parameters related to the eMc matrix obtained with a camera perspective projection model including the distorsion, use the code below:
Now, you can get the intrinsic camera parameters of the image I acquired with the camera, with:
Definition at line 346 of file vpRobotAfma6.cpp.
void vpRobotAfma6::move | ( | const std::string & | filename | ) |
Moves the robot to the joint position specified in the filename. The positioning velocity is set to 10% of the robot maximal velocity.
filename | : File containing a joint position to reach. |
Definition at line 2096 of file vpRobotAfma6.cpp.
void vpRobotAfma6::move | ( | const std::string & | filename, |
double | velocity | ||
) |
Moves the robot to the joint position specified in the filename with a specified positioning velocity.
filename | : File containing a joint position to reach. |
velocity | : Percentage of the maximal velocity. Values should be in ]0:100]. |
Definition at line 2118 of file vpRobotAfma6.cpp.
void vpRobotAfma6::openGripper | ( | ) |
Open the pneumatic CCMOP gripper.
Definition at line 2134 of file vpRobotAfma6.cpp.
|
inherited |
This function gets the robot constant parameters from a file.
filename | : File name containing the robot constant parameters, like max/min joint values, distance between 5 and 6 axis, coupling factor between axis 5 and 6, and the hand-to-eye homogeneous matrix. |
Definition at line 1023 of file vpAfma6.cpp.
void vpRobotAfma6::powerOff | ( | void | ) |
Power off the robot.
vpRobotException::lowLevelError | : If the low level controller returns an error during robot stopping. |
Definition at line 730 of file vpRobotAfma6.cpp.
void vpRobotAfma6::powerOn | ( | void | ) |
Power on the robot.
vpRobotException::lowLevelError | : If the low level controller returns an error during robot power on. |
Definition at line 663 of file vpRobotAfma6.cpp.
|
static |
Read joint positions in a specific Afma6 position file.
This position file has to start with a header. The six joint positions are given after the "R:" keyword. The first 3 values correspond to the joint translations X,Y,Z expressed in meters. The 3 last values correspond to the joint rotations A,B,C expressed in degres to be more representative for the user. Theses values are then converted in radians in q. The character "#" starting a line indicates a comment.
A typical content of such a file is given below:
filename | : Name of the position file to read. |
q | : Joint positions: X,Y,Z,A,B,C. Translations X,Y,Z are expressed in meters, while joint rotations A,B,C in radians. |
The code below shows how to read a position from a file and move the robot to this position.
Definition at line 1977 of file vpRobotAfma6.cpp.
|
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.
|
static |
Save joint (articular) positions in a specific Afma6 position file.
This position file starts with a header on the first line. After convertion of the rotations in degrees, the joint position q is written on a line starting with the keyword "R: ". See readPosFile() documentation for an example of such a file.
filename | : Name of the position file to create. |
q | : Joint positions [X,Y,Z,A,B,C] to save in the filename. Translations X,Y,Z are expressed in meters, while rotations A,B,C in radians. |
Definition at line 2061 of file vpRobotAfma6.cpp.
|
virtual |
Set the geometric transformation between the end-effector frame and the tool frame in the low level controller.
eMc | : Transformation between the end-effector frame and the tool frame. |
Reimplemented from vpAfma6.
Definition at line 390 of file vpRobotAfma6.cpp.
|
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().
void vpRobotAfma6::setPosition | ( | const std::string & | filename | ) |
Move to an absolute joint position with a given percent of max velocity. The robot state is set to position control. The percent of max velocity is to set with setPositioningVelocity(). The position to reach is defined in the position file.
filename | : Name of the position file to read. The readPosFile() documentation shows a typical content of such a position file. |
This method has the same behavior than the sample code given below;
vpRobotException::lowLevelError | : vpRobot::MIXT_FRAME and vpRobot::END_EFFECTOR_FRAME not implemented. |
vpRobotException::positionOutOfRangeError | : The requested position is out of range. |
Definition at line 1349 of file vpRobotAfma6.cpp.
|
virtual |
Move to an absolute position with a given percent of max velocity. The percent of max velocity is to set with setPositioningVelocity(). The position to reach can be specified in joint coordinates, in the camera frame or in the reference frame.
position | : A six dimension vector corresponding to the position to reach. All the positions are expressed in meters for the translations and radians for the rotations. If the position is out of range, an exception is provided. |
frame | : Frame in which the position is expressed. |
vpRobotException::lowLevelError | : vpRobot::MIXT_FRAME and vpRobot::END_EFFECTOR_FRAME not implemented. |
vpRobotException::positionOutOfRangeError | : The requested position is out of range. |
To catch the exception if the position is out of range, modify the code like:
Implements vpRobot.
Definition at line 1103 of file vpRobotAfma6.cpp.
void vpRobotAfma6::setPosition | ( | const vpRobot::vpControlFrameType | frame, |
const vpPoseVector & | pose | ||
) |
Move the robot to an absolute cartesian position with a given percent of max velocity. The percent of max velocity is to set with setPositioningVelocity(). The position to reach can only be specified in camera frame or in the reference frame. In joint, an exception is thrown.
pose | : A six dimension pose vector corresponding to the position to reach. The three first parameters are the translations in meter, the three last parameters are the rotations expressed as a theta u vector in radians. If the position is out of range, an exception is provided. |
frame | : Frame in which the position is expressed. |
vpRobotException::lowLevelError | : vpRobot::MIXT_FRAME, vpRobot::END_EFFECTOR_FRAME and vpRobot::ARTICULAR_FRAME not implemented. |
vpRobotException::positionOutOfRangeError | : The requested position is out of range. |
To catch the exception if the position is out of range, modify the code like:
Definition at line 1001 of file vpRobotAfma6.cpp.
void vpRobotAfma6::setPosition | ( | const vpRobot::vpControlFrameType | frame, |
double | pos1, | ||
double | pos2, | ||
double | pos3, | ||
double | pos4, | ||
double | pos5, | ||
double | pos6 | ||
) |
Move to an absolute position with a given percent of max velocity. The percent of max velocity is to set with setPositioningVelocity(). The position to reach can be specified in joint coordinates, in the camera frame or in the reference frame.
This method owerloads setPosition(const vpRobot::vpControlFrameType, const vpColVector &).
pos1,pos2,pos3,pos4,pos5,pos6 | : The six coordinates of the position to reach. All the positions are expressed in meters for the translations and radians for the rotations. |
frame | : Frame in which the position is expressed. |
vpRobotException::lowLevelError | : vpRobot::MIXT_FRAME and vpRobot::END_EFFECTOR_FRAME not implemented. |
vpRobotException::positionOutOfRangeError | : The requested position is out of range. |
Definition at line 1290 of file vpRobotAfma6.cpp.
void vpRobotAfma6::setPositioningVelocity | ( | double | velocity | ) |
Set the maximal velocity percentage to use for a position control.
The default positioning velocity is defined by vpRobotAfma6::defaultPositioningVelocity. This method allows to change this default positioning velocity
velocity | : Percentage of the maximal velocity. Values should be in ]0:100]. |
Definition at line 918 of file vpRobotAfma6.cpp.
|
protectedinherited |
Definition at line 206 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::init(), and vpSimulatorAfma6::setVelocity().
|
virtual |
Change the robot state.
newState | : New requested robot state. |
Reimplemented from vpRobot.
Definition at line 592 of file vpRobotAfma6.cpp.
|
inlineprotectedinherited |
Set the current tool type.
Definition at line 184 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::init().
|
virtual |
Apply a velocity to the robot.
frame | : Control frame in which the velocity is expressed. Velocities could be expressed in articular, camera frame, reference frame or mixt frame. |
vel | : Velocity vector. Translation velocities are expressed in m/s while rotation velocities in rad/s. The size of this vector is always 6. |
vpRobotException::wrongStateError | : If a the robot is not configured to handle a velocity. The robot can handle a velocity only if the velocity control mode is set. For that, call setRobotState( vpRobot::STATE_VELOCITY_CONTROL) before setVelocity(). |
Implements vpRobot.
Definition at line 1614 of file vpRobotAfma6.cpp.
|
inlineinherited |
void vpRobotAfma6::stopMotion | ( | void | ) |
Stop the robot and set the robot state to vpRobot::STATE_STOP.
vpRobotException::lowLevelError | : If the low level controller returns an error during robot stopping. |
Definition at line 641 of file vpRobotAfma6.cpp.
|
protectedinherited |
Definition at line 199 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::computeArticularVelocity(), vpSimulatorAfma6::getVelocity(), and vpSimulatorAfma6::init().
|
protectedinherited |
Definition at line 197 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::init().
|
protectedinherited |
Definition at line 196 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::init().
|
protectedinherited |
Definition at line 193 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::init(), vpSimulatorAfma6::isInJointLimit(), vpSimulatorAfma6::setJointLimit(), and vpSimulatorAfma6::updateArticularPosition().
|
protectedinherited |
Definition at line 194 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::init(), vpSimulatorAfma6::isInJointLimit(), vpSimulatorAfma6::setJointLimit(), and vpSimulatorAfma6::updateArticularPosition().
|
protectedinherited |
Definition at line 192 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::compute_fMi().
|
staticinherited |
File where constant parameters in relation with the robot are stored: joint max, min, coupling factor between 4 ant 5 joint, distance between 5 and 6 joint, tranformation eMc between end-effector and camera frame.
|
staticinherited |
|
staticinherited |
Name of the camera attached to the CCMOP tool (vpAfma6ToolType::TOOL_CCMOP).
Definition at line 99 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::getCameraParameters().
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
Name of the camera attached to the 2 fingers gripper tool (vpAfma6ToolType::TOOL_GRIPPER).
Definition at line 104 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::getCameraParameters().
|
staticinherited |
|
static |
Default positioning velocity in percentage of the maximum velocity. This value is set to 15. The member function setPositioningVelocity() allows to change this value.
Definition at line 251 of file vpRobotAfma6.h.
|
staticinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
|
staticprotectedinherited |
|
staticprotectedinherited |
|
protectedinherited |
|
staticinherited |
Number of joint.
Definition at line 184 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::init(), and vpSimulatorAfma6::readPosFile().
|
protectedinherited |
Definition at line 205 of file vpAfma6.h.
Referenced by vpSimulatorAfma6::init().
|
protectedinherited |