Skip to content

Get Target Speed Fraction

SUMMARY

Get Target Speed Fraction returns the speed scaling fraction that was set programmatically via the set_speed_slider skill (or equivalent). This is distinct from Get Speed Scaling, which returns the speed scaling applied by the teach pendant slider.

The combined effect of both factors is returned by Get Speed Scaling Combined.

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
fraction = robot.get_target_speed_fraction()

The Code

Example: Read the Target Speed Fraction

Connect to the robot, read the programmatic speed fraction, and log it.

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)

fraction = robot.get_target_speed_fraction()
logger.info(f"Target speed fraction: {fraction:.3f}")

# Disconnect
robot.disconnect()

The Explanation of the Code

get_target_speed_fraction returns the speed fraction in the range [0.0, 1.0] that was set programmatically. A value of 1.0 means full programmed speed; 0.5 means 50%. This factor is multiplied by the teach-pendant speed slider value to produce the combined speed scaling returned by Get Speed Scaling Combined.

How to Tune the Parameters

This skill takes no parameters.

Return Value

TypeDescription
floatProgrammatically set speed scaling fraction [0.0, 1.0].

Where to Use the Skill

  • Speed scaling diagnostics — Verify that the programmatic speed fraction is set as expected
  • Combined speed analysis — Use alongside Get Speed Scaling to understand the combined effective speed

When Not to Use the Skill

Do not use Get Target Speed Fraction when: