Skip to content

Set Force Mode Gain Scaling

SUMMARY

Set Force Mode Gain Scaling adjusts how aggressively the force mode controller responds to force errors. Values above 1.0 increase responsiveness but can cause instability; values below 1.0 produce smoother but slower force tracking.

SUPPORTED ROBOTS

This skill is currently supported on Universal Robots only. Calling this method on other robot brands will raise a NotImplementedError.

The Skill

python
robot.set_force_mode_gain_scaling(scaling=0.5)

The Code

Example: Set Force Mode Gain Scaling

Set the force mode gain scaling factor before starting force mode.

python
from loguru import logger
from telekinesis.synapse.robots.manipulators import universal_robots

robot_ip = "192.168.1.2"  # replace with your robot's IP

robot = universal_robots.UniversalRobotsUR10E()
# Connect
robot.connect(ip=robot_ip)

scaling = 0.5
result = robot.set_force_mode_gain_scaling(scaling=scaling)
logger.success(f"Force mode gain scaling set to: {scaling}, result: {result}")

# Disconnect
robot.disconnect()

The Explanation of the Code

set_force_mode_gain_scaling sets the proportional gain multiplier for the force mode controller. The value must be in (0, 2]: values less than 1.0 produce slower, more stable force tracking; values greater than 1.0 produce faster tracking but increase the risk of instability. Set this before starting force mode. It is recommended to start with 0.5 and increase gradually.

How to Tune the Parameters

ParameterTypeRequiredDescription
scalingfloatYesGain scaling factor in (0, 2]. 1.0 = nominal gain.

Return Value

ValueDescription
NoneThis skill returns nothing.

Where to Use the Skill

  • Tuning responsiveness before Move in Force Mode.
  • Increasing gain for applications requiring fast force tracking (e.g., grinding).
  • Decreasing gain for slow, stable contact tasks.

When Not to Use the Skill

Use a different skill instead in these cases: