|
Fast Research Interface Library
Manual and Documentation
|
Cartesian impedance controller interface for the KUKA Light-Weight Robot IV. More...
#include <LWRCartImpedanceController.h>
Public Member Functions | |
| LWRCartImpedanceController (const char *InitFileName) | |
| Constructor. | |
| ~LWRCartImpedanceController (void) | |
| Destructor. | |
| int | StartRobot (const float &TimeOutValueInSeconds=120.0) |
| Starts the robot. | |
| void | GetMeasuredCartPose (float *MeasuredCartPose) |
| Reads the measured Cartesian pose frame from the latest data telegram of the KRC unit. | |
| void | SetCommandedCartPose (const float *CommandedCartPose) |
| Copies the desired Cartesian pose frame into the data telegram to be send to the KRC unit. | |
| void | SetCommandedCartForcesAndTorques (const float *CartForcesAndTorques) |
| Copies the desired Cartesian force/torque vector into the data telegram to be send to the KRC unit. | |
| void | SetCommandedCartStiffness (const float *CommandedCartStiffness) |
| Copies the desired Cartesian stiffness vector into the data telegram to be send to the KRC unit. | |
| void | SetCommandedCartDamping (const float *CommandedCartDamping) |
| Copies the desired Cartesian damping vector into the data telegram to be send to the KRC unit. | |
| void | GetEstimatedExternalCartForcesAndTorques (float *EstimatedExternalCartForcesAndTorques) |
| Reads the estimated external force and torque values w.r.t. the tool frame from the latest data telegram of the KRC unit. | |
Cartesian impedance controller interface for the KUKA Light-Weight Robot IV.
Definition at line 72 of file LWRCartImpedanceController.h.
| LWRCartImpedanceController::LWRCartImpedanceController | ( | const char * | InitFileName | ) | [inline] |
Constructor.
The constructor creates the actual object of the class FastResearchInterface, which is used by this class.This constructor performs several procedures. It
InitFileName using the method FastResearchInterface::ReadInitFile(), which further on uses an object of the class InitializationFileEntry, In case,
InitFileName cannot be opened, InitFileName does not contain all required parameters (cf. The Initialization File for the Fast Research Interface Library), or the constructor lets the calling process terminate and exits with a value of EXIT_FAILURE.
| InitFileName | A pointer to an array of char values containing the path and filename of the initialization file (e.g., "/home/lwrcontrol/etc/980039-FRI-Driver.init"). For details about this file, please refer to The Initialization File for the Fast Research Interface Library. |
SCHED_FIFO).Definition at line 87 of file LWRCartImpedanceController.h.
| LWRCartImpedanceController::~LWRCartImpedanceController | ( | void | ) | [inline] |
Destructor.
The destructor deletes the actual object of the class FastResearchInterface, which is used by this class.This destructor performs a set of procedures to cleanly shutdown the robot:
SIGTERM) will be sent to the thread FastResearchInterface::KRCCommunicationThread. Definition at line 100 of file LWRCartImpedanceController.h.
| void LWRCartImpedanceController::GetEstimatedExternalCartForcesAndTorques | ( | float * | EstimatedExternalCartForcesAndTorques | ) | [inline] |
Reads the estimated external force and torque values w.r.t. the tool frame from the latest data telegram of the KRC unit.
| EstimatedExternalCartForcesAndTorques | A pointer to an array of float values; the array has to have at least a size of six elements. The estimated external force and torque values are written into this array. |
Definition at line 208 of file LWRCartImpedanceController.h.
| void LWRCartImpedanceController::GetMeasuredCartPose | ( | float * | MeasuredCartPose | ) | [inline] |
Reads the measured Cartesian pose frame from the latest data telegram of the KRC unit.
| MeasuredCartPose | A pointer to an array of float values; the array has to have at least a size of twelve elements. The measured Cartesian pose frame is written into this array. |
Definition at line 133 of file LWRCartImpedanceController.h.
| void LWRCartImpedanceController::SetCommandedCartDamping | ( | const float * | CommandedCartDamping | ) | [inline] |
Copies the desired Cartesian damping vector into the data telegram to be send to the KRC unit.
| CommandedCartDamping | A pointer to an array of float values; the array has to have at least a size of six elements. The desired Cartesian damping vector is copied from this array. |
Definition at line 193 of file LWRCartImpedanceController.h.
| void LWRCartImpedanceController::SetCommandedCartForcesAndTorques | ( | const float * | CartForcesAndTorques | ) | [inline] |
Copies the desired Cartesian force/torque vector into the data telegram to be send to the KRC unit.
| CartForcesAndTorques | A pointer to an array of float values; the array has to have at least a size of six elements. The desired Cartesian force/torque vector is copied from this array. |
Definition at line 163 of file LWRCartImpedanceController.h.
| void LWRCartImpedanceController::SetCommandedCartPose | ( | const float * | CommandedCartPose | ) | [inline] |
Copies the desired Cartesian pose frame into the data telegram to be send to the KRC unit.
| CommandedCartPose | A pointer to an array of float values; the array has to have at least a size of twelve elements. The desired Cartesian pose frame is copied from this array. |
Definition at line 148 of file LWRCartImpedanceController.h.
| void LWRCartImpedanceController::SetCommandedCartStiffness | ( | const float * | CommandedCartStiffness | ) | [inline] |
Copies the desired Cartesian stiffness vector into the data telegram to be send to the KRC unit.
| CommandedCartStiffness | A pointer to an array of float values; the array has to have at least a size of six elements. The desired Cartesian stiffness vector is copied from this array. |
Definition at line 178 of file LWRCartImpedanceController.h.
| int LWRCartImpedanceController::StartRobot | ( | const float & | TimeOutValueInSeconds = 120.0 | ) | [inline, virtual] |
Starts the robot.
This method performs a complete start-up procedure of the robot arm. The following steps are executed:
FRIControl (cf.KRL File: FRIControl.src) is started by the user, the constructor FastResearchInterface::FastResearchInterface::() should be called in order to prevent any loss of UDP packages. friOpen() to receive UDP messages in order to let the KRC unit switch to Monitor Mode. $FRI_FRM_INT[16] to a value of 10, which lets the KRL program FRIControl call the function friStart() in order to switch from Monitor Mode to Command Mode. true.
The complete start-up procedure must not take longer than TimeOutValueInSeconds seconds. If completed successfully, the robot arm is ready for operation. This method should be used pairwise with the method FastResearchInterface::StopRobot() in order to ensure a safe and error-free operation.
| ControlMode | Either value of the enumeration FastResearchInterface::LWRControlModes:
|
| TimeOutValueInSeconds | Timeout value in seconds for the user to turn on the robot arm by using the KUKA Control Panel. The default value of this optional parameter is 120 seconds. |
ENOTCONN if no connection between the remote host and the KRC unit could be established. Please check FRIControl (cf.KRL File: FRIControl.src) has been started, or EALREADY if the KRC unit is already in command mode, that is, the KRL function friStart() was already called by a previous call of FastResearchInterface::StartRobot(). If the robot is not ready for operation (i.e., the result of FastResearchInterface::IsMachineOK() is false), call FastResearchInterface::StopRobot() first. It might be required to check whether the KRC unit is running correctly, and whether the KRL program KRL program FRIControl (cf.KRL File: FRIControl.src) is being executed. ETIME if the start-up procedure could not be completed within the specified time interval of TimeOutValueInSeconds EOK if no error occurred. Implements LWRBaseControllerInterface.
Definition at line 114 of file LWRCartImpedanceController.h.