Skip to content

Set Force

SUMMARY

Set Force configures the default gripping force used by subsequent move, open, and close commands when those calls pass force=-1.0.

Robotiq defaults to 100% after connect. Call set_force only when a different session-level default is needed.

The Skill

python
actual_force = gripper.set_force(force=60.0)

The Code

Example: Set a Session-Level Force Baseline

python
from telekinesis.synapse.tools.parallel_grippers import robotiq

gripper = robotiq.Robotiq2F85()
# Connect
gripper.connect(ip="192.168.1.1", protocol="RTDE")
# Set default force to 60%
actual = gripper.set_force(force=60.0)
print(f"Force set to: {actual}%")
gripper.open(force=-1.0)
gripper.close(force=-1.0)
# Disconnect
gripper.disconnect()

The Explanation of the Code

set_force stores a session-level default force. It applies to subsequent move, open, and close calls when those calls pass force=-1.0. The method returns the actual force value accepted by the backend.

Default. After connect, the force is automatically set to 100% in percent units. Only call set_force to change this default.

Force unit. Force is expressed in the unit configured by set_unit("force", ...) (default: "percent" after connect, range 0–100).

-1.0 preset passthrough. Passing -1.0 instructs the backend to keep its current internal preset without overriding it from software.

Return Value

TypeDescription
floatThe actual force value accepted by the backend.

How to Tune the Parameters

Robotiq 2F-85

ParameterTypeDescription
forcefloatDesired force in percent (0–100). Pass -1.0 to use the backend's current preset.

OnRobot RG2 / RG6

ParameterTypeDescription
forcefloatDesired force in Newtons. RG2 max 40 N, RG6 max 120 N. Pass -1.0 to use the backend's current preset.

TIP

Start with a low force (20–30% for Robotiq, or ~10 N for OnRobot) for lightweight or fragile parts and increase until the grasp is secure without risking damage.

Where to Use the Skill

  • Session baseline — Set once after connecting so individual move/open/close calls can pass force=-1.0
  • Force profile switching — Re-call mid-session when switching between object types that need different gripping forces

When Not to Use the Skill

Do not call set_force when:

  • Force is passed per-call — if every move/open/close already includes an explicit force argument, this call is redundant
  • The gripper is not connected — always call connect before issuing configuration commands

Supported Grippers

GripperSupported
OnRobot RG2✅ (force in Newtons, clamped to model max)
OnRobot RG6✅ (force in Newtons, clamped to model max)
Robotiq 2F-85✅ (force in configured unit, default: percent)
Schunk EGU-50Coming Soon!