Maintains a network connection to the gripper, provides the current gripper state, and allows the execution of commands.  
 More...
#include <gripper.h>
 | 
| 
using  | ServerVersion = uint16_t | 
|   | Version of the gripper server. 
  | 
|   | 
 | 
|   | Gripper (const std::string &franka_address) | 
|   | Establishes a connection with a gripper connected to a robot.  
  | 
|   | 
|   | Gripper (Gripper &&gripper) noexcept | 
|   | Move-constructs a new Gripper instance.  
  | 
|   | 
| Gripper &  | operator= (Gripper &&gripper) noexcept | 
|   | Move-assigns this Gripper from another Gripper instance.  
  | 
|   | 
| 
  | ~Gripper () noexcept | 
|   | Closes the connection. 
  | 
|   | 
| bool  | homing () const | 
|   | Performs homing of the gripper.  
  | 
|   | 
| bool  | grasp (double width, double speed, double force, double epsilon_inner=0.005, double epsilon_outer=0.005) const | 
|   | Grasps an object.  
  | 
|   | 
| bool  | move (double width, double speed) const | 
|   | Moves the gripper fingers to a specified width.  
  | 
|   | 
| bool  | stop () const | 
|   | Stops a currently running gripper move or grasp.  
  | 
|   | 
| GripperState  | readOnce () const | 
|   | Waits for a gripper state update and returns it.  
  | 
|   | 
| ServerVersion  | serverVersion () const noexcept | 
|   | Returns the software version reported by the connected server.  
  | 
|   | 
Maintains a network connection to the gripper, provides the current gripper state, and allows the execution of commands. 
- Note
 - The members of this class are threadsafe. 
 
- Examples
 - grasp_object.cpp.
 
 
◆ Gripper() [1/2]
  
  
      
        
          | franka::Gripper::Gripper  | 
          ( | 
          const std::string &  | 
          franka_address | ) | 
           | 
         
       
   | 
  
explicit   | 
  
 
Establishes a connection with a gripper connected to a robot. 
- Parameters
 - 
  
    | [in] | franka_address | IP/hostname of the robot the gripper is connected to. | 
  
   
- Exceptions
 - 
  
  
 
 
 
◆ Gripper() [2/2]
  
  
      
        
          | franka::Gripper::Gripper  | 
          ( | 
          Gripper &&  | 
          gripper | ) | 
           | 
         
       
   | 
  
noexcept   | 
  
 
Move-constructs a new Gripper instance. 
- Parameters
 - 
  
  
 
 
 
◆ grasp()
      
        
          | bool franka::Gripper::grasp  | 
          ( | 
          double  | 
          width,  | 
        
        
           | 
           | 
          double  | 
          speed,  | 
        
        
           | 
           | 
          double  | 
          force,  | 
        
        
           | 
           | 
          double  | 
          epsilon_inner = 0.005,  | 
        
        
           | 
           | 
          double  | 
          epsilon_outer = 0.005  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Grasps an object. 
An object is considered grasped if the distance \(d\) between the gripper fingers satisfies \((\text{width} - \text{epsilon_inner}) < d < (\text{width} + \text{epsilon_outer})\).
- Parameters
 - 
  
    | [in] | width | Size of the object to grasp in \([m]\).  | 
    | [in] | speed | Closing speed in \([\frac{m}{s}]\).  | 
    | [in] | force | Grasping force in \([N]\).  | 
    | [in] | epsilon_inner | Maximum tolerated deviation when the actual grasped width is smaller than the commanded grasp width.  | 
    | [in] | epsilon_outer | Maximum tolerated deviation when the actual grasped width is larger than the commanded grasp width. | 
  
   
- Returns
 - True if an object has been grasped, false otherwise.
 
- Exceptions
 - 
  
  
 
- Examples
 - grasp_object.cpp.
 
 
 
◆ homing()
      
        
          | bool franka::Gripper::homing  | 
          ( | 
           | ) | 
           const | 
        
      
 
Performs homing of the gripper. 
After changing the gripper fingers, a homing needs to be done. This is needed to estimate the maximum grasping width.
- Returns
 - True if command was successful, false otherwise.
 
- Exceptions
 - 
  
  
 
- See also
 - GripperState for the maximum grasping width. 
 
- Examples
 - grasp_object.cpp.
 
 
 
◆ move()
      
        
          | bool franka::Gripper::move  | 
          ( | 
          double  | 
          width,  | 
        
        
           | 
           | 
          double  | 
          speed  | 
        
        
           | 
          ) | 
           |  const | 
        
      
 
Moves the gripper fingers to a specified width. 
- Parameters
 - 
  
    | [in] | width | Intended opening width in \([m]\).  | 
    | [in] | speed | Closing speed in \([\frac{m}{s}]\). | 
  
   
- Returns
 - True if command was successful, false otherwise.
 
- Exceptions
 - 
  
  
 
 
 
◆ operator=()
◆ readOnce()
Waits for a gripper state update and returns it. 
- Returns
 - Current gripper state.
 
- Exceptions
 - 
  
  
 
- Examples
 - grasp_object.cpp.
 
 
 
◆ serverVersion()
Returns the software version reported by the connected server. 
- Returns
 - Software version of the connected server. 
 
 
 
◆ stop()
      
        
          | bool franka::Gripper::stop  | 
          ( | 
           | ) | 
           const | 
        
      
 
Stops a currently running gripper move or grasp. 
- Returns
 - True if command was successful, false otherwise.
 
- Exceptions
 - 
  
  
 
- Examples
 - grasp_object.cpp.
 
 
 
The documentation for this class was generated from the following file: