Visual Servoing Platform
version 3.5.0 under development (2022-02-15)
|
#include <visp3/robot/vpRobotFranka.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 | |
vpRobotFranka () | |
vpRobotFranka (const std::string &franka_address, franka::RealtimeConfig realtime_config=franka::RealtimeConfig::kEnforce) | |
virtual | ~vpRobotFranka () |
void | connect (const std::string &franka_address, franka::RealtimeConfig realtime_config=franka::RealtimeConfig::kEnforce) |
vpHomogeneousMatrix | get_fMe (const vpColVector &q) |
vpHomogeneousMatrix | get_fMc (const vpColVector &q) |
vpHomogeneousMatrix | get_eMc () const |
void | get_eJe (vpMatrix &eJe) |
void | get_eJe (const vpColVector &q, vpMatrix &eJe) |
void | get_fJe (vpMatrix &fJe) |
void | get_fJe (const vpColVector &q, vpMatrix &fJe) |
void | getCoriolis (vpColVector &coriolis) |
void | getForceTorque (const vpRobot::vpControlFrameType frame, vpColVector &force) |
void | getGravity (vpColVector &gravity) |
franka::RobotState | getRobotInternalState () |
franka::Gripper * | getGripperHandler () |
franka::Robot * | getHandler () |
vpColVector | getJointMin () const |
vpColVector | getJointMax () const |
void | getMass (vpMatrix &mass) |
void | getPosition (const vpRobot::vpControlFrameType frame, vpColVector &position) |
void | getPosition (const vpRobot::vpControlFrameType frame, vpPoseVector &pose) |
void | getVelocity (const vpRobot::vpControlFrameType frame, vpColVector &d_position) |
int | gripperClose () |
int | gripperGrasp (double grasping_width, double force=60.) |
void | gripperHoming () |
int | gripperMove (double width) |
int | gripperOpen () |
void | gripperRelease () |
void | move (const std::string &filename, double velocity_percentage=10.) |
bool | readPosFile (const std::string &filename, vpColVector &q) |
bool | savePosFile (const std::string &filename, const vpColVector &q) |
void | set_eMc (const vpHomogeneousMatrix &eMc) |
void | setForceTorque (const vpRobot::vpControlFrameType frame, const vpColVector &ft, const double &filter_gain=0.1, const bool &activate_pi_controller=false) |
void | setLogFolder (const std::string &folder) |
void | setPosition (const vpRobot::vpControlFrameType frame, const vpColVector &position) |
void | setPositioningVelocity (double velocity) |
vpRobot::vpRobotStateType | setRobotState (vpRobot::vpRobotStateType newState) |
void | setVelocity (const vpRobot::vpControlFrameType frame, const vpColVector &vel) |
void | stopMotion () |
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 (double maxVr) |
void | setMaxTranslationVelocity (double maxVt) |
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 |
This class is a wrapper over the libfranka component part of the Franka Control Interface (FCI).
Before using vpRobotFranka follow the installation instructions to install libfranka. We suggest to build libfranka from source if you are not using ROS.
Moreover, you need also to setup a real-time kernel following these instructions.
Up to now, this class provides the following capabilities to:
What is not implemented is:
Known issues:
We provide also the getHandler() function that allows to acces to the robot handler and call the native libfranka API fonctionalities:
Definition at line 223 of file vpRobotFranka.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 |
Robot control states.
vpRobotFranka::vpRobotFranka | ( | ) |
Default constructor.
Definition at line 56 of file vpRobotFranka.cpp.
vpRobotFranka::vpRobotFranka | ( | const std::string & | franka_address, |
franka::RealtimeConfig | realtime_config = franka::RealtimeConfig::kEnforce |
||
) |
Establishes a connection with the robot.
[in] | franka_address | IP/hostname of the robot. |
[in] | realtime_config | If set to kEnforce, an exception will be thrown if realtime priority cannot be set when required. Setting realtime_config to kIgnore disables this behavior. |
Definition at line 74 of file vpRobotFranka.cpp.
References connect(), and vpRobot::nDof.
|
virtual |
Destructor.
Definition at line 105 of file vpRobotFranka.cpp.
References setRobotState(), and vpRobot::STATE_STOP.
void vpRobotFranka::connect | ( | const std::string & | franka_address, |
franka::RealtimeConfig | realtime_config = franka::RealtimeConfig::kEnforce |
||
) |
Establishes a connection with the robot and set default behavior.
[in] | franka_address | IP/hostname of the robot. |
[in] | realtime_config | If set to kEnforce, an exception will be thrown if realtime priority cannot be set when required. Setting realtime_config to kIgnore disables this behavior. |
Definition at line 129 of file vpRobotFranka.cpp.
References vpException::fatalError.
Referenced by vpRobotFranka().
|
virtual |
Gets the robot Jacobian in the end-effector frame relative to the end-effector frame represented as a 6x7 matrix in row-major format and computed from the robot current joint position.
[out] | eJe_ | : Body Jacobian expressed in the end-effector frame. |
Implements vpRobot.
Definition at line 490 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), and vpArray2D< Type >::resize().
void vpRobotFranka::get_eJe | ( | const vpColVector & | q, |
vpMatrix & | eJe_ | ||
) |
Gets the robot Jacobian in the end-effector frame relative to the end-effector frame represented as a 6x7 matrix in row-major format and computed from the robot current joint position.
[in] | q | : 7-dim vector corresponding to the robot joint position [rad]. |
[out] | eJe_ | : Body Jacobian expressed in the end-effector frame. |
Definition at line 514 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), and vpArray2D< Type >::resize().
vpHomogeneousMatrix vpRobotFranka::get_eMc | ( | ) | const |
Return the homogeneous transformation that gives the position of the camera frame (or in general of any tool frame) in the robot end-effector frame.
By default, this transformation is set to identity, meaning that the camera (or tool) frame is located on the end-effector.
To change the position of the camera (or tool) frame on the end-effector frame, use set_eMc().
Definition at line 1014 of file vpRobotFranka.cpp.
Referenced by getForceTorque().
|
virtual |
Gets the robot Jacobian in the end-effector frame relative to the base frame represented as a 6x7 matrix in row-major format and computed from the robot current joint position.
[out] | fJe_ | : Zero Jacobian expressed in the base frame. |
Implements vpRobot.
Definition at line 542 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), and vpArray2D< Type >::resize().
void vpRobotFranka::get_fJe | ( | const vpColVector & | q, |
vpMatrix & | fJe_ | ||
) |
Gets the robot Jacobian in the end-effector frame relative to the base frame represented as a 6x7 matrix in row-major format and computed from the robot joint position given as input.
[in] | q | : 7-dim vector corresponding to the robot joint position [rad]. |
[out] | fJe_ | : Zero Jacobian expressed in the base frame. |
Definition at line 566 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), vpArray2D< Type >::resize(), and vpArray2D< Type >::size().
vpHomogeneousMatrix vpRobotFranka::get_fMc | ( | const vpColVector & | q | ) |
Given the joint position of the robot, computes the forward kinematics (direct geometric model) as an homogeneous matrix that gives the position of the camera frame (or in general of any tool attached to the robot) in the robot base frame.
By default, the transformation that corresponds to the transformation between the end-effector and the camera (or tool) frame is set to identity, meaning that the camera (or tool) frame is located on the end-effector.
To change the position of the camera (or tool) frame , use set_eMc().
[in] | q | : Joint position as a 7-dim vector. |
Definition at line 435 of file vpRobotFranka.cpp.
References get_fMe().
Referenced by getPosition().
vpHomogeneousMatrix vpRobotFranka::get_fMe | ( | const vpColVector & | q | ) |
Given the joint position of the robot, computes the forward kinematics (direct geometric model) as an homogeneous matrix that gives the position of the end-effector in the robot base frame.
[in] | q | : Joint position as a 7-dim vector. |
Definition at line 395 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), and vpArray2D< Type >::size().
Referenced by get_fMc(), and getPosition().
void vpRobotFranka::getCoriolis | ( | vpColVector & | coriolis | ) |
Get the Coriolis force vector (state-space equation) calculated from the current robot state: , in .
[out] | coriolis | : Coriolis force vector. |
Definition at line 324 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), and vpColVector::resize().
void vpRobotFranka::getForceTorque | ( | const vpRobot::vpControlFrameType | frame, |
vpColVector & | force | ||
) |
Get robot force torque.
[in] | frame | : Type of forces and torques to retrieve. Admissible values are:
|
[out] | force | : Measured forced and torques. |
If you want to get a cartesian position, use rather getPosition(const vpRobot::vpControlFrameType, vpPoseVector &)
Definition at line 241 of file vpRobotFranka.cpp.
References vpRobot::END_EFFECTOR_FRAME, vpException::fatalError, get_eMc(), getRobotInternalState(), vpHomogeneousMatrix::inverse(), vpRobot::JOINT_STATE, vpColVector::resize(), and vpRobot::TOOL_FRAME.
void vpRobotFranka::getGravity | ( | vpColVector & | gravity | ) |
Get the gravity vector calculated form the current robot state. Unit: .
[out] | gravity | : Gravity vector |
Definition at line 346 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), and vpColVector::resize().
|
inline |
Get gripper handler to access native libfranka functions.
Definition at line 300 of file vpRobotFranka.h.
References vpException::fatalError.
|
inline |
Get robot handler to access native libfranka functions.
Definition at line 314 of file vpRobotFranka.h.
References vpException::fatalError, vpRobot::getPosition(), vpRobot::setPosition(), vpRobot::setRobotState(), and vpRobot::setVelocity().
vpColVector vpRobotFranka::getJointMax | ( | ) | const |
Gets maximum joint values.
Definition at line 995 of file vpRobotFranka.cpp.
vpColVector vpRobotFranka::getJointMin | ( | ) | const |
Gets minimal joint values.
Definition at line 982 of file vpRobotFranka.cpp.
void vpRobotFranka::getMass | ( | vpMatrix & | mass | ) |
Get the 7x7 mass matrix. Unit: .
[out] | mass | : 7x7 mass matrix, row-major. |
Definition at line 368 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), and vpArray2D< Type >::resize().
|
inherited |
Get the maximal rotation velocity that can be sent to the robot during a velocity control.
Definition at line 273 of file vpRobot.cpp.
References vpRobot::maxRotationVelocity.
Referenced by vpSimulatorAfma6::computeArticularVelocity(), vpSimulatorViper850::computeArticularVelocity(), vpSimulatorAfma6::findHighestPositioningSpeed(), vpSimulatorViper850::findHighestPositioningSpeed(), vpSimulatorAfma6::setPosition(), vpRobotTemplate::setVelocity(), vpSimulatorCamera::setVelocity(), vpRobotCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpRobotPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpRobotKinova::setVelocity(), vpRobotFlirPtu::setVelocity(), vpSimulatorAfma6::setVelocity(), vpSimulatorViper850::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), setVelocity(), vpRobotViper650::setVelocity(), and vpRobotViper850::setVelocity().
|
inherited |
Get the maximal translation velocity that can be sent to the robot during a velocity control.
Definition at line 251 of file vpRobot.cpp.
References vpRobot::maxTranslationVelocity.
Referenced by vpSimulatorAfma6::setPosition(), vpRobotTemplate::setVelocity(), vpSimulatorCamera::setVelocity(), vpRobotCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpRobotPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpRobotKinova::setVelocity(), vpRobotFlirPtu::setVelocity(), vpSimulatorAfma6::setVelocity(), vpSimulatorViper850::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), setVelocity(), vpRobotViper650::setVelocity(), and vpRobotViper850::setVelocity().
|
inherited |
Return the current robot position in the specified frame.
Definition at line 216 of file vpRobot.cpp.
References vpRobot::getPosition().
|
virtual |
Get robot position.
[in] | frame | : Type of position to retrieve. Admissible values are:
|
[out] | position | : Robot position. When joint position is asked this vector is 7-dim. Otherwise for a cartesian position this vector is 6-dim. Its content is similar to a vpPoseVector, with first the 3 tranlations in meter and then the 3 orientations in radian as a vector (see vpThetaUVector). |
If you want to get a cartesian position, use rather getPosition(const vpRobot::vpControlFrameType, vpPoseVector &)
Implements vpRobot.
Definition at line 187 of file vpRobotFranka.cpp.
References vpRobot::END_EFFECTOR_FRAME, vpException::fatalError, get_fMc(), get_fMe(), getRobotInternalState(), vpRobot::JOINT_STATE, vpColVector::resize(), and vpRobot::TOOL_FRAME.
void vpRobotFranka::getPosition | ( | const vpRobot::vpControlFrameType | frame, |
vpPoseVector & | pose | ||
) |
Get robot cartesian position.
[in] | frame | : Type of cartesian position to retrieve. Admissible values are:
|
[out] | pose | : Robot cartesian position. This vector is 6-dim. Its content is similar to a vpPoseVector, with first the 3 tranlations in meter and then the 3 orientations in radian as a vector (see vpThetaUVector). |
Definition at line 451 of file vpRobotFranka.cpp.
References vpPoseVector::buildFrom(), vpRobot::END_EFFECTOR_FRAME, vpException::fatalError, getRobotInternalState(), vpRobot::JOINT_STATE, and vpRobot::TOOL_FRAME.
|
inlineprotectedinherited |
Definition at line 172 of file vpRobot.h.
Referenced by vpSimulatorAfma6::computeArticularVelocity(), and vpSimulatorViper850::computeArticularVelocity().
franka::RobotState vpRobotFranka::getRobotInternalState | ( | ) |
Definition at line 956 of file vpRobotFranka.cpp.
References vpException::fatalError.
Referenced by get_eJe(), get_fJe(), get_fMe(), getCoriolis(), getForceTorque(), getGravity(), getMass(), getPosition(), getVelocity(), and setForceTorque().
|
inlinevirtualinherited |
Definition at line 144 of file vpRobot.h.
Referenced by vpRobotBiclops::getPosition(), vpRobotBiclops::getVelocity(), vpRobotPtu46::setPosition(), vpRobotBiclops::setPosition(), vpSimulatorCamera::setPosition(), vpRobotCamera::setPosition(), vpSimulatorAfma6::setPosition(), vpRobotAfma4::setPosition(), vpSimulatorViper850::setPosition(), vpRobotAfma6::setPosition(), setPosition(), vpRobotViper650::setPosition(), vpRobotViper850::setPosition(), vpRobotPtu46::setRobotState(), vpRobotBiclops::setRobotState(), vpRobotFlirPtu::setRobotState(), vpSimulatorAfma6::setRobotState(), vpSimulatorViper850::setRobotState(), vpRobotAfma4::setRobotState(), vpRobotAfma6::setRobotState(), setRobotState(), vpRobotViper650::setRobotState(), vpRobotViper850::setRobotState(), vpRobotTemplate::setVelocity(), vpRobotBiclops::setVelocity(), vpRobotPtu46::setVelocity(), vpSimulatorCamera::setVelocity(), vpRobotCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpRobotKinova::setVelocity(), vpRobotFlirPtu::setVelocity(), vpSimulatorAfma6::setVelocity(), vpSimulatorViper850::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), setVelocity(), vpRobotViper650::setVelocity(), vpRobotViper850::setVelocity(), vpRobotFlirPtu::stopMotion(), vpSimulatorAfma6::stopMotion(), vpSimulatorViper850::stopMotion(), stopMotion(), vpRobotViper650::stopMotion(), and vpRobotViper850::stopMotion().
void vpRobotFranka::getVelocity | ( | const vpRobot::vpControlFrameType | frame, |
vpColVector & | d_position | ||
) |
Get robot velocity.
[in] | frame | : Type of velocity to retrieve. Admissible values are:
|
[out] | d_position | : Robot velocity. When joints velocity is asked this vector is 7-dim. Otherwise for a cartesian velocity this vector is 6-dim. Its content is similar to a vpPoseVector, with first the 3 tranlations in meter and then the 3 orientations in radian as a vector (see vpThetaUVector). |
Definition at line 295 of file vpRobotFranka.cpp.
References vpException::fatalError, getRobotInternalState(), vpRobot::JOINT_STATE, and vpColVector::resize().
int vpRobotFranka::gripperClose | ( | ) |
Closes the gripper.
Definition at line 1276 of file vpRobotFranka.cpp.
References gripperMove().
int vpRobotFranka::gripperGrasp | ( | double | grasping_width, |
double | force = 60. |
||
) |
Grasp an object that has a given width.
An object is considered grasped if the distance d between the gripper fingers satisfies grasping_width - 0.005 < d < grasping_width + 0.005.
[in] | grasping_width | : Size of the object to grasp. [m] |
[in] | force | : Grasping force. [N] |
Definition at line 1335 of file vpRobotFranka.cpp.
void vpRobotFranka::gripperHoming | ( | ) |
Performing a gripper homing.
Definition at line 1227 of file vpRobotFranka.cpp.
References vpException::fatalError.
int vpRobotFranka::gripperMove | ( | double | width | ) |
Moves the gripper fingers to a specified width.
[in] | width | : Intended opening width. [m] |
Definition at line 1247 of file vpRobotFranka.cpp.
References vpException::fatalError.
Referenced by gripperClose().
int vpRobotFranka::gripperOpen | ( | ) |
Closes the gripper.
Definition at line 1289 of file vpRobotFranka.cpp.
References vpException::fatalError.
void vpRobotFranka::gripperRelease | ( | ) |
Release an object that is grasped.
Definition at line 1310 of file vpRobotFranka.cpp.
References vpException::fatalError.
void vpRobotFranka::move | ( | const std::string & | filename, |
double | velocity_percentage = 10. |
||
) |
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. |
velocity_percentage | : Velocity percentage. Values in range [1, 100]. |
Definition at line 1045 of file vpRobotFranka.cpp.
References vpRobot::JOINT_STATE, readPosFile(), setPosition(), setPositioningVelocity(), setRobotState(), and vpRobot::STATE_POSITION_CONTROL.
bool vpRobotFranka::readPosFile | ( | const std::string & | filename, |
vpColVector & | q | ||
) |
Read joint positions in a specific Franka position file.
This position file has to start with a header. The seven joint positions are given after the "R:" keyword and are 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:
[in] | filename | : Name of the position file to read. |
[out] | q | : 7-dim joint positions: q1 q2 q3 q4 q5 q6 q7 with values expressed in radians. |
The code below shows how to read a position from a file and move the robot to this position.
Definition at line 1099 of file vpRobotFranka.cpp.
References vpMath::rad(), vpColVector::resize(), and vpIoTools::splitChain().
Referenced by move().
|
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 163 of file vpRobot.cpp.
References vpException::dimensionError, and vpArray2D< Type >::size().
Referenced by vpRobotTemplate::setVelocity(), vpSimulatorCamera::setVelocity(), vpRobotCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpRobotPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpRobotKinova::setVelocity(), vpRobotFlirPtu::setVelocity(), vpRobotAfma4::setVelocity(), vpRobotAfma6::setVelocity(), setVelocity(), vpRobotViper650::setVelocity(), and vpRobotViper850::setVelocity().
bool vpRobotFranka::savePosFile | ( | const std::string & | filename, |
const vpColVector & | q | ||
) |
Save joint positions in a specific Panda 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 vector to save in the filename with values expressed in radians. |
Definition at line 1182 of file vpRobotFranka.cpp.
References vpMath::deg().
void vpRobotFranka::set_eMc | ( | const vpHomogeneousMatrix & | eMc | ) |
Set the homogeneous transformation that gives the position of the camera frame (or in general of any tool frame) in the robot end-effector frame.
By default, this transformation is set to identity, meaning that the camera (or tool) frame is located on the end-effector.
This transformation has to be set before controlling the robot cartesian velocity in the camera frame or getting the position of the robot in the camera frame.
[in] | eMc | : End-effector to camera frame transformation. |
Definition at line 1031 of file vpRobotFranka.cpp.
void vpRobotFranka::setForceTorque | ( | const vpRobot::vpControlFrameType | frame, |
const vpColVector & | ft, | ||
const double & | filter_gain = 0.1 , |
||
const bool & | activate_pi_controller = false |
||
) |
Definition at line 906 of file vpRobotFranka.cpp.
References vpRobot::END_EFFECTOR_FRAME, getRobotInternalState(), vpRobot::JOINT_STATE, vpRobot::MIXT_FRAME, vpRobot::REFERENCE_FRAME, vpArray2D< Type >::size(), vpRobot::TOOL_FRAME, and vpRobotException::wrongStateError.
void vpRobotFranka::setLogFolder | ( | const std::string & | folder | ) |
Set the folder or directory used to record logs at 1Kz when setVelocity() is used. By default the log folder is empty.
When the log folder is empty, logs are not created.
[in] | folder | : A path to a folder that will contain a basket of log files. If the folder doesn't exist it will be created recursively. |
Definition at line 600 of file vpRobotFranka.cpp.
References vpIoTools::checkDirectory(), vpException::fatalError, and vpIoTools::makeDirectory().
|
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 260 of file vpRobot.cpp.
References vpRobot::maxRotationVelocity.
Referenced by vpRobotViper650::getControlMode(), vpRobotViper850::getControlMode(), vpRobotViper650::setMaxRotationVelocity(), vpRobotViper850::setMaxRotationVelocity(), vpSimulatorAfma6::setPosition(), vpRobotCamera::vpRobotCamera(), and vpSimulatorCamera::vpSimulatorCamera().
|
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 239 of file vpRobot.cpp.
References vpRobot::maxTranslationVelocity.
Referenced by vpSimulatorAfma6::setPosition(), vpRobotCamera::vpRobotCamera(), and vpSimulatorCamera::vpSimulatorCamera().
|
virtual |
Set robot position. This function is blocking; it returns when the desired position is reached.
[in] | frame | : The only possible value is vpRobot::JOINT_STATE. Other values are not implemented. |
[in] | position | : This is a 7-dim vector that corresponds to the robot joint positions expressed in rad. |
Implements vpRobot.
Definition at line 625 of file vpRobotFranka.cpp.
References vpException::fatalError, vpException::functionNotImplementedError, vpRobot::getRobotState(), vpRobot::JOINT_STATE, setRobotState(), and vpRobot::STATE_POSITION_CONTROL.
Referenced by move().
void vpRobotFranka::setPositioningVelocity | ( | double | velocity | ) |
Set the maximal velocity percentage to use for a position control.
[in] | velocity | : Percentage of the maximal velocity. Values should be in ]0:100]. |
Definition at line 673 of file vpRobotFranka.cpp.
Referenced by move().
|
protectedinherited |
Definition at line 207 of file vpRobot.cpp.
Referenced by vpSimulatorAfma6::init(), vpSimulatorViper850::init(), vpSimulatorCamera::setVelocity(), vpSimulatorPioneer::setVelocity(), vpSimulatorPioneerPan::setVelocity(), vpSimulatorAfma6::setVelocity(), and vpSimulatorViper850::setVelocity().
|
virtual |
Change the robot state.
[in] | newState | : New requested robot state. |
Reimplemented from vpRobot.
Definition at line 684 of file vpRobotFranka.cpp.
References vpRobot::getRobotState(), vpRobot::setRobotState(), vpRobot::STATE_FORCE_TORQUE_CONTROL, vpRobot::STATE_POSITION_CONTROL, vpRobot::STATE_STOP, and vpRobot::STATE_VELOCITY_CONTROL.
Referenced by move(), setPosition(), stopMotion(), and ~vpRobotFranka().
|
virtual |
Apply a velocity to the robot.
[in] | frame | : Control frame in which the velocity is expressed. Velocities could be expressed as joint velocities, cartesian velocity twist expressed in the robot reference frame, in the end-effector frame or in the camera or tool frame. |
[in] | vel | : Velocity vector. Translation velocities are expressed in m/s while rotation velocities in rad/s. The size of this vector is always 6 for a cartesian velocity skew, and 7 for joint velocities. |
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 831 of file vpRobotFranka.cpp.
References vpRobot::END_EFFECTOR_FRAME, vpRobot::getMaxRotationVelocity(), vpRobot::getMaxTranslationVelocity(), vpRobot::getRobotState(), vpRobot::JOINT_STATE, vpRobot::MIXT_FRAME, vpRobot::REFERENCE_FRAME, vpRobot::saturateVelocities(), vpArray2D< Type >::size(), vpRobot::STATE_VELOCITY_CONTROL, vpRobot::TOOL_FRAME, and vpRobotException::wrongStateError.
Referenced by stopMotion().
|
inlineinherited |
Definition at line 159 of file vpRobot.h.
Referenced by vpRobotAfma4::vpRobotAfma4(), vpRobotAfma6::vpRobotAfma6(), vpRobotViper650::vpRobotViper650(), and vpRobotViper850::vpRobotViper850().
void vpRobotFranka::stopMotion | ( | void | ) |
Stop the robot when it is controlled in velocity 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 1212 of file vpRobotFranka.cpp.
References vpRobot::getRobotState(), vpRobot::JOINT_STATE, setRobotState(), setVelocity(), vpRobot::STATE_STOP, and vpRobot::STATE_VELOCITY_CONTROL.
|
protectedinherited |
Definition at line 112 of file vpRobot.h.
Referenced by vpRobot::operator=(), vpRobotCamera::vpRobotCamera(), vpSimulatorCamera::vpSimulatorCamera(), vpSimulatorPioneer::vpSimulatorPioneer(), and vpSimulatorPioneerPan::vpSimulatorPioneerPan().
|
protectedinherited |
robot Jacobian expressed in the end-effector frame
Definition at line 104 of file vpRobot.h.
Referenced by vpRobotFlirPtu::get_eJe(), vpSimulatorCamera::get_eJe(), vpRobotCamera::get_eJe(), vpRobot::operator=(), vpRobotAfma4::setVelocity(), vpRobotCamera::vpRobotCamera(), and vpSimulatorCamera::vpSimulatorCamera().
|
protectedinherited |
is the robot Jacobian expressed in the end-effector frame available
Definition at line 106 of file vpRobot.h.
Referenced by vpRobot::operator=(), vpRobotCamera::vpRobotCamera(), vpSimulatorCamera::vpSimulatorCamera(), vpSimulatorPioneer::vpSimulatorPioneer(), and vpSimulatorPioneerPan::vpSimulatorPioneerPan().
|
protectedinherited |
robot Jacobian expressed in the robot reference frame available
Definition at line 108 of file vpRobot.h.
Referenced by vpRobotFlirPtu::get_fJe(), and vpRobot::operator=().
|
protectedinherited |
is the robot Jacobian expressed in the robot reference frame available
Definition at line 110 of file vpRobot.h.
Referenced by vpRobot::operator=(), vpRobotCamera::vpRobotCamera(), vpSimulatorCamera::vpSimulatorCamera(), vpSimulatorPioneer::vpSimulatorPioneer(), and vpSimulatorPioneerPan::vpSimulatorPioneerPan().
|
protectedinherited |
Definition at line 98 of file vpRobot.h.
Referenced by vpRobot::getMaxRotationVelocity(), vpRobotTemplate::init(), vpRobotFlirPtu::init(), vpRobotKinova::init(), vpRobot::operator=(), vpRobot::setMaxRotationVelocity(), vpRobotPtu46::setVelocity(), vpRobotViper650::vpRobotViper650(), and vpRobotViper850::vpRobotViper850().
|
staticprotectedinherited |
Definition at line 99 of file vpRobot.h.
Referenced by vpRobotTemplate::init(), vpRobotFlirPtu::init(), and vpRobotKinova::init().
|
protectedinherited |
Definition at line 96 of file vpRobot.h.
Referenced by vpRobot::getMaxTranslationVelocity(), vpRobotTemplate::init(), vpRobotFlirPtu::init(), vpRobotKinova::init(), vpRobot::operator=(), and vpRobot::setMaxTranslationVelocity().
|
staticprotectedinherited |
Definition at line 97 of file vpRobot.h.
Referenced by vpRobotTemplate::init(), vpRobotFlirPtu::init(), and vpRobotKinova::init().
|
protectedinherited |
number of degrees of freedom
Definition at line 102 of file vpRobot.h.
Referenced by vpRobotKinova::getJointPosition(), vpRobotTemplate::init(), vpRobotFlirPtu::init(), vpRobotKinova::init(), vpRobot::operator=(), vpRobotKinova::setDoF(), vpRobotKinova::setJointVelocity(), vpRobotKinova::setPosition(), vpRobotTemplate::setVelocity(), vpRobotFlirPtu::setVelocity(), vpRobotKinova::setVelocity(), vpRobotCamera::vpRobotCamera(), vpRobotFranka(), vpSimulatorCamera::vpSimulatorCamera(), vpSimulatorPioneer::vpSimulatorPioneer(), and vpSimulatorPioneerPan::vpSimulatorPioneerPan().
|
protectedinherited |
Definition at line 114 of file vpRobot.h.
Referenced by vpRobot::operator=(), vpRobotCamera::vpRobotCamera(), vpSimulatorCamera::vpSimulatorCamera(), vpSimulatorPioneer::vpSimulatorPioneer(), vpSimulatorPioneerPan::vpSimulatorPioneerPan(), and vpRobot::~vpRobot().
|
protectedinherited |
Definition at line 113 of file vpRobot.h.
Referenced by vpRobot::operator=(), vpRobotCamera::vpRobotCamera(), vpSimulatorCamera::vpSimulatorCamera(), vpSimulatorPioneer::vpSimulatorPioneer(), vpSimulatorPioneerPan::vpSimulatorPioneerPan(), and vpRobot::~vpRobot().
|
protectedinherited |
Definition at line 116 of file vpRobot.h.
Referenced by vpRobotAfma4::init(), vpRobotAfma6::init(), vpRobotViper650::init(), vpRobotViper850::init(), vpRobot::operator=(), vpRobotAfma4::vpRobotAfma4(), vpRobotAfma6::vpRobotAfma6(), vpRobotViper650::vpRobotViper650(), and vpRobotViper850::vpRobotViper850().