franky.Gripper

class franky.Gripper

Bases: pybind11_object

A wrapper around the franka::Gripper class that adds asynchronous functionality.

__init__(self: franky._franky.Gripper, fci_hostname: str) None

Establishes a connection with a gripper connected to a robot.

Parameters:

franka_address – IP/hostname of the robot the gripper is connected to.

Raises:
grasp(self: franky._franky.Gripper, width: SupportsFloat | SupportsIndex, speed: SupportsFloat | SupportsIndex, force: SupportsFloat | SupportsIndex, epsilon_inner: SupportsFloat | SupportsIndex = 0.005, epsilon_outer: SupportsFloat | SupportsIndex = 0.005) bool

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:
  • width – Size of the object to grasp in \([m]\).

  • speed – Closing speed in \([\frac{m}{s}]\).

  • force – Grasping force in \([N]\).

  • epsilon_inner – Maximum tolerated deviation when the actual grasped width is smaller than the commanded grasp width.

  • 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.

Raises:
grasp_async(self: franky._franky.Gripper, width: SupportsFloat | SupportsIndex, speed: SupportsFloat | SupportsIndex, force: SupportsFloat | SupportsIndex, epsilon_inner: SupportsFloat | SupportsIndex = 0.005, epsilon_outer: SupportsFloat | SupportsIndex = 0.005) franky._franky.BoolFuture

Asynchronous variant of the grasp function.

Parameters:
  • width – Size of the object to grasp in [m].

  • speed – Closing speed in [m/s].

  • force – Grasping force in [N].

  • epsilon_inner – Maximum tolerated deviation when the actual grasped width is smaller than the commanded grasp width.

  • epsilon_outer – Maximum tolerated deviation when the actual grasped width is larger than the commanded grasp width.

Returns:

Future that becomes ready when the grasp is finished. Contains true if an object has been grasped, false otherwise.

homing(self: franky._franky.Gripper) bool

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.

Raises:

See also

GripperState for the maximum grasping width.

homing_async(self: franky._franky.Gripper) franky._franky.BoolFuture

Asynchronous variant of the homing function.

Returns:

A future that becomes ready when the homing is finished. Contains true if the homing was successful.

move(self: franky._franky.Gripper, width: SupportsFloat | SupportsIndex, speed: SupportsFloat | SupportsIndex) bool

Moves the gripper fingers to a specified width.

Parameters:
  • width – Intended opening width in \([m]\).

  • speed – Closing speed in \([\frac{m}{s}]\).

Returns:

True if command was successful, false otherwise.

Raises:
move_async(self: franky._franky.Gripper, width: SupportsFloat | SupportsIndex, speed: SupportsFloat | SupportsIndex) franky._franky.BoolFuture

Asynchronous variant of the move function.

Parameters:
  • width – Intended opening width in [m].

  • speed – Speed of the movement in [m/s].

Returns:

Future that becomes ready when the movement is finished. Contains true if the movement was successful.

open(self: franky._franky.Gripper, speed: SupportsFloat | SupportsIndex) bool

Opens the gripper fully.

Parameters:

speed – Speed of the movement in [m/s].

Returns:

True if the gripper was opened successfully.

open_async(self: franky._franky.Gripper, speed: SupportsFloat | SupportsIndex) franky._franky.BoolFuture

Asynchronous variant of the open function.

Parameters:

speed – Speed of the movement in [m/s].

Returns:

Future that becomes ready when the gripper is fully opened. Contains true if the gripper was opened successfully.

stop(self: franky._franky.Gripper) bool

Stops a currently running gripper move or grasp.

Returns:

True if command was successful, false otherwise.

Raises:
stop_async(self: franky._franky.Gripper) franky._franky.BoolFuture

Asynchronous variant of the stop function.

Returns:

A future that becomes ready when the stop is finished. Contains true if the stop was successful.

property is_grasped

Whether the gripper is grasping

property max_width

Maximum width of the gripper [m]

property server_version

Returns the software version reported by the connected server.

Returns:

Software version of the connected server.

property state

Current gripper state.

property width

Current opening width of the gripper [m]