Flexiv RDK APIs  1.5
Public Member Functions | List of all members
flexiv::rdk::Gripper Class Reference

Interface with the robot gripper. More...

#include <gripper.hpp>

Public Member Functions

 Gripper (const Robot &robot)
 [Non-blocking] Create an instance and initialize gripper control interface. More...
 
void Init ()
 [Blocking] Manually trigger the initialization of the connected gripper. This step is not needed for grippers that automatically initialize upon power-on. More...
 
void Grasp (double force)
 [Non-blocking] Grasp with direct force control. Requires the mounted gripper to support direct force control. More...
 
void Move (double width, double velocity, double force_limit=0)
 [Non-blocking] Move the gripper fingers with position control. More...
 
void Stop ()
 [Blocking] Stop the gripper. More...
 
bool moving () const
 [Non-blocking] Whether the gripper fingers are moving. More...
 
const GripperStates states () const
 [Non-blocking] Access the current gripper states. More...
 

Detailed Description

Interface with the robot gripper.

Definition at line 19 of file gripper.hpp.

Constructor & Destructor Documentation

◆ Gripper()

flexiv::rdk::Gripper::Gripper ( const Robot robot)

[Non-blocking] Create an instance and initialize gripper control interface.

Parameters
[in]robotReference to the instance of flexiv::rdk::Robot.
Exceptions
std::runtime_errorif the initialization sequence failed.

Member Function Documentation

◆ Grasp()

void flexiv::rdk::Gripper::Grasp ( double  force)

[Non-blocking] Grasp with direct force control. Requires the mounted gripper to support direct force control.

Parameters
[in]forceTarget gripping force. Positive: closing force, negative: opening force [N].
Exceptions
std::logic_errorif robot is not in the correct control mode.
Note
Applicable control modes: all modes except IDLE.
Warning
Target inputs outside the valid range (specified in gripper's configuration file) will be saturated.

◆ Init()

void flexiv::rdk::Gripper::Init ( )

[Blocking] Manually trigger the initialization of the connected gripper. This step is not needed for grippers that automatically initialize upon power-on.

Note
Applicable control modes: all modes except IDLE.
This function blocks until the request is successfully delivered.
Warning
This function returns before the initialization is finished, thus additional wait is needed before the gripper can take any commands.

◆ Move()

void flexiv::rdk::Gripper::Move ( double  width,
double  velocity,
double  force_limit = 0 
)

[Non-blocking] Move the gripper fingers with position control.

Parameters
[in]widthTarget opening width [m].
[in]velocityClosing/opening velocity, cannot be 0 [m/s].
[in]force_limitMaximum output force during movement [N]. If not specified, default force limit of the mounted gripper will be used.
Exceptions
std::logic_errorif robot is not in the correct control mode.
Note
Applicable control modes: all modes except IDLE.
Warning
Target inputs outside the valid range (specified in gripper's configuration file) will be saturated.

◆ moving()

bool flexiv::rdk::Gripper::moving ( ) const

[Non-blocking] Whether the gripper fingers are moving.

Returns
True: moving, false: stopped.

◆ states()

const GripperStates flexiv::rdk::Gripper::states ( ) const

[Non-blocking] Access the current gripper states.

Returns
GripperStates value copy.
Note
Real-time (RT).

◆ Stop()

void flexiv::rdk::Gripper::Stop ( )

[Blocking] Stop the gripper.

Note
Applicable control modes: all modes.
This function blocks until the gripper control is transferred back to plan/primitive.

The documentation for this class was generated from the following file: